spider IDE python. Difference in running by pressing F5 and F9?

前端 未结 1 478
北恋
北恋 2021-01-06 21:44

I have a specific question concerning the python (Python 2.7) IDE Spider (2.3.5.2)

Today I noticed that there is a difference in running my script as a whole, i.e.

相关标签:
1条回答
  • 2021-01-06 22:06

    It is normal that you find __file__ undefined when running by single line because:

    When a module is loaded in Python, __file__ is set to its name. You can then use that with other functions to find the directory that the file is located in.

    There is no loaded module when you run by single line.

    0 讨论(0)
提交回复
热议问题