TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Getting back into Python

5 pointsby codrabout 11 years ago
About to start a job doing python; it&#x27;s been over 10 years since I&#x27;ve written any. All I remember is lots of indentation.<p>I&#x27;ve been doing C# for the last 10 years, so I&#x27;m quite out of touch with the latest in python development.<p>What&#x27;s the best IDE for writing python? (on Mac OS X)<p>I see a lot of options out there, but would like to hear what people are actually using. Mostly I want an IDE that supports debugging.<p>I see that Xcode supports python, does anyone use that?<p>Thanks!

13 comments

deftabout 11 years ago
I&#x27;ve never used an IDE for Python development, I find a text editor is good enough. As Jugurtha said, Sublime Text on Linux is great, I use it daily. Good luck with the new job!
mrfusionabout 11 years ago
IDE&#x27;s aren&#x27;t as big of a deal in Python as they would be in C#.<p>A lot of people just pick a nice text editor to do their work in. I like to use xcode on the mac, but I use Python&#x27;s built in debugger from the command line for debugging. I find it easier than fooling with an IDE.<p>[1] <a href="http://stackoverflow.com/questions/4228637/getting-started-with-the-python-debugger-pdb" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;4228637&#x2F;getting-started-w...</a>
评论 #7443359 未加载
colinwdabout 11 years ago
If you don&#x27;t want to stray too far from your comfort zone, Visual Studio has a pretty good Python Tools extension. I&#x27;m also a C# dev and I find it really nice to be able to play around with Python in the environment I&#x27;m most comfortable in.<p><a href="https://pytools.codeplex.com/" rel="nofollow">https:&#x2F;&#x2F;pytools.codeplex.com&#x2F;</a><p>Edit: Ah, just saw you mentioned OS X. I like Sublime Text on that end.
Jugurthaabout 11 years ago
Not any more indentation than code in any other language (you indent anyway, whether that&#x27;s enforced or not).<p>Python has IDLE (which is cross-platform), but I prefer writing with Sublime Text(on Ubuntu).<p>Here&#x27;s a list for you:<p><a href="http://en.wikipedia.org/wiki/List_of_integrated_development_environments_for_Python#Python" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;List_of_integrated_development_...</a><p>Good luck, codr.
评论 #7443313 未加载
workhere-ioabout 11 years ago
I&#x27;m pretty happy with Komodo Edit (<a href="http://komodoide.com/komodo-edit/" rel="nofollow">http:&#x2F;&#x2F;komodoide.com&#x2F;komodo-edit&#x2F;</a>), and it&#x27;s free.
wilsonfiifiabout 11 years ago
First choice would be Komodo Edit hands down! If you&#x27;re willing to spend a bit more then you can go for Komodo IDE.<p>If you want a lighter weight editor then Sublime Text is a decent option.
yen223about 11 years ago
Most powerful part of Python is its repl, no IDE required.<p>I do Django development, and my workflow consists of Sublime Text + IPython.
bdevineabout 11 years ago
PyCharm has a free edition that is quite nice, IMO. It even plays nicely with Vagrant and IPython, if that matters.
taternutsabout 11 years ago
If you&#x27;re looking for a full-featured IDE in the vein of VS, PyCharm is pretty good
blitiabout 11 years ago
What type of Python work will you be doing? Web, ML, desktop, etc?
评论 #7443316 未加载
imwhimsicalabout 11 years ago
Sublime Text (or Githubs Atom) works for me.
abimaelmartellabout 11 years ago
VIM is a great editor for Python
amiroucheabout 11 years ago
GNU&#x2F;Linux emacs user for Python dev.<p>The ability to browser a code easily, when you don&#x27;t actually know the code, is a lot of time that will be saved.<p>Pycharm is the best tool I know that does it out of the box.<p>I don&#x27;t know about its debugging facility (I think you mean setting break points), probably <a href="https://github.com/narfdotpl/debug" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;narfdotpl&#x2F;debug</a> will work just fine. I&#x27;ve been doing 1 year and a half of debugging Python code and used it three times. Most of the time the workflow is this:<p>0) add logs?<p>1) reproduce the bug<p>2) read the logs?<p>3) read the code?<p>4) if the best fix is found fix it else restart at 0)<p>Other useful tools for debugging:<p>- <a href="http://dpaste.com/hold/1751069/" rel="nofollow">http:&#x2F;&#x2F;dpaste.com&#x2F;hold&#x2F;1751069&#x2F;</a> this is the basic version of what I use at work. It&#x27;s a data descriptor [1]<p>- <a href="http://faulthandler.readthedocs.org/" rel="nofollow">http:&#x2F;&#x2F;faulthandler.readthedocs.org&#x2F;</a> &quot;for when there is no traceback&quot;<p>- Since you do UI, most likely you&#x27;ll deal with asynchronous callback style code (non-yield based), the traceback of a callback is not always useful ie. you want to know to which code it is answering to. For that matter you need tweak the event-loop code... having this patch at hand is helpful. e.g. say you do a asynchronous call to retrieve something in the database, the call probably looks like &quot;query(callback=query_callback)&quot;, when the &quot;query_callback&quot; will be called by the event loop with the result of the query as arguments, most likely the immediate top frame is the event-loop (if it&#x27;s not the previous frame, it&#x27;s the one before...) and &quot;query&quot; function will not be in the callstack of course... If &quot;query_callback&quot; is used as a callback of several asynchronous calls, you can not find the &quot;calling code&quot; with &quot;find usage&quot; of your IDE... I think asyncio fix this<p>Profiling:<p>- <a href="http://www.vrplumber.com/programming/runsnakerun/" rel="nofollow">http:&#x2F;&#x2F;www.vrplumber.com&#x2F;programming&#x2F;runsnakerun&#x2F;</a><p>- <a href="https://github.com/bdarnell/plop" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bdarnell&#x2F;plop</a><p>- <a href="https://github.com/wyplay/pytracemalloc" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;wyplay&#x2F;pytracemalloc</a> it is integrated in Python 3.4<p>I also use gdb on python coredumps.<p>[1] <a href="http://www.cafepy.com/article/python_attributes_and_methods/python_attributes_and_methods.html#creating-descritors" rel="nofollow">http:&#x2F;&#x2F;www.cafepy.com&#x2F;article&#x2F;python_attributes_and_methods&#x2F;...</a>