Home Download Buy Blog Forum Support

sublime as your IPython editor

Re: sublime as your IPython editor

Postby SteveCooperOrg on Thu Mar 27, 2008 1:54 pm

Hi, S. What exactly does this let you do? I'm new to python and I've installed ipython but not really used it. Thanks.
Maybe what you're looking for is at the http://www.sublimetextwiki.com
SteveCooperOrg
 
Posts: 193
Joined: Thu Mar 20, 2008 9:53 am

Re: sublime as your IPython editor

Postby jps on Fri Mar 28, 2008 2:43 am

That plugin is crazy, I'm impressed! :)

I'll take a look at the multiple instance bug, and add the creating-nonexistent-files feature to the next beta.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: sublime as your IPython editor

Postby jps on Fri Mar 28, 2008 7:13 am

Well, one option (keen!) for the moment is to make a plugin that opens a socket, and then, in IPython, make a proxy API that mirrors the sublime one, serializing all requests / responses.

While cool, it's no small amount of work. I've got an item on my todo list to investigate emebedding IPython, which is probably a more reasonable way to go.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: sublime as your IPython editor

Postby jps on Fri Mar 28, 2008 7:31 am

I'm more than happy to help... it may not be too bad actually, http://pyro.sourceforge.net/ seems like it do quite a bit of the legwork automatically.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: sublime as your IPython editor

Postby jps on Fri Mar 28, 2008 7:41 am

The IPython parallel computing stuff doesn't look like it's going to help solve this kind of problem.

I'm also not sure if pyro is going to be as useful as it could be: I got the impression from reading the docs that the return value from every function must be serialised and sent over the wire (as opposed to having a proxy returned), which would not work in the case of view.sel(), view.options() etc... I could well be wrong on this not being possible though.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: sublime as your IPython editor

Postby jps on Fri Mar 28, 2008 1:28 pm

http://pypi.python.org/pypi/processing/0.50 is another library that will handle RMI and proxies.

tbh though, I'm not sure how much of a win it is to be able to access the current View via IPython.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: sublime as your IPython editor

Postby SteveCooperOrg on Fri Mar 28, 2008 1:59 pm

jps wrote:tbh though, I'm not sure how much of a win it is to be able to access the current View via IPython.


The best I can come up with ATM, if you could attach to a running instance of Sublime, is the idea that it could make it easier to develop tests for plugins; eg, I could write a test that did this (pseudocode)

# get a copy of a window in sublime
wnd = getSublimeInstance().window[0]

# create a new view
vw = wnd.newFile()
vw.insert(0, "My test string")

vw.runCommand("findNext test")
assert(len(vw.sel()) == 1, "should have selected one instance")
assert(vw.sel()[0] = "text", "should have selected the word 'text')

This could make it easier to develop tests for plugins.

Also, possibly, there is the idea that you may want to run an automated or unattended process which uses Sublime as a 'text server', and uses the sublime API as you might use, say the MS Word COM interface to build documents.

Lastly, the idea reminds me of emacs/slime for developing LISP. In this setup, you actually attach to a LISP server from within emacs, and push commands from there. If I understand correctly, it might be good to push commands from Sublime into IPython, rather than starting in IPython and moving into Sublime. So I could type

dir(os)

in sublime, select it, choose the 'send to IPython' command, and watch IPython tell me what's in `os`.

Just fiddling with idea. I may have entirely the wrong end of the stick.
Last edited by SteveCooperOrg on Fri Mar 28, 2008 3:26 pm, edited 1 time in total.
Maybe what you're looking for is at the http://www.sublimetextwiki.com
SteveCooperOrg
 
Posts: 193
Joined: Thu Mar 20, 2008 9:53 am

Re: sublime as your IPython editor

Postby jps on Sun Mar 30, 2008 12:57 am

sublimator wrote:ps. Sublime is a bit strange about when it will open a new instance from the command line. If you launched it from the command line to begin with then your IPthon edits will be sent there otherwise it will create a new instance for the first edit and behave as expected afterwards.


Took a look at this: When it's checking to see if it's already running, Sublime Text will compare the path name it was run from, and pretend the other instance doesn't exist if it differs. This is mostly to make my life easier during development, but it was biting you here because the check is case sensitive. If you change your script to be "C:\Program Files" rather than "C:\program files", you'll be fine. This will be fixed in the next beta.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: sublime as your IPython editor

Postby Chicken Pie4 Tea on Sun Jun 19, 2011 12:04 pm

The link given in the first post is dead
Chicken Pie4 Tea
 
Posts: 2
Joined: Fri Jun 17, 2011 3:19 pm

Next

Return to Plugin Announcements

Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests