First time here? Check out the FAQ!

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 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."

updated 2023-10-20 15:27:06 -0500
This post is a wiki. Anyone with karma >75 is welcome to improve it.
edit flag offensive 0 remove flag close merge delete


add a comment see more comments

1 Answer


I think you may be following the tutorial on our website and not from the Help menu in Wing Personal. The tutorial in the website is for Wing Pro and that part of the tutorial uses the Debug Console tool that is not present in Wing Personal. The similar Python Shell tool is present, but does not reflect the run state of the debug process, it's just its own environment similar to what you get when you start 'python' on the command line.

Please let us know if this doesn't help.

Wingware Support's avatar
Wingware Support
answered 2023-10-21 07:40:18 -0500
edit flag offensive 0 remove flag delete link


add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer