Spyder: command to open files in spyder editor

Created on 9 Oct 2017  路  7Comments  路  Source: spyder-ide/spyder

Is there any function to open .py files in the spyder editor directly from the IPython command line within spyder IDE? I basically want something working like matlab 'open' command. thank you.

Most helpful comment

Yep, we fixed that a long time ago.

All 7 comments

You mean opening and a possibility to edit te file, not running directly?

Yes, you can use the %edit magic, like this

%edit foo.py

However, I think it doesn't work on Windows right now (not exactly sure why...)

Could you please let me know which function is called when I double-click the file name inside spyder? Probably I could just directly use that command as well. thanks.

We don't have a function for that but use QDesktopServices instead.

Yes, you can use the %edit magic, like this

%edit foo.py

However, I think it doesn't work on Windows right now (not exactly sure why...)

It worked perfectly for me on Windows :)

Yep, we fixed that a long time ago.

How to open txt files in spyder ide.when performing file operation its showing text file not found

Was this page helpful?
0 / 5 - 0 ratings