problems with Perl; changing to Python

Cameron Laird claird at starbase.neosoft.com
Thu Apr 18 14:27:05 EDT 2002


In article <MPG.17291f2bfcb85301989684 at news.rz.uni-karlsruhe.de>,
Uwe Mayer  <merkosh at hadiko.de> wrote:
			.
			.
			.
>Perl is great for scripts. Perl is great for programs with less than 
>perhaps 200 lines. A program should be aware of its memory usage; for a 
>script I don't care.
>
>I need a language that can be used to write programs with. GUI, and 
>commandline tools. When the program run in background they shouldn't 
>take up more memory than necessary.
>F.e. I wrote a Perl script checking for changes on homepages, expiry 
>date, etc in regular intervals. This "program" is 600 lines long and 
>uses 7mb of ram... too much in my oppinion.
>Can I do that in Python?
>
>I'll need to write programs which have to be extensible. The program 
>may, during calculation require up to 500 mb ram. Fine with me. On the 
>other hand I'll neet to write something working in background and then 
>(depending on its task and size) 1-2 MB should be enough. 
>What about Python here?
>
>Installing Perl modules was a torture. I am sitting behind a firewall 
>and in order to install the modules (compiling them did never work on my 
>Windows 2k mashine) I had to run my own DNS server and tunnel the 
>connection. Will that work better with Python? (f.e. Proxy support would 
>be sufficient!)
>
>And for the GUI programming: I used Perl/Tk previously, so Tkinter would 
>be most fammiliar, I guess. What other GUI packages can Python offer me 
>that will work (perhaps even in compiled .exe format) on windows 
>mashines? What about features like "minimize to tray" or "always on 
>top" that I wasn't able to accomplish in Perl/Tk?
>
>I need a language where I can rely on OOP if I need to. A language where 
>there's a difference between class- and instance- varriables. 
>How about multiple inheritance (perl, c++) or interfaces (jave) in 
>python?
>
>Are there any applications written in Python?
>Am I right here with Python or will I have to stick to a hybid C++/Java 
>solution?
			.
			.
			.
Quite a few people are successful writing large
applications in Perl.  Python's better in this
role, though, I believe any objective observer
will agree.  In fact, I claim Python is better
than C++ or Java (!) for large-scale programming.
Please, whatever you do, don't regard C++ and
Java as paragons of effectiveness.

The run-time memory footprint of Python is
roughly comparable to Perl's.  It's good that
you're sensitive to this; however, most people
find modern equipment runs moderate applications
coded in either Perl or Python just fine, with-
out hitting memory limits, and we have
relatively few measurements from real applica-
tions.  My summary:  I speculate that memory
limits are less of a practical problem than you
appear to believe they are.

Python's about the most flexible language in the
world in its bindings with GUI toolkits.  C
barely has as many.  <URL: http://
starbase.neosoft.com/~claird/comp.lang.python/python_GUI.html >
has more on the subject.

Installation of non-standard modules is a juve-
nile art.  You might have much better, or worse,
experience with Python, as compared to your Perl
history.  It's hard to predict.  I generally
have been happier with Python, in this regard,
but there's quite a range of results.

It *is* possible to "minimize to tray" and "keep
on top" programmatically in Perl/Tk.  I'm working
on these for the official FAQ, by the way.

OOP in Python is quite pleasant.
-- 

Cameron Laird <Cameron at Lairds.com>
Business:  http://www.Phaseit.net
Personal:  http://starbase.neosoft.com/~claird/home.html



More information about the Python-list mailing list