Re: Can you introduce some book about python?

2005-05-21 Thread rdsteph
You m,igth try my page of Python Book reviews at http://www.awaretek.com/book.html Ron Stephens fdsl ysnh wrote: > --- [EMAIL PROTECTED]: > > > Send Python-list mailing list submissions to > > python-list@python.org > > > > To subscribe or unsubscribe via the World Wide Web, > > visit > >

Re: SQL Query via python

2005-05-21 Thread Heiko Wundram
Am Samstag, 21. Mai 2005 06:54 schrieb Sakesun Roykiattisak: > Try > > cursor.execute ( > """ > SELECT name, month, day ,category, city FROM bday > WHERE %s = %s > """ > %(arg1,arg2)) *argh* You don't do any quoting of SQL-parameters, and that's more than bad! (leaves you up to the mercy of

Re: Can you introduce some book about python?

2005-05-21 Thread Heiko Wundram
Am Samstag, 21. Mai 2005 08:59 schrieb [EMAIL PROTECTED]: > Quoting a senseless quote, bravo! ... wasting-bandwith-sure-is-fun-over-ISDN-'ly yours, -- --- Heiko. see you at: http://www.stud.mh-hannover.de/~hwundram/wordpress/ pgpgNcbIb66ja.pgp Description: PGP signature -- http://mail.py

Re: first release of PyPy

2005-05-21 Thread Torsten Bronger
Hallöchen! Paul Rubin writes: > Torsten Bronger <[EMAIL PROTECTED]> writes: > >> Please could somebody explain to us non-CS people why PyPy could >> have speed features CPython can't have? > > Does the one-word answer "compiler" explain enough? No, just more questions.

Re: first release of PyPy

2005-05-21 Thread Ville Vainio
> "Torsten" == Torsten Bronger <[EMAIL PROTECTED]> writes: Torsten> What's supposed to be compiled? Only PyPy itself or also Torsten> the programs it's "interpreting"? PyPy is written in python, if it can be compiled then the programs can be as well. Torsten> I've been told by s

Re: first release of PyPy

2005-05-21 Thread Ville Vainio
> "Ville" == Ville Vainio <[EMAIL PROTECTED]> writes: Ville> This is not about PyPy but it might help: Ville> http://www.python.org/pycon/dc2004/papers/1/paper.pdf (It's about starkiller, sorry about the opaque url) -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.

Re: [pysqlite] How do I use pysqlite in a multi-threading env.?

2005-05-21 Thread F. GEIGER
"Gerhard Haering" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] I've completely rewritten the db handling stuff, which formerly did too much behind the scenes (explicit is better than implicit...). Now everything looks much better. No unexpected errors and - most important - l

Re: first release of PyPy

2005-05-21 Thread Shane Hathaway
Torsten Bronger wrote: > Hallöchen! > > "Kay Schluehr" <[EMAIL PROTECTED]> writes: > > >>[...] >> >>[...] Once You get enough speed out of the PyPy-runtime and the >>community shifts to it the PEP-process degenerates in the view of >>a PyPythonista to discussions about aspects of the std-objects

Re: first release of PyPy

2005-05-21 Thread Kay Schluehr
Torsten Bronger wrote: > Hallöchen! > > Paul Rubin writes: > > > Torsten Bronger <[EMAIL PROTECTED]> writes: > > > >> Please could somebody explain to us non-CS people why PyPy could > >> have speed features CPython can't have? > > > > Does the one-word answer "compiler"

Re: first release of PyPy

2005-05-21 Thread Kay Schluehr
Shane Hathaway wrote: > Now people are experimenting with high level compilers written in high level > languages. Where will this pattern lead? Who knows. :-) Drift from old Europe ( greek Pythons ) to old India to "Nagas" and other snake-beings and goddesses :-) http://www.khandro.net/myster

Re: [Tutor] Comparing a string

2005-05-21 Thread Jonas Melian
Alan G wrote: >>I'm tryin compare a string with a value with style of > > Use regular expressions and turn it around: > > import re > s = 'i686' > ex = re.compile('i?86') > if ex.match(s): print 'they match!' > > Is that what you mean? > > Alan G. > > Thanks, that's the way. But in a express

IDLE 1.0.5 crashs on Windows

2005-05-21 Thread Torsten Bronger
Hallöchen! I've installed Python 2.3.5, IDLE 1.0.5 on a Win2k box and have fatal Windows errors with a trivial script. You can see a screenshot of the problem at . My script (on the left side) is trivial, namely def _to_int(x):

Re: IDLE 1.0.5 crashs on Windows

2005-05-21 Thread Torsten Bronger
Hallöchen! Torsten Bronger <[EMAIL PROTECTED]> writes: > I've installed Python 2.3.5, IDLE 1.0.5 on a Win2k box and have > fatal Windows errors with a trivial script. You can see a > screenshot of the problem at > . At http://www-u

moving from c++ to python

2005-05-21 Thread Michael
Hi, I'm a pretty sound programmer in C++, but would like to learn python! Does anyone know of any tutorial s aimed at me?? My biggest confusion so far is the lack of pointers in Python .. Regards Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: moving from c++ to python

2005-05-21 Thread pythonchallenge
Michael wrote: > Hi, > I'm a pretty sound programmer in C++, but would like to learn python! Does > anyone know of any tutorial s aimed at me?? My biggest confusion so far is > the lack of pointers in Python .. > Regards > > > Michael > > I suggest that you start with the official Python t

Re: moving from c++ to python

2005-05-21 Thread William Heymann
On Saturday 21 May 2005 03:19 am, Michael wrote: Yeah this tutorial is aimed at people that already know how to program. http://www.diveintopython.org/ It would still be a good idea though to go through the basic python tutorial at http://docs.python.org/tut/tut.html For someone already exp

Re: Memory errors with large zip files

2005-05-21 Thread John Machin
On 20 May 2005 18:04:22 -0700, "Lorn" <[EMAIL PROTECTED]> wrote: >Ok, I'm not sure if this helps any, but in debugging it a bit I see the >script stalls on: > >newFile.write (zf.read (zfilename)) > >The memory error generated references line 357 of the zipfile.py >program at the point of decompre

Re: ANN: new release of RUR-PLE available

2005-05-21 Thread could ildg
It's very interestring, I like it. On 5/20/05, André Roberge <[EMAIL PROTECTED]> wrote: > Michael Hoffman wrote: > > André Roberge wrote: > > > >>Version 0.8.6a is now available. > > > > > > You might see a bit more interest if you briefly explain what RUR-PLE > > is, and where to find it. > Oops..

Re: first release of PyPy

2005-05-21 Thread Carl Friedrich Bolz
Hi! Ville Vainio wrote: >>"Torsten" == Torsten Bronger <[EMAIL PROTECTED]> writes: > > > Torsten> What's supposed to be compiled? Only PyPy itself or also > Torsten> the programs it's "interpreting"? > > PyPy is written in python, if it can be compiled then the programs can > be as

ZODB memory problems (was: processing a Very Large file)

2005-05-21 Thread DJTB
[posted to comp.lang.python, mailed to [EMAIL PROTECTED] Hi, I'm having problems storing large amounts of objects in a ZODB. After committing changes to the database, elements are not cleared from memory. Since the number of objects I'd like to store in the ZODB is too large to fit in RAM, my pro

Re: SQL Query via python

2005-05-21 Thread Sakesun Roykiattisak
*argh* You don't do any quoting of SQL-parameters, and that's more than bad! (leaves you up to the mercy of SQL-injection attacks, for example) I'm aware of the issue. But I think the one who start this question is too naive to explain anything more complex. Just give him a hint for fur

Re: first release of PyPy

2005-05-21 Thread beliavsky
Shane Hathaway wrote: > > Please could somebody explain to us non-CS people why PyPy could > > have speed features CPython can't have? > > The idea is to shift more of the responsibility to optimize code from > the human to the computer. Since C code is at a low level, the computer > can only i

Re: moving from c++ to python

2005-05-21 Thread Ville Vainio
> "Michael" == Michael <[EMAIL PROTECTED]> writes: Michael> me?? My biggest confusion so far is the lack of pointers Michael> in Python .. Achtually, python uses pointers for everything. On the contrary there are no "value types" in python. MyClass* c = new MyClass(12,13); is e

Problem: embedding Python

2005-05-21 Thread mmf
Hallo! I tried to use Python from C like it is described in the Python Docmentation. So I wrote the following C source file: #include int main(int argc, char *argv[]) { Py_Initialize(); PyRun_SimpleString("print 'Hallo World!'\n"); Py_Finalize(); return 0; } I sa

Re: Problem: embedding Python

2005-05-21 Thread thesamet
mmf wrote: > Hallo! > > I tried to use Python from C like it is described in the Python > Docmentation. So I wrote the following C source file: > > #include > int > main(int argc, char *argv[]) > { > Py_Initialize(); > PyRun_SimpleString("print 'Hallo World!'\n"); > Py_Finalize

Re: import cx_Oracle fails!

2005-05-21 Thread Bernard Delmée
Hi Daniel, is your processor Itanium or PA? I am having a hard time getting cx_oracle (4.1) and python (2.3.5) to cooperate on an HP-UX 11.23 server (I see you're running 11.11). I can compile both packages with gcc 3.4.3 either in 32-bit (apparently the default) or 64-bit (-mlp64 gcc flag) but p

Re: first release of PyPy

2005-05-21 Thread John Roth
"Torsten Bronger" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hallöchen! > > Paul Rubin writes: > >> Torsten Bronger <[EMAIL PROTECTED]> writes: >> >>> Please could somebody explain to us non-CS people why PyPy could >>> have speed features CPython can'

PyPy 0.6.1

2005-05-21 Thread holger krekel
Hi again, On Fri, May 20, 2005 at 23:38 +0200, holger krekel wrote: > The PyPy 0.6 release > has already been superseded by the PyPy 0.6.1 bug-fix release. We are temporarily not having access to that time machine and thus have to fix things the old way, unfortunately.

Re: SQL Query via python

2005-05-21 Thread Jeff Elkins
On Saturday 21 May 2005 04:56 am, Heiko Wundram wrote: > Am Samstag, 21. Mai 2005 06:54 schrieb Sakesun Roykiattisak: > > Try > > > > cursor.execute ( > > """ > > SELECT name, month, day ,category, city FROM bday > > WHERE %s = %s > > """ > > %(arg1,arg2)) > > *argh* You don't do any quoting

Re: How to learn OO of python?

2005-05-21 Thread Benji York
>"Harlin Seritt" <[EMAIL PROTECTED]> wrote: >class Animal: > def eats(self): > print 'The animal eats.' > def walks(self): > print 'The animal walks.' > """#the self keyword means that this function will be a class >function""" Mike Meyer wrote: > First, the correct termi

Re: first release of PyPy

2005-05-21 Thread Skip Montanaro
beliavsky> C++ is a higher level language than C, >From the compiler's viewpoint C++ is not much higher level than C. It has the same basic types, (structs, unions and C++ classes are really the same thing data-wise, though C++ classes can be somewhat more complex layout-wise) and supports

Re: Is Python suitable for a huge, enterprise size app?

2005-05-21 Thread Dave Brueck
Paul Rubin wrote: > Dave Brueck <[EMAIL PROTECTED]> writes: > >>>What do you use for HTTPS? >> >>m2crypto (plus some patches to make asynchronous SSL do what we needed). > > > That seems to be a nice piece of code, but it's still at version 0.13; Version numbers are fairly relative, though. In

Re: How to receive events (eg. user mouse clicks) from IE

2005-05-21 Thread Roger Upole
There does appear to be some sort of conflict between the two event hooks. I wasn't seeing it before since IE was getting google from my browser cache and it was coming up almost instantaneously. As soon as I switched the URL to a page that loads slowly, I got the same result. Adding win32gui

Fw: evidence john bokma al jazeera connection ?

2005-05-21 Thread William Baker
please add forward to alt.security.terrorism if information p.p.s. "john bokma" shows long list in message boards, just in last month. lots of information to netherlands where muslem militants are. could some be coded cryption to aljazeera, so messages are in secret for the terror n

Re: Can you introduce some book about python?

2005-05-21 Thread [EMAIL PROTECTED]
if u r come from china, maybe python.cn is a good start :) -- http://mail.python.org/mailman/listinfo/python-list

Re: count files in a directory

2005-05-21 Thread rbt
Heiko Wundram wrote: > Am Samstag, 21. Mai 2005 06:25 schrieb James Stroud: > >>This will work for your purposes (and seems pretty fast compared to the >>alternative): >> >>file_count = len(os.walk(valid_path).next()[2]) > > > But will only work when you're just scanning a single directory with

Re: first release of PyPy

2005-05-21 Thread Mike Meyer
Shane Hathaway <[EMAIL PROTECTED]> writes: > Torsten Bronger wrote: > Even if things don't turn out that way, note that each generation of > programming languages builds on its predecessors, and PyPy could help > bootstrap the next generation. Assemblers first had to be written in > machine code;

Re: count files in a directory

2005-05-21 Thread rbt
James Stroud wrote: > Sorry, I've never used os.walk and didn't realize that it is a generator. > > This will work for your purposes (and seems pretty fast compared to the > alternative): > > file_count = len(os.walk(valid_path).next()[2]) Thanks James... this works *really* well for times when

ImportError: cannot import name - newbie

2005-05-21 Thread qwejohn
Hello, I am quite a newbie to Python. I am working on Linux Fedora Core 3. I have wrote a small program named box.py which has only a constructor: """box.py""" class box: def __init__(self): print "in box" This program passes running "python box.py". I had put this program under /work/d

Re: Is Python suitable for a huge, enterprise size app?

2005-05-21 Thread Dieter Maurer
"Fredrik Lundh" <[EMAIL PROTECTED]> writes on Thu, 19 May 2005 09:54:15 +0200: > ... > and unless your operating system is totally braindead, and thus completely > unfit > to run huge enterprise size applications, that doesn't really matter much. > leaks > are problematic, large peak memory use

Re: count files in a directory

2005-05-21 Thread Steven Bethard
rbt wrote: > Heiko Wundram wrote: > import os > path = "/home/heiko" > file_count = sum((len(f) for _, _, f in os.walk(path))) > file_count > > Thanks! that works great... is there any significance to the underscores > that you used? I've always used root, dirs, files when using o

Re: ImportError: cannot import name - newbie

2005-05-21 Thread Steven Bethard
[EMAIL PROTECTED] wrote: > """box.py""" > > class box: > def __init__(self): > print "in box" > > This program passes running "python box.py". > > I had put this program under /work/dev/mytests/new > > Now I want to use it from a second python program, which > resides in a totally differe

Re: How to receive events (eg. user mouse clicks) from IE

2005-05-21 Thread J Correia
"Roger Upole" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > There does appear to be some sort of conflict between the two event > hooks. I wasn't seeing it before since IE was getting google from my > browser cache and it was coming up almost instantaneously. As soon > as I switch

Re: Fw: evidence john bokma al jazeera connection ?

2005-05-21 Thread jg
William Baker wrote: > > > >please add forward to alt.security.terrorism if information > > p.p.s. "john bokma" shows long list in message boards, just in last > month. lots of information to netherlands where muslem militants > are. could some be coded cryption to aljazeera, so mes

http://www.tbn.org/films/videos/To_Hell_And_Back.ram << GREAT VIDEO! Just click on link to view.

2005-05-21 Thread AOLfan250106
http://www.tbn.org/films/videos/To_Hell_And_Back.ram << GREAT VIDEO! Just click on link to view. -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Veusz 0.6 - a scientific plotting package

2005-05-21 Thread qwweeeit
Hi Jeremy, I am interested in collaborating to your project, but first of all I must install Veusz and see what is the feeling I get. I'm almost a newbie in Python but I'm an old programmer and have quite a lot of experience in designing scientific software. For example I know very well contour pl

Re: python24.zip

2005-05-21 Thread Dieter Maurer
"Martin v. Löwis" <[EMAIL PROTECTED]> writes on Fri, 20 May 2005 18:13:56 +0200: > Robin Becker wrote: > > Firstly should python start up with non-existent entries on the path? > > Yes, this is by design. > > > Secondly is this entry be the default for some other kind of python > > installation?

Parsing XML - Newbie help

2005-05-21 Thread rh0dium
Hi all, I am relatively new to python and certainly new to XML parsing. Can some show me how to get the product text out of this? Really I want to know this has 2 processors and the are AMD Opteron(tm) Processor 250 I have gotten this far... class HWParser: def __init__(self): if

Re: SQL Query via python

2005-05-21 Thread Jeff Elkins
On Saturday 21 May 2005 01:32 pm, Dennis Lee Bieber wrote: > On Fri, 20 May 2005 23:57:01 -0400, Jeff Elkins > You have to remember that .execute(), using the (template, > (arg...)) format, is designed to apply suitable quoting to the > arguments. It does not parse the SQL to determine if argumen

Re: How to receive events (eg. user mouse clicks) from IE

2005-05-21 Thread Roger Upole
Reducing the sleep time in the loop also seems to speed things up. I'm guessing due to giving both event loops more resources, but I can't prove it conclusively. This might make a good candidate for the Cookbook (or there's a collection of IE automation examples at win32com.de) so anybody else try

Re: We are one of the world leading legal sources for male impotence treatments

2005-05-21 Thread qwweeeit
I should need "a great errrect1on "... but get away from beeing permanently on the top of the list! -- http://mail.python.org/mailman/listinfo/python-list

Re: python24.zip

2005-05-21 Thread Robin Becker
Dieter Maurer wrote: . > > The question was: > >"should python start up with **non-existent** objects on the path". > > I think there is no reason why path needs to contain an object > which does not exist (at the time the interpreter starts). > > In your use case, "python24.zip" does e

Re: Running a python program during idle time only

2005-05-21 Thread James Carroll
There's probably a way to tell how long the user has been idle, but here's how you can check the CPU load to see if it's elevated... (of course your program might elevate it too.) On linux, you can read from /proc/loadavg Here's a fun thing to try on windows... make sure you have the win32all

Re: python24.zip

2005-05-21 Thread "Martin v. Löwis"
Dieter Maurer wrote: > The question was: > >"should python start up with **non-existent** objects on the path". > > I think there is no reason why path needs to contain an object > which does not exist (at the time the interpreter starts). There is. When the interpreter starts, it doesn't kn

Re: Fw: evidence john bokma al jazeera connection ?

2005-05-21 Thread Neil Hodgson
There is a response to this on John's web site: http://johnbokma.com/mexit/2005/05/19/daniel-joseph-min.html Neil -- http://mail.python.org/mailman/listinfo/python-list

embedded python in c - function

2005-05-21 Thread PixelDust1
Hi guys, I am pretty new to Python and to embedding it in C. Here is what I am trying to accomplish: I have a C program that accepts user input, which can be a Python script which includes functions defined by the user line by line as typed in. Let me show the code that I have: #include "Python.

Re: first release of PyPy

2005-05-21 Thread Christian Tismer
Torsten Bronger wrote: ... > I've been told by so many books and on-line material that Python > cannot be compiled (unless you cheat). So how is this possible? Have a look at Psyco, that will be folded into and improved by PyPy. -- Christian Tismer :^)

Re: first release of PyPy

2005-05-21 Thread Christian Tismer
Ville Vainio wrote: >>"Torsten" == Torsten Bronger <[EMAIL PROTECTED]> writes: > > > Torsten> What's supposed to be compiled? Only PyPy itself or also > Torsten> the programs it's "interpreting"? > > PyPy is written in python, if it can be compiled then the programs can > be as wel

Re: first release of PyPy

2005-05-21 Thread Paul Rubin
Christian Tismer <[EMAIL PROTECTED]> writes: > Type inference works fine for our implementation of Python, > but it is in fact very limited for full-blown Python programs. > Yoou cannot do much more than to try to generate effective code > for the current situation that you see. But that's most oft

Re: first release of PyPy

2005-05-21 Thread Jp Calderone
On 21 May 2005 17:57:17 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: >Christian Tismer <[EMAIL PROTECTED]> writes: >> Type inference works fine for our implementation of Python, >> but it is in fact very limited for full-blown Python programs. >> Yoou cannot do much more than to try t

Re: first release of PyPy

2005-05-21 Thread Paul Rubin
Jp Calderone <[EMAIL PROTECTED]> writes: > Have you profiler data in support of this? Suggesting >optimizations, especially ones which require semantic changes to >existing behavior, without actually knowing that they'll speed things >up, or even that they are targetted at bottleneck code, is ki

Re: porting help

2005-05-21 Thread Neal Norwitz
You may need to write your own dynload_vxworks.c. Notice there are various OS specific dynload_*.c files. You can try to use dynload_stub.c to see if you can get it to compile. You may also need to muck with Include/pyport.h and configure to get things going. Good Luck! n -- http://mail.pytho

None module reference

2005-05-21 Thread Stefan Seefeld
hello, I'v run into a bug that I find hard to understand: In a python module of mine I import system modules ('sys', say) and then use them from within some functions. However, during program termination I'm calling one such function and the module reference ('sys') is 'None' ! What does that m

Re: SQL Query via python

2005-05-21 Thread Jeff Elkins
Just as an fyi: In one weekend I have gone from knowing zip about SQL/Python to implementing code on my personal server that emails info to family about birthdays and such. I know I could have installed other *nix programs that would do the same thing, but so what :) Thanks so much to the folk

Re: None module reference

2005-05-21 Thread Kay Schluehr
Stefan Seefeld wrote: > hello, > > I'v run into a bug that I find hard to understand: > > In a python module of mine I import system modules > ('sys', say) and then use them from within some functions. > > However, during program termination I'm calling > one such function and the module reference