ScriptSpot

Forum topic · General Scripting

how to run a script from a website?

By osefcomplet · 2019-12-20

Description

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 (2)

.

miauu · 2019-12-31

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