Closed AdrianLC closed 9 years ago
Thanks a lot for the feedback. I will take a look asap on those points you have mentioned.
@AdrianLC I have quite a dilemma here. In order to show some output from runserver
I need to read asynchronously output of the process command is running in. That is tough one since you can only read output after subprocess is executed. Another approach would be to manually specify shell for each platform, for example "run cmd.exe" for Windows and "run bash" for Linux.
So if you have any ideas about that it would help.
Hello, I have to say I've never used it extensively but subprocess.Popen
has some attributes for in/output redirection, pipes, etc. This article seems quite helpful. I just did a quick test:
import subprocess
import sys
top = subprocess.Popen(['top'], stdout=sys.stdout)
and it shows the output in real time, so runserver
should be pretty straight forward.
The parsing... well, that's likely to be the most difficult.
You could have a look at some other plugins that manage shells. I know there's this project SublimeREPL which does some impressive magic with the shells. The code might be too complex though, I didn't really understand much : /
The thing is that with stdout=subprocess.PIPE
it process will redirect output only after command is finished. But in the case of runserver you want to see it realtime.
Like I said I don't really know much about subprocesses. But, the top
command is a system resources monitor (CPU usage, memory, etc.) and it doesn't stop until you press 'q'. I got real time output with the code I wrote in my previous comment.
Note that even if it works it might not be the best way to redirect stdout. I didn't do exhaustive research on the subject.
Hi. Can you please check it on Fedora again. I have checked on Ubuntu and it seemed to work there.
Hello there,
Nice plugin. You might not believe it but I actually had a project like this in my list of personal project ideas :D .
My distro is Fedora 19 x64. In case you're not familiar with the "linux distro world", it's not based on Ubuntu or Debian, is like the free-community version of Red Hat Enterprise Linux.
Well, here I leave my impressions after testing it for a while:
Preferences -> Package Settings
.Browse Packages...
to change the direction of the slashes inpython_virtualenv_paths
. I only use virtualenvwrapper but I left it like this:Stop runserver
might be a good idea.test (app_name)
,"test (app_name)"
,test
. The stacktrace is always:I'll leave a log example as well:
That was it. It might be finished by then, but in 4 to 6 months I might have a bit of spare time to contribute. Would have to study the plugin API first cause I haven't worked with it before.
Good luck with the project, Adrián