Re: cut strings and parse for images

2004-12-07 Thread Andreas Volz
Am Tue, 07 Dec 2004 00:40:02 GMT schrieb Paul McGuire: Is this in the ballpark of where you are trying to go? Yes, thanks. You helped me a lot. Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: long number multiplication

2004-12-07 Thread Nick Coghlan
Christopher A. Craig wrote: i needed to implement this myself and was thinking of storing the digits of an integer in a list. That's sort of what Python does except the digits are 15 bits, not base 10. Doing it in base 10 would be a huge pain because of the problems with base 10-base 2

Re: RPC with Python - Comparison?

2004-12-07 Thread Wolfgang Keller
Am 6 Dec 2004 16:00:35 -0800 schrieb has: Wolfgang Keller wrote: MacPython also supports Apple events I know, but I was thinking of OS-independent RPC protocols. :-) Pity, you're missing some good stuff... :/ _I_ _am_ using a Mac at home. But not _everyone_ _else_ and especially not

Re: Deadlock detection

2004-12-07 Thread Duncan Grisby
In article [EMAIL PROTECTED], Josiah Carlson [EMAIL PROTECTED] wrote: Duncan Grisby [EMAIL PROTECTED] wrote: Does anyone know of a deadlock detector for Python? I don't think it would be too hard to hook into the threading module and instrument mutexes so they can be tested for deadlocks.

Re: Win32 Libs for 2.4

2004-12-07 Thread Robin Becker
Martin v. Löwis wrote: Robin Becker wrote: I thought that static .libs didn't make reference to the dll's they need; isn't that done at load time? Unfortunately, thanks to Microsoft's infinite wisdom, static libs *do* reference DLLs. The C lib headers contain things like #pragma lib(msvcrt.lib)

win32 extensions for Python 2.4

2004-12-07 Thread Ishwor
Hello all, I was looking through Mark Hammond's website for win32 extensions for Python 2.4 but couldn't find it. If i am not wrong has anyone any idea when it will be available or is it being worked on? The activestate's version of Python has win32 extension but i won't be bothered to download

Re: win32 extensions for Python 2.4

2004-12-07 Thread Simon Brunning
On Tue, 7 Dec 2004 21:25:03 +1030, Ishwor [EMAIL PROTECTED] wrote: Hello all, I was looking through Mark Hammond's website for win32 extensions for Python 2.4 but couldn't find it. If i am not wrong has anyone any idea when it will be available or is it being worked on? The activestate's

Re: win32 extensions for Python 2.4

2004-12-07 Thread Nick Coghlan
Ishwor wrote: Hello all, I was looking through Mark Hammond's website for win32 extensions for Python 2.4 but couldn't find it. If i am not wrong has anyone any idea when it will be available or is it being worked on? The activestate's version of Python has win32 extension but i won't be

Re: win32 extensions for Python 2.4

2004-12-07 Thread Ishwor
On Tue, 07 Dec 2004 21:00:22 +1000, Nick Coghlan [EMAIL PROTECTED] wrote: Ishwor wrote: Hello all, I was looking through Mark Hammond's website for win32 extensions for Python 2.4 but couldn't find it. If i am not wrong has anyone any idea when it will be available or is it being

Upgrading Python Article

2004-12-07 Thread Michael Foord
http://www.voidspace.org.uk/python/articles/upgrading_python.html I've been looking at whether to upgrade immediately from Python 2.3 to Python 2.4 or postpone it. This is my first `major version change`, so I've come up against the usual windoze (tm) problem - upgrading python breaks all my

Re: Problems getting TwistedMatrix

2004-12-07 Thread donnal
I just downloaded it yesterday, and it was very fast. Donnal Walter Arkansas Children's Hospital -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Wing IDE 2.0.1 released

2004-12-07 Thread Laura Creighton
Congratulations! Laura -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems getting TwistedMatrix

2004-12-07 Thread Donnal Walter
Lucas Raab wrote: Has anybody who has recently downloaded Twisted seem to have any problems with downloading it?? I'm a dial-up user (which might be why) and whenever I click the link to download it it takes 30+ for a 1.8 MB file, which should take only about 7-10. I just downloaded Twisted

Re: using cmd.exe as a telnet client

2004-12-07 Thread Jp Calderone
On Mon, 06 Dec 2004 12:52:31 -0600, Donnal Walter [EMAIL PROTECTED] wrote: I wrote: I've been wanting to get acquainted with Twisted for awhile now, ... BTW, do you know if Twisted's option negotiation uses a callback function? I might download it to take a look, ... Sorry I did not do

Loading a file only once into an object and being able to access it from other modules

2004-12-07 Thread Philippe C. Martin
This is a basic question I'm sure but I do not know wether to use __builtin__, global, or a static method: I have a very large XML file that I load into dictionnaries defined in a class located in a module that is imported in many places. Since the loading process is very slow, I would like

Re: Loading a file only once into an object and being able to access it from other modules

2004-12-07 Thread Remy Blank
Philippe C. Martin wrote: I have a very large XML file that I load into dictionnaries defined in a class located in a module that is imported in many places. Since the loading process is very slow, I would like the file not to be loaded on import or class instantiation, but only once

Re: Loading a file only once into an object and being able to access it from other modules

2004-12-07 Thread Andrew James
You're looking for the Singleton pattern to ensure that only one instance of your class is instantiated at a time. There's a particularly useful discussion about this at: http://c2.com/cgi/wiki?PythonSingleton I suggest you try the different methods out and pick the one best suited to your

Re: Unknown locale nb_NO ?

2004-12-07 Thread Stas Z
On Tue, 07 Dec 2004 15:22:00 +0100, Ola Natvig wrote: Stas Z wrote: Hello, Just noticed that the locale 'nb_NO' is not supported in Python?! [...] I believe the standard locale for Norsk bokmål is 'no_NO'. You could try that. When I 'googled' for it, I saw that no_NO has become

Re: cookie lib policy how-tp?

2004-12-07 Thread Jonathan Ellis
Riko Wichmann wrote: When I use opera to access this page by hand and look at the sources, I see the full sources when letting opera identify itself as MSIE 6.0. When using Mozilla 5.0 I get the same in-complete source file as with python. Sounds like your first step should be to identify

Re: regex syntax

2004-12-07 Thread Andreas Volz
Am Mon, 6 Dec 2004 17:24:35 -0800 (PST) schrieb [EMAIL PROTECTED]: Ich kann nicht spricht Deutch, aber: Ahh! Sorry for this! It was a mistake :-( regards Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: regex syntax

2004-12-07 Thread Andreas Volz
Am 6 Dec 2004 17:43:21 -0800 schrieb [EMAIL PROTECTED]: viel besser als das vergleichbare Regexp: re.match('.*\.jpg$', filename) Ok,now I've choosen this regex: '.*\.(?i)jpe?g' to get .jpg .JPG .jpeg .JPEG seems to work. Is this correct? regards Andreas --

Re: Loading a file only once into an object and being able to access it from other modules

2004-12-07 Thread Philippe C. Martin
Thank you all for your answers, I guess I would not have made Python 101:-) As far as I was concerned, importing a module twice would have resulted in loading the file twice. Regards, Philippe -- * Philippe C. Martin SnakeCard LLC www.snakecard.com *

PythonWin32 issue with McMillan Installer (6a2) and WMI

2004-12-07 Thread bschollnick
Folks, I have run into a strange problem, that I have not been able to solve. I have previously bundled this application with Installer successfully. Just recently though, I tried, and ran into a issue. Yes, I have made changes, but nothing I would expect this level of issue with... Mainly

Re: httpconnection class handle 302 redirect?

2004-12-07 Thread Laszlo Zsolt Nagy
Hello Joe, Tuesday, December 7, 2004, 3:50:53 AM, you wrote: Hi , it looks like that HTTPConnection class is not capable to handle 302 redirect response. Is there any sample implementation that tackle this problem? I am using python 2.3.3 on Windows platform. I'm using this method (inside

Re: Quixote+Nevow+LivePage

2004-12-07 Thread mirnazim
I am really sorry if i sounded a bit bad, i did not mean that. what i meant was that , i got my answer to Q2 that livepage is for twisted only. but Q1 and Q2 still stand. I m sorry again. -- http://mail.python.org/mailman/listinfo/python-list

Re: Time for : comp.lang.python.newbies ??

2004-12-07 Thread James Stroud
Maybe a time for a new discussion group along that suggested by the Subject line ? I would hesitate to change too much about this list. I spend about 1 hr. per day (probably too much) perusing the technical explanations, musings, and rants--and hoping to learn enough to reply with an answer

Re: using cmd.exe as a telnet client

2004-12-07 Thread Donnal Walter
Jp Calderone wrote: The iac_FOO method will be called whenever the telnet command FOO is received with the command's argument (the byte following it) as its only argument. When a subnegotiation is received, iacSBchunk is called. That's the 1.3 API, anyway. It will still exist in 2.0, but it is

Re: Deadlock detection

2004-12-07 Thread Stephen Kellett
In message [EMAIL PROTECTED], Duncan Grisby [EMAIL PROTECTED] writes understood, and there are plenty of systems that do it. I just haven't been able to find one for Python. There is one at http://www.softwareverify.com as I mentioned in a previous posting. Stephen -- Stephen Kellett Object

Webapp servers security

2004-12-07 Thread Anakim Border
App servers such as quixote, webware and skunkweb (just to name a few) offer a clean environment to develop Python webapps. I have some problems, however, understanding their security model. My objective is to host webapps from different people on a single Linux server; because of that, I want to

ming for python

2004-12-07 Thread titouille
Hello everybody !! anyone has try to build ming0.3beta1 for python 2.3.3 under windows ?? Since three days, I try to build it with mingw32, and finally, I am stopped with C declarations error in src/actioncompiler/swf4compiler.y If anyone has build with success ming (mingc.pyd) for python 2.3.3,

Re: Time for : comp.lang.python.newbies ??

2004-12-07 Thread Ron Phillips
Speaking for the newbies (or that segment of them who aren't asking you to do their homework/job/googling for them): The trouble is, we don't knowwhether we can't find information(X) because: "X" isnotthe term "knowbies" use for the concept, or because: information(X)is rare due tothe

Re: Webapp servers security

2004-12-07 Thread Alan Kennedy
[Anakim Border] App servers such as quixote, webware and skunkweb (just to name a few) offer a clean environment to develop Python webapps. I have some problems, however, understanding their security model. Since they each have different security models, that's not surprising. This is a

Re: Unknown locale nb_NO ?

2004-12-07 Thread Richard Brodie
Stas Z [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] However it strikes me as odd, that Python2.3.4 raises an exception when querying for a valid locale. I tend to call it a bug :-( File one in the bug tracker, then, and it might get fixed. --

Re: finding byte order

2004-12-07 Thread biner . sebastien
Scott David Daniels wrote: biner wrote: I am using a program that has to read binary data from files coming from different machines. The file are always written with big endian. Diez B. Roggisch wrote: [Scott David Daniels wrote] How about sys.byteorder? This doesn't help, as he

I need to create the table and I want to edit its content from www level.

2004-12-07 Thread Rootshell
Hi. Yes, the 'Tabla' concept seems to be very helpful. I need few days to instal and try it. Thank you very much. Greetings. Rootshell -- http://mail.python.org/mailman/listinfo/python-list

Re: How is Python designed?

2004-12-07 Thread Limin Fu
Hi, why did you choose that technique and not a common parser generator? The Because I didn't know the standard parse technique when I started to implement Yuan :) kind of parsing you use is somewhat oldfashioned - back in the times where parsing theory wasn't evolved enough. The

error on crude test of embedding python in c++ HELP PLEASE

2004-12-07 Thread Donnie Leen
I wrote a program to test calling c function from python code embedding in c as following, it cause error after running a while(about 398 circle). I test it in msvc6, python2.3, windows 2k, could anyone tell me why this happened since i just work according to the document? Thanks first. Donnie

PIL for Windows for Python 2.4

2004-12-07 Thread Scott F
As there is no build for Python 2.4, I attempted to put it together from source. Running setup.py build gives this error: Traceback (most recent call last): File C:\tmp\PIL\Imaging-1.1.4\setup.py, line 60, in ? for line in open(os.path.join(libImaging, ImConfig.h)).readlines():

Re: Unknown locale nb_NO ?

2004-12-07 Thread StasZ
On Tue, 07 Dec 2004 19:19:42 +, Richard Brodie wrote: Stas Z [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] However it strikes me as odd, that Python2.3.4 raises an exception when querying for a valid locale. I tend to call it a bug :-( File one in the bug tracker, then,

Sorting in huge files

2004-12-07 Thread Paul
Hi all I have a sorting problem, but my experience with Python is rather limited (3 days), so I am running this by the list first. I have a large database of 15GB, consisting of 10^8 entries of approximately 100 bytes each. I devised a relatively simple key map on my database, and I would like

Re: ming for python

2004-12-07 Thread Michel Claveau - abstraction méta-galactique non triviale en fuite perpétuelle.
Ha ! Ha ! Tu tentes la coup de l'émigration ? J'espère que ça marchera... -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

writing to mailboxes

2004-12-07 Thread Eric S. Johansson
I've been searching around for the equivalent to the mailbox module except with the capability of writing messages as well as reading. If it makes it easier, I only need to write to maildir mailboxes. I found a reference to http://pythonms.sf.net/ Python mail system) but it seems to have

Re: Webapp servers security

2004-12-07 Thread Istvan Albert
Anakim Border wrote: few) offer a clean environment to develop Python webapps. I have some problems, however, understanding their security model. Did I miss anything? They don't have a security model. AFAIK only Zope has. Istvan. -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I do this? (eval() on the left hand side)

2004-12-07 Thread It's me
Caleb Hattingh [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi It's me a = 3 y = a print eval(y) To get 'a' to be 4 here, you would say a = 4 Obviously but that's not what I wish to do. I am not sure why you would want to do otherwise? Perhaps you

sys.stdin.read question

2004-12-07 Thread It's me
Why do I get an AttributeError: read message when I do: import sys r=sys.stdin.read() ?? I've tried: r=sys.stdin.read(80) r=sys.stdin.read(1) same error message. I couldn't find any reference to this function in my Python book (they have the stdout but not in). Some sample

Re: Import a module without executing it?

2004-12-07 Thread Steven Bethard
Jay O'Connor wrote: -- def test(var): print var #main test(3) -- I want to be able to import this module so I can see ah ha, this module defines a function called 'test', but I don't want the code at the bottom executed during the import. If you have

Re: How do I do this? (eval() on the left hand side)

2004-12-07 Thread Caleb Hattingh
Sure, ok, I think I am with you now. You get a (e.g.) variable name as a string, and you KNOW how to evaluate it with eval, but you also want to be able to assign back to (through) the string representation? One way (if I understand you correctly) is with the globals or locals dicts. Try

Re: sys.stdin.read question

2004-12-07 Thread Grant Edwards
On 2004-12-07, It's me [EMAIL PROTECTED] wrote: Why do I get an AttributeError: read message when I do: import sys r=sys.stdin.read() Dunno. Works fine for me under 2.3.4, and according to the docs, should work under 2.4. What do you get when you do this: import sys

Re: How do I do this? (eval() on the left hand side)

2004-12-07 Thread Craig Ringer
On Wed, 2004-12-08 at 05:12, It's me wrote: There are many situations where this is useful. For instance, you might be getting an input which is a string representing the name of a variable and you wish to evaluate the expression (like a calculator application, for instance). While I do

Re: Sorting in huge files

2004-12-07 Thread Steven Bethard
Paul wrote: I expect a few repeats for most of the keys, and that s actually part of what I want to figure out in the end. (Said loosely, I want to group all the data entries having similar keys. For this I need to sort the keys first (data entries having _same_ key), and then figure out which

Re: Sorting in huge files

2004-12-07 Thread Paul
I really do need to sort. It is complicated and I haven't said why, but it will help in finding similar keys later on. Sorry I can't be more precise, this has to do with my research. Your two other suggestions with itertools and operator are more useful, but I was mostly wondering about

Re: cookie lib policy how-tp?

2004-12-07 Thread Marc Christiansen
Riko Wichmann [EMAIL PROTECTED] wrote: Jonathan Ellis wrote: Sounds like your first step should be to identify yourself as IE. opener = urllib2.build_opener(...) opener.addheaders = [(User-Agent, whatever IE calls itself these days)] -Jonathan Tried that already. At least, I hope

Re: Sorting in huge files

2004-12-07 Thread Steven Bethard
Paul wrote: Is this reasonnable to do on 10^8 elements with repeats in the keys? I guess I should just try and see for myself. Yeah, that's usually the right solution. I didn't comment on space/speed issues because they're so data dependent in a situation like this, and without actually looking

Re: Win32 Libs for 2.4

2004-12-07 Thread Robin Becker
Martin v. Löwis wrote: Robin Becker wrote: I don't think this forces the linker to load stuff from this module although I can see that it might be dangerous depending on which obj files are seen first. I think you are wrong. In the object, there will be simply a linker command line option

Re: How do I do this? (eval() on the left hand side)

2004-12-07 Thread It's me
Thanks for all the replies and yes I realize the associated issue of doing something like this. For simplicity sake, let's say I need to do something like this (for whatever reason): prompt for name of variable in someother program space you wish to retrieve go retrieve the value from that other

Re: sys.stdin.read question

2004-12-07 Thread Grant Edwards
On 2004-12-07, It's me [EMAIL PROTECTED] wrote: Dunno. Works fine for me under 2.3.4, and according to the docs, should work under 2.4. What do you get when you do this: import sys Done that. type(sys.stdin) I get: type 'instance' dir(sys.stdin) I get:

Re: sys.stdin.read question

2004-12-07 Thread Grant Edwards
On 2004-12-08, Caleb Hattingh [EMAIL PROTECTED] wrote: It runs properly in a shell (bash), but on another matter: ' r=sys.stdin.read(1) g ' r 'g' ' r=sys.stdin.read(5) 1234567890 ' r '\n1234' ' What exactly happened to my 1234567890? I understand that I am only taking 5

Re: PDF count pages

2004-12-07 Thread davidb
Andreas Lobinger wrote: Jose Benito Gonzalez Lopez wrote: Does anyone know how I could do in order to get/count the number of pages of a PDF file? Like this ? [...] import pdffile pf = pdffile.pdffile('../rfc1950.pdf') import pages pp = pages.pages(pf) len(pp.pagelist) [...]

Re: Python 2.3.5 ?

2004-12-07 Thread Tim Peters
[Luis M. Gonzalez] I'm confussed... Python 2.4 (final) hs been released a few days ago, but now I see that Python 2.3.5 is being worked on. Why? What does it mean? Just that enough volunteers exist interested in producing another bugfix release for the 2.3 line. It will probably be the last

Re: Python 2.3.5 ?

2004-12-07 Thread Larry Bates
Just because 2.4 arrives doesn't mean that ALL work is stopped on 2.3. It is quite common to have releases overlap. The very newest release is put out (2.4) , but bugs are still being fixed in older (2.3). Larry Bates Luis M. Gonzalez wrote: I'm confussed... Python 2.4 (final) hs been released

regex for url paramter

2004-12-07 Thread Andreas Volz
Hi, I try to extract a http target from a URL that is given as parameter. urlparse couldn't really help me. I tried it like this url=http://www.example.com/example.html?url=http://www.example.org/exa mple.html p = re.compile( '.*url=') url = p.sub( '', url) print url

RE: regex for url paramter

2004-12-07 Thread Robert Brewer
Andreas Volz wrote: I try to extract a http target from a URL that is given as parameter. urlparse couldn't really help me. I tried it like this url=http://www.example.com/example.html?url=http://www.exampl e.org/exa mple.html p = re.compile( '.*url=') url = p.sub( '', url) print url

Re: Python 2.3.5 ?

2004-12-07 Thread It's me
Not to mention that there are packages out there that doesn't work (yet) with 2.4. Pynum is one such package. -- It's me Larry Bates [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Just because 2.4 arrives doesn't mean that ALL work is stopped on 2.3. It is quite common to have

Python for Palm OS?

2004-12-07 Thread Erik Max Francis
I just got myself a new Treo 650 and was looking around for Python for Palm projects. The only ones I find are Pippy http://pippy.sourceforge.net/ and Python to Palm Pilot Port http://www.isr.uci.edu/projects/sensos/python/ both of which look to be rather stale. They're both

Pmw.ScrolledText

2004-12-07 Thread Donald L. Dietmeyer
I am attempting to put together a dumb terminal using a Pmw.ScrolledText to communicate via a serial port with a box that does the echoing of characters it receives. How can I stop the ScrolledText from echoing characters typed to it? Or lacking that, how can I know when a character has been

Re: Help with super()

2004-12-07 Thread Christopher J. Bottaro
Thank you everyone for the help, that cleared it up for me. Andy Gross wrote: Florian, See: http://www.python.org/doc/newstyle.html /arg On Dec 7, 2004, at 5:38 AM, Florian Lindner wrote: Steven Bethard schrieb: Christopher J. Bottaro wrote: Why don't this code work? import

RE: Help with generators outside of loops.

2004-12-07 Thread Robert Brewer
Christopher J. Bottaro wrote: I have a generator that works like this: for row in obj.ExecSQLQuery(sql, args): # process the row Now there are some querys that run where I know the result will only be a single row. Is there anyway to get that single row from the generator

Re: Import a module without executing it?

2004-12-07 Thread Jay O'Connor
Lonnie Princehouse wrote: The real question, I suppose, is what is a good technique to find what modules and classes implement or refer to particular names I think your best bet is still to import the module and introspect it. It will execute some code, but (by convention) simply importing a

Re: Help with generators outside of loops.

2004-12-07 Thread David Eppstein
In article [EMAIL PROTECTED], Robert Brewer [EMAIL PROTECTED] wrote: But I'm guessing that you can't index into a generator as if it is a list. row = obj.ExecSQLQuery(sql, args).next() I've made it a policy in my own code to always surround explicit calls to next() with try ... except

Problem while trying to extract a directory from a zipfile.

2004-12-07 Thread ralobao
I have this code: try: file = zipfile.ZipFile(nome_arquivo) Gauge.start() #inicia o Gauge for element in file.namelist(): try: newFile = open(diretorio + element,wb) except: newFile = open(diretorio + element +

Re: Upgrading Python Article

2004-12-07 Thread Jive
I had to back out of 2.4. In time I'll upgrade. It's not really fair to blame windoze for the incompatibility. It is possible to make software backward compatible with shared libraries. But you need a plan. The windoze plan is based on COM in its various guises. Of course, it's not standard

concurrent telnet sessions/consoles

2004-12-07 Thread Tony Pryor
hello, is anyone using python to spawn multiple concurrent telnet client consoles? i've tried to use concurrent telnet consoles in perl and feel like i'm getting snared by library idiosyncrasies. tony -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL for Windows for Python 2.4

2004-12-07 Thread Peter Hansen
Scott F wrote: As there is no build for Python 2.4, I attempted to put it together from source. Running setup.py build gives this error: Traceback (most recent call last): File C:\tmp\PIL\Imaging-1.1.4\setup.py, line 60, in ? for line in open(os.path.join(libImaging,

Re: Import a module without executing it?

2004-12-07 Thread Kent Johnson
Jay O'Connor wrote: The real question, I suppose, is what is a good technique to find what modules and classes implement or refer to particular names You might like to try ctags. I have had a good experience with it. It's not as automatic as I would like - you have to build a cross-reference

Python consultant

2004-12-07 Thread Adam
I know Java and C very well, and I've also decided to learn python. I am currently coding a web based massively multiplayer Nation Simulation with Python(that's how I learn languages, I undertake fairly large projects.) My friend and I have written a lot of it, and we started a project on

Re: Python for Palm OS?

2004-12-07 Thread Peter Hansen
Erik Max Francis wrote: I just got myself a new Treo 650 and was looking around for Python for Palm projects. The only ones I find are Pippy http://pippy.sourceforge.net/ and Python to Palm Pilot Port http://www.isr.uci.edu/projects/sensos/python/ both of which look to be rather stale.

Re: memoize factorial example (was Re: decorators ?)

2004-12-07 Thread Terry Reedy
Daniel 'Dang' Griffith [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] But the factorial example on the wiki has a defect. It incorrectly calculates factorial(0) as 0, when it should be 1. This is a matter of definition, and definitions apparently differ. fact(0) == 0 is a

Re: Book Recommendations

2004-12-07 Thread JanC
Nathan schreef: The link doesn't work -- maybe because of the new google groups interface? Can you repost with a working link? I think it's this: http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/7bc765e46f2d2180 -- JanC Be strict when sending and tolerant when

Re: memoize factorial example (was Re: decorators ?)

2004-12-07 Thread Tim Peters
[Daniel 'Dang' Griffith] But the factorial example on the wiki has a defect. It incorrectly calculates factorial(0) as 0, when it should be 1. [Terry Reedy] This is a matter of definition, and definitions apparently differ. fact(0) == 0 is a backward projection from the definition f(1) =

3D plotting library / OpenGL

2004-12-07 Thread Andrew Dalke
I've been looking for a decent 3D plotting library with support for user selection that works under OpenGl, preferable with wxPython. For this first project I need to do a 3D scatter plot with different colors and glyphs (spheres, crosses, etc.) for the points. The axes will be labeled and I

2D array

2004-12-07 Thread LutherRevisited
I'm wanting to do something with a list that is basically a 2 dimensional array. I'm not so good with lists so can someone give me an example of how I might implement this in Python? thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: memoize factorial example (was Re: decorators ?)

2004-12-07 Thread Fernando Perez
Terry Reedy wrote: Daniel 'Dang' Griffith [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] But the factorial example on the wiki has a defect. It incorrectly calculates factorial(0) as 0, when it should be 1. This is a matter of definition, and definitions apparently differ.

Re: 3D plotting library / OpenGL

2004-12-07 Thread Fernando Perez
Andrew Dalke wrote: I've been looking for a decent 3D plotting library with support for user selection that works under OpenGl, preferable with wxPython. For this first project I need to do a 3D scatter plot with different colors and glyphs (spheres, crosses, etc.) for the points. The axes

Re: memoize factorial example (was Re: decorators ?)

2004-12-07 Thread Fernando Perez
Fernando Perez wrote: No, fact(0)==1 simply because any proper definition of a factorial has to match up with the gamma function (offset by one) at all non-negative integers. So there's no room for any ambiguity here. I should have added a link to the ever-useful mathworld:

Re: 3D plotting library / OpenGL

2004-12-07 Thread Robert Kern
Andrew Dalke wrote: I've been looking for a decent 3D plotting library with support for user selection that works under OpenGl, preferable with wxPython. For this first project I need to do a 3D scatter plot with different colors and glyphs (spheres, crosses, etc.) for the points. The axes will be

Re: How is Python designed?

2004-12-07 Thread LutherRevisited
Kinda off subject, just thought I'd add that 0! = 1 for that recursion example, since that wasn't considered. Nice post though. -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with generators outside of loops.

2004-12-07 Thread Steven Bethard
Robert Brewer wrote: Christopher J. Bottaro wrote: I have a generator that works like this: for row in obj.ExecSQLQuery(sql, args): # process the row Now there are some querys that run where I know the result will only be a single row. Is there anyway to get that single row from the

Re: 2D array

2004-12-07 Thread Steven Bethard
LutherRevisited wrote: I'm wanting to do something with a list that is basically a 2 dimensional array. I'm not so good with lists so can someone give me an example of how I might implement this in Python? thanks. If you're planning to do anything serious with a 2D array, you should probably

Why I can't launch python 2.4 final IDLE?

2004-12-07 Thread AnkyHe
I downloaded the python 2.4 final from the offical website and installed it on WindowsXP+SP2 (Chinese version). There was not any problem in this process, but the IDLE can't be launched without any warnning. Is there anybody else encount this problem and how to resolve it? Thanks! --

Re: 3D plotting library / OpenGL

2004-12-07 Thread Mike C. Fletcher
I've got a collection of 3D libraries here: http://www.vrplumber.com/py3d.py?category=retained http://www.vrplumber.com/py3d.py?category=science My own OpenGLContext would likely handle what you've described. It's scenegraph based, can handle fairly large-ish worlds, allows for writing

after embedding and extending python (using swig) problem importing (non-core) modules

2004-12-07 Thread stefan
Hi Folks, I currenty extended some of my C++ functionality to python and also embedded python to use python functionality in my C++ system (and use as well these extended functions). While this works fine with the core python functionality, as soon as I run a script (on the embedded system)

Re: Python installation breaks Outlook Express

2004-12-07 Thread JanC
Mike schreef: I have the same problem. It isn't a problem with Outlook. It is with Python. I loose my wired AND wireless connections. Removing Python bringst them back to operational. Mike I don't know about the wired/wireless connections above, but this: M. Laymon wrote: I just

simple GUI question

2004-12-07 Thread Roose
I have been writing only command line programs in python, and I need a way to simply pop up a GUI dialog box, with an OK box. Simple huh? I have used tkMessageBox.showwarning. This works OK but it also pops up an empty frame -- i.e. it pops up 2 things. Is there a way to disable this, or is

Re: simple GUI question

2004-12-07 Thread vincent wehren
Roose wrote: I have been writing only command line programs in python, and I need a way to simply pop up a GUI dialog box, with an OK box. Simple huh? I have used tkMessageBox.showwarning. This works OK but it also pops up an empty frame -- i.e. it pops up 2 things. Is there a way to disable

Re: Python for Palm OS?

2004-12-07 Thread Maurice LING
Peter Hansen wrote: Erik Max Francis wrote: I just got myself a new Treo 650 and was looking around for Python for Palm projects. The only ones I find are Pippy http://pippy.sourceforge.net/ and Python to Palm Pilot Port http://www.isr.uci.edu/projects/sensos/python/ both of which look

Unicode docstrings in PyMethodDef?

2004-12-07 Thread Craig Ringer
Hi folks I'm currently working on a fairly well internationalised app that embeds a Python intepreter. I'd like to make the docstrings translatable, but am running into the issue that the translation function returns unicode data. Does anybody here know what encoding docstrings in PyMethodDef

Re: regex for url paramter

2004-12-07 Thread Paul McGuire
Robert Brewer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Andreas Volz wrote: I try to extract a http target from a URL that is given as parameter. urlparse couldn't really help me. I tried it like this url=http://www.example.com/example.html?url=http://www.exampl e.org/exa

opinions comments needed for improving a simple template engine.

2004-12-07 Thread Wensheng
Hi, I wrote a small template engine called spytee. Like any template enigne, it take a text(html) template file as input, process the variable tags in the file, and display the resulted text. The difference from most templates are: you can edit the template file in the html editor(Frontpage,

Re: after embedding and extending python (using swig) problem importing (non-core) modules

2004-12-07 Thread Donnie Leen
Du you use program in linux? I work in windows, but I think it's a way to tell your program the module path like this: char path[MAX_PATH], cpy_cmd[MAX_PATH];GetCurrentDirectory( MAX_PATH, path );sprintf( cpy_cmd, "sys.path.append(r\'%s\\modules\')", path );

Your message to Magick-announce awaits moderator approval

2004-12-07 Thread magick-announce-bounces
Your mail to 'Magick-announce' with the subject Re: Thanks! Is being held until the list moderator can review it for approval. The reason it is being held: Post by non-member to a members-only list Either the message will get posted to the list, or you will receive notification of the

  1   2   >