how to run a script from a website?

Hey guys!

I'd like to run a script from a web server but it doesn't seem to work. here's how I run one of my script:
python.Execute("
import sys

SCRIPT_FOLDER = 'path\script'
if SCRIPT_FOLDER not in sys.path:
sys.path.append(SCRIPT_FOLDER)

import MYSCRIPT_ui
MYSCRIPT_ui.generate_ui()
")
Locally it works.

If I replace 'path\script' by my server web that looks something like this: '207.180.XXX.XXX\script' I got an error message
ImportError: no module named MYSCRIPT_ui

I tried a filein, execute, nothing seems to work.
Any ideas?

Thank you!

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alexnguyen's picture
miauu's picture

.

Download the script in local folder and then run it from there with fileIn()

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.