how to execute Python 3.3 script in Spyder console with variables?

前端 未结 2 957
太阳男子
太阳男子 2020-12-16 13:27

how can I execute Python 3.3 script in Spyder console, and that has variables?

My sample code (C:/test/myfile.py) is

from sys import argv
script, fir         


        
2条回答
  •  我在风中等你
    2020-12-16 13:36

    What also works is the IPython console of Spyder is:

    In [1]: runfile('C:/yourfolder/myfile.py',args='one two three')

提交回复
热议问题