Ask Your Question
1

${WING:FILENAME} example needed

asked 2020-11-17 07:19:39 -0600

jrobijns gravatar image

updated 2020-11-17 09:23:52 -0600

I have tried so many ways to use ${WING:FILENAME} in my script, that I am out of ideas. In my script, I want to use the filename of the script as a variable. So simply put, I want something like this:

fileName = ${WING:FILENAME}

After reading https://wingware.com/doc/proj/variabl... I tried just about every combination, including os.environ.get, but I keep getting a syntax error on ${WING:FILENAME}. I am positive I am just making a stupid mistake in my thought process somewhere, but I just need to be able to use this variable. So I need help :-/

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-11-17 08:03:55 -0600

${WING:FILENAME} can only be used within Wing to configure your project and is not automatically set in the environment of processes that Wing launches. You can set an environment variable to its value yourself by adding a MYFILENAME=${WING:FILENAME} to the environment.

edit flag offensive delete link more

Comments

That was exactly what I needed to know. Thanks!

jrobijns gravatar imagejrobijns ( 2020-11-17 08:14:22 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-11-17 07:19:39 -0600

Seen: 145 times

Last updated: Nov 17