Announce: Release of HP54111D version 0.3

2004-12-20 Thread Philippe Dalet
Announce: Release of HP54111D version 0.3 I'm glad to announce the release of HP54111D 0.3. HP54111D's homepage is at; http://gpib82357a.sourceforge.net/pyHP54111D.htm and downloads are at: http://sourceforge.net/projects/HP54111D/

ANN: Kamaelia - A Network Testbed

2004-12-20 Thread Michael Sparks
Kamaelia - A Network Testbed I'm very pleased to be able to be able to announce the release of the BBC's RD KAMAELIA project under open source licensing terms to all potential collaborative partners in the network community. Kamaelia is collection of python modules

ANN: Python Multimedia Computing book and software

2004-12-20 Thread Doug Holton
This book is due to be published any day now: Introduction to computing and programming with Python: A Multimedia Approach by Mark Guzdial, a CS professor at Georgia Tech. It uses the Jython Environment for Students (JES). You can use this to for example work with and manipulate images or

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread ian
Hi Fredrik, Thank you for the suggestion. I tried different from/to settings and guess what? The mail came thru. The script is now.. import win32com.client s = win32com.client.Dispatch('CDO.Message') s.From = [EMAIL PROTECTED](was [EMAIL PROTECTED]) s.To = [EMAIL

Re: How about pure virtual methods?

2004-12-20 Thread Carl Banks
Fredrik Lundh wrote: (I think you could create some kind of drinking game based on the number of non-quoted lines between the From-line and the first line containing the word boo in Doug's posts on comp.lang.python. A little like the game based on the number of minutes between someone

Re: Language fluency (was Re: BASIC vs Python)

2004-12-20 Thread Alan Gauld
On 19 Dec 2004 16:22:03 -0500, [EMAIL PROTECTED] (Aahz) wrote: I'm curious about that last statement. Are you saying that if you write, full time, code for production, that fluency will decrease? Or that the nifty recent features of Python (generators, etc.) are not useful in production code?

Re: Is this a good use for lambda

2004-12-20 Thread Max M
The entity Fredrik Lundh wrote: /F Isn't it about time you became xml avare, and changed that to: f/ ? -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: BASIC vs Python

2004-12-20 Thread Alan Gauld
was too late). A machine designed to be run on Forth would have been unbelievably powerful from the late 70s to the mid 90s (it would be more painful now than the x86 legacy, but still). A small data point here is that Sun still use Forth in their Sparc workstations. Their system prompt is

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread ian
Hi Ganesan Wow, I'm REALLY impressed with the high level of support in this forum. (Another great reason to continue learning Python grin I tried what you suggested. After trying a different from/to address the message is sent. But it is NOT sent via Outlook Express. I would appreciate any

Re: Is this a good use for lambda

2004-12-20 Thread Michael Hoffman
Max M wrote: Isn't it about time you became xml avare, and changed that to: f/ That makes no sense. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie question

2004-12-20 Thread Steve Holden
Doug Holton wrote: David Wurmfeld wrote: I am new to python; any insight on the following would be appreciated, even if it is the admonition to RTFM (as long as you can direct me to a relevant FM) Is there a standard approach to enumerated types? I could create a dictionary with a linear set

Re: Is this a good use for lambda

2004-12-20 Thread Steve Holden
Michael Hoffman wrote: Max M wrote: Isn't it about time you became xml avare, and changed that to: f/ That makes no sense. Yeah, but give the guy a break, we've all made feeble attempts at humor from time to time. You realize, I suppose, that it's a reference to the fact that XHTML uses

Re: accessing module global vars by name

2004-12-20 Thread Peter Hansen
Martin Drautzburg wrote: Withing a module I can assign a value to a global var by assigning to it in the outermost scope. Fine. But how can I do this if the attribute name itself is kept in a variable. Once the module is loaded I can access the module's namespace no problem, but inside the module

Re: MySQLdb Python 2.4 on Windows

2004-12-20 Thread Matthias Verniers
Fredrik Lundh schreef: Matthias Verniers wrote: 2. Is it possible to use Python 2.4 2.3 next to each other without conflicts? yes, assuming next to each other means on the same machine. but binary extensions are bound to the Python version they were built for; you cannot use a 2.3 extension

Re: input record seperator (equivalent of $| of perl)

2004-12-20 Thread Gábor Farkas
Scott David Daniels wrote: M.E.Farmer wrote: I dont have itertools yet. That module looks like it rocks. thanks for the pointers, M.E.Farmer If you have python 2.3 or 2.4, you have itertools. for me it seems that 2.3 does not have itertools.groupby. it has itertools, but not itertools.groupby.

Re: input record seperator (equivalent of $| of perl)

2004-12-20 Thread Nick Coghlan
[EMAIL PROTECTED] wrote: I would like to read this file as a record. I can do this in perl by defining a record seperator; is there an equivalent in python? Depending on your exact use case, you may also get some mileage out of using the csv module with a custom delimeter. Py from csv import

Re: MySQLdb Python 2.4 on Windows

2004-12-20 Thread Steve Holden
Fredrik Lundh wrote: Matthias Verniers wrote: 2. Is it possible to use Python 2.4 2.3 next to each other without conflicts? yes, assuming next to each other means on the same machine. but binary extensions are bound to the Python version they were built for; you cannot use a 2.3 extension with

Re: Is this a good use for lambda

2004-12-20 Thread Simo Melenius
Fredrik Lundh [EMAIL PROTECTED] writes: Simo Melenius wrote: Sure, but mental pollution counts too IMO. What you write and what you read must go through your brain, including dummy variables. And next you start thinking how to hide it from your own mind (e.g. naming it _my_local_func or

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread Ganesan R
ian == ian [EMAIL PROTECTED] writes: Hi Ganesan Wow, I'm REALLY impressed with the high level of support in this forum. (Another great reason to continue learning Python grin Well, I am a Linux guy myself. I experimented with win32com a bit a couple of weeks back, so I am trying my ideas on

convert \uXXXX to native character set?

2004-12-20 Thread Joe Wong
Hi, Is there any library to convert HTML page with \u encoded text to native character set, e.g. BIG5. Regards, - Joe No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.296 / Virus Database: 265.6.0 - Release Date: 2004/12/17 --

Re: convert \uXXXX to native character set?

2004-12-20 Thread Miki Tebeka
Hello Joe, Is there any library to convert HTML page with \u encoded text to native character set, e.g. BIG5. Try: help(.decode) Bye. -- Miki Tebeka [EMAIL PROTECTED] http://tebeka.bizhat.com The only

eScrew zen story

2004-12-20 Thread eScrewDotCom
eScrew Welcome to eScrew! eScrew is eScrew and this is eScrew story. eScrew will tell you eScrew story if you promise eScrew to consider eScrew story as joke. eScrew story is very funny. eScrew story is so funny that eScrew will have to take break from time to time because eScrew needs some rest

Re: Boo who? (was Re: newbie question)

2004-12-20 Thread Luis M. Gonzalez
Peter Hansen wrote: And given that Boo is *not* virtually identical to Python*, pointing it out to a self-proclaimed newbie with a question about enums seems like nothing more than an ill-chosen moment to do a little proselytizing. Why not just start a thread about Boo and point it out to

Re: Why are tuples immutable?

2004-12-20 Thread Antoon Pardon
On 2004-12-17, John Roth [EMAIL PROTECTED] wrote: I came in on this thread a bit late. The strictly pragmatic answer to the question in the header should be obvious. If tuples were mutable, then there would be no difference between tuples and lists, so there would be no need for tuples.

Re: MySQLdb Python 2.4 on Windows

2004-12-20 Thread Steve Holden
Matthias Verniers wrote: [...] Good job! It would be nice if I could have a copy of your installer. I am one of the interested people ;-) Regards As I reported, I've shipped a copy of the installer to Andy Dustman, so it will appear on SourceForge in due course. For those who can't wait,

Re: MySQLdb Python 2.4 on Windows

2004-12-20 Thread Matthias Verniers
Steve Holden schreef: Matthias Verniers wrote: [...] Good job! It would be nice if I could have a copy of your installer. I am one of the interested people ;-) Regards As I reported, I've shipped a copy of the installer to Andy Dustman, so it will appear on SourceForge in due course. For those

Re: Web forum (made by python)

2004-12-20 Thread Nick Coghlan
Alan Kennedy wrote: But I really don't think we've had any trolls in the NG lately, although perhaps one or two people have been *extremely* grumpy ;-) Aye - one thing I've noticed on both py-dev and here, is that when people seem especially snippy, sarcastic or touchy, my best bet is to assume

Re: Is this a good use for lambda

2004-12-20 Thread Fredrik Lundh
I just found it amusing that somenone like Frederik Lundh, who has written xml stuff like ElementTree, uses something that reminds of an old HTML tag as a sig. it's a perfectly valid XML end tag. locating the start tag is left as an exercise... /F --

Best GUI for small-scale accounting app?

2004-12-20 Thread Bulba!
I'll soon start development of a specialized small app and need to choose GUI for it. I have narrowed the choice to wxPython/PythonCard and QT/PyQT (buying commercial licenses is not a big problem, the company would pay for it). Which is better for this kind of application? I mean, looking

Recursive structures

2004-12-20 Thread bearophileHUGS
(This is a repost from another python newsgroup). While using some nested data structures, I've seen that I'd like to have a function that tells me if a given data structure contains one or more cyclic references (a way to recognise a cycle in a graph is to do a depth-first search, marking

Re: Web forum (made by python)

2004-12-20 Thread Fredrik Lundh
Nick Coghlan wrote: Aye - one thing I've noticed on both py-dev and here, is that when people seem especially snippy, sarcastic or touchy, my best bet is to assume it's something in real life that's pissing them off, rather than anything I actually said. works both ways -- it can be

Re: embedding: forcing an interpreter to end

2004-12-20 Thread Diez B. Roggisch
Hi, I've googled my heart out and reread the threading API countless times. Any suggest or hints would be greatly appreciated. You might have used the wrong keywords - the subject of killable threads comes up every month once or twice, and usually is discussed to some length. There exist some

Re: Recursive structures

2004-12-20 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: (This is a repost from another python newsgroup). While using some nested data structures, I've seen that I'd like to have a function that tells me if a given data structure contains one or more cyclic references (a way to recognise a cycle in a graph is to do a

Re: Boo who? (was Re: newbie question)

2004-12-20 Thread Steve Holden
Luis M. Gonzalez wrote: Peter Hansen wrote: And given that Boo is *not* virtually identical to Python*, pointing it out to a self-proclaimed newbie with a question about enums seems like nothing more than an ill-chosen moment to do a little proselytizing. Why not just start a thread about Boo and

Re: Is this a good use for lambda

2004-12-20 Thread Fredrik Lundh
Simo Melenius wrote: use something short, like f. hopefully, a single character won't overload your brain. I've heard some brain can tackle even Java's overly verbose syntax I find that hard to believe. Are you sure they're not relying on eclipse, or some other body part? Like someone

Re: Best GUI for small-scale accounting app?

2004-12-20 Thread Steve Holden
Paul Rubin wrote: Bulba! [EMAIL PROTECTED] writes: I'll soon start development of a specialized small app and need to choose GUI for it. I have narrowed the choice to wxPython/PythonCard and QT/PyQT What does the app need to do? I'd try to make it web based unless there's a good reason not

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread ian
Hi Steve, Why the insistence on using Outlook Express, is you don;t mind me asking? Good question. The problem is that I have a developed a freeware application called Kirby Alarm And Task Scheduler (see www.kirbyfooty.com). The program can pop up a note, run a program, play a sound, or send an

Re: Best GUI for small-scale accounting app?

2004-12-20 Thread Bulba!
On 20 Dec 2004 04:43:06 -0800, Paul Rubin http://[EMAIL PROTECTED] wrote: I'll soon start development of a specialized small app and need to choose GUI for it. I have narrowed the choice to wxPython/PythonCard and QT/PyQT What does the app need to do? Basically, it's for a data-entry

Re: Funny story about python

2004-12-20 Thread Lucas Raab
[snip] eScrew eScrew will keep writing this shit because eScrew enjoys to masturbate your spiritual sense of self eScrew Awww, it was such a good story until now. -- http://mail.python.org/mailman/listinfo/python-list

Re: No acceptable C compiler was found in $PATH

2004-12-20 Thread Peter Nuttall
On Monday 20 Dec 2004 03:58, banaticus wrote: What does this error message mean? What can I do to fix it? Here'e the command that I just tried running, and the messages that I received. I just barely unpacked python. linux:/Python-2.4 # ./configure checking MACHDEP... linux2 checking

Re: Parallelization with Python: which, where, how?

2004-12-20 Thread Fredrik Lundh
Mathias [EMAIL PROTECTED] wrote: I have a (pretty much) emberassingly parallel problem and look for the right toolbox to parallelize it over a cluster of homogenous linux workstations. I don't need automatic loop-parallelization or the like since I prefer to prepare the work packets by

Re: Best GUI for small-scale accounting app?

2004-12-20 Thread Paul Rubin
Steve Holden [EMAIL PROTECTED] writes: What does the app need to do? I'd try to make it web based unless there's a good reason not to. That's even if it just runs on the user's desktop; run the http listener on the localhost and let the user connect to it with a browser. I'm not sure

Re: Best GUI for small-scale accounting app?

2004-12-20 Thread Paul Rubin
Bulba! [EMAIL PROTECTED] writes: Reason 1: It would be somewhat complex to develop it using PHP (I have done some recon in that area) and using GUI on Windows is actually faster way of entering and editing data than via the Web browser I think. Well, I was concentrating more on

Re: Best GUI for small-scale accounting app?

2004-12-20 Thread RM
Here is another question, are you deploying in Linux, Windows, Mac, or some combination of these? I think that may be a big factor to consider. I do like the look of Qt under Linux, however, I have never seen it under Windows. Qt seems to be very focused in Linux, with Mac and Windows support

Re: Writev

2004-12-20 Thread Adam DePrince
On Mon, 2004-12-20 at 02:18, Steven Bethard wrote: Adam DePrince wrote: file.writelines( seq ) and map( file.write, seq ) are the same; the former is syntactic sugar for the later. Well, that's not exactly true. For one thing, map(file.write, seq) returns a list of Nones, while

Re: Parallelization with Python: which, where, how?

2004-12-20 Thread Ganesan R
Mathias == Mathias [EMAIL PROTECTED] writes: Dear NG, I have a (pretty much) emberassingly parallel problem and look for the right toolbox to parallelize it over a cluster of homogenous linux workstations. I don't need automatic loop-parallelization or the like since I prefer to prepare

Re: Funny story about python

2004-12-20 Thread has
has wrote: Not sure which is less Turing-complete: eScrew, or eScrew's author... Oops, I meant 'AI-complete'. -- http://mail.python.org/mailman/listinfo/python-list

Re: Funny story about python

2004-12-20 Thread has
has wrote: Not sure which is less Turing-complete: eScrew, or eScrew's author... Oops, I meant 'AI-complete'. -- http://mail.python.org/mailman/listinfo/python-list

Re: Funny story about python

2004-12-20 Thread has
has wrote: Not sure which is less Turing-complete: eScrew, or eScrew's author... Oops, I meant 'AI-complete'. On second thoughts, 'Turing-complete' works too. -- http://mail.python.org/mailman/listinfo/python-list

Re: Best GUI for small-scale accounting app?

2004-12-20 Thread Phil Thompson
Here is another question, are you deploying in Linux, Windows, Mac, or some combination of these? I think that may be a big factor to consider. I do like the look of Qt under Linux, however, I have never seen it under Windows. Qt seems to be very focused in Linux, with Mac and Windows

Re: Boo who? (was Re: newbie question)

2004-12-20 Thread Steve Holden
Luis M. Gonzalez wrote: Steve, I didn't want to be agressive at all. Although now that I read again my post, it seems a little bit harsh... But I see that very often in this list, some replies show much of intolerance and very little politeness. And in my oppinion, this is one of these cases. I

Re: extending python with a C-written dll

2004-12-20 Thread Grant Edwards
On 2004-12-20, Jean-Baptiste PERIN [EMAIL PROTECTED] wrote: I'm trying to make a windows dll reachable from a python script.. FWIW, you can call dll's using the ctypes modules without mucking around in C. There may be performance reasons to build a real python module, but I haven't run across

Re: mx Oddity in FC3/RedHat ES

2004-12-20 Thread Steve Holden
Eric Azarcon wrote: Hello! I've installed the mx package from egenix, and I am experiencing pretty odd behaviour. If I launch python and run the following commands, I get an error: import mx from mx import * mx.DateTime.today() Well, from anything import * is bad form for any module unless

Re: Newbie: A very basic problem related to cgi.py

2004-12-20 Thread Peter Hansen
Steve Holden wrote: Traceback (most recent call last): File cgi.py, line 2, in ? import cgi File /c/steve/cgi.py, line 12, in ? main() File /c/steve/cgi.py, line 6, in main form = cgi.FieldStorage() AttributeError: 'module' object has no attribute 'FieldStorage' Ha! There's a

Re: Newbie: A very basic problem related to cgi.py

2004-12-20 Thread Ali
You are right, I had first named my file cgi.py... but then i realized that it was causing conflicts so i renamed it to mycgi.py as you can see in the trace, but the problem persisted... After reading your reply i took a look at the directory i was in and there was a pyc file in it... cgi.pyc, i

Re: extending python with a C-written dll

2004-12-20 Thread Jean-Baptiste PERIN
Grant Edwards a écrit : On 2004-12-20, Jean-Baptiste PERIN [EMAIL PROTECTED] wrote: I'm trying to make a windows dll reachable from a python script.. FWIW, you can call dll's using the ctypes modules without mucking around in C. There may be performance reasons to build a real python module,

Re: how to pass globals across modules (wxPython)

2004-12-20 Thread Larry Bates
I also struggled with this until I looked into many of the wxWindows examples. They all tend to pass in the parent to each subsequent layer of classes so that they can easily refer backwards in the hierarchy. Example In your code you will find that inside of SetTopWindow you have parent as the

Re: Time Difference

2004-12-20 Thread Gabriel Cooper
GMane Python wrote: Hello I was wondering if there is an existing function that would let me determine the difference in time. For a more robust solution, checkout Python's profile module. http://docs.python.org/lib/profile.html -- http://mail.python.org/mailman/listinfo/python-list

Re: mx Oddity in FC3/RedHat ES

2004-12-20 Thread Eric Azarcon
In article [EMAIL PROTECTED], Steve Holden [EMAIL PROTECTED] wrote: from anything import * is bad form for any module unless (like Tkinter, for example) it's been Ah, I see. Thank you. Is there any reference, or way for me to determine whether something can/should be imported in this

type method-wrapper?

2004-12-20 Thread Thomas Guettler
Hi, l=[] print type(l.__delattr__) # -- type 'method-wrapper' I didn't find a corresponding type in the modules types. Is it missing or am I blind? (Python 2.3.3) -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread ian
Hi Max, Thanks for the suggestion. I'm always open to new ideas. Can you please tell me how to retrieve the default account settings from Outlook Express? Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: extending python with a C-written dll

2004-12-20 Thread Grant Edwards
On 2004-12-20, Jean-Baptiste PERIN [EMAIL PROTECTED] wrote: I'm trying to make a windows dll reachable from a python script.. FWIW, you can call dll's using the ctypes modules without mucking around in C. There may be performance reasons to build a real python module, but I haven't run

Re: Recursive structures

2004-12-20 Thread Thomas Guettler
Am Mon, 20 Dec 2004 04:22:24 -0800 schrieb bearophileHUGS: I've seen that I'd like to have a function that tells me if a given data structure contains one or more cyclic references Hi, does this help you? from types import * def isrecursive(obj, dict=None): if dict==None:

Re: Best GUI for small-scale accounting app?

2004-12-20 Thread Paul Rubin
Bulba! [EMAIL PROTECTED] writes: Your CherryPy powered web applications are in fact stand-alone Python applications embedding their own web server. You can deploy them anywhere you can run Python applications. - cool!! You might not really want a separate socket listener for each application.

Re: mx Oddity in FC3/RedHat ES

2004-12-20 Thread Steve Holden
Eric Azarcon wrote: [...] My needs are pretty simple. Maybe you can point me in the right direction. I need to compare the creation time of a file with a date, and determine if I need to delete it. I know how to use stat to get the file creation time. I can get the current time. If I subtract the

Re: Best GUI for small-scale accounting app?

2004-12-20 Thread RM
Bulba! wrote: Hmm.. and if I may ask, what limitations you have stumbled on? In reality, PythonCard is just an easier way of manipulating wxPython. The thing is that PythonCard needs to have a wraper for each wxPython widget that it uses, and, then that wrapper needs to be incorporated into

mod_python and xml.sax

2004-12-20 Thread Jeffrey Froman
I am having difficulty getting mod_python and xml.sax to play nicely with each other. I am using: Python 2.4 Mod_python 2.7.10 Apache 1.3.33 Using the mod_python.publisher handler to invoke the go function in the following script: from xml.sax import make_parser def go(): x = make_parser()

Re: extending python with a C-written dll

2004-12-20 Thread Grant Edwards
On 2004-12-20, Jean-Baptiste PERIN [EMAIL PROTECTED] wrote: OK .. ctypes looks great .. and I plan to use it for futur purposes The fact is that the python interpreter I use is not a standard one It is a python interpreter delivered within a software named Blender. I don't know whether it

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread Chris
I'm a newbie (oh no I can here you say another one...) How can I get Python to send emails using the default windows email client (eg outlook express)? I thought I could just do the following import win32com.client s = win32com.client.Dispatch('CDO.Message') s.From = [EMAIL PROTECTED] s.To =

RE: Best GUI for small-scale accounting app?

2004-12-20 Thread Gabriel Cosentino de Barros
Title: RE: Best GUI for small-scale accounting app? ( sorry about top posting) 1. Ever avoid web based. unless you have to do it webbased. I've been doing web based apps for 5 years now. it simple don't pay off! usability within a browser sucks, unless you can spend time re-writting the

Re: Best GUI for small-scale accounting app?

2004-12-20 Thread RM
I admit that I don't know much about Qt in Windows. As, I said, I've never seen it. The fact that they don't offer a GPLed version for Windows is a deterrent for me. I have heard very nice things about Qt's api. I even bought a book on it, but since the apps I've needed to write, had to be

Re: input record seperator (equivalent of $| of perl)

2004-12-20 Thread Scott David Daniels
Gábor Farkas wrote: Scott David Daniels wrote: If you have python 2.3 or 2.4, you have itertools. for me it seems that 2.3 does not have itertools.groupby. it has itertools, but not itertools.groupby. True. The 2.4 document says that itertools.groupby() is equivalent to: class groupby(object):

Tabnanny really useful?

2004-12-20 Thread Franz Steinhaeusler
Hi, I looked at tabnanny to check a python source file. But I didn't find anything, tabnanny is able to find, what couldn't be found by compile command. Or have I missed something? best regards, -- Franz Steinhaeusler -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie: A very basic problem related to cgi.py

2004-12-20 Thread Peter Hansen
Steve Holden wrote: Peter Hansen wrote: I suspected that too, Steve, but why would it be showing the library cgi.py in the traceback if he had a local one with the same name? Weird. (Unless, as I wondered in my redundant reply, the traceback he posted wasn't the real traceback...) It *is* a

Re: Best GUI for small-scale accounting app?

2004-12-20 Thread Diez B. Roggisch
Question for you, does Qt use the native Windows dialogs and widgets or does it use its own? If the latter, how close are they to the native look? Will they change appearance when a user chooses a different theme in the Display Dialog? AFAIK they do all stuff themselves. And also AFAIK

List limits

2004-12-20 Thread [EMAIL PROTECTED]
How many items can be stored in a Python list? I have close to 70,000 items... is this within a lists limits? -- http://mail.python.org/mailman/listinfo/python-list

Code without effect (wx demo TreeCtrl.py ImageList)

2004-12-20 Thread Martin Drautzburg
In the wx demoy TreeCtrl.py I find the following code, that should have no effect but seems to be needed nevertheless. class TestTreeCtrlPanel(wx.Panel): def __init__(self, parent, log): [...} self.tree = MyTreeCtrl(self, tID, wx.DefaultPosition, ... isz = (16,16)

Re: extending python with a C-written dll

2004-12-20 Thread Jean-Baptiste PERIN
thanks for your valuable help .. ctypes is not lost for ever ..I'm going to explore a little bit .. it may suit my need in the end .. I had read : http://www.python.org/dev/doc/devel/ext/intro.html and eveything looked so simple in it .. I'm sad to realize that it only works for linux plateform

Re: Writev

2004-12-20 Thread Steven Bethard
Adam DePrince wrote: [snip great explanation] I want to include it because POSIX has a single OS call that conceptually maps pretty closely to writelines. writev can be faster because you don't have to do memory copies to buffer data in one place for it -- the OS will do that, and can sometimes

Re: List limits

2004-12-20 Thread Jeff Epler
I'm referring to Python 2.2's C headers as I answer this question. I believe some of may have changed by 2.4. The number of elements in a variable-sized object (those with Py_VAR_HEAD; I believe this includes lists, tuples, and strings) is stored in a platform 'int'. On most (desktop) systems,

RE: type method-wrapper?

2004-12-20 Thread Robert Brewer
Thomas Guettler wrote: Hi, l=[] print type(l.__delattr__) # -- type 'method-wrapper' I didn't find a corresponding type in the modules types. Is it missing or am I blind? You're not blind. Have a look at Objects\decrobject.c in CVS.

Re: Code without effect (wx demo TreeCtrl.py ImageList)

2004-12-20 Thread Steve Holden
Martin Drautzburg wrote: In the wx demoy TreeCtrl.py I find the following code, that should have no effect but seems to be needed nevertheless. class TestTreeCtrlPanel(wx.Panel): def __init__(self, parent, log): [...} self.tree = MyTreeCtrl(self, tID, wx.DefaultPosition, ...

Re: Recursive structures

2004-12-20 Thread Scott David Daniels
Thomas Guettler wrote: code to do the test The following transformation of his code shows how exceptions can be used to make code read more clearly. There are a few issues (such as AVOIDITER) to decide on, and usually you are inquiring about your own data structures (which you'll know more

Silly questions about True and False

2004-12-20 Thread drs
I just upgraded my Python install, and for the first time have True and False rather than 1 and 0. I was playing around at the command line to test how they work (for instance, if 9: and if True: both lead to the conditional being executed, but True == 9 - False, that this would be true was not

Re: extending python with a C-written dll

2004-12-20 Thread Diez B. Roggisch
and look at the expected result .. it is far simpler from the python side view But you have to do all the C-Work! I think ctype is uselful when dealing with dll you're not the author of It is useful, if you don't want to write an extension for the extra work that is needed for that - for

Re: Code without effect (wx demo TreeCtrl.py ImageList)

2004-12-20 Thread Paul McGuire
Martin Drautzburg [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] In the wx demoy TreeCtrl.py I find the following code, that should have no effect but seems to be needed nevertheless. class TestTreeCtrlPanel(wx.Panel): def __init__(self, parent, log): [...}

Re: extending python with a C-written dll

2004-12-20 Thread Scott David Daniels
Jean-Baptiste PERIN wrote: Hi, I'm trying to make a windows dll reachable from a python script .. and I'm encountering troubles during link step .. I use lcc to compile and link I use python 2.3 under win XP Note that MinGW32 is a tested path for building (free) C extensions. I don't know if

Re: A rational proposal

2004-12-20 Thread Christopher A. Craig
I've been thinking about doing this for a while. cRat (http://sf.net/projects/pythonic) already meets these qualifications except that I need to add decimal support to it now that decimals are in the language. I could rewrite the existing code in Python (it's currently in C), but there are some

Re: extending python with a C-written dll

2004-12-20 Thread Jean-Baptiste PERIN
error: Python was built with version 6 of Visual Studio, and extensions need to be built with the same version of the compiler, but it isn't installed. How do you expect to be able to write your own extension if you don't have the environment to do so in the first place? that error has nothing

Re: . is a good idea! (OT, was: Re: do you master list comprehensions?)

2004-12-20 Thread Scott David Daniels
Bengt Richter wrote: Not true on NT4 at least: Alt-Spacebar gets you the system menu paste into the dos window with Alt-spacebar e p Thanks immensely for this -- I love it. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Recursive structures

2004-12-20 Thread Steven Bethard
Scott David Daniels wrote: if mytype not in AVOIDITER: try: for item in obj: walks(item, seen) except TypeError: pass try: for key, value in obj.items(): walks(key, seen) # Key might be object w/ hash method

Re: extending python with a C-written dll

2004-12-20 Thread Grant Edwards
On 2004-12-20, Jean-Baptiste PERIN [EMAIL PROTECTED] wrote: I know it has nothing to do with python .. It just makes me sad to see that python cannot get rid of Visual Studoi to be extended. That's got nothing to do with Python. You have to compile extensions using a compiler that has an

Re: A completely silly question

2004-12-20 Thread David Bolen
Fredrik Lundh [EMAIL PROTECTED] writes: Well, but that's true as well for getchar() (at least in many cases of interactive input and line buffering), so in that respect I do think it's a fairly direct replacement, depending on how the OP was going to use getchar() in the application.

Re: Tabnanny really useful?

2004-12-20 Thread John Roth
Franz Steinhaeusler [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I looked at tabnanny to check a python source file. But I didn't find anything, tabnanny is able to find, what couldn't be found by compile command. Or have I missed something? Tabnanny is intended to check whether

Re: Silly questions about True and False

2004-12-20 Thread Steve Holden
Peter Hansen wrote: drs wrote: I just upgraded my Python install, and for the first time have True and False rather than 1 and 0. I was playing around at the command line to test how they work (for instance, if 9: and if True: both lead to the conditional being executed, but True == 9 - False,

Re: Silly questions about True and False

2004-12-20 Thread Steven Bethard
drs wrote: I just upgraded my Python install, and for the first time have True and False rather than 1 and 0. I was playing around at the command line to test how they work (for instance, if 9: and if True: both lead to the conditional being executed, but True == 9 - False, that this would be

Re: A rational proposal

2004-12-20 Thread Bengt Richter
On Fri, 17 Dec 2004 21:29:52 -0600, Mike Meyer [EMAIL PROTECTED] wrote: PEP: XXX Title: A rational number module for Python Version: $Revision: 1.4 $ Last-Modified: $Date: 2003/09/22 04:51:50 $ Author: Mike Meyer [EMAIL PROTECTED] Status: Draft Type: Staqndards Content-Type: text/x-rst Created:

Re: A rational proposal

2004-12-20 Thread Dan Bishop
Mike Meyer wrote: John Roth [EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] PEP: XXX Title: A rational number module for Python ... Rationals will mix with all other numeric types. When combined with an integer type, that integer will

Re: Recursive structures

2004-12-20 Thread Leif K-Brooks
[EMAIL PROTECTED] wrote: While using some nested data structures, I've seen that I'd like to have a function that tells me if a given data structure contains one or more cyclic references (a way to recognise a cycle in a graph is to do a depth-first search, marking vertices along the way. An

MIDI library recommendations, please?

2004-12-20 Thread Andrew Koenig
Are there widely used and recommended Python libraries that will let me 1) Interpret and generate MIDI messages easily? 2) Allow me to select and communicate with MIDI devices attached to my computer? I know that (2) is platform-dependent, so if there isn't a multiplatform version of

  1   2   >