Re: Accessing DB2 with Python

2004-12-16 Thread Larry Bates
I just tried the link at it works from here. Site has source and Windows binary versions of software. Looks loke it is being maintained. Windows binary for Python 2.3 was added in September 2004. No 2.4 binary. Larry Bates Syscon, Inc. Shawn Milo wrote: Is anyone doing this? I would like to acce

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Lenard Lindstrom
Amir Dekel <[EMAIL PROTECTED]> writes: > Hi everyone, > > I have two problems: > > 1. How can I keep my changes in sys.path after closing the interpreter? > Just how flexible does this need to be? sys.path can easily be altered at startup from within a sitecustomize module (section 3.28 -- site

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

2004-12-16 Thread Kent Johnson
Keith Dart wrote: What I do is set Python's sys.ps1 variable to something else. I have a module called "interactive" that I import implicitly by shell alias: py='python -i -c '\''import interactive'\' Which, among other things, sets the prompt to "Python> " You can do the same thing using a PYTHO

Re: Accessing DB2 with Python

2004-12-16 Thread Jean Brouwers
Try with capital DB. /Jean Brouwers In article <[EMAIL PROTECTED]>, Shawn Milo <[EMAIL PROTECTED]> wrote: > ftp://people.linuxkorea.co.kr/pub/db2, -- http://mail.python.org/mailman/listinfo/python-list

Re: Accessing DB2 with Python

2004-12-16 Thread Jan Dries
Shawn Milo wrote: Is anyone doing this? I would like to access a DB2 database (IBM's database) with Python. I checked "Python in a Nutshell," and it refers to ftp://people.linuxkorea.co.kr/pub/db2, but I am unable to connect to that site, although it could be a firewall issue, as I am at work.

newbie: Datetime module for Python 2.2.x

2004-12-16 Thread Eric Azarcon
Hello! I'm fairly new to Python, and was wondering if someone might be able to help. I'm doing something that requires the datetime module released in 2.3. Unfortunately, the target machines are running 2.2.x and there is no easy way that I know of to install 2.3/2.4 (RHEL ES). I've done some lo

Re: getopt: Make argument mandatory

2004-12-16 Thread Kent Johnson
Frans Englich wrote: On Wednesday 15 December 2004 14:07, Diez B. Roggisch wrote: In my use of getopt.getopt, I would like to make a certain parameter mandatory. I know how to specify such that a parameter must have a value if it's specified, but I also want to make the parameter itself mandatory(c

Re: os.walk bug?

2004-12-16 Thread Terry Reedy
os.walk bug?--- for d in dirs: # -- remove archive if d[:2] == '20': print "--- removing:", d dirs.remove(d) -- Please post in plain text, not html/rtf. It is easier to reply to. Without looking at

Re: create lowercase strings in lists - was: (No subject)

2004-12-16 Thread Mike Meyer
"Mark Devine" <[EMAIL PROTECTED]> writes: > Sorry for not putting a subject in the last e-mail. The function lower suited > my case exactly. Here however is my main problem: > Given that my new list is : > [class-map match-all cmap1', 'match ip any', 'class-map match-any cmap2', > 'match any', '

Programming/Modeling Contract

2004-12-16 Thread expecthealth
MODELING/Programming Opportunity: Do you know anyone for a 3-6 month assignment who is a mathematician/Programmer – possibly a queuing theory person? We need someone to help understand staffing models, depending on the time of day, number of order points, seasonally, We are finding that our

Re: Python mascot proposal

2004-12-16 Thread kdahlhaus
> http://exogen.cwru.edu/python2.png Wow, that's sharp! -- http://mail.python.org/mailman/listinfo/python-list

ElementTree.write() question

2004-12-16 Thread Stephen Waterbury
[If there is a separate list for elementtree, please someone clue me ... I didn't see one.] Fredrik or other xml / elementtree gurus: I see from the source that ElementTree.write() writes at the beginning of the xml output if an encoding other than utf-8 or us-ascii is selected. Shouldn't it also

Re: Why are tuples immutable?

2004-12-16 Thread Jarek Zgoda
Fredrik Lundh wrote: how does the dictionary know if you want key value equality or key identity equality? By the __hash__ and __eq__ methods you provide on your object. so what you're saying is that Python dictionaries should work just like Python dictionaries work today. sorry for wasting my time

Re: Python mascot proposal

2004-12-16 Thread kdahlhaus
I just noticed the link - are you at Case in Cleveland? I'm in Brooklyn (OH). -- http://mail.python.org/mailman/listinfo/python-list

RE: Why no list heritable type?

2004-12-16 Thread Robert Brewer
James Stroud wrote: > The thread "why not arrays" got me thinking. I would really > like to inherit > from a list so that I can add methods based on its contents, > say if I filled > it with a type of object and wanted to iterate over all > objects. I have built > a wrapper around a list like

Re: os.walk bug?

2004-12-16 Thread Tim Peters
[Gabriel Cosentino de Barros] ... > for root, dirs, files in os.walk('t:\'): > # -- do stuff > print "working on", root > # -- stuff done > > print 'DEBUG: dirs =', dirs > for d in dirs: > # -- remove archive >

Re: Why no list heritable type?

2004-12-16 Thread Jeff Shannon
James Stroud wrote: The thread "why not arrays" got me thinking. I would really like to inherit from a list so that I can add methods based on its contents, say if I filled it with a type of object and wanted to iterate over all objects. I have built a wrapper around a list like this for general

Re: Programming/Modeling Contract

2004-12-16 Thread Steve Holden
expecthealth wrote: MODELING/Programming Opportunity: Do you know anyone for a 3-6 month assignment who is a mathematician/Programmer – possibly a queuing theory person? We need someone to help understand staffing models, depending on the time of day, number of order points, seasonally, We are

Re: BASIC vs Python

2004-12-16 Thread Jeff Shannon
Doug Holton wrote: If you want to make applications with a graphical user interface (GUI), check out wxpython, although they haven't yet released a version that works with the new python 2.4 however: http://wxpython.org/ Actually, Robin *has* released 2.4 binaries, he just hasn't updated the we

Re: Winge IDE Issue - an suggestions?

2004-12-16 Thread Mike Thompson
Marco Aschwanden wrote: Without further checking I would propose you let WingIDE ignore this exception - most probably WingIDE is choking on a exception that was thrown intentionally by the module writer. I hope you know how to let WingIDE ignore exceptions? (In the upper part of the Excepti

Re: Html or Pdf to Rtf (Linux) with Python

2004-12-16 Thread Axel Straschil
Hello! > That's easy. Load the HTML in MS Word, and save it as RTF. Script it > via COM using the python win32all (I think that's what it's now > called) package. As I wrote in my posting and the subject: linux ;-) I could try to do this with open office, by I'm afraid this will not be a performa

cmp of multiple attributes (WAS: Why are tuples immutable?)

2004-12-16 Thread Steven Bethard
Roy Smith wrote: class Property: def __init__ (self, block, lot, zoning="Unknown"): self.block = block self.lot = lot self.zoning = zoning def __hash__ (self): return (self.block + self.lot) def __cmp__ (self, other): # I wish there was a less ver

Re: High level SNMP

2004-12-16 Thread Ilya Etingof
Jeremy Sanders <[EMAIL PROTECTED]> wrote: > On Thu, 09 Dec 2004 15:34:14 +0200, Petri Laakso wrote: [skipped] > The old versions of PySNMP (version 2.XX), seem to be a lot simpler to > use than later ones, so I might do that. That's if I can work out how to Recent versions tend to be more comple

Re: Accessing DB2 with Python

2004-12-16 Thread Jarek Zgoda
Larry Bates wrote: I just tried the link at it works from here. Site has source and Windows binary versions of software. Looks loke it is being maintained. Windows binary for Python 2.3 was added in September 2004. No 2.4 binary. Be aware, that it's a module for "normal" DB2, not a DB2/400. To a

Re: [ANN] [Hack] Import binary extensions from zipfiles, windows only

2004-12-16 Thread Michel Claveau - abstraction méta-galactique non triviale en fuite perpétuelle.
I like this kind of gadget. -- http://mail.python.org/mailman/listinfo/python-list

Re: Accessing DB2 with Python

2004-12-16 Thread Michel Claveau - abstraction méta-galactique non triviale en fuite perpétuelle.
Hi ! it's not a web site, it's FTP... -- http://mail.python.org/mailman/listinfo/python-list

[ANN] PySourceColor 1.9.6 much new code please review

2004-12-16 Thread mefjr75
Hello all , I have just finished PySourceColor.py ver 1.9.6. I am near the end of this tool, and would appreciate a little bit of review. Please help me find the pesky little bugs that have escaped me. I had much difficulty getting linenumbers to work properly. If you see a simpler way to do linenu

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Amir Dekel
Jeff Shannon wrote: Not only can one modify the environment variable PYTHONPATH, but one can also use a .pth file. Under windows, when the interpreter starts up it will search its default sys.path for any files with extension .pth; if it finds any, then it will use each line of those files as a

Re: cmp of multiple attributes (WAS: Why are tuples immutable?)

2004-12-16 Thread Roy Smith
>Roy Smith wrote: >> def __cmp__ (self, other): >> # I wish there was a less verbose way to do this! >> if self.block < other.block: >> return -1 >> if self.block > other.block: >> return 1 >> if self.lot < other.lot: >> return -1

Re: BASIC vs Python

2004-12-16 Thread Thomas Bartkus
The "interpreted" nature of the existing Python language has little to do with how it compares to other languages. Most languages, including BASIC, are available in either flavor - interpreted or compiled. And either way, it's still the same language. That being said, one would expect an interpre

Re: (No subject)

2004-12-16 Thread Steven Bethard
Jeremy Jones wrote: Mark Devine wrote: I'm brand new to python and I was wondering if anybody knew of a easy [snip] You could use string.lower (make sure you "import string"): string.lower is deprecated in Python 2.4. Better to go with str.lower as Diez B. Roggisch suggested: commands = [c.lowe

RE: [ANN] [Hack] Import binary extensions from zipfiles, windows only

2004-12-16 Thread Delaney, Timothy C (Timothy)
Thomas Heller wrote: > zipextimporter.py contains the ZipExtImporter class which allows to > load Python binary extension modules contained in a zip.archive, > without unpacking them to the file system. I take it this was what you were talking about the other day when you mentioned single-file ap

Re: create lowercase strings in lists - was: (No subject)

2004-12-16 Thread Steve Holden
Mark Devine wrote: Actually what I want is element 'class-map match-all cmap1' from list 1 to match 'class-map cmap1 (match-all)' or 'class-map cmap1 mark match-all done' in list 2 but not to match 'class-map cmap1'. Each element in both lists have multiple words in them. If all the words of any el

Re: create lowercase strings in lists - was: (No subject)

2004-12-16 Thread Mark Devine
Actually what I want is element 'class-map match-all cmap1' from list 1 to match 'class-map cmap1 (match-all)' or 'class-map cmap1 mark match-all done' in list 2 but not to match 'class-map cmap1'. Each element in both lists have multiple words in them. If all the words of any element of the fir

Re: GPL and Python modules.

2004-12-16 Thread Scott Robinson
On Mon, 25 Oct 2004 20:13:46 -0700, Robert Kern <[EMAIL PROTECTED]> wrote: >Tim Churches wrote: >> From: [EMAIL PROTECTED] >> >>>[mailto:[EMAIL PROTECTED] >>> On Behalf Of Robert Kern >>>Sent: Tuesday, 26 October 2004 11:34 AM >>>To: [EMAIL PROTECTED] >>>Subject: Re: GPL and Python modules. >>>

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Jeff Shannon
Amir Dekel wrote: 2. os.path.expanduser("~") always gives me "C:\\" instead of my homepath. I have tried to change my homepath in WinXP using set homepath(in command line), and alsaw using the "Environment Variables" in WinXP system properties, non helped. I really have to fix this somehow. We

Re: Python IDE

2004-12-16 Thread Dan Perl
Interesting. I've never met anyone like that. If they are in high tech, they must be hardware people, otherwise how would they make a living? And I'm not sure "socialists" is the correct term in this case, it sounds to me more like "communists". Or "liberals" for our friends in the US. ;-)

Re: Module question

2004-12-16 Thread Jeff Shannon
Simon Brunning wrote: On Wed, 15 Dec 2004 18:10:40 -0800, Jeff Shannon <[EMAIL PROTECTED]> wrote: The difference being that when Excel opens up a *.CSV, it goes through the import wizard. Are you sure that's true? When I open a *.csv file, Excel *appears* to open it without running any kind

Re: lies about OOP

2004-12-16 Thread Jeff Shannon
Peter Hansen wrote: P.S.: I'm only half Danish, but the other half is from a particularly bloodthirsty line of Canadians. I thought it was physically impossible for Canadians to be bloodthirsty outside of hockey games... ;) Jeff Shannon Technician/Programmer Credit International -- http://mail.

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Amir Dekel
Jeff Shannon wrote: Amir Dekel wrote: 2. os.path.expanduser("~") always gives me "C:\\" instead of my homepath. I have tried to change my homepath in WinXP using set homepath(in command line), and alsaw using the "Environment Variables" in WinXP system properties, non helped. I really have to fi

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

2004-12-16 Thread Fernando Perez
Kent Johnson wrote: > Keith Dart wrote: >> What I do is set Python's sys.ps1 variable to something else. I have a >> module called "interactive" that I import implicitly by shell alias: >> >> py='python -i -c '\''import interactive'\' >> >> Which, among other things, sets the prompt to "Python>

Re: Why are tuples immutable?

2004-12-16 Thread Jeff Shannon
Adam DePrince wrote: And how exactly do you propose to mutate an object without changing its hash value? * Create this mutate-able object type. * Create two objects that are different with different hash values. * Mutate one so that it is the same as the other. * Compare their hash values. If

Re: Why are tuples immutable?

2004-12-16 Thread Jeff Shannon
Antoon Pardon wrote: Op 2004-12-16, Jeff Shannon schreef <[EMAIL PROTECTED]>: nevermind the fact that I can't think of a case where I'm likely to "retrieve" a key from a dict, modify it, and then put it back. (I can think of endless cases where I'd want to do that with *values*, but not wit

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Fernando Perez
Amir Dekel wrote: > Hi everyone, > > I have two problems: > > 1. How can I keep my changes in sys.path after closing the interpreter? As others said, use $PYTHONPATH > 2. os.path.expanduser("~") always gives me "C:\\" instead of my > homepath. I have tried to change my homepath in WinXP using

Re: Html or Pdf to Rtf (Linux) with Python

2004-12-16 Thread Stephen Thorne
On Thu, 16 Dec 2004 19:30:37 + (UTC), Axel Straschil <[EMAIL PROTECTED]> wrote: > > That's easy. Load the HTML in MS Word, and save it as RTF. Script it > > via COM using the python win32all (I think that's what it's now > > called) package. > > As I wrote in my posting and the subject: linux

Re: create lowercase strings in lists - was: (No subject)

2004-12-16 Thread Mike Meyer
Steve Holden <[EMAIL PROTECTED]> writes: > Mark Devine wrote: > >> Actually what I want is element 'class-map match-all cmap1' from list 1 to >> match 'class-map cmap1 (match-all)' or 'class-map cmap1 mark match-all done' >> in list 2 but not to match 'class-map cmap1'. >> Each element in both l

Re: Python IDE

2004-12-16 Thread Mike Meyer
A: What's the most obnoxious thing on Usenet? Q: topposting. "Dan Perl" <[EMAIL PROTECTED]> writes: > "fuzzylollipop" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> no it was a sideways remark at all the software socialists that thing >> EVERYTHING should be free, never said any

Re: Python IDE

2004-12-16 Thread Mike Meyer
A: What's the most obnoxious thing on Usenet? Q: topposting. "Dan Perl" <[EMAIL PROTECTED]> writes: > "fuzzylollipop" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> no it was a sideways remark at all the software socialists that thing >> EVERYTHING should be free, never said any

wxPython question

2004-12-16 Thread Jive
How the heck do you set the icon on a frame using a .ico file, or a .bmp file, or whatever? How do you find out how to do something like that? Apparently there is no documentation to speak of. I tried looking the in the demo program, but I didn't find the secret.. -- http://mail.python.org/ma

Re: BASIC vs Python

2004-12-16 Thread Philippe C. Martin
>>and it was the only interpreter I've ever used that had no compilation >>phase whatsoever) is no easier to deal with than compiled C. Ditto for >>the various flavors of LISP I've worked with. I do find working with an interpreter easier than with a compiler. A _long_ time ago, I recall a boss

Re: BASIC vs Python

2004-12-16 Thread Mike Meyer
"Philippe C. Martin" <[EMAIL PROTECTED]> writes: >>>and it was the only interpreter I've ever used that had no compilation >>>phase whatsoever) is no easier to deal with than compiled C. Ditto for >>>the various flavors of LISP I've worked with. > I do find working with an interpreter easier than

Re: Python IDE

2004-12-16 Thread Mike Meyer
"Dan Perl" <[EMAIL PROTECTED]> writes: > "Mike Meyer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> A: What's the most obnoxious thing on Usenet? >> Q: topposting. > > What is "Jeopardy", Alex? You got your Q&A mixed up. No, the Q&A in that order demonstrate what's wrong with

Re: Winge IDE Issue - an suggestions?

2004-12-16 Thread David Bolen
Mike Thompson writes: (...) > WingIDE bug seemed the only explanation, although it was puzzling me > that something so obvious could make it through their QA. Thanks again. I haven't used ElementTree, but if it includes an extension module (likely for performance), it's important to realize that

Re: Python IDE

2004-12-16 Thread JanC
Mike Meyer schreef: > There was a group that made a living porting GCC to vender-specific > hardware platforms, Cygnus. -- JanC "Be strict when sending and tolerant when receiving." RFC 1958 - Architectural Principles of the Internet - section 3.9 -- http://mail.python.org/mailman/listinfo/py

Re: Python IDE

2004-12-16 Thread Dan Perl
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Dan Perl" <[EMAIL PROTECTED]> writes: > >> "Mike Meyer" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >>> A: What's the most obnoxious thing on Usenet? >>> Q: topposting. >> >> What is "Jeopardy", Alex?

Re: Socket being garbage collected too early

2004-12-16 Thread David Bolen
Scott Robinson <[EMAIL PROTECTED]> writes: > I have been having trouble with the garbage collector and sockets. Are you actually getting errors or is this just theoretical? > Unfortunately, google keeps telling me that the problem is the garbage > collector ignoring dead (closed?) sockets instea

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Brian van den Broek
Jeff Shannon said unto the world upon 2004-12-16 17:54: Amir Dekel wrote: 2. os.path.expanduser("~") always gives me "C:\\" instead of my homepath. I have tried to change my homepath in WinXP using set homepath(in command line), and alsaw using the "Environment Variables" in WinXP system propert

regular expression for javadoc style comment

2004-12-16 Thread Alessandro Crugnola
Hi all, i need to use a regular expression to match javadoc style comments in a file, something like /** * Constructs a new Call instance. * * @param object the object the Function shall be executed on * @param func the Function that shall be executed

Re: BASIC vs Python

2004-12-16 Thread Adam DePrince
On Thu, 2004-12-16 at 13:36, abisofile wrote: > hi > > I'm new to programming.I've try a little BASIC so I want ask since > Python is also interpreted lang if it's similar to BASIC. Nobody is answering this question because they are shuddering in fear and revulsion. During the 1980's BASIC wa

Re: lies about OOP

2004-12-16 Thread Adam DePrince
On Thu, 2004-12-16 at 18:23, Jeff Shannon wrote: > Peter Hansen wrote: > > > P.S.: I'm only half Danish, but the other half is from > > a particularly bloodthirsty line of Canadians. > I thought it was physically impossible for Canadians to be bloodthirsty > outside of hockey games... ;) When I

Re: wxPython question

2004-12-16 Thread mefjr75
Jive wrote: > How the heck do you set the icon on a frame using a .ico file, or a .bmp > file, or whatever? How do you find out how to do something like that? > Apparently there is no documentation to speak of. I tried looking the in > the demo program, but I didn't find the secret.. Hello Jive,

Re: BASIC vs Python

2004-12-16 Thread Adam DePrince
On Thu, 2004-12-16 at 13:42, It's me wrote: > "abisofile" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > > hi > > > > I'm new to programming.I've try a little BASIC so I want ask since > > Python is also interpreted lang if it's similar to BASIC. > > > > > > > > Is a Ferrari s

Permission

2004-12-16 Thread -g00t©-
--( oo )-- I don't know if there's a beginner board, just tell me if it's the place; I tried Python this weekend. I'm java coder and I was looking for handling names in os. I tried the os.raname('file.ext','nuFile.ext') and I got a Permission denied error. In the docs, it

Re: create lowercase strings in lists - was: (No subject)

2004-12-16 Thread Steven Bethard
Michael Spencer wrote: ... conv = "".join(char.lower() for char in text if char not in unwanted) Probably a good place to use str.replace, e.g. conv = text.lower() for char in unwanted: conv = conv.replace(char, '') Some timings to support my assertion: =) C:\Documents and Settings\Steve>

Re: Permission

2004-12-16 Thread Peter Hansen
-g00t©- wrote: I tried Python this weekend. I'm java coder and I was looking for handling names in os. I tried the os.raname('file.ext','nuFile.ext') and I got a Permission denied error. In the docs, it say that it should work only for UNIX, than it shouldn't work on XP (if I understood). I'm on XP

Re: os.walk bug?

2004-12-16 Thread Adam DePrince
On Thu, 2004-12-16 at 14:45, Gabriel Cosentino de Barros wrote: > Hi > > I'm new to the list. i found a bad behaviour of os.walk that i can > reproduce 100% but didn't find an answer to why it does that > > I have the folowing tree: > > t:\dir1 > t:\dir1\2000 > t:\dir1\2001 > t:\dir1\content >

WebDAV Server

2004-12-16 Thread Mark Hoffman
Jody - Is this you? Pr. Mark A. Hoffman, S.T.S.St. John's Lutheran ChurchSan Antonio, Texas(210)223-2611 Confidentiality Notice: This email message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthor

Re: Is Python good for graphics?

2004-12-16 Thread Esmail Bonakdarian
Robert Kern wrote: do you (or anyone else) have a recommendation for 2D type graphics? I like Kiva (but then, I also help develop it). The best place to get it right now is the SVN repository, but it's fairly stable. http://svn.enthought.com/svn/enthought/branches/converge/kiva/ thanks Robert,

Re: Is Python good for graphics?

2004-12-16 Thread Esmail Bonakdarian
Fredrik Lundh wrote: WCK, Tk's Canvas, wxPython (do they have a canvas-style widget available these days), any other self-respecting UI toolkit... but if you're going to do animations, the drawing part isn't really the hard bit -- and vpython is designed to do animations. if you want things to loo

Re: create lowercase strings in lists - was: (No subject)

2004-12-16 Thread Bengt Richter
On Fri, 17 Dec 2004 02:06:01 GMT, Steven Bethard <[EMAIL PROTECTED]> wrote: >Michael Spencer wrote: >> ... conv = "".join(char.lower() for char in text if char not in >> unwanted) > >Probably a good place to use str.replace, e.g. > >conv = text.lower() >for char in unwanted: > conv = con

Re: Is Python good for graphics?

2004-12-16 Thread Esmail Bonakdarian
Doug Holton wrote: I'll tell you know it's not going to be so easy. There isn't something in python like flash. But here are some options: See pyxel for python: http://bellsouthpwp.net/p/r/prochak/pyxel.html and pygame: http://pygame.org/ Gato, the graph animation toolkit, is implemented in pyt

Re: os.walk bug?

2004-12-16 Thread Tim Peters
[Adam DePrince] > Each iteration of os.walk returns three parameters; one of those, > dirs, is a list of directories within the current directory pointed at > by root. Right. > Am I correct to assume that you beleve that by changing the > contents of dir you will affect how os.walk traverses the

Re: Best book on Python?

2004-12-16 Thread Esmail Bonakdarian
Esmail Bonakdarian wrote: > I myself am looking for a small portable quick > reference, Scott David Daniels wrote: Look into Python Essential Reference for that kind of book -- no fat, lotsa goodies. Hi Scott, Thanks for the recommendation. I didn't know about this book but looking at amazon, it lo

Re: Is Python good for graphics?

2004-12-16 Thread djw
Esmail Bonakdarian wrote: First of all, I *really* like Python ;-) I need some help with the graphical side of things. I would like to do some basic graphics with Python, but I am not sure what the best/most effective way for me to do what I want. Basically, I would like to be able to create some b

Re: Is Python good for graphics?

2004-12-16 Thread John Hunter
> "djw" == djw <[EMAIL PROTECTED]> writes: djw> PyGame? djw> http://www.pygame.org/ Seconded, despite the plethora of packages proposed in response to the original query, pygame seems like a clear winner for the problem described. And this coming from the author a different graphic

Re: wxPython question

2004-12-16 Thread M.E.Farmer
Messed up it does need the dots. This should handle bmp ico png gif and several other formats. Still need to be 32 by 32 wx.InitAllImageHandlers() image = wx.Image(file, wx.BITMAP_TYPE_ANY) image = image.ConvertToBitmap() icon = wxEmptyIcon() icon.CopyFromBitmap(image) frame.SetIcon(icon) Hth,

Re: lies about OOP

2004-12-16 Thread Andy Salnikov
"Gregor Horvath" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Daniel T. wrote: > > [EMAIL PROTECTED] wrote: > > > > > >>A paper finding that OOP can lead to more buggy software is at > >>http://www.leshatton.org/IEEE_Soft_98a.html > > > > > > Sure, OOP *can* lead to more buggy sof

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

2004-12-16 Thread Keith Dart
Fernando Perez wrote: You might want to look at ipython: http://ipython.scipy.org, I did just recently install that. It looks very nice. Would make a great interactive prompt for an IDE, as well. -- \/ \/ (O O) -- oOOo~(

Question about Py C API implementation.

2004-12-16 Thread Adonis
I wrote a small script to flatten a list of lists without the need of recursion, it works fine for the most part, but was wanting to reimplement it in C just for kicks, and would give me and excuse to learn the Python C API, but the C implementation does not function properly, I *think* it might

Re: Cool object trick

2004-12-16 Thread Jive
Kinda cool. It's occured to me that just about everything Pythonic can be done with dicts and functions. Your Obj is just a dict with an alternate syntax. You don't have to put quotes around the keys. But that's cool. class struct(object): def __init__(self, **kwargs): self.__dict

Re: BASIC vs Python

2004-12-16 Thread Andrew Dalke
Adam DePrince > During the 1980's BASIC was the language to embedd into the ROM's of the > computers of the day. This was in a misguided effort to make computers > understandable to their target audience. The goal of the day was to > build a system that a manager would want to buy; it was believ

Re: BASIC vs Python

2004-12-16 Thread It's me
"Adam DePrince" <[EMAIL PROTECTED]> wrote in message > > Don't do it, unless your goal is simply to embarrass and insult > programmers. > I saw this code from an earlier post: lst1 = ["ab", "ac", "ba", "bb", "bc"] lst2 = ["ac", "ab", "bd", "cb", "bb"] dct1 = dict.fromkeys(lst1)

Re: BASIC vs Python

2004-12-16 Thread Gregor Horvath
Hi, Adam DePrince wrote: computers of the day. This was in a misguided effort to make computers understandable to their target audience. The goal of the day was to build a system that a manager would want to buy; it was believed that [..] BASIC = Beginners all purpose symbolic instruction code A

Re: Multithreading tkinter question

2004-12-16 Thread Oleg Paraschenko
Hello John, > Mark, > > I tried your code snippet with Python 2.3.4. Worked fine. Only problem was > that the program fell off the end and terminated before the second thread > could open the Tkinter window. So I added these lines at the end to make the > main thread wait:- > > from msvcrt import

RE: Cool object trick

2004-12-16 Thread Doran_Dermot
I rather like it! I prefer writing obj.spam to obj["spam"]! I wonder if there is a technical downside to this use of Python? P.S. Certainly makes writing 'print obj.spam, obj.spam, obj.eggs, obj.bacon, obj.sausages, "and", obj.spam' a lot easier ;-) -Original Message- From: [EMAIL PROT

Re: BASIC vs Python

2004-12-16 Thread Mike Meyer
Andrew Dalke <[EMAIL PROTECTED]> writes: > Adam DePrince > Given the hardware constraints of the early 1980s, which > language do you think should have been used instead of BASIC? Logo. It was invented in 1968, when mainframes weren't much more powerfull than those '80s microcomputers. It had sta

Re: Html or Pdf to Rtf (Linux) with Python

2004-12-16 Thread Axel Straschil
Hello! > I've been able to successfully get konqueror to generate a pdf from a > html file via dcop. It's something along the lines of: For that stuff, I'm using htmloc (http://www.htmldoc.org/). Lg, AXEL. -- The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD

Re: spawn* or exec* and fork, what should I use and how ?

2004-12-16 Thread Keith Dart
Lingyun Yang wrote: Hi, I want to use python as a "shell like" program, and execute an external program in it( such as mv, cp, tar, gnuplot) I tried: Since you appear to be on a *nix system, a good choice is the proctools module in the pyNMS package. http://sourceforge.net/projects/pynms os.ex

Re: Why are tuples immutable?

2004-12-16 Thread Paul Rubin
Antoon Pardon <[EMAIL PROTECTED]> writes: > Two guidelines can make it easier for a programmer to do this. > > 1) Put a copy in the dictionary, so that mutating the original >object won't affect what is in the dictonary. What's supposed to happen here? a = [1,2,3] d[a] = 9 a.appe

Re: python re - a not needed

2004-12-16 Thread Paul Rubin
Max M <[EMAIL PROTECTED]> writes: > Instead of writing ad-hoc html parsers, use BeautifulSoup instead. > > http://www.crummy.com/software/BeautifulSoup/ Hey, I like that. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

RE: KeyError

2004-12-16 Thread Doran_Dermot
If a default value would be acceptable to the application (which is quite likely), then this would be a much cleaner solution. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roland Heiber Sent: 16 December 2004 10:28 To: [EMAIL PROTECTED] Subject: Re: Key

Re: Why are tuples immutable?

2004-12-16 Thread Antoon Pardon
Op 2004-12-16, Max M schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > >> Well IMO there are two sides in this argument. The first is whether >> or not python allows mutable keys. The second is whether or not >> limiting keys to immutables in dictionaries provides a performance >> gain. > > > T

Re: Why are tuples immutable?

2004-12-16 Thread Fredrik Lundh
Antoon Pardon wrote: > That depends on whether the programmes wants value equality > or identity equality. > > In the first case the programmer shouldn't mutate a after > it was introduced as key in the dictionary; but should > either introduce a copy or work on a copy later. As > such your snippe

Re: Efficient grep using Python?

2004-12-16 Thread TZOTZIOY
On Wed, 15 Dec 2004 17:07:37 +0100, rumours say that "Fredrik Lundh" <[EMAIL PROTECTED]> might have written: >> Essentially, want to do efficient grep, i..e from A remove those lines which >> are also present in file B. > >that's an unusual definition of "grep" that would be grep -vf B A and it

Winge IDE Issue - an suggestions?

2004-12-16 Thread Mike Thompson
I've run into a problem using WingIDE. I have a dead simple script (which uses ElementTree): from elementtree.ElementTree import Element, SubElement, tostring e = Element("Outer") sub = SubElement(e, 'Version').text = "v1.0" print tostring(e) When I run this script from the command line, it work

Re: Step by step: Compiling extensions with MS Visual C++ Toolkit 2003 - msvccompiler-patch.txt (0/1)

2004-12-16 Thread miki
Hello Martin, Martin Bless wrote: [Something very long ...] Why don't just use MingW32? Download it from http://prdownloads.sf.net/mingw/MinGW-3.1.0-1.exe?download (14.8MB) and install. Write your extension module and setup.py and then run: python setup.py build --compiler=mingw32 That's all! Yo

Re: Step by step: Compiling extensions with MS Visual C++ Toolkit 2003 - msvccompiler-patch.txt (0/1)

2004-12-16 Thread Fuzzyman
The VC Toolkit is *better* than gcc ;-) Regards, Fuzzyman http://www.voidspace.org.uk/atlantibots/pythonutils.html -- http://mail.python.org/mailman/listinfo/python-list

Re: libxml2/xpath

2004-12-16 Thread Maxim Khesin
I do not believe it is... You can see the doc by clicking on the link. Does it have to be? thanks, m Martijn Faassen wrote: Maxim Khesin wrote: I am trying to do some xpath on http://fluidobjects.com/doc.xhtml but cannot get past 'point A' (that is, I am totally stuck): import libxml2 mydoc = li

Re: libxml2/xpath

2004-12-16 Thread Frans Englich
On Thursday 16 December 2004 12:29, Maxim Khesin wrote: > I do not believe it is... You can see the doc by clicking on the link. > Does it have to be? No, but your XPath statements must match the namespace, no matter what it is. The document do have a namespace -- as XHTML should: http://www.w3

why not arrays?

2004-12-16 Thread Rahul
Hi. I just wanted to know why arrays have not been included as a builtin datatype like lists or dictionaries? The numpy extension shows that it can be implemented. then why not include arrays in core python? rahul -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   >