First time here? Check out the FAQ!

Revision history  [back]

Wing 9 Personal Struggling to get sys.argv to show test args in tutorial 9.2

This is the line of the tutorial I don't understand: "Try this now by bringing up File Properties for example1.py and set the run arguments in the Debug/Execute tab to test args."

To find the TESTPROJECT 1: In Python Shell I did this:

import os 
import pprint 

env_var = os.environ 

print("User's Environment variable:") 
pprint.pprint(dict(env_var), width = 1)

and to get sys.argv I tried importing sys first but all I get is:

>>> sys.argv
['']

I did restart debugging, but I'm confused where I'm supposed to find sys.argv from following line from tutorial which says "Now if you restart debugging, os.environ will contain the environment variable TESTPROJECT and sys.argv will end in test args."

Wing 9 Personal Struggling to get sys.argv to show test args in tutorial 9.2

This is the line of the tutorial I don't understand: "Try understand:L Try this now by bringing up File Properties for example1.py and set the run arguments in the Debug/Execute tab to test args."

args. To find the TESTPROJECT 1: 1: In Python Shell PythonShell I did this:

this:
import os 
import pprint 

env_var = os.environ

print("User's Environment variable:") pprint.pprint(dict(env_var), width = 1)

1)

and to get sys.argv I tried importing sys first but all I get is:for

>>> 

sys.argv ['']

['']

I did restart debugging, but I'm confused where I'm supposed to find sys.argv from following line from tutorial which says "Now tutorial: Now if you restart debugging, os.environ will contain the environment variable TESTPROJECT and sys.argv will end in test args."args.