First time here? Check out the FAQ!
1

${WING:FILENAME} example needed

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 :-/

jrobijns's avatar
78
jrobijns
asked 2020-11-17 07:19:39 -0500
Wingware Support's avatar
4.1k
Wingware Support
updated 2020-11-17 09:23:52 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

${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.

Wingware Support's avatar
4.1k
Wingware Support
answered 2020-11-17 08:03:55 -0500
edit flag offensive 0 remove flag delete link

Comments

That was exactly what I needed to know. Thanks!

jrobijns's avatar jrobijns (2020-11-17 08:14:22 -0500) edit
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