developing tools

535 views
Skip to first unread message

Mic L

unread,
Dec 27, 2012, 7:45:11 AM12/27/12
to python-...@googlegroups.com
Hi,
What kind of developing tools do you use for writing code for Tornado ?

Thank you in advance.

Mic

Nabil Servais

unread,
Dec 27, 2012, 8:14:17 AM12/27/12
to python-...@googlegroups.com
Hello

On Thu, Dec 27, 2012 at 1:45 PM, Mic L <mict...@gmail.com> wrote:
Hi,
What kind of developing tools do you use for writing code for Tornado ?

A good text editor (sublime text for example) and ipython. 

And in case of emergency, I use wireshark or pdb ;).
 

Nabil Servais

unread,
Dec 27, 2012, 8:15:53 AM12/27/12
to python-...@googlegroups.com
And I forgot the most important, a pen and paper for schematize my application.

Adam Tauno Williams

unread,
Dec 27, 2012, 8:19:10 AM12/27/12
to python-...@googlegroups.com
On Thu, 2012-12-27 at 14:15 +0100, Nabil Servais wrote:
> And I forgot the most important, a pen and paper for schematize my
> application.

+1 Or white board. I love me some white board.

As for editors - I recommend taking a look at geany.
<http://www.geany.org/>

> On Thu, Dec 27, 2012 at 2:14 PM, Nabil Servais
> <nabil....@gmail.com> wrote:
> Hello
> On Thu, Dec 27, 2012 at 1:45 PM, Mic L <mict...@gmail.com> wrote:
> Hi,
> What kind of developing tools do you use for writing code for
> Tornado ?

--
Adam Tauno Williams GPG D95ED383
Systems Administrator, Python Developer, LPI / NCLA

Joe Bowman

unread,
Dec 27, 2012, 8:29:39 AM12/27/12
to python-...@googlegroups.com
I use tmux and vim, generally a full screen terminal using tmux with 2 panes. I have a very small pane on the bottom I use to run the web server, and then the pane above it has vim open where I do my code editing.

I've also recently been using tilda for my terminal, allows me to use the F1 key to show/hide the terminal so I can interact with the app easier with a browser while I'm working. For some reason my brain seems to like this better than hopping to a different virtual desktop. Most likely because at work as a sysadmin virtual desktops are broke into activities.

Andrew Grigorev

unread,
Dec 27, 2012, 9:15:08 AM12/27/12
to python-...@googlegroups.com
vim + pyflakes plugin

27.12.2012 18:45, Mic L пишет:
--
Andrew

Didip Kerabat

unread,
Dec 27, 2012, 1:07:11 PM12/27/12
to python-...@googlegroups.com
* git as version control

* fabric+git as deployment tool and configuration management

* sometimes I use virtualenv to test PyPy build

* 1 linode instance to develop in, I just ssh in and use standard vi.

* selenium for all the tests.

* supervisord to manage all of my daemons, even on development environment.

* lk (https://github.com/elijahr/lk) instead of ack for code search.

* cloc (http://cloc.sourceforge.net) to count lines of code.

* vulture (http://pypi.python.org/pypi/vulture) to find unused methods/functions. It's not perfect, but good and fast enough.

* pyScss (https://github.com/Kronuz/pyScss) to compile .scss files.

* and I scrape PyPI to find out the latest version of any python modules. I have a convenience script for that: https://gist.github.com/4350782

- Didip -

Jordon Mears

unread,
Dec 28, 2012, 10:19:23 AM12/28/12
to python-...@googlegroups.com
I actually implemented a web based editor using Tornado that I now use to do all of my coding.

https://github.com/jordoncm/cider/downloads
--
Jordon Mears
http://www.finefrog.com

Mic L

unread,
Dec 30, 2012, 11:00:59 PM12/30/12
to python-...@googlegroups.com
Thank you for all responses. 

Python IDE:
It looks like many people use Vim and I found some tutorial online about it, but I have not tried them out yet:
Both tutorials do not use pyflakes is there any reason for it? Are there better HowTos  avaible?

Did someone tried:

HTML/JS IDE:
Did someone tried or recommend others HTML/JS IDE?

Thank you in advance.

Mic 

Ben Darnell

unread,
Dec 31, 2012, 1:43:12 PM12/31/12
to Tornado Mailing List
I haven't tried it myself, but some of my colleagues use PyCharm and seem fairly happy with it.

Personally, I use Emacs.  Some details on my setup (as it relates to python/tornado):
* I use shell-mode extensively, mainly so I can use emacs like a (tiling) window manager.  I do a lot of my version control interaction in the shell (with $EDITOR set to emacsclient), and also run tests there (I have always have a buffer running "python -m tornado.autoreload -m tornado.test.runtest" or the equivalent for whatever project I'm working on). Also try compilation-shell-minor-mode to get clickable stacktraces.
* I use flymake to run pyflakes
* I nearly always run emacs locally, and access remote files over sshfs or tramp (usually sshfs because it's faster).  

Other python tools I recommend:
* virtualenv is indispensable if you have more than one project.
* tox is a good way to run tests in multiple configurations (more of an issues with libraries where you want to support multiple versions than for applications).
* I use supervisord to run servers in production.  There are lots of other modern process managers out there too (e.g. daemontools); I would strongly recommend that you use one and never try to daemonize/disown a process yourself or write an old-style init.d script. 
* sphinx for generating documentation (and readthedocs.org as long as your project is open source)
* pyflakes and pep8/autopep8 for code analysis/linting (I've had problems with pychecker, and pylint is way too noisy to be useful)

-Ben

A. Jesse Jiryu Davis

unread,
Dec 31, 2012, 10:55:43 PM12/31/12
to python-...@googlegroups.com
+1 for supervisord and for PyCharm. I find PyCharm's interactive debugger absolutely invaluable, it's saved me cumulative months of developing and debugging time. Ben, that's a sweet tip about autoreload.

Leo Liu

unread,
Jan 3, 2013, 4:14:39 AM1/3/13
to python-...@googlegroups.com
On 2013-01-01 02:43 +0800, Ben Darnell wrote:
> I do a lot of my version control interaction
> in the shell (with $EDITOR set to emacsclient), and also run tests
> there (I have always have a buffer running "python -m
> tornado.autoreload -m tornado.test.runtest" or the equivalent for
> whatever project I'm working on).

Looks like a productive use of autoreload. Unfortunately if you have
grammar error (by accident) in any of the related modules it craps out.

Leo

Roey Berman

unread,
Jan 3, 2013, 6:49:44 AM1/3/13
to python-...@googlegroups.com
If you're worried about that you can always run the autoreload line in a while loop:

while true; do python -m tornado.autoreload -m tornado.test.runtest; sleep 1; done

Ben Darnell

unread,
Jan 3, 2013, 1:18:16 PM1/3/13
to Tornado Mailing List
autoreload is actually smart about syntax errors when run as a wrapper like this - it will still catch the error and wait for the next change to re-run the tests, so you shouldn't need an outside loop.  When autoreload is used in other ways (i.e. Application(debug=True)), it can't recover from syntax errors because they often occur before the IOLoop gets started.  This means it's useful to use both modes of autoreload at once:  "python -m tornado.autoreload -m myproject.server.main --debug".  The --debug flag (which gets passed to the Application settings) will handle reloads while the server is running, and the outer "-m tornado.autoreload" catches syntax errors and other startup problems.

-Ben

Leo Liu

unread,
Jan 3, 2013, 8:33:13 PM1/3/13
to python-...@googlegroups.com
On 2013-01-04 02:18 +0800, Ben Darnell wrote:
> autoreload is actually smart about syntax errors when run as a wrapper
> like this - it will still catch the error and wait for the next change
> to re-run the tests, so you shouldn't need an outside loop. When
> autoreload is used in other ways (i.e. Application(debug=True)), it
> can't recover from syntax errors because they often occur before the
> IOLoop gets started. This means it's useful to use both modes of
> autoreload at once: "python -m tornado.autoreload -m
> myproject.server.main --debug". The --debug flag (which gets passed to
> the Application settings) will handle reloads while the server is
> running, and the outer "-m tornado.autoreload" catches syntax errors
> and other startup problems.
>
> -Ben

In some cases, it works like described above. But not always.

python -m tornado.autoreload t.py

If I introduce a syntax error in s.py the shell session looks like this:

$ python -m tornado.autoreload t.py
Hello, I am S.
I am T.
Hello, I am S.
WARNING:root:Script exited with uncaught exception
Traceback (most recent call last):
File "/Users/leo/python/lib/python2.7/site-packages/tornado/autoreload.py", line 273, in main
exec f.read() in globals(), globals()
File "<string>", line 1, in <module>
File "/Users/leo/sandbox/s.py", line 2, in <module>
z
NameError: name 'z' is not defined

........

after this point whatever changes made to s.py, tornado is not
restarting the script.

t.py
s.py

Ben Darnell

unread,
Jan 4, 2013, 4:03:10 AM1/4/13
to Tornado Mailing List
Yeah, some kinds of errors still confuse it.  In this case making any change to t.py will wake it back up.  I've made some more changes in 3.0 that should make it more robust about all kinds of import-time errors.

-Ben


import s

print "I am T."

print "Hello, I am S."


Leo


Leo Liu

unread,
Jan 4, 2013, 1:21:27 PM1/4/13
to python-...@googlegroups.com
On 2013-01-04 17:03 +0800, Ben Darnell wrote:
> Yeah, some kinds of errors still confuse it. In this case making any
> change to t.py will wake it back up. I've made some more changes in
> 3.0 that should make it more robust about all kinds of import-time
> errors.
>
> -Ben

Thanks.

Leo

aliane abdelouahab

unread,
Jan 6, 2013, 5:48:12 AM1/6/13
to Tornado Web Server
noone noted Aptana Studio (JS, HTML, Python...), it's open source and
for all OS :p

Frank Smit

unread,
Jan 6, 2013, 9:38:01 AM1/6/13
to python-...@googlegroups.com
I'll make a list:

- Sublime Text 2
- Urxvt (a lot)
- Virtualenv
- Xmonad. Not specifically for development, but it helps a lot when
you don't have to drag windows around (e.g. terminals).
- A paper notebook.
Reply all
Reply to author
Forward
0 new messages