replace words

2005-10-26 Thread [EMAIL PROTECTED]
What is the way for replacing in a string from . to . the sentence? for example: "been .taken. it may be .left. there, even if the .live coals were not. cleared" I want to do this-> replace(\.(.*)\.,\.start (1) end\.) result: "been .start taken end. it may be .start left end. there, even if the .

Re: Microsoft Hatred FAQ

2005-10-26 Thread Peter T. Breuer
In comp.os.linux.misc David Schwartz <[EMAIL PROTECTED]> wrote: > "Peter T. Breuer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > I don't know what drugs you're on, but the McDonald's corporation most > certainly is in the business of the wholesale distribution of burger

Re: How to statically link Python with ncurses and readline?

2005-10-26 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > What do you mean? A static-only build does somehow exclude that I had > static libraries before? No, it doesn't. I misunderstood. It is quite unclear still what you had been doing: e.g. did you have shared versions of db and Tcl or not? Did you have linker scripts in pla

Re: XML Tree Discovery (script, tool, __?)

2005-10-26 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > just namespace + tag here's an ElementTree-based example: # http://effbot.org/tag/elementtree import elementtree.ElementTree as ET FILE = "example.xml" path = () path_map = {} for event, elem in ET.iterparse(FILE, events=("start", "end")):

Re: Missing modules '_ssl', 'ext.IsDOMString', 'ext.SplitQName'

2005-10-26 Thread uid09012_ti
Hi, yes of course the traceback could be helpfull so here it is... Traceback (most recent call last): File "App1.py", line 6, in ? File "Frame1.pyc", line 16, in ? File "brain.pyc", line 4, in ? File "xml\dom\ext\reader\__init__.pyc", line 20, in ? LookupError: unknown encoding: utf-8 -

Re: Missing modules '_ssl', 'ext.IsDOMString', 'ext.SplitQName'

2005-10-26 Thread uid09012_ti
Hi, which file names do you mean? -Martin. -- http://mail.python.org/mailman/listinfo/python-list

Re: more than 100 capturing groups in a regex

2005-10-26 Thread Joerg Schuster
> if you want to know why 100 is a reasonable and non-random choice, I > suggest checking the RE documentation for "99 groups" and the special > meaning of group 0. I have read everything I found about Python regular expressions. But I am not able to understand what you mean. What is so special ab

a Haskell a Day

2005-10-26 Thread Xah Lee
A Haskell A Day: Manifesto This is my learning notes on Haskell. I call it a-Haskell-a-day. I've been programing since 1992, and am a top expert at the Mathematica↗ language. I've long wanted to learn Haskell. It is my habit to write down what i'm learning. I will send out a small tip of what i ha

Re: Weird import behavior

2005-10-26 Thread Fredrik Lundh
"Tommytrojan" wrote: > thanks for your quick reply. I guess I should have included the output. > I thought I was clear in the error description. > The problem is that I never assign to 'string'. I only reference it (as > the error message correctly states). If you comment out the import > statemen

Re: Would there be support for a more general cmp/__cmp__

2005-10-26 Thread Antoon Pardon
Op 2005-10-25, Christopher Subich schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: >> Op 2005-10-25, Christopher Subich schreef <[EMAIL PROTECTED]>: >> > >>>Which is exactly why a < b on sets returns True xor False, but cmp(a,b) >>>throws an exception. >> >> >> I don't see the conection. >>

Re: a Haskell a Day

2005-10-26 Thread usenet
Xah Lee wrote: > I hope you will join me in learning Haskell. I think the folks here are more interested in Perl. There's a reason why this newsgroup is called lc("comp.lang.PERL.misc"). -- http://mail.python.org/mailman/listinfo/python-list

Re: a Haskell a Day

2005-10-26 Thread usenet
Xah Lee wrote: > I hope you will join me in learning Haskell. I think the folks here are more interested in Perl. There's a reason why this newsgroup is called lc("comp.lang.PERL.misc"). -- http://mail.python.org/mailman/listinfo/python-list

Re: p2exe using wine/cxoffice

2005-10-26 Thread Jon Perez
James Stroud wrote: > "better". The only reason I want this functionality is to make my software > available to windoze users--despite their unfortunate ignorance, they are > people too. That's what I always say. Actually, I think it's many unix/linux users who are ignorant of just how nice, stab

Listen in promiscuous mode (Sniffer) on UDP port 162 and copy packets to another port

2005-10-26 Thread Henko Gouws (H)
Dear reader   An application A opens UDP port 162 and listens for incoming packets.  We have another application B that wants to receive the same information from UDP port 162 but this application cannot open the port 162 because it is already opened by application A.  We want both A and

Re: Microsoft Hatred FAQ

2005-10-26 Thread David Blomstrom
Time for my two cents regarding this "debate." I started working on an anti-Microsoft website at http://www.freedomware.us/ some time ago. I never really finished it, for several reasons. I was new to PHP, so it was kind of slow going to begin with. Then I made some big mistakes that I still haven

Re: Microsoft Hatred FAQ

2005-10-26 Thread David Blomstrom
A bit off topic, but it amazes me that people in the web design/Internet industry don't take a more active stance against Microsoft. Think about it: The health care industry has been privatized in the U.S. I spent sixteen years in education, another institution that has been privatized. (It has la

Re: Top-quoting defined [was: namespace dictionaries ok?]

2005-10-26 Thread Duncan Booth
James Stroud wrote: > On Tuesday 25 October 2005 00:31, Duncan Booth wrote: >> P.S. James, *please* could you avoid top-quoting > > Were it not for Steve Holden's providing me with a link off the list, > I would have never known to what it is you are referring. I have read > some relevant literat

Re: How best to reference parameters.

2005-10-26 Thread David Poundall
Nice - I like that Tony. I had seen it around before but I didn't catch on. Thanks for the clear example.. -- http://mail.python.org/mailman/listinfo/python-list

Re: more than 100 capturing groups in a regex

2005-10-26 Thread Fredrik Lundh
Joerg Schuster wrote: > > if you want to know why 100 is a reasonable and non-random choice, I > > suggest checking the RE documentation for "99 groups" and the special > > meaning of group 0. > > I have read everything I found about Python regular expressions. But I > am not able to understand wh

Re: a Haskell a Day

2005-10-26 Thread Erik Max Francis
Xah Lee wrote: > This is my learning notes on Haskell. I call it a-Haskell-a-day. Another day, another community to completely piss of, huh, Xah? -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis Never take a s

Re: more than 100 capturing groups in a regex

2005-10-26 Thread Joerg Schuster
So what? -- http://mail.python.org/mailman/listinfo/python-list

Re: Listen in promiscuous mode (Sniffer) on UDP port 162 and copy packetsto another port

2005-10-26 Thread Gerald Klix
Hi Henko, the proper solution to this problem ist to use on libpcap's python bindings, like for example Billy The Kid. Here are some pointers: http://home.student.utwente.nl/g.v.berg/btk/ http://pycap.sourceforge.net/ http://monkey.org/~dugsong/pypcap/ http://www.tcpdump.org/ (libpcap) HTH Gerald

Re: more than 100 capturing groups in a regex

2005-10-26 Thread Iain King
Fredrik Lundh wrote: > Iain King wrote: > > > Anyway, back to the OP: in this specific case, the cap of 100 groups in > > a RE seems random to me, so I think the rule applies. > > perhaps in the "indistinguishable from magic" sense. > > if you want to know why 100 is a reasonable and non-random ch

Re: a Haskell a Day

2005-10-26 Thread Keith Thompson
"Xah Lee" <[EMAIL PROTECTED]> writes: [snip] ___ /| /| | | ||__|| | Please do | / O O\__ NOT | /

Re: Would there be support for a more general cmp/__cmp__

2005-10-26 Thread Antoon Pardon
Op 2005-10-25, Christopher Subich schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > >> I also think there is the problem that people aren't used to partial >> ordering. There is an ordering over sets, it is just not a total >> ordering. But that some pairs are uncomparable (meaning that neither

Re: a Haskell a Day

2005-10-26 Thread Martin Ambuhl
Xah Lee wrote: > This is my learning notes on Haskell. I call it a-Haskell-a-day. No one in any of comp.lang.perl.misc, comp.lang.python, comp.lang.c, comp.lang.java.programmer, comp.unix.programmer gives a damn about your adventures in Haskell. If you must mastubate, please do so i

Pickle to source code

2005-10-26 Thread Gabriel Genellina
Hello I want to convert from pickle format to python source code. That is, given an existing pickle, I want to produce a textual representation which, when evaluated, yields the original object (as if I had unpickled the pickle). I know of some transformations pickle/xml (Zope comes with one such

Re: more than 100 capturing groups in a regex

2005-10-26 Thread André Malo
* "Iain King" <[EMAIL PROTECTED]> wrote: > Ah, doh! Of course. Oh well then... still, doesn't python's RE > engine support named groups? That would be cumbersome, but would allow > you to go above 100... The named groups are built on top of numbered captures. They are mapped by the parser and

Re: select.select() on windows

2005-10-26 Thread Maksim Kasimov
you have to use non-block readining. http://docs.python.org/lib/module-select.html: A time-out value of zero specifies a poll and never blocks. jas wrote: > I am currently using subprocess to execute a command. Then I read from > it's stdout...however, this is hanging on a read..waiting for mor

Re: Microsoft Hatred FAQ

2005-10-26 Thread Eike Preuss
David Schwartz wrote: >> >>But if *every* vendor has to make that same choice, there is no place for >>that other 5% to go to buy another operating system. So the other >>operating system(s) die off. And those 5% become customers of Microsoft >>since there's no other choice left. And *that* i

Re: Would there be support for a more general cmp/__cmp__

2005-10-26 Thread Antoon Pardon
Op 2005-10-25, Steven D'Aprano schreef <[EMAIL PROTECTED]>: > On Tue, 25 Oct 2005 10:09:29 -0400, Christopher Subich wrote: > By analogy, one can ask, "is the cat inside the box?" and get the answer "No", but this does not imply that therefore the box must be inside the cat. >>> >>> >

Re: more than 100 capturing groups in a regex

2005-10-26 Thread Joerg Schuster
My first test program was far too naive. Evil things do happen. Simply removing the code that restricts the number of capturing groups to 100 is not a solitution. -- http://mail.python.org/mailman/listinfo/python-list

Re: more than 100 capturing groups in a regex

2005-10-26 Thread Joerg Schuster
... solution -- http://mail.python.org/mailman/listinfo/python-list

Re: p2exe using wine/cxoffice

2005-10-26 Thread Thomas Heller
Jon Perez <[EMAIL PROTECTED]> writes: > James Stroud wrote: > >> "better". The only reason I want this functionality is to make my software >> available to windoze users--despite their unfortunate ignorance, they are >> people too. That's what I always say. > > Actually, I think it's many unix/lin

Looping Problem (Generating files - only the last record generates a file)

2005-10-26 Thread vasilijepetkovic
Hello All, I have a problem with the program that should generate x number of txt files (x is the number of records in the file datafile.txt). Once I execute the program (see below) only one file (instead of x files) is created. The file created is based on the last record in datafile.txt. The p

Re: select.select() on windows

2005-10-26 Thread Ben Sizer
jas wrote: > I am currently using subprocess to execute a command. Then I read from > it's stdout...however, this is hanging on a read..waiting for more > bytes. So what I would like is to timeout...and select.selec() seems > to be what I need. Except I don't have a socket, i have stdout. > > A

Re: Looping Problem (Generating files - only the last record generates a file)

2005-10-26 Thread Iain King
[EMAIL PROTECTED] wrote: > Hello All, > > I have a problem with the program that should generate x number of txt > files (x is the number of records in the file datafile.txt). > > Once I execute the program (see below) only one file (instead of x > files) is created. The file created is based on t

Re: Looping Problem (Generating files - only the last record generates a file)

2005-10-26 Thread [EMAIL PROTECTED]
You have only indented the first line in the for-loop, so for each line in the file you split the line into town and latlong. Then after you have split the last line in the file you write a new file with the last result in the for-loop. What you want is probably something like this: #! python H

Re: Looping Problem (Generating files - only the last record generates a file)

2005-10-26 Thread John Abel
[EMAIL PROTECTED] wrote: >Hello All, > >I have a problem with the program that should generate x number of txt >files (x is the number of records in the file datafile.txt). > >Once I execute the program (see below) only one file (instead of x >files) is created. The file created is based on the la

Re: Looping Problem (Generating files - only the last record generates a file)

2005-10-26 Thread Marcus Ekelund
[EMAIL PROTECTED] wrote: > Hello All, > > I have a problem with the program that should generate x number of txt > files (x is the number of records in the file datafile.txt). > > Once I execute the program (see below) only one file (instead of x > files) is created. The file created is based on th

Re: Microsoft Hatred FAQ

2005-10-26 Thread Iain King
David Blomstrom wrote: > A bit off topic, but it amazes me that people in the > web design/Internet industry don't take a more active > stance against Microsoft. > > Think about it: The health care industry has been > privatized in the U.S. I spent sixteen years in > education, another institution

Re: Looping Problem (Generating files - only the last record generates a file)

2005-10-26 Thread Peter Otten
[EMAIL PROTECTED] wrote: > Once I execute the program (see below) only one file (instead of x > files) is created. The file created is based on the last record in > datafile.txt. > #! python > > HEADER = "This page displays longitude-latitude information" > SUBHEADER = "City" > > for line in o

Printing a document in the default network printer under Windows

2005-10-26 Thread Maravilloso
Hi all: I'm getting mad trying to find the way for making a standard document (Word file, Postscript document, JPEG file...) to be sent/printed in the default network printer from a python script that runs on Win2K. Any idea? Thanks in advance. Maravilloso -- http://mail.pytho

RE: Printing a document in the default network printer under Windows

2005-10-26 Thread Tim Golden
[Maravilloso] > I'm getting mad trying to find the way for making a standard > document (Word file, Postscript document, JPEG file...) to be > sent/printed in the default network printer from a python script that > runs on Win2K. Is this of any use? http://tgolden.sc.sabren.com/python/win32_how_

Re: replace words

2005-10-26 Thread Peter Otten
[EMAIL PROTECTED] wrote: > What is the way for replacing in a string from . to . the sentence? > for example: > "been .taken. it may be .left. there, > even if the .live coals were not. cleared" > I want to do this-> replace(\.(.*)\.,\.start (1) end\.) > result: > "been .start taken end. it may

RE: p2exe using wine/cxoffice

2005-10-26 Thread Tim Golden
> James Stroud wrote: >> "better". The only reason I want this functionality is to make my software >> available to windoze users--despite their unfortunate ignorance, they are >> people too. That's what I always say. Jon Perez <[EMAIL PROTECTED]> writes: > Actually, I think it's many unix/linux

Re: Printing a document in the default network printer under Windows

2005-10-26 Thread Maravilloso
Perfect, thanks! I owe you now some PyBeers :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Pickle to source code

2005-10-26 Thread Benjamin Niemann
Gabriel Genellina wrote: > I want to convert from pickle format to python source code. That is, > given an existing pickle, I want to produce a textual representation > which, when evaluated, yields the original object (as if I had > unpickled the pickle). > I know of some transformations pickle/x

Re: Pickle to source code

2005-10-26 Thread Maksim Kasimov
As far i know, in pickle-file there are only attributes values of a pickled object, but not an object itself. It is possible to unpickle object only if you have the sourse of the class that object you have pickled. So, if you have class code and attribute values of the class instance, there is

assignment to reference

2005-10-26 Thread Loris Caren
If a = 'apple' b = 'banana' c = 'cabbage' How can I get something like:- for i in 'abc': r = eval(i) if r == 'cabbage': r = 'coconut' actually change the object referenced by r rather than creating a new object temporarily referenced by it? I've tried playing with eval and exec wit

Double replace or single re.sub?

2005-10-26 Thread Iain King
I have some code that converts html into xhtml. For example, convert all tags into . Right now I need to do to string.replace calls for every tag: html = html.replace('','') html = html.replace('','') I can change this to a single call to re.sub: html = re.sub('<([/]*)i>', r'<\1em>', html) W

Re: p2exe using wine/cxoffice

2005-10-26 Thread Sybren Stuvel
Jon Perez enlightened us with: > Actually, I think it's many unix/linux users who are ignorant of > just how nice, stable and productive Windows can be as a desktop > environment. I thought the same thing after spending two hours removing some adware I found. > Ever since Win2K got rid of the con

Re: p2exe using wine/cxoffice

2005-10-26 Thread Sybren Stuvel
Tim Golden enlightened us with: > Well, I'm with you. I'm sure a lot of people will chime in to point > out just how flexible and useful and productive Linux is as a > workstation, but every time I try to use it -- and I make an honest > effort -- I end up back in Windows I'm curious, what do you

Re: assignment to reference

2005-10-26 Thread Sybren Stuvel
Loris Caren enlightened us with: > If > > a = 'apple' > b = 'banana' > c = 'cabbage' > > How can I get something like:- > > for i in 'abc': > r = eval(i) > if r == 'cabbage': r = 'coconut' > > actually change the object referenced by r rather > than creating a new object temporarily ref

Re: assignment to reference

2005-10-26 Thread Fredrik Lundh
Loris Caren wrote: > a = 'apple' > b = 'banana' > c = 'cabbage' > > How can I get something like:- > > for i in 'abc': > r = eval(i) > if r == 'cabbage': r = 'coconut' > > actually change the object referenced by r rather > than creating a new object temporarily referenced by it? if you n

Re: a Haskell a Day

2005-10-26 Thread Roedy Green
On 26 Oct 2005 00:38:23 -0700, "Xah Lee" <[EMAIL PROTECTED]> wrote, quoted or indirectly quoted someone who said : >A Haskell A Day: Manifesto This is the wrong newsgroup. Had you done the same for Java, comp.lang.java.help would be the place to post it. -- Canadian Mind Products, Roedy Green. ht

Re: Log rolling question

2005-10-26 Thread NickC
If you're on Python 2.4, then consider whether or not you can use a TimedRotatingLogFileHandler from the logging module to handle this for you: http://www.python.org/doc/2.4.1/lib/node344.html Of course, that only works if defining a "month" as 30 days is acceptable. If you genuinely need calendar

Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Tim Golden
[Sybren Stuvel] Tim Golden enlightened us with: > > Well, I'm with you. I'm sure a lot of people will chime in to point > > out just how flexible and useful and productive Linux is as a > > workstation, but every time I try to use it -- and I make an honest > > effort -- I end up back in Windows

Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread [EMAIL PROTECTED]
Tim Golden wrote: > As it happens, (and I suspect I'll have to don my flameproof suit here), > I prefer the Windows command line to bash/readline for day-to-day use, > including in Python. Why? Because it does what I can't for the life of > me get readline to do: you can type the first few letters

Re: Top-quoting defined [was: namespace dictionaries ok?]

2005-10-26 Thread Iain King
Duncan Booth wrote: > James Stroud wrote: > > > On Tuesday 25 October 2005 00:31, Duncan Booth wrote: > >> P.S. James, *please* could you avoid top-quoting > > > > Were it not for Steve Holden's providing me with a link off the list, > > I would have never known to what it is you are referring. I

Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread darren kirby
quoth the Tim Golden: > As it happens, (and I suspect I'll have to don my flameproof suit here), > I prefer the Windows command line to bash/readline for day-to-day use, > including in Python. Why? Because it does what I can't for the life of > me get readline to do: you can type the first few lett

Re: p2exe using wine/cxoffice

2005-10-26 Thread Steve Holden
Jon Perez wrote: > James Stroud wrote: > > >>"better". The only reason I want this functionality is to make my software >>available to windoze users--despite their unfortunate ignorance, they are >>people too. That's what I always say. > > > Actually, I think it's many unix/linux users who are

Re: Client/Server socket send user input

2005-10-26 Thread jas
Dennis, Thanks. That certainly looks like it could work. I understand about the interactive shell and my app going back and forth with the reads/writes. When my program runs it won't be used in an interactive python shell, but that is the only way I know of to really test it. -- http://mail

Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Sybren Stuvel
Tim Golden enlightened us with: > Not quite fair. Not only would I avoid saying something with a > redundant apostrophe ;) but the Windows user interface, at least for > my purposes, didn't change such a huge amount between Win9x and > Win2K, Hence my reference to windows 3.1. > It's obvious that

OT: Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Jeremy Jones
Tim Golden wrote: >As it happens, (and I suspect I'll have to don my flameproof suit here), >I prefer the Windows command line to bash/readline for day-to-day use, >including in Python. Why? Because it does what I can't for the life of >me get readline to do: you can type the first few letters

RE: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Tim Golden
Tim Golden wrote: > As it happens, (and I suspect I'll have to don my flameproof suit here), > I prefer the Windows command line to bash/readline for day-to-day use, > including in Python. Why? Because it does what I can't for the life of > me get readline to do: you can type the first few letters

Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread [EMAIL PROTECTED]
oops, stand corrected. As I don't use the feature more than ctrl-r and up/down arrow. Tim Golden wrote: > Thanks to both of you. But that much I already knew. It's not > that I have *no* knowledge about readline: I did at least > read the manuals when I got stuck! But as far as I can tell > from m

Re: Pickle to source code

2005-10-26 Thread Gabriel Genellina
Benjamin Niemann ha escrito: > Gabriel Genellina wrote: > > > I want to convert from pickle format to python source code. That is, > > given an existing pickle, I want to produce a textual representation > > which, when evaluated, yields the original object (as if I had > > If all objects correctl

Re: Windows vs Linux

2005-10-26 Thread Thomas Heller
"Tim Golden" <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] >> But command line in Windows is in no way in the same >> league as *nix shell. Use for command completion and up/down >> arrow or to search for history. > > [darren kirby] >> Try ctrl-r in bash, then type your first few letters... >

tool for syntax coloring in html

2005-10-26 Thread Xah Lee
in some online documentations, for examples: http://perldoc.perl.org/perlref.html http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme-Z-H-17.html http://www.haskell.org/hawiki/HaskellDemo the codes are syntax colored. Is there a tool that produce codes in html with syntax coloring? Thanks.

Re: Pickle to source code

2005-10-26 Thread Gabriel Genellina
Maksim Kasimov ha escrito: > As far i know, in pickle-file there are only attributes values of a pickled > object, but not an object itself. > > It is possible to unpickle object only if you have the sourse of the class > that object you have pickled. > So, if you have class code and attribute

Re: tool for syntax coloring in html

2005-10-26 Thread Maciej Dziardziel
Xah Lee wrote: > in some online documentations, for examples: > > http://perldoc.perl.org/perlref.html > http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme-Z-H-17.html > http://www.haskell.org/hawiki/HaskellDemo > > the codes are syntax colored. > > Is there a tool that produce codes in ht

WinXP vs. Win98

2005-10-26 Thread sidanko
I use Python 2.3.3 (Enthought edition) with wxPython and it is installed on both WinXP and Win98. On Win98 machine I have the following error: Traceback (most recent call last): File "C:\PYTHON23\Lib\site-packages\pythonwin\

Re: tool for syntax coloring in html

2005-10-26 Thread Gerhard Häring
Xah Lee wrote: > in some online documentations, for examples: > > http://perldoc.perl.org/perlref.html > http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme-Z-H-17.html > http://www.haskell.org/hawiki/HaskellDemo > > the codes are syntax colored. > > Is there a tool that produce codes in htm

RE: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Tim Golden
[Sybren Stuvel] [Tim Golden] > > It's obvious that everyone has a different way of working, and that > > I'm more comfortable in Windows because all sorts of small > > familiarities > So what I read in your post is that you simply don't want to leave > your familiar environment. Fair enough. Wel

Re: Windows vs Linux

2005-10-26 Thread Bernhard Herzog
"Tim Golden" <[EMAIL PROTECTED]> writes: > But as far as I can tell > from my experience and from the docs -- and I'm not near a > Linux box at the mo -- having used ctrl-r to recall line x > in the history, you can't just down-arrow to recall x+1, x+2 etc. > Or can you? You can. It works fin

Re: Top-quoting defined [was: namespace dictionaries ok?]

2005-10-26 Thread Ron Adam
Duncan Booth wrote: > No, I didn't think it was malice which is why I just added what I > considered to be a polite request at the end of my message. I assumed that > most people either knew the phrase or could find out in a few seconds using > Google so there wasn't much point in rehashing t

Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Sybren Stuvel
Tim Golden enlightened us with: > But as far as I can tell from my experience and from the docs -- and > I'm not near a Linux box at the mo -- having used ctrl-r to recall > line x in the history, you can't just down-arrow to recall x+1, x+2 > etc. Or can you? With bash as well as the Python inte

Re: tool for syntax coloring in html

2005-10-26 Thread Michele Simionato
Gerhard wrote: > http://initd.org/pub/software/pysqlite/doc/usage-guide.html Can I suggest you to use a larger font for the code?It is pretty difficult to parse with my current screen resolution. BTW, pysqlite2 is pretty cool ;) Michele Simionato -- http://mail.python.org/mailman

RE: Windows vs Linux

2005-10-26 Thread Tim Golden
"Tim Golden" <[EMAIL PROTECTED]> writes: > But as far as I can tell > from my experience and from the docs -- and I'm not near a > Linux box at the mo -- having used ctrl-r to recall line x > in the history, you can't just down-arrow to recall x+1, x+2 etc. > Or can you? [Bernhard Herzog] > Yo

RE: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Tim Golden
Tim Golden enlightened us with: > But as far as I can tell from my experience and from the docs -- and > I'm not near a Linux box at the mo -- having used ctrl-r to recall > line x in the history, you can't just down-arrow to recall x+1, x+2 > etc. Or can you? [Sybren] With bash as well as the Py

Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Giovanni Dall'Olio
Tim Golden ha scritto: > As it happens, (and I suspect I'll have to don my flameproof suit here), > I prefer the Windows command line to bash/readline for day-to-day use, > including in Python. Why? Because it does what I can't for the life of > me get readline to do: you can type the first few

Re: tool for syntax coloring in html

2005-10-26 Thread Stephen Hildrey
Xah Lee wrote: > Is there a tool that produce codes in html with syntax coloring? I'm sure there's a million-and-one tools that will do what you want, and suggest you search Google. Personally, I've used vim to do this in the past. The following generates marked-up code: :runtime syntax/2

Re: tool for syntax coloring in html

2005-10-26 Thread propell
I use Silvercity for my web site. SilverCity is a Python interface to the Scintilla lexers. It's available at http://silvercity.sourceforge.net/ I find the output from silvercity a bit verbose, so I have written a few Python classes for cleaning up the output. The code is available at http://fausk

Re: Pickle to source code

2005-10-26 Thread Gabriel Genellina
> I want to convert from pickle format to python source code. That is, > given an existing pickle, I want to produce a textual representation > which, when evaluated, yields the original object (as if I had > unpickled the pickle). > I know of some transformations pickle/xml (Zope comes with one su

Re: Would there be support for a more general cmp/__cmp__

2005-10-26 Thread Ron Adam
Antoon Pardon wrote: > Op 2005-10-25, Steven D'Aprano schreef <[EMAIL PROTECTED]>: >>Can somebody remind me, what is the problem Antoon is trying to solve here? > > > Well there are two issues. One about correct behaviour and one about > practicallity. > > The first problem is cmp. This is w

How do I access the property info in this example ?

2005-10-26 Thread David Poundall
How do I access the property information in this example ? class C(object): def getx(self): return self.__x def setx(self, value): self.__x = value def delx(self): del self.__x x = property(getx, setx, delx, "I'm the 'x' property.") I would like to get at ... "I'm the 'x' propert

Re: a Haskell a Day

2005-10-26 Thread Mike Meyer
Erik Max Francis <[EMAIL PROTECTED]> writes: > Xah Lee wrote: >> This is my learning notes on Haskell. I call it a-Haskell-a-day. Interesting. Xah Lee's orginals don't show up in the Python newsgroup. No big loss. In any case, please help google find Xah Lee under the proper search terms. Add a l

Dr. Dobb's Python-URL! - weekly Python news and links (Oct 26)

2005-10-26 Thread Cameron Laird
QOTW: "Using Unix for 20+ years probably warps one's perception of what's obvious and what isn't." -- Grant Edwards "... windoze users--despite their unfortunate ignorance, they are people too." -- James Stroud "The Widget Construction Kit (WCK) is an extension API that allows you to imp

Re: wxPython import error

2005-10-26 Thread Michele Petrazzo
[EMAIL PROTECTED] ha scritto: > I have tried several times to install wxPython on Fedora Core 2. The > installation seems to go fine (from sources), but when I try to import the > wx module I keep getting the following error: > <-cut-> > Any help or explanation would be greatly appreciated. Fo

Re: Double replace or single re.sub?

2005-10-26 Thread Mike Meyer
"Iain King" <[EMAIL PROTECTED]> writes: > I have some code that converts html into xhtml. For example, convert > all tags into . Right now I need to do to string.replace calls > for every tag: > > html = html.replace('','') > html = html.replace('','') > > I can change this to a single call to

Re: How do I access the property info in this example ?

2005-10-26 Thread Sybren Stuvel
David Poundall enlightened us with: > class C(object): > def getx(self): return self.__x > def setx(self, value): self.__x = value > def delx(self): del self.__x > x = property(getx, setx, delx, "I'm the 'x' property.") > > I would like to get at ... > > "I'm the 'x' property." As

Re: Would there be support for a more general cmp/__cmp__

2005-10-26 Thread Christopher Subich
Antoon Pardon wrote: > Op 2005-10-25, Christopher Subich schreef <[EMAIL PROTECTED]>: >> >>My biggest complaint here is about returning None or IncomparableValue; >>if that happens, then all code that relies on cmp returning a numeric >>result will have to be rewritten. > > > I don't know. Ther

Re: How do I access the property info in this example ?

2005-10-26 Thread David Poundall
Thanks - I was trying to do c = C() print c.x.__doc__ my mistake. -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Sybren Stuvel
Tim Golden enlightened us with: > Well yes. I think the (only slightly) wider point I was making was > that -- despite goodwill and several attempts on my part -- Linux > still has not overpowered me with its usefulness. I have yet to see any OS that overpowers me with its usefulness. > Extending

suggestions between these two books

2005-10-26 Thread John Salerno
Hi all. I'm fairly new to programming and I thought I'd like to try Python. I'm trying to decide between these two books: Learning Python (O'Reilly) Beginning Python: From Novice to Professional (APress) and I was hoping you might have some suggestions. LP seems to be a good intro, but the othe

Re: Double replace or single re.sub?

2005-10-26 Thread Iain King
Mike Meyer wrote: > "Iain King" <[EMAIL PROTECTED]> writes: > > > I have some code that converts html into xhtml. For example, convert > > all tags into . Right now I need to do to string.replace calls > > for every tag: > > > > html = html.replace('','') > > html = html.replace('','') > > > >

Re: Missing modules '_ssl', 'ext.IsDOMString', 'ext.SplitQName'

2005-10-26 Thread Ron Adam
[EMAIL PROTECTED] wrote: > Hi, > > which file names do you mean? > > -Martin. I've ran across a case where I copied a module from the python libs folder to my source directory, it would work fine before I built with py2exe, but afterwards it would give a file not found error. I haven't q

Re: tool for syntax coloring in html

2005-10-26 Thread Philippe C. Martin
I use gvim. regards, Philippe Xah Lee wrote: > in some online documentations, for examples: > > http://perldoc.perl.org/perlref.html > http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme-Z-H-17.html > http://www.haskell.org/hawiki/HaskellDemo > > the codes are syntax colored. > > Is th

Re: Pickle to source code

2005-10-26 Thread Jean-Paul Calderone
On 26 Oct 2005 06:15:35 -0700, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >> I want to convert from pickle format to python source code. That is, >> given an existing pickle, I want to produce a textual representation >> which, when evaluated, yields the original object (as if I had >> unpickled

  1   2   3   >