From 8c37071d49cd3246675b938d4f48822563fbcc8b Mon Sep 17 00:00:00 2001 From: bigJIU <1572204178@qq.com> Date: Thu, 20 Oct 2022 22:48:14 +0800 Subject: [PATCH] Post success --- .idea/MarioWeb.iml | 14 ++++ .idea/artifacts/Mario_AI_Interface_jar.xml | 8 -- .idea/libraries/Mario_AI_Interface.xml | 9 --- .idea/misc.xml | 4 +- .idea/modules.xml | 2 +- .idea/vcs.xml | 2 +- .idea/workspace.xml | 82 ++++++++++++++++----- Flask/main.py | 16 ---- __pycache__/main.cpython-39.pyc | Bin 0 -> 909 bytes main.py | 22 ++++++ play.html | 14 +++- templates/play.html | 54 ++++++++++++++ 12 files changed, 171 insertions(+), 56 deletions(-) create mode 100644 .idea/MarioWeb.iml delete mode 100644 .idea/artifacts/Mario_AI_Interface_jar.xml delete mode 100644 .idea/libraries/Mario_AI_Interface.xml delete mode 100644 Flask/main.py create mode 100644 __pycache__/main.cpython-39.pyc create mode 100644 main.py create mode 100644 templates/play.html diff --git a/.idea/MarioWeb.iml b/.idea/MarioWeb.iml new file mode 100644 index 0000000..37901ac --- /dev/null +++ b/.idea/MarioWeb.iml @@ -0,0 +1,14 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/artifacts/Mario_AI_Interface_jar.xml b/.idea/artifacts/Mario_AI_Interface_jar.xml deleted file mode 100644 index 619f216..0000000 --- a/.idea/artifacts/Mario_AI_Interface_jar.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - $USER_HOME$/Documents/MarioGAN/cheerpj_2.3 - - - - - \ No newline at end of file diff --git a/.idea/libraries/Mario_AI_Interface.xml b/.idea/libraries/Mario_AI_Interface.xml deleted file mode 100644 index 1c80183..0000000 --- a/.idea/libraries/Mario_AI_Interface.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 0e05be0..d56657a 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,4 @@ - - - + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index 3e4201b..8086adc 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 35eb1dd..94a25f7 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index b1d20ac..7dd98c7 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,14 +1,15 @@ - - - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/Flask/main.py b/Flask/main.py deleted file mode 100644 index 5596b44..0000000 --- a/Flask/main.py +++ /dev/null @@ -1,16 +0,0 @@ -# This is a sample Python script. - -# Press Shift+F10 to execute it or replace it with your code. -# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings. - - -def print_hi(name): - # Use a breakpoint in the code line below to debug your script. - print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint. - - -# Press the green button in the gutter to run the script. -if __name__ == '__main__': - print_hi('PyCharm') - -# See PyCharm help at https://www.jetbrains.com/help/pycharm/ diff --git a/__pycache__/main.cpython-39.pyc b/__pycache__/main.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ac829f0c3d397e370232d6ae25901a96469664bc GIT binary patch literal 909 zcmY*X&2AJi430B1JG0x}{v9}R=yflxRBi|%q#|yVqJoe{D~+b>bUWLboyEzBwkoG` z?K{A+&%s;d%86I#2|G(gi4@0nV*C5-l%vr=@%ov+pFYz{{SxExirIL@+g`Ikg;1*o za%gm}n<$T(IFFkoPe2(kJ=7T8>O3{+_YC77fC=`#sT;`q!IQEl!+!7#OgiT`IG6#h z-D(`-DEQYn%lf&d3%(!X25#O0DBL<$N=Pw) z`0#3TdAWb)ntI1^ogM4ws?W7Acg1%H`QYz0UyOkwPD0Y%J4I`J+&@2fKKW=3*$H;# zSvxtRcFrj6@F{TQZd_A5%t`$>&!+_)td@NDHScxG&@!3NvL2dava2=9f`1t7E@dxf< z+8B4%qW!OR@=lP2TKlXxH3tNq;;z#OH#|Y7*%t*Zb_oVc+Ij=W{HsE9X^SI6HCktF z+#`YQd#j2*SyHudKAzilK~jx+BBZg8M4*w*jC;-WB#q5jC_R7-20%|(_gPU$SBpXj zC1_5%+2MHPlT-OtB&=7Xlk)#6N!X%nOi}o#TrPb=ZO7A+8LU8u+!1w)M{okVRcl`~ aEq1keDMPW_ES~D2W>7KjXdMQ<4E_K$C&@Vg literal 0 HcmV?d00001 diff --git a/main.py b/main.py new file mode 100644 index 0000000..2b96db4 --- /dev/null +++ b/main.py @@ -0,0 +1,22 @@ +from flask import Flask, render_template, request, redirect, url_for + +app = Flask(__name__,static_folder='') + +@app.route('/') +def index(): + py2htmlstr = 'py2html test str' + return render_template('play.html',py2htmlstr = py2htmlstr) + +@app.route('/dataPage') +def dataPage(data): + return data + +@app.route('/',methods = ['POST']) +def getData(): + if request.method == 'POST': + print("POST") + print(request.json) + return redirect(url_for('dataPage',data = request.json)) + +if __name__ == '__main__': + app.run(debug=True) \ No newline at end of file diff --git a/play.html b/play.html index 78aaca8..9ef3ebc 100644 --- a/play.html +++ b/play.html @@ -4,14 +4,26 @@ CheerpJ test + +
{{ py2htmlstr }} + + + + +
{{ py2htmlstr }} + + \ No newline at end of file