Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

As anyone who has used Smalltalk knows, one of the main benefits (other than a late-bound language that discourages many poor practices), is that the system is totally transparent and reflective, which makes understanding APIs and existing code easy, and locating functionality pretty easy.

Is there anything that creates a similar environment for Python?

A few examples of features of a smalltalk development environment, not natively found in python are:

  • search class/method/etc names,
  • examine inheritance hierarchies
  • functionality to show the full interface of a given class/object, and where the properties therein originate
  • an integrated graphical debugger which allows one to examine the full state of everything in the system, and see every instance of a given type, as well as all threads.

Note that I use windows, so anything that works well on windows would be particularly useful.

share|improve this question
    
What's wrong with the help() function that's already part of Python? –  S.Lott Dec 26 '11 at 19:39
5  
@S.Lott: Have you ever user a proper smalltalk environment? Comparing help() with a smalltalk environment is like comparing unorganised stone tablets with the Library of Congress. Sure, the data is there, but the difference is organisation and navigation. –  Marcin Dec 26 '11 at 20:07
    
Are you saying that only Smalltalk's environment is acceptable? I'm not clear on how to answer the question if that's the case. I was hoping for clarification as to what -- specific -- issues you had with help. It would be helpful to update the question with something more specific. If you make knowledge of smalltalk a pre-requisite for answering the question, you may not get the kind of help you're looking for. –  S.Lott Dec 26 '11 at 20:16
5  
@S.Lott: I think his definition of "looks like a Smaltalk environment" is clear enough. –  missingno Dec 26 '11 at 21:04
1  
@Marcin: I'm sorry the question is unclear. I'd love to be able to help. I've use a large, large number of IDE's. However, since you refuse to specify what's important to you, I cannot offer help. Since you have relatively few answers, you can take that as a hint that your question isn't very clear. Or you can complain that people ask for details before they try to offer incomplete or inaccurate help. If you want help, consider meeting people half way. Or. If you don't want help, try complaining. –  S.Lott Dec 27 '11 at 2:48
show 6 more comments

4 Answers

Marcin,

Having worked with Smalltalk myself for two years, I can tell you I haven't seen any Python IDE available that will give you the level of expressiveness you are looking for in Smalltalk IDEs such as VisualWorks or Squeak.

The key thing about most Smalltalk IDEs is that code + development tools are stored in the same place. So rather than coding in a text editor, then compiling/interpreting it on a VM, It's all done on the same binary. This has obvious benefits as you could connect to a Smalltalk image in a production environment and start coding/debugging on the image itself rather than having to change then publish a new copy as everything is already there. The main drawback I found with this approach is the amount of memory it consumes. You can obviously strip the image down to remedy this, but that takes time.

I will say that it's not impossible to have a Python IDE that does this, but there simply isn't one available as far as I've seen. Despite the dynamic nature of both languages, the approach to development between both languages different given that Python is file based and Smalltalk is image based.

share|improve this answer
1  
OK, good to hear from someone who clearly gets the question. I don't think that the mere fact of having code stored in files really forces much on us - at the abstract level with python we work with packages rather than files (that isn't to say that python IDEs don't in practice adopt a file-based world view). –  Marcin Jan 5 '12 at 11:04
    
A bit of history. The Smalltalk boys and girls that developed VisualAge IDE where asked to develop a Java based implementation of their IDE, which everyone knows as Eclipse. Some of the features you see in that will look the same, it's simply nowhere near as expressive. I struggled to get into Smalltalk in the beginning coming from a Java background, but it grew on me and got me back into Python again. The Smalltalk developers I've worked with were more keen on Ruby than Python though, which was interesting :) –  Desolate Planet Jan 5 '12 at 11:22
    
@Marcin, I agree with what your saying and it would be good to have an IDE for Python that does this. Even the code stored on Smalltalk image is backed up by it's own version controlled changelog files. That level of expressiveness your looking for is difficult to attain when components such as the debugger/compiler etc are not running in harmony with the code. So having everything in the same place is really what makes it work. Above and beyond that, the Smalltalk community have done a good job of doing it properly as it's very easy and productive to work with. –  Desolate Planet Jan 5 '12 at 11:25
2  
I think we are in agreement. I think Ruby is more smalltalk like, but their culture is more like the worst of lisp weenies: poor documentation, hostile to anyone who mentions the plank in their eyes. –  Marcin Jan 5 '12 at 11:35
1  
The point of that last comment, I should clarify, was not to have an unnecessary crack at ruby users, but rather to say that I think the python culture is closer to that of the smalltalk community. –  Marcin Jan 5 '12 at 11:45
add comment

ipython adds lots of syntactic sugar over the default Python REPL. In particualr, you get tab-completion, a nice "?" shortcut for the help() function and everything is nicely colorized and easier to read.

Not quite a Smalltalk environment but I find it very helpful.

share|improve this answer
    
Thank you - any experience with using this on windows? –  Marcin Dec 26 '11 at 21:48
    
@Marcin: It only runs on Windows. –  S.Lott Dec 27 '11 at 12:06
    
Well, the command line REPL works on LINUX at least (thats what I use anyway). –  missingno Dec 27 '11 at 13:23
    
Sorry. Yes, I was thinking this was Iron Python. –  S.Lott Jan 4 '12 at 17:36
    
Feel free to tidy up you comments any time then. *8') –  Mark Booth Jan 4 '12 at 17:44
show 1 more comment

I sometimes find myself using PythonWin's IDE just for the gui available during debugging (run using 'Step-through in the debugger' then show the Stack View). I've never touched smalltalk, though, so I might be way off base...enter image description here

share|improve this answer
add comment

You can't really expect a Smalltalk-like Python IDE. In Smalltalk, the IDE is an integral part of the runtime (or "image").

share|improve this answer
    
I don't see why not. Python has extremely good reflective capabilities. Whether or not the IDE is "integral" (which I don't think is true - you can dump out all of that code from your image if you want) is neither here nor there. –  Marcin Jan 4 '12 at 21:46
1  
@Marcin, as I said in my own answer, it's not entirely impossible to develop a Python IDE to give you this feature. It simply comes down to two different approaches to developing software. One being file based, there other being image based. So I wouldn't say Nemanja's answer is wrong, but I would also argue that it's not impossible to have an IDE that can do this. –  Desolate Planet Jan 5 '12 at 10:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.