Hi,

On Oct 6, 9:19 pm, Batu <[email protected]> wrote:
> Hello all,
>
> I would like to be able to open the already imported modules in the
> Spyder Editor using a syntax like:
> import foo
> open('foo')

There is already something similar but only to open filenames:
_open_in_spyder(fname [, lineno])

I have just renamed it into 'open_in_spyder' (without the leading
underscore to make it easier to spell: it was not meant to be used
directly) and now it may open file either from its filename or from
the associated module as you suggested:
http://code.google.com/p/spyderlib/source/detail?r=cdb8ab46d0837a108dcf696b3aefa2c6526d2c76

HTH,
Pierre

> I am hoping this open command would get the file location from:
> foo.__file__
>
> and display the contents in a new tab in Editor (or bring up the tab
> if already open).
>
> Is there already an existing command for this? If not I am willing to
> look into writing it, and I would like some suggestions about how to
> open files from ipython. I know this is somehow possible, as we can
> click on the highlighted links in the error traceback to open the file
> in Editor.
>
> Best,
> batu
> Spyder: 2.1.0beta1
> Python: 2.7.1+
> OS: Ubuntu 11.04 64bit

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/spyderlib?hl=en.

Reply via email to