Search code examples
pythonpyscripter

Execute a python file with arguments with PyScripter


I have a piece of python code.

from sys import argv

script, first, second, third = argv

print "The script is called:", script
print "Your first variable is:", first
print "Your second variable is:", second
print "Your third variable is:", third

I use PyScripter IDE for Python 2.7, but not sure how to pass the arguments with it, there is a Python Interpreter window on the bottom of the IDE.

ide


Solution

  • Found the solution by myself. Click Run Menu will find the command line parameters. Then clicking it to input what you want.

    image