简体   繁体   中英

How to include file in wing-IDE

I have a file called tweet.py located on my desktop which contains numerous functions that I would like to use in the wing-IDE. How do I include the file so I can use the functions in the python shell? I looked online but did not find anything to help me. Thanks guys. I'm using ubuntu 14.04, if that helps.

Open the file in Wing and then select Evaluate File in Python Shell from the Source menu. After that, functions/etc defined in the file can be accessed from the shell. You do need to redo that if you've edited the file.

Or you may want to use the Active Range feature that's new in Wing 5.0.9: Select a range of code, and press the + icon in the Python Shell (top right) to make it the active range. Then you can easily reevaluate that range in the Python Shell by pressing the cog icon (or bind a key to the command python-shell-evaluate-active-range).

Another option is to set a breakpoint, debug to it, and then use the Debug Probe, which is a shell that lets you interact with the runtime state in the currently selected debug stack frame.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM