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: 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: 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: 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: 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: 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 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: 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

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: ".>>>" 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~(

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: 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: 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: 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: 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: 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: 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: 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
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: 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,

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: 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 >

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: 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>

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: 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

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: 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: 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

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: 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

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: 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: 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: 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 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: 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: Accessing DB2 with Python

2004-12-16 Thread Grumman
Jarek Zgoda wrote: Be aware, that it's a module for "normal" DB2, not a DB2/400. To access DB2/400 you have to use ClientAccess ODBC (from Windows or *nix platform) driver or iSeries port of Python (from AS/400). And just to be complete, under windows, using win32all, you can also use the OLE

Re: Python IDE

2004-12-16 Thread Dan Perl
"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. So what, just because I wrote at the top of the posting you couldn't see my warning sign for the sarca

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

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: 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: Socket being garbage collected too early

2004-12-16 Thread Mike Meyer
Scott Robinson <[EMAIL PROTECTED]> writes: > I have been having trouble with the garbage collector and sockets. > Unfortunately, google keeps telling me that the problem is the garbage > collector ignoring dead (closed?) sockets instead of removing live > ones. My problem is > > > x.sock=so

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: 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: BASIC vs Python

2004-12-16 Thread Mike Meyer
"Thomas Bartkus" <[EMAIL PROTECTED]> writes: > 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 la

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 Michael Spencer
Steve Holden wrote: 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 a

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: 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: Html or Pdf to Rtf (Linux) with Python

2004-12-16 Thread Mike Meyer
Axel Straschil <[EMAIL PROTECTED]> writes: > 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 o

Re: Socket being garbage collected too early

2004-12-16 Thread Steve Holden
Scott Robinson wrote: I have been having trouble with the garbage collector and sockets. Unfortunately, google keeps telling me that the problem is the garbage collector ignoring dead (closed?) sockets instead of removing live ones. My problem is x.sock=socket.socket(socket.AF_INET,socket.SOCK

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: ".>>>" 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: 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: Redirecting stdin, stdout, and stderr to a window

2004-12-16 Thread Michael Fuhr
Michael McGarry <[EMAIL PROTECTED]> writes: > How do I redirect stdin, stdout and stderr to a window? I am using Qt > for GUI. I don't know what specific mechanisms Qt provides, but the general solution is to write a class that implements I/O methods like read, readline, and write, and assign in

Re: Why no list heritable type?

2004-12-16 Thread Mike Meyer
"Robert Brewer" <[EMAIL PROTECTED]> writes: >> Why aren't built >> in lists and dictionaries real heritable types that can save >> this kind of patchwork? > > They are since Python 2.2 (IIRC): And before Python 2.2 there was the UserList class in the standard library. Which is still there in 2.

Socket being garbage collected too early

2004-12-16 Thread Scott Robinson
I have been having trouble with the garbage collector and sockets. Unfortunately, google keeps telling me that the problem is the garbage collector ignoring dead (closed?) sockets instead of removing live ones. My problem is x.sock=socket.socket(socket.AF_INET,socket.SOCK_STREAM)

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: 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: 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: 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: 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: 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: 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: Why no list heritable type?

2004-12-16 Thread Jeremy Bowers
On Thu, 16 Dec 2004 12:53:32 -0800, James Stroud wrote: > Then it can be heritable and I can add or override methods. Why aren't > built in lists and dictionaries real heritable types that can save this > kind of patchwork? Is there a pythonic reason I am missing here? Along with others pointing o

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: Why no list heritable type?

2004-12-16 Thread James Stroud
Steve Holden wrote: > I think the thing you are really missing is the fact that list and the > other built-in types can be used as the basis for inheritance: I've never seen this done in any manual that I can remember. Its so useful, that I thought I would have run into it before as an example

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: 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: newbie: Datetime module for Python 2.2.x

2004-12-16 Thread Jarek Zgoda
Eric Azarcon wrote: 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 do

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

2004-12-16 Thread Steven Bethard
Kent Johnson wrote: You can do the same thing using a PYTHONSTARTUP file - see http://docs.python.org/tut/node4.html#SECTION00424 You can change the prompts with import sys sys.ps1 = ' >>> ' sys.ps2 = ' ... ' Very cool. I didn't know about this. Does anyone know how to make it

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: 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

[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: 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

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 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: 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

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: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Jeff Shannon
Lenard Lindstrom wrote: 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? Saving sys.path changes between interpreter runs would be more involved. On Windows Python loads the initial module search

Re: Why no list heritable type?

2004-12-16 Thread Steve Holden
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: 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

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: 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: 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: 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: 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 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: 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

Why no list heritable type?

2004-12-16 Thread James Stroud
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 use: class list_of

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

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: 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

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: 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', '

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: 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

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: Best book on Python?

2004-12-16 Thread Jean Brouwers
The text of David Mertz' book is available on line at /jean Brouwers In article <[EMAIL PROTECTED]>, Mirko Zeibig <[EMAIL PROTECTED]> wrote: > Maurice LING said the following on 12/12/2004 11:13 PM: > >>Google for Dive Into Python. Its a free online publication, see i

  1   2   3   >