View previous topic :: View next topic |
Author |
Message |
oryagel
Joined: 28 Jul 2010 Posts: 92
|
Posted: Tue Dec 15, 2015 1:27 am Post subject: Run Python script from file |
|
|
Hi,
I have a very simple script that I try to execute as a Shell Script:
Quote: | import sys
print sys.argv[1]
print sys.argv[2]
print sys.argv[3]
print sys.argv[4] |
It works as expected when I paste the script in the script box and use the command:
Quote: | C:\Python27\python.exe %Script% %Params% |
I want to start the script from a .py file
So I tried to put the following in the Script box:
Quote: | "D:\Tools\test.py" %1 %2 % 3 %4 |
But then I get an error:
Quote: | TypeError: not all arguments converted during string formatting |
How should I execute the script properly?
Thanks |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
Posted: Tue Dec 15, 2015 12:49 pm Post subject: |
|
|
Just specify start cmd like the following:
C:\Python27\python.exe "D:\Tools\test.py" %Params%
Script field leave empty. |
|
Back to top |
|
|
oryagel
Joined: 28 Jul 2010 Posts: 92
|
Posted: Wed Dec 16, 2015 12:37 am Post subject: |
|
|
Works.
Thanks |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
Posted: Wed Dec 16, 2015 4:26 am Post subject: |
|
|
You are welcome. |
|
Back to top |
|
|
|