Home Download Buy Blog Forum Support

SublimePTY [pre-alpha]

SublimePTY [pre-alpha]

Postby wuub on Sat Feb 18, 2012 2:13 pm

SublimePTY pre-alpha

https://github.com/wuub/SublimePTY

Image

because I'm lazy and decided that keeping this hidden slows down development.

This is real terminal emulation that was once meant to be part of SublimeREPL, but after a bit of thought, I decided those two things are very different and should be separate.

Disclaimer: DON'T USE IT FOR ANYTHING. It's PRE alpha and I mean it, some keys don't even work yet!!!

Changelog:
0.2.0
- most of the functions for beta version on windows are now ready
Known problems:
- console_server.py still needs to be started/killed manually
- capitalized letters are broken
Short screencast: http://www.youtube.com/watch?v=eaGBVdlqTko
I'm am super tired, and didn't know what I was doing but it should be pretty obvious what works and what doesn't. Most of the delays is me thinking what to do next or waiting for buffer to resize (ATM resizing is done each 2 seconds or so))


0.1.0
- Prototype Windows console is in ;)

0.0.6
- shell job control is now enabled
- also, ctrl-c works as expected
Last edited by wuub on Sun May 13, 2012 5:56 pm, edited 6 times in total.
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: SublimePTY [pre-alpha]

Postby C0D312 on Sat Feb 18, 2012 2:34 pm

Couldn't get it to start on my mac. (And it froze the window entirely)
Console output:
Code: Select all
Traceback (most recent call last):
  File "./sublime_plugin.py", line 327, in run_
  File "./sublimepty.py", line 20, in run
  File "./process.py", line 107, in __init__
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/UserDict.py", line 22, in __getitem__
    raise KeyError(key)
KeyError: 'USERNAME'
Traceback (most recent call last):
  File "./sublimepty.py", line 9, in read_all
  File "./process.py", line 24, in read_all
  File "./process.py", line 149, in _read
AttributeError: 'PtyProcess' object has no attribute '_poll'
Traceback (most recent call last):
  File "./sublimepty.py", line 9, in read_all
  File "./process.py", line 24, in read_all
  File "./process.py", line 149, in _read
AttributeError: 'PtyProcess' object has no attribute '_poll'


P.S. WTF! Default.sublime-keymap is 2529 lines long.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: SublimePTY [pre-alpha]

Postby wuub on Sat Feb 18, 2012 2:41 pm

C0D312 wrote:Couldn't get it to start on my mac. (And it froze the window entirely)


Bugfix pushed. I am too used to dictionaries that return None when key is missing.

C0D312 wrote:P.S. WTF! Default.sublime-keymap is 2529 lines long.


Yes. They said "you can't intercept all keys in a sublime view", and I said: "we will see" :D
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: SublimePTY [pre-alpha]

Postby C0D312 on Sat Feb 18, 2012 2:51 pm

Thanks for the quickfix. That fixed one of the errors. I'm still getting:
Code: Select all
Traceback (most recent call last):
  File "./sublime_plugin.py", line 327, in run_
  File "./sublimepty.py", line 20, in run
  File "./process.py", line 117, in __init__
AttributeError: 'module' object has no attribute 'poll'


Yes. They said "you can't intercept all keys in a sublime view", and I said: "we will see"


Hahaha
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: SublimePTY [pre-alpha]

Postby wuub on Sat Feb 18, 2012 2:56 pm

Oh, it seems that select.poll() is missing on OSX. http://atomized.org/2008/12/python-on-o ... electpoll/
Nice, I love when this happens. Looking for a way to replace select.poll() with select.select() or something else
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: SublimePTY [pre-alpha]

Postby C0D312 on Sat Feb 18, 2012 3:04 pm

select.poll()
(Not supported by all operating systems.) Returns a polling object, which supports registering and unregistering file descriptors, and then polling them for I/O events; see section Polling Objects below for the methods supported by polling objects.
http://docs.python.org/library/select.html

It can't be that important, right?
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: SublimePTY [pre-alpha]

Postby wuub on Sat Feb 18, 2012 3:11 pm

I was able to replace it with select.select() which hopefully is available on OSX.
It is important, non blocking reads are quite nice ;)

EDIT:
I think I'll launch OSX now and do the rest of todays dev on it instead of Ubuntu.
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: SublimePTY [pre-alpha]

Postby C0D312 on Sat Feb 18, 2012 3:26 pm

Awesome, it works now. I'll report back when I break it again :)
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: SublimePTY [pre-alpha]

Postby weslly on Sat Feb 18, 2012 4:03 pm

it works great with zsh :D
weslly
 
Posts: 203
Joined: Sun Aug 28, 2011 3:57 am
Location: Brazil

Re: SublimePTY [pre-alpha]

Postby sublimator on Sat Feb 18, 2012 11:43 pm

Really feeling the `loser` in windows loser right now :(
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Next

Return to Plugin Announcements

Who is online

Users browsing this forum: Exabot [Bot] and 2 guests