Will Python Be Good For This Type Of Project?

Jean-François Doyon jfdoyon at methane.ca
Thu Sep 29 23:04:24 EDT 2005


> What I'm trying to determine is 1) if it's relatively easy to write a
> program to work as an application AND an applet (depending on how it's
> called)

No.  There is no such thing as "Python applets", unless the end user's 
browser has third-party plug-ins that enable browsers to do so (A Python 
equivalent to the Java Plug-In) ... I think those exist anyways :)

Or, if possible you could make your applet include Jython, and write 
everything in Python, and have the client's JRE run the whole thing. 
Seems like a big detour if you're already proficient in Java to be 
honest.  Not to mention a big download, and potential security problems?

> 2) If it'll handle the networking to read what amounts to web
> pages full of setting info and write that back in POST statements without
> problems from the user's point of view and easily from the programmer's
> point of view

Not a problem, Python can do all that quite easily.  Look here:

http://python.org/doc/2.4.2/lib/internet.html

> 3) What coding time and difficulty is like in Python
> compared to, most specifically, Java and Perl, 

Well, presumably you'd have a learning curve ... Ignoring that coding 
time in Python is pretty much always fastest (I used to love Perl ... 
until I found Python).  One of my big points when promoting Python is 
exectly this: less time coding, less time debugging, more time making 
good code that works right the first time, and importantly, much easier 
to maintain over time.

> 4) Is it easy for me to
> interface Java and Python classes seamlessly, 

I've never used it, but Jython supposedly gives you the ability to do 
this quite well.  It's a Python interpreter written in Java :)

http://www.jython.org/

> and 5) (I realize only I can
> answer this for sure, but opinions and experience of others would be a
> help!) Is Python easy enough and fast enough to code in that it'd be worth
> me taking time to learn it and doing the project Python instead of Java?

For this one project, it's hard to say.  Overall I would say that 
learning a whole language for writing one GUI app might be excessive.  I 
would suggest you look over Python as thoroughly as you can, and see if 
maybe it's a language you would want to use not only for this project, 
but others in the future as well.

Being self-taught myself, I expect you will switch to Python :) Only 
masochists or hardcore purists that think statically typed languages are 
"better" stick to Java.  Well or because it's mandated by their 
organisations and so on ...

Do note that in this case you would also need a GUI framework ... 
wxPython would be my reocmmendation:

http://www.wxpython.org/

(This is another reason the whole "applet" thing might be problematic).

Python does not have a single GUI framework, but many.  The Standard 
Library support Tcl/Tk, which isn't very nice.  wxPython is very nice 
API, and well supported.  There are bindings to GTK and QT as well.

Hope this helps!

J.F.

> 
> Any help, thoughts, comments, and such are appreciated!
> 
> Thank you!
> 
> Hal 



More information about the Python-list mailing list