Re: Python compiler method

2004-12-16 Thread Tim Roberts
"Lady_Valerie" <[EMAIL PROTECTED]> wrote: > >hello guys! i just want to ask favor, coz i want to know how python >compiler method could be done? im really clueless of this programming >language hope anyone coule help me with this topic... im just focusing >only on the compiler of the python.thanks

temp file name

2004-12-16 Thread km
Hi all, Is there a way to create a unique file name; safely i have used os.tmpnam() with python2.4, i warns that the usage is a potential security risk. tia KM -- http://mail.python.org/mailman/listinfo/python-list

Re: temp file name

2004-12-16 Thread Binu K S
Use the tempfile module instead. It is more secure. Check the documentation for tempfile.NamedTemporaryFile. If you are only looking to get a unique name and want to do the file management yourself, you may have to close the file opened by this function and reopen it. On Fri, 17 Dec 2004 17:21:53

Re: Why are tuples immutable?

2004-12-16 Thread Antoon Pardon
Op 2004-12-16, Jeff Shannon schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > >>Demanding that users of dictioanaries somehow turn their mutable objects >>into tuples when used as a key and back again when you retrieve the keys >>and need the object [...] >> > > But, you generally don't "retrie

python re - a not needed

2004-12-16 Thread kepes.krisztian
Hi ! I want to get infos from a html, but I need all chars except <. All chars is: over chr(31), and over (128) - hungarian accents. The .* is very hungry, it is eat < chars too. If I can use not, I simply define an regexp. [not<]* It is get all in the href. I wrote this programme, but it is too co

Re: Why are tuples immutable?

2004-12-16 Thread Antoon Pardon
Op 2004-12-15, Steve Holden schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > >> Op 2004-12-15, Roel Schroeven schreef <[EMAIL PROTECTED]>: >> >>>Antoon Pardon wrote: >>> Op 2004-12-15, Fredrik Lundh schreef <[EMAIL PROTECTED]>: >sorry, but I don't understand your reply at all. a

Re: Python mascot proposal

2004-12-16 Thread Carlos Ribeiro
On Thu, 16 Dec 2004 07:42:38 GMT, Dimitri Tcaciuc <[EMAIL PROTECTED]> wrote: > Hm, interesting. So I'm hearing lots of different opinions here, but it > seems like there's not too many radical thoughts about not using snake > at all and it can be pretty much summed up to 2 things > 1) use a snake >

Re: Why are tuples immutable?

2004-12-16 Thread Antoon Pardon
Op 2004-12-16, Jeremy Bowers schreef <[EMAIL PROTECTED]>: > On Wed, 15 Dec 2004 15:08:09 +, Antoon Pardon wrote: > >> And I think that is a stupid reason. There are enough other situations >> were people work with mutable objects but don't wish to mutate specific >> objects. Like objects in a

Re: python re - a not needed

2004-12-16 Thread Max M
kepes.krisztian wrote: I want to get infos from a html, but I need all chars except <. All chars is: over chr(31), and over (128) - hungarian accents. The .* is very hungry, it is eat < chars too. Instead of writing ad-hoc html parsers, use BeautifulSoup instead. http://www.crummy.com/software/Beau

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

2004-12-16 Thread Thomas Heller
Warning: experimental code! Overview 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. Call the zipextimporter.install() function to install the import hook, add

Re: NO REALLY

2004-12-16 Thread Fredrik Lundh
> Isn't there a comp.lang.flame or something? comp.lang.object ? (there don't seem to be a comp.lang.procedural ...) -- http://mail.python.org/mailman/listinfo/python-list

Re: python re - a not needed

2004-12-16 Thread Peter Otten
kepes.krisztian wrote: > Hi ! > > I want to get infos from a html, but I need all chars except <. > All chars is: over chr(31), and over (128) - hungarian accents. > The .* is very hungry, it is eat < chars too. > > If I can use not, I simply define an regexp. > [not<]* > > It is get all in the

Re: KeyError

2004-12-16 Thread Roland Heiber
[EMAIL PROTECTED] wrote: Hi "R", The only explanation I can give is that the environment varialbe REMOTE_ADDR does not exist! Wrap your high-level code with try and except. Example: try: tablesDirectory = tablesDirectoryPrefix + os.environ['REMOTE_ADDR'] except KeyError: # Code to handle the f

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

2004-12-16 Thread Stefan Behnel
Nick Coghlan schrieb: data = [['foo','bar','baz'],['my','your'],['holy','grail']] result = [] for d in data: .>>> data = [['foo','bar','baz'],['my','your'],['holy','grail']] .>>> from itertools import chain .>>> result = "".join(chain(*data)) 'foobarbazmyyourholygrail' This is the first time I see

Re: Why are tuples immutable?

2004-12-16 Thread Max M
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. The problem is that you don't understand what dicts are typically used

Re: lies about OOP

2004-12-16 Thread Martijn Faassen
Peter Hansen wrote: Martijn Faassen wrote: Peter Hansen wrote: Well, in any case, thanks for setting the record straight, Martjin. That of course also happens to me once every while. I can take care of myself though -- Dijkstra however needs an advocate for the correct spelling of his name in thi

Avaliable free modules

2004-12-16 Thread sam
Hi group, Is there any site like cpan.org for python? Thanks Sam -- http://mail.python.org/mailman/listinfo/python-list

Re: Avaliable free modules

2004-12-16 Thread Binu K S
Vaults of Parnassus: http://www.vex.net/parnassus/ On Thu, 16 Dec 2004 18:56:09 +0800, sam <[EMAIL PROTECTED]> wrote: > Hi group, > > Is there any site like cpan.org for python? > > Thanks > Sam > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listi

Re: libxml2/xpath

2004-12-16 Thread Martijn Faassen
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 = libxml2.parseDoc(text) mydoc.xpathEval('/html') [] this returns an empty resultlist, which just seems plain wrong. Can anyone t

MDaemon Warning - virus found: delivery failed

2004-12-16 Thread arodrig
*** WARNING ** Este mensaje ha sido analizado por MDaemon AntiVirus y ha encontrado un fichero anexo(s) infectado(s). Por favor revise el reporte de abajo. AttachmentVirus name Action taken ---

Re: Help need with converting Hex string to IEEE format float

2004-12-16 Thread Richard Brodie
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > One example I tried was: > > wibble = struct.unpack("f", struct.pack("l", long(conv_str, 16))) > OverflowError: long int too large to convert to int You can't fit 0x8000L into a signed 32-bit integer, use 'L' for an unsigned one.

Re: Avaliable free modules

2004-12-16 Thread TZOTZIOY
On Thu, 16 Dec 2004 18:56:09 +0800, rumours say that sam <[EMAIL PROTECTED]> might have written: >Hi group, > >Is there any site like cpan.org for python? Google these: "vaults of parnassus" "python package index" They're an approximation of CPAN. If you waited for a week in the newsgroup, you

Re: Python IDE

2004-12-16 Thread Abe Mathews
On 15 Dec 2004 12:18:15 -0800, fuzzylollipop <[EMAIL PROTECTED]> wrote: > TruStudio for Eclipse is nice for those everything must be free > socialists. -OR- - Those who are new to python, more comfortable in an IDE, and want a Python-enabled IDE that they can use without having to pay now - Thos

Re: Efficient grep using Python?

2004-12-16 Thread TZOTZIOY
On Wed, 15 Dec 2004 16:10:08 +, rumours say that [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. > >You could implement elegantly using the new sets feature >For reference here is the unix way

Re: Why are tuples immutable?

2004-12-16 Thread Antoon Pardon
Op 2004-12-16, Fredrik Lundh schreef <[EMAIL PROTECTED]>: > 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 >> eit

Re: ANN: Python Test Environment

2004-12-16 Thread Fuzzyman
This seems to work very well. I'm still tweaking the 'stdlibfinder.py' and the setup.py - but it's still ok. In some ways it acts like a basic 'Python Runtime Environment'. Part of the reason for building it was that in one of my jobs I don't have python installed and can't install new programs. I

Re: Avaliable free modules

2004-12-16 Thread Fuzzyman
No but a lot of people would like there to be. No one has (to my knowledge) come forward to do the work on it yet though (or offered the bandwidth). There is a *list* of packages available - with information and liks - called the Python Package Index. See http://www.python.org/pypi Regard

Re: Why are tuples immutable?

2004-12-16 Thread Antoon Pardon
Op 2004-12-16, Paul Rubin schreef : > 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 h

Re: NO REALLY

2004-12-16 Thread Martijn Faassen
Peter Hansen wrote: Brian van den Broek wrote: Peter Hansen said unto the world upon 2004-12-15 17:39: I could easily see this thread descending into a flame war in, oh, about another ten posts. That would be so freaky... Without a doubt that is the most ignorant and small-minded thought that ev

Re: Why are tuples immutable?

2004-12-16 Thread Fredrik Lundh
Antoon Pardon 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 wa

Re: Python IDE

2004-12-16 Thread Roland Heiber
limodou wrote: http://wiki.wookpecker.org.cn/moin.cgi/NewEdit Try this instead: http://wiki.woodpecker.org.cn/moin.cgi/NewEdit ^ SCNR, Roland ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: Module question

2004-12-16 Thread Simon Brunning
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 of wizard. Certainly I

Re: Winge IDE Issue - an suggestions?

2004-12-16 Thread Mike Thompson
Mike Thompson wrote: I've run into a problem using WingIDE. I have a dead simple script (which uses ElementTree): from elementtree.ElementTree import Element, SubElement, tostring Just to be clear: that's the effbot's ElementTree package at http://effbot.org/zone/element-index.htm -- Mike --

Re: Multithreading tkinter question

2004-12-16 Thread John Pote
"Mark English" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Is there a safe way to run tkinter in a multithreaded app where the mainloop runs in a background thread ? Mark, I tried your code snippet with Python 2.3.4. Worked fine. Only problem was that the program fell off the

Re: logging in omniORB for python

2004-12-16 Thread Birgit Rahm
> > it gets written to stdout - and then looks like this: > > omniORB: ObjRef(IDL:ehotel.de/omphalos/Domain:1.0) -- deleted. It was tricky: PythonWin doesnt display this, only the output of the program. Now I have started it in the DOS Box (startPrg.py >logout.log) and the omniORB uses the DOS Bo

Re: cygwin python.exe symlink breaks when called from .bat file

2004-12-16 Thread Jason Tishler
George, Please keep your replies on-list. On Wed, Dec 15, 2004 at 01:36:03PM -0500, george young wrote: > On Wed, 15 Dec 2004 10:56:17 -0500 > Jason Tishler <[EMAIL PROTECTED]> threw this fish to the penguins: > > On Wed, Dec 15, 2004 at 07:21:31AM -0800, gry wrote: > > > Under cygwin, the python

Re: Why are tuples immutable?

2004-12-16 Thread Thomas Heller
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > Antoon Pardon wrote: > >> That depends on whether the programmes wants value equality >> or identity equality. > > how does the dictionary know if you want key value equality or key > identity equality? Smalltalk has separate Dictionary and IdentityDi

Re: Multithreading tkinter question

2004-12-16 Thread Mark English
> Date: Thu, 16 Dec 2004 11:59:53 GMT > From: "John Pote" <[EMAIL PROTECTED]> > > "Mark English" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > Is there a safe way to run tkinter in a multithreaded app > where the mainloop runs in a background thread ? > > > I tried your code

Re: Why are tuples immutable?

2004-12-16 Thread Antoon Pardon
Op 2004-12-16, Fredrik Lundh schreef <[EMAIL PROTECTED]>: > Antoon Pardon 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

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

2004-12-16 Thread Roel Schroeven
Stefan Behnel wrote: Nick Coghlan schrieb: data = [['foo','bar','baz'],['my','your'],['holy','grail']] result = [] for d in data: .>>> data = [['foo','bar','baz'],['my','your'],['holy','grail']] .>>> from itertools import chain .>>> result = "".join(chain(*data)) 'foobarbazmyyourholygrail' This i

Re: cygwin python.exe symlink breaks when called from .bat file

2004-12-16 Thread Fredrik Lundh
Jason Tishler wrote: >> > You can always do the following as a workaround: >> > >> > C:\> bash -c python >> >> Hmm, that's fine for typing a command interactively, but try fitting >> it into a DOS "ftype" command so that double-clicking a .py file gets >> the right thing with the right args --

Re: PythonWin Not Updating

2004-12-16 Thread Colin J. Williams
Chris wrote: I'm working on a program in PythonWin. The problem I'm running into is that after I make a code change, PythonWin doesn't always see it. Has anyone else had this problem? Chris I've had this problem with older builds of PythonWin. With build 202 tis doesn't seem to be a problem fo

Re: cygwin python.exe symlink breaks when called from .bat file

2004-12-16 Thread Daniel Dittmar
[EMAIL PROTECTED] wrote: [Windows XP Pro, cygwin python 2.4] Under cygwin, the python executable is installed as python2.4.exe with a symbolic link to python.exe. This is fine as long as one is operating only withing the cygwin world. But I execute python from a foo.bat file, and windows barfs on

bdb question

2004-12-16 Thread Philippe C. Martin
Hi, I am trying to fix the following problem: 1) I have a gui thread + a background thread that intantiates a bdb child. 2) When I wish to quit in the middle of a debugged program, I roughly do the following: 2.a) set_quit() 2.b) kill my bdb child 2.c) stop my background thread I notice that m

Re: NO REALLY

2004-12-16 Thread Scott David Daniels
Martijn Faassen wrote: It's slow and no scientific research exists in its favor! Also it doesn't work. Why would I need polymorphism? Lisp had all of this 50 years ago anyway. But functional programming by the way SUX TOO! So does procedural programming! And structured programming SUX, GOTO all

Re: Module question

2004-12-16 Thread Bill Turczyn
Thanks to everyone for the prompt reply, I now have several options to explore. Thanks again, Bill -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Python Test Environment

2004-12-16 Thread stani_
Hi Fuzzy, I'm quite interested in your test environment project. It would enable me to carry my favorite working environment around on my 1gb flashdisk. Very useful indeed, as I also sometimes am at places where I can't install or don't want to install python and all set of libraries. What is the m

Re: why not arrays?

2004-12-16 Thread Gerhard Haering
On Thu, Dec 16, 2004 at 05:51:18AM -0800, Rahul wrote: > 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? Arrays are included in a mo

Re: why not arrays?

2004-12-16 Thread Thomas Bartkus
Because the "list" object covers all the functionality contained in the traditional "array" structure. If it pleases you , you can ignore the additional conveniences the list object offers and just treat it like an ordinary array. Unless, of course, what you are seeking are the joys associated wit

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

2004-12-16 Thread Nick Coghlan
Roel Schroeven wrote: Stefan Behnel wrote: This is the first time I see that and I totally like the idea of writing ".>>>" instead of ">>>" at the beginning of a line. Thank you Dr. Dobb! It's unfortunate for c.l.py that Python uses ">>>" as the default prompt as it messes up the display on mail

Re: Winge IDE Issue - an suggestions?

2004-12-16 Thread Marco Aschwanden
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 Exceptions-tool click on 'Ignor

Re: Unpacking Binary Data - not using struct module

2004-12-16 Thread Laurent Pointal
Geoffrey wrote: My questions ... 1) Does anyone recognize this numeric format ? Seem to be some decimal coded binary, where you only use hexa from 0 to 9, coding corresponding decimal digits. The trailing hexa F may be used to indicate the end of the number (if number can have variable length) as

Re: Efficient grep using Python?

2004-12-16 Thread P
Christos TZOTZIOY Georgiou wrote: On Wed, 15 Dec 2004 16:10:08 +, rumours say that [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. You could implement elegantly using the new sets feature For referen

Re: do you master list comprehensions?

2004-12-16 Thread Nick Coghlan
Nick Coghlan wrote: (FYI, I filed bug report #1085744 on SF about this) And Raymond Hettinger was able to decipher my somewhat incoherent rambling (tip: don't try to write bug reports in the wee hours of the morning) and produce a potentially useful modification to PySequence_Tuple. Anyway, I gu

Re: Python mascot proposal

2004-12-16 Thread Luis M. Gonzalez
> > But before pushing forward any particular design, maybe it will make > > sense to make some sort of official logo contest on Python's main > > website and post it on /. ? > I was waiting for someone to propose that :-) I'm new to this list and Python in general, but I think that this sort of t

Re: Unpacking Binary Data - not using struct module

2004-12-16 Thread Richard Brodie
"Geoffrey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 1) Does anyone recognize this numeric format ? Google :) http://www.room42.com/store/computer_center/packed_decimal.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: why not arrays?

2004-12-16 Thread Nick Coghlan
Rahul wrote: 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 As Gerhard mentioned, the standard library module 'array' can be used fo

Re: why not arrays?

2004-12-16 Thread Scott David Daniels
Rahul wrote: 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 We know of three implementations of arrays now: the "array" module, the

Re: looking for wget-like module for getching software

2004-12-16 Thread Stefan Behnel
Robert P. J. Day schrieb: that is, i can just say, "go get file gcc-3.4.2.tar.bz2", and start searching at "ftp://pub.gnu.org/pub/gcc";. i may not know how far down in the directory structure that file is, but wget will happily search recursively until it finds it. That sounds pretty inefficient

Re: datetime

2004-12-16 Thread Fred Pacquier
Chris <[EMAIL PROTECTED]> said : > Okay, I searched www.python.org for a date handler and found datetime. > http://www.python.org/dev/doc/devel/lib/module-datetime.html However, > whenever I try to import datetime, I get a No module named datetime > error. What am I missing? The module docum

Re: datetime

2004-12-16 Thread Chris
Okay, I searched www.python.org for a date handler and found datetime. http://www.python.org/dev/doc/devel/lib/module-datetime.html However, whenever I try to import datetime, I get a No module named datetime error. What am I missing? The module documentation says "New in version 2.3". Is that

Re: datetime

2004-12-16 Thread Mark_S_Thomas
How about just 'time',. import time time.ctime() 'Thu Dec 16 10:25:11 2004' -- http://mail.python.org/mailman/listinfo/python-list

Re: Python mascot proposal

2004-12-16 Thread EP
> It's a great marketing idea. There was a thread recently on Python-dev > that started with a message from Guido, where he talks about a > seemingly persistent perception that exists in the specialized press > regarding Python as a flexible, nice, but generally slow (or slower > than the alterna

(No subject)

2004-12-16 Thread Mark Devine
Hi I'm brand new to python and I was wondering if anybody knew of a easy way to change every character in a list into its lower case form. The list is like so: commands = ['CLASS-MAP MATCH-ALL cmap1', 'MaTch Ip AnY', 'CLASS-map Match-Any cmap2', 'MaTch AnY', 'Policy-map policy1', 'Class cmap1'

Re: change windows system path from cygwin python?

2004-12-16 Thread gry
The _winreg api looks helpful; unfortunately, I'm trying to stick to what can be got from the cygwin install -- no _winreg. Simplicity of installation is quite important. (I'm using cygwin to get the xfree86 X-server, which is the whole point of this exercise) I have found the cygwin command-line

Re: Upgrading Python Article

2004-12-16 Thread JanC
Tim Roberts schreef: > I don't think that's fair. Visual C++ 7.1 is signficantly better at > compliance than their past compilers. AFAIK that's only for C++, not for C...? -- JanC "Be strict when sending and tolerant when receiving." RFC 1958 - Architectural Principles of the Internet - secti

Re: (No subject)

2004-12-16 Thread Jeremy Jones
Mark Devine wrote: Hi I'm brand new to python and I was wondering if anybody knew of a easy way to change every character in a list into its lower case form. The list is like so: commands = ['CLASS-MAP MATCH-ALL cmap1', 'MaTch Ip AnY', 'CLASS-map Match-Any cmap2', 'MaTch AnY', 'Policy-map policy

Re: lies about OOP

2004-12-16 Thread H. S. Lahman
Responding to Daniel T Try and find and experienced OO developer who would advocate that large, complex generalizations are a good practice. You can write lousy programs in any paradigm. The likelihood increases when you use the most technically deficient of all the OOPLs. (If those devel

Re: libxml2/xpath

2004-12-16 Thread Frans Englich
On Thursday 16 December 2004 14:46, [EMAIL PROTECTED] wrote: > > # confDocument is a libxml2 document, from parseFile() etc > > xp = confDocument.xpathNewContext() > > xp.xpathRegisterNs("xhtml", "http://www.w3.org/1999/xhtml";) > > dirElement = xp.xpathEval( "/xhtml:html" ) > > Stu

Re: Why are tuples immutable?

2004-12-16 Thread Roy Smith
Adam DePrince <[EMAIL PROTECTED]> wrote: > And how exactly do you propose to mutate an object without > changing its hash value? That's easy. Define a hash function that doesn't use all the data in the object. class Foo: def __init__ (self, a, b, c): self.a = a self.b

Re: lies about OOP

2004-12-16 Thread Mark Nicholls
"H. S. Lahman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Responding to Daniel T > > >>Try and find and experienced OO developer who would advocate that large, > >>complex generalizations are a good practice. You can write lousy > >>programs in any paradigm. The likelihood

Re: Efficient grep using Python?

2004-12-16 Thread TZOTZIOY
On Thu, 16 Dec 2004 14:28:21 +, rumours say that [EMAIL PROTECTED] might have written: [sf] Essentially, want to do efficient grep, i..e from A remove those lines which are also present in file B. [EMAIL PROTECTED] >>>You could implement elegantly using the new sets feature >>>For ref

Re: Best book on Python?

2004-12-16 Thread Scott David Daniels
Esmail Bonakdarian wrote: I myself am looking for a small portable quick reference, thinking about the O'Reilly pocket guide but I'm not sure how good it is. I read on amazon that it doesn't have an index - that seems odd for any book, and esp a quick ref. Look into Python Essential Reference for t

Legend problems in MatPlotLib

2004-12-16 Thread Jorl Shefner
I've only been able to plot data with both symbols and lines by issuing two plot commands, one for markers and one for lines. That's perfectly fine, but it creates a problem when I try to create a legend for it. For some reason, the legend command by default alternates between using symbo

Re: lies about OOP

2004-12-16 Thread Steve Holden
Dave Benjamin wrote: In article <[EMAIL PROTECTED]>, Adam DePrince wrote: On Tue, 2004-12-14 at 18:27, Roy Smith wrote: Terry Reedy <[EMAIL PROTECTED]> wrote: I did not really 'get' OOP until after learning Python. The relatively simple but powerful user class model made more sense to me than C++.

Re: lies about OOP

2004-12-16 Thread Steve Holden
Martijn Faassen wrote: Peter Hansen wrote: Martijn Faassen wrote: Peter Hansen wrote: Well, in any case, thanks for setting the record straight, Martjin. That of course also happens to me once every while. I can take care of myself though -- Dijkstra however needs an advocate for the correct spe

lowering the case of strings in list -- WAS: (No subject)

2004-12-16 Thread Brian van den Broek
Mark Devine said unto the world upon 2004-12-16 10:49: Hi I'm brand new to python and I was wondering if anybody knew of a easy way to change every character in a list into its lower case form. The list is like so: commands = ['CLASS-MAP MATCH-ALL cmap1', 'MaTch Ip AnY', 'CLASS-map Match-Any cmap2'

Re: Lowercasing Items in a List

2004-12-16 Thread Benji York
Mark Devine wrote: I'm brand new to python and I was wondering if anybody knew of a easy way to change every character in a list into its lower case form. How about this: >>> commands = ['CLASS-MAP MATCH-ALL cmap1', 'MaTch Ip AnY', 'CLASS-map Match-Any cmap2', 'MaTch AnY', 'Policy-map policy1', 'C

Re: Legend problems in MatPlotLib

2004-12-16 Thread John Hunter
> "Jorl" == Jorl Shefner <[EMAIL PROTECTED]> writes: Jorl>I've only been able to plot data with both symbols and Jorl> lines by issuing two plot commands, one for markers and one Jorl> for lines. That's perfectly fine, but it creates a problem Jorl> when I try to create a

Re: Python mascot proposal

2004-12-16 Thread Peter Hansen
EP wrote: It's a great marketing idea. There was a thread recently on Python-dev that started with a message from Guido, where he talks about a seemingly persistent perception that exists in the specialized press regarding Python as a flexible, nice, but generally slow (or slower than the alternati

Re: lies about OOP

2004-12-16 Thread Peter Hansen
Steve Holden wrote: They're all dreadful liars, these Scandinavians ;-) So, you're saying they are not very good at lying? (And be careful what you say about Scandinavians. I may have to bring my axe to the next PyCon... "You! Where is your payment voucher! Thwack! Everybody line up here and d

Re: I DECLARE THIS THREAD FINISHED

2004-12-16 Thread Peter Hansen
Steve Holden wrote: ... I try to remember there are people joining the group all the time, so even my rantings are new to someone. You wish, Steve. ;-) All the same, I'd like to thank Jive for his indirect responsibility for triggering Martijn (who, by the way, SUX) to produce his last outburst.

Re: looking for wget-like module for getching software

2004-12-16 Thread Robert P. J. Day
On Thu, 16 Dec 2004, Stefan Behnel wrote: > > Robert P. J. Day schrieb: > > that is, i can just say, "go get file gcc-3.4.2.tar.bz2", and start > > searching at "ftp://pub.gnu.org/pub/gcc";. i may not know how far down > > in the directory structure that file is, but wget will happily search >

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

2004-12-16 Thread Amir Dekel
Hi everyone, I have two problems: 1. How can I keep my changes in sys.path after closing the interpreter? 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 Var

module file length limitations on windows?

2004-12-16 Thread Lonnie Princehouse
I've run into some eccentric behavior... It appears that one of my modules is being cut off at exactly 2^14 characters when I try to import it. Has anyone else encountered this? I can't find any mention of such a bug, and stranger yet, other modules that exceed 16384 characters seem to work just

Re: Why are tuples immutable?

2004-12-16 Thread Roy Smith
Max M <[EMAIL PROTECTED]> wrote: > The problem is that you don't understand what dicts are typically used > for. Because of the nonliniarity in dict lookups, dicts are used for > optimisation. To me, dicts are first and foremost used when you want a mapping relationship where the key is not a v

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

2004-12-16 Thread Steve Holden
Mark Devine wrote: 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', 'policy-map policy1', 'class cmap1'

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

2004-12-16 Thread Mike Meyer
Axel Straschil <[EMAIL PROTECTED]> writes: > Hallo! > >> However, our company's product, PDFTextStream does do a phenomenal >> job of extracting text and metadata out of PDF documents. It's >> crazy-fast, has a clean API, and in general gets the job done very >> nicely. It presents two points of

Re: Python mascot proposal

2004-12-16 Thread sdeibel
Please note that to make something official, it has to be passed through the Python Software Foundation, which holds the intellectual property for Python and is responsible for trademarks associated with the language. If you're serious about doing this, you may want to email "psf at python dot org

Re: Best book on Python?

2004-12-16 Thread Mirko Zeibig
Maurice LING said the following on 12/12/2004 11:13 PM: Google for Dive Into Python. Its a free online publication, see if is any good for you. Cheers, I like "Dive into Python" for the fact that it tends to explain examples line by line in an annotated form but it may just be my personal pref

Re: A beginner's problem...

2004-12-16 Thread Christian Ergh
DogWalker wrote: "Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> said: In <[EMAIL PROTECTED]>, Amir Dekel wrote: When I import a module I have wrote, and then I find bugs, it seems that I can't import it again after a fix it. It always shows the same problem. I try del module but it doesn't work

Re: why not arrays?

2004-12-16 Thread Terry Reedy
"Scott David Daniels" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > We know of three implementations of arrays now: the "array" module, This module for mutable linear homogeneous arrays is already included in Python since long ago. It does not compete with the next two. > the

Re: Python mascot proposal

2004-12-16 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, EP <[EMAIL PROTECTED]> writes Well, the snake mascot as drawn is, of course, very flexible, appears to be friendly, and is, well, just how fast is a big snake, esp. a python? I don't know about Pythons but there is a black snake in Africa (a black mamba?) that wh

Re: lies about OOP

2004-12-16 Thread Jon Perez
projecktzero wrote: A co-worker considers himself "old school" in that he hasn't seen the light of OOP.(It might be because he's in love with Perl...but that's another story.) He thinks that OOP has more overhead and is slower than programs written the procedural way. The problem with OOP is not o

Re: Best book on Python?

2004-12-16 Thread Luis M. Gonzalez
This is a very good introduction online: www.g2swaroop.net/byte-of-python I also suggest: - Learning Python 2nd Ed. - Core Python You can also try these online resources: - Dive into Python - Thinking in Python -- http://mail.python.org/mailman/listinfo/python-list

Re: Python mascot proposal

2004-12-16 Thread Carlos Ribeiro
On Thu, 16 Dec 2004 11:51:18 -0500, Peter Hansen <[EMAIL PROTECTED]> wrote: > EP wrote: > >>It's a great marketing idea. There was a thread recently on Python-dev > >>that started with a message from Guido, where he talks about a > >>seemingly persistent perception that exists in the specialized pr

Re: BASIC vs Python

2004-12-16 Thread Doug Holton
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. Which BASIC did you try? Realbasic? Visual Basic? You should check out some of these beginner's python tutorials: http://www.honors.montana.edu/~jjc/e

Re: getopt: Make argument mandatory

2004-12-16 Thread Frans Englich
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(combin

Re: module file length limitations on windows?

2004-12-16 Thread Lonnie Princehouse
No non-printing characters. However, I just tried copying the file (from a windows cmd prompt), and the copy was cut off at the same point the interpreter is getting to. When I edit the file with vim, though, the whole thing comes through. I think this is a pretty strong indication that this monke

os.walk bug?

2004-12-16 Thread Gabriel Cosentino de Barros
Title: os.walk bug? 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 t:\dir2 t:\dir2\2000 t:\dir2\2001 t:\dir2\2002 t:\dir2\2003 t:

  1   2   3   >