How do I load a file into the python console?

前端 未结 8 2216
攒了一身酷
攒了一身酷 2020-12-12 09:28

I have some lines of python code that I\'m continuously copying/pasting into the python console. Is there a load command or something I can run? e.g. load

8条回答
  •  时光说笑
    2020-12-12 09:48

    Open command prompt in the folder in which you files to be imported are present. when you type 'python', python terminal will be opened. Now you can use

    import script_name
    Note: no .py extension to be used while importing.
    How can I open a cmd window in a specific location?

提交回复
热议问题