I am looking xml-python processor

2006-11-26 Thread Asper Faner
Is there any newer version of topic map processor I can use ? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: test message

2006-11-26 Thread Jordan Greenberg
Ben Finney wrote: > Jordan Greenberg <[EMAIL PROTECTED]> writes: > >> [EMAIL PROTECTED] wrote: >>> This is a test message, please ignore. >> I could do that, but reminding you that test messages go in *.test >> groups is way more fun. > > I'm betting that the test message was to the Python mailin

problem with wxTextCtrl text style

2006-11-26 Thread alyph
Hi, I'm using wxTextCtrl in python (wxPython 2.6, python 2.4). And I used the SetStyle function to change color of some text already shown in the TextCtrl. Everything works fine excpet if I set a whole line to a new style the row space seems to get smaller than before... Any ideas? -- http://ma

Re: test message

2006-11-26 Thread Ben Finney
Jordan Greenberg <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > > This is a test message, please ignore. > > I could do that, but reminding you that test messages go in *.test > groups is way more fun. I'm betting that the test message was to the Python mailing list, not a Usenet group.

python-dev Summary for 2006-10-16 through 2006-10-31

2006-11-26 Thread steven . bethard
python-dev Summary for 2006-10-16 through 2006-10-31 .. contents:: [The HTML version of this Summary is available at http://www.python.org/dev/summary/2006-10-16_2006-10-31] = Announcements =

python-dev Summary for 2006-11-01 through 2006-11-15

2006-11-26 Thread steven . bethard
python-dev Summary for 2006-11-01 through 2006-11-15 .. contents:: [The HTML version of this Summary is available at http://www.python.org/dev/summary/2006-11-01_2006-11-15] = Announcements =

python-dev Summary for 2006-10-01 through 2006-10-15

2006-11-26 Thread steven . bethard
python-dev Summary for 2006-10-01 through 2006-10-15 .. contents:: [The HTML version of this Summary is available at http://www.python.org/dev/summary/2006-10-01_2006-10-15] = Announcements =

Re: test message

2006-11-26 Thread Jordan Greenberg
[EMAIL PROTECTED] wrote: > This is a test message, please ignore. I could do that, but reminding you that test messages go in *.test groups is way more fun. And there are about a billion of them to choose from. The great thing about test groups is that when you use them, you don't clutter up my (a

Re: Ruby/Python/REXX as a MUCK scripting language

2006-11-26 Thread johnzenger
Have you considered JavaScript Spidermonkey or JavaScript Rhino? Sandboxing is automatic, and lots of people know the language already (although fewer people are familiar with its dynamic object-oriented capabilities). Tony Belding wrote: > I'm interested in using an off-the-shelf interpreted lang

Re: The Python Papers Edition One

2006-11-26 Thread Ben Finney
"Noah Slater" <[EMAIL PROTECTED]> writes: > I do not think this thread is an embarrassment to the community. I > think it speaks volumes about people's commitment to free software. > > While we can applaud such contributions it is no excuse to waiver on > one's ethics and principles. Yes, this wa

Re: Generating header information using ElementTree

2006-11-26 Thread Craig
John Machin wrote: > Craig wrote: > > > Great. Got that sorted. The problem I have now is that some of the > > XML data is not copied across to the file when I have the text > > information included. The number of characters that is lost is equal > > to the number of characters that is in the

test message

2006-11-26 Thread john . smith
This is a test message, please ignore. -- http://mail.python.org/mailman/listinfo/python-list

Re: The Python Papers Edition One

2006-11-26 Thread Noah Slater
I do not think this thread is an embarrassment to the community. I think it speaks volumes about people's commitment to free software. While we can applaud such contributions it is no excuse to waiver on one's ethics and principles. Regardless of content, or even format, if the Python Papers are

Re: Generating header information using ElementTree

2006-11-26 Thread John Machin
Craig wrote: > Great. Got that sorted. The problem I have now is that some of the > XML data is not copied across to the file when I have the text > information included. The number of characters that is lost is equal > to the number of characters that is in the block of text I entered > befor

Re: The Python Papers License Discussion

2006-11-26 Thread Ben Finney
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Thank you all who have commented on the licensing issues surrounding > The Python Papers. Thanks for patiently discussing it with your community. > 1) Authors submitting to The Python Papers will be permitted to > choose from a number of licens

Re: Ruby/Python/REXX as a MUCK scripting language

2006-11-26 Thread Jeremy C B Nicoll
In article <[EMAIL PROTECTED]>, Tony Belding <[EMAIL PROTECTED]> wrote: > My final option would be to create my own language interpeter... If you're capable of doing that, I'd have thought you'd be capable of taking the source code for Regina and modifying it so that either no commands are pas

Re: Generator question

2006-11-26 Thread Mathias Panzenboeck
Robert Kern wrote: > Timothy Wu wrote: >> Hi, >> >> Using generator recursively is not doing what I expect: >> >> def test_gen(x): >> yield x >> x = x - 1 >> if x != 0: >> test_gen(x) > > The only thing that the last line does is *create* a new generator object. You > need to a

Pending: A Mixin class for testing

2006-11-26 Thread Scott David Daniels
Here is a Mix-in class I just built for testing. It is quite simple, but illustrates how Mixins can be used. class Pending(object): _pending = iter(()) def __new__(class_, *args, **kwargs): try: return class_._pending.next() except

Re: Generating header information using ElementTree

2006-11-26 Thread Craig
Diez B. Roggisch wrote: > Craig schrieb: > > Fredrik Lundh wrote: > > > >> Craig wrote: > >> > >>> I'm only new to Python so please bear with me. I using ElementTree to > >>> generate an XML file that will reference a DTD and an XSL file. The > >>> header information I want at the start of the f

The Python Papers License Discussion

2006-11-26 Thread [EMAIL PROTECTED]
Thank you all who have commented on the licensing issues surrounding The Python Papers. For the time being, the board and I have decided to continue using the Creative Commons Noncommercial, Attribution and Share-Alike license as the standard license for articles contained in The Python Papers. Ho

Re: Generating header information using ElementTree

2006-11-26 Thread John Machin
Craig wrote: > Fredrik Lundh wrote: > > > Craig wrote: > > > > > I'm only new to Python so please bear with me. I using ElementTree to > > > generate an XML file that will reference a DTD and an XSL file. The > > > header information I want at the start of the file is as follows: > > > > > > >

Re: pdb question

2006-11-26 Thread tac-tics
Strange. It seems to be working just fine now. Maybe I wasn't waiting for all the symbols to be defined before setting my breakpoint. On Nov 26, 2:41 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > tac-tics wrote: > > In the Python debugger (pdb), how do you designate breakpoints at the > > start o

Re: Generating header information using ElementTree

2006-11-26 Thread Diez B. Roggisch
Craig schrieb: > Fredrik Lundh wrote: > >> Craig wrote: >> >>> I'm only new to Python so please bear with me. I using ElementTree to >>> generate an XML file that will reference a DTD and an XSL file. The >>> header information I want at the start of the file is as follows: >>> >>> >>> >>> >>

Re: Generating header information using ElementTree

2006-11-26 Thread Craig
Fredrik Lundh wrote: > Craig wrote: > > > I'm only new to Python so please bear with me. I using ElementTree to > > generate an XML file that will reference a DTD and an XSL file. The > > header information I want at the start of the file is as follows: > > > > > > > > > > > > How do you add

Re: The Python Papers Edition One

2006-11-26 Thread Łukasz Langa
Fredrik Lundh: > Tennessee Leeuwenburg wrote: > > >> If anyone has any good ideas for how to cope as a publisher with these >> difficulties, I'm all ears. >> > > has any of the format zealots posting to this thread actually > volunteered to produce any material for your publication? if no

Re: Generating header information using ElementTree

2006-11-26 Thread Fredrik Lundh
Craig wrote: > I'm only new to Python so please bear with me. I using ElementTree to > generate an XML file that will reference a DTD and an XSL file. The > header information I want at the start of the file is as follows: > > > > > > How do you add this header information to the tree to t

Generating header information using ElementTree

2006-11-26 Thread Craig
Hi there, I'm only new to Python so please bear with me. I using ElementTree to generate an XML file that will reference a DTD and an XSL file. The header information I want at the start of the file is as follows: How do you add this header information to the tree as I can't find any docume

Several entries on Tile and TableList at the Tkinter wiki

2006-11-26 Thread Kevin Walzer
I'm not sure how often members of this list visit the Tkinter wiki at http://tkinter.unpythonic.net/wiki/FrontPage; this wiki seems to have less traffic in general than the Tcl/Tk wiki at http://wiki.tcl.tk. Given that, I hope it's not out of line for me to call attention to several pages that I'v

Re: pdb question

2006-11-26 Thread Fredrik Lundh
tac-tics wrote: > In the Python debugger (pdb), how do you designate breakpoints at the > start of methods? > I've tried: > break methodName > break class.methodName > break object.methodName > > but none of these seem to work. What is the trick? define "seem to work". the "className.methodName

pdb question

2006-11-26 Thread tac-tics
In the Python debugger (pdb), how do you designate breakpoints at the start of methods? I've tried: break methodName break class.methodName break object.methodName but none of these seem to work. What is the trick? -- http://mail.python.org/mailman/listinfo/python-list

Re: question about function not executing

2006-11-26 Thread Jussi Salmela
Ara Kooser wrote: > When I run the python program it works fine until I try to go west > from my inital start room. I get the room description but no raw_input > prompt. I just get dumped back to >>> in the python shell. I think I > am missing something simple. I pasted in the code below. I am us

Re: question about function not executing

2006-11-26 Thread Juho Schultz
Hint: Posting only the piece of code causing the problem will give you more answers... Ara Kooser wrote: > Hello all, > > I hope I am posting this correctly. I am running Python 2.4.2 on > Slackware 11.0 using IDLE. I am in the process of learning python so I > am writing a text adventure game

question about function not executing

2006-11-26 Thread Ara Kooser
Hello all, I hope I am posting this correctly. I am running Python 2.4.2 on Slackware 11.0 using IDLE. I am in the process of learning python so I am writing a text adventure game using functions and global variables only. I know there is a better way to do this but that is for later. When I

Re: acessing to the raw data of an email message

2006-11-26 Thread Fredrik Lundh
Jiba wrote: > Does anyone have an idea ? I think it would be nice to let the > parser add the raw message data in the Message object. since you're the one passing the raw data to the email parser, maybe you could store it somewhere yourself? -- http://mail.python.org/mailman/listinfo/python

acessing to the raw data of an email message

2006-11-26 Thread Jiba
Hi, I'm using the email Python package for parsing mail and checking GPG signature. The Message object doesn't store the raw message data. Message.as_string "rebuild" the whole message, for example it may gives: Content-Disposition: attachment; filename=text.txt whereas the original message wa

Re: Persistent Threads & Synchronisation

2006-11-26 Thread Matthew Tylee Atkinson
On Sun, 26 Nov 2006 13:24:21 +0100, Marc 'BlackJack' Rintsch wrote: > There seems to be a misunderstanding of threads. You don't call functions > in a thread from the main program. If you call a function from the main > thread then the function is executed in the main thread. That's true for > a

Re: RuPy Ruby & Python Conference 2007

2006-11-26 Thread Paul McGuire
"Katarzyna Bylec" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > we would like to invite you to one of the biggest Ruby and Python > events in > central-eastern Europe next year. RuPy Conference dedicated to Ruby and > Python programming languages will take place in April

Re: About alternatives to Matlab

2006-11-26 Thread sturlamolden
Phil Schmidt wrote: > Well, that kind of gets right to my point. Does the "added" effort with > Python to interface with data acquisition hardware really result in > less productivity? I am very familiar with Matlab, Labview, and Python, > and frankly, Python is the most productive and powerful pr

Re: Inheritance from builtin list and override of methods.

2006-11-26 Thread Fredrik Lundh
Michalis Giannakidis wrote: > Could someone please explain the reasoning/behabiour of these? in general, methods on C objects are implemented in terms of operations on the internal data structures, not in terms of a subset of the methods already provided by the object. -- http://mail.python

Re: ANN: RuPy Ruby & Python Conference 2007

2006-11-26 Thread parser
This is a really great news for both Ruby and Python lovers!! Katarzyna Bylec wrote: > Hello, > > we would like to invite you to one of the biggest Ruby and Python > events in > central-eastern Europe next year. RuPy Conference dedicated to Ruby and > Python programming languages will take place

Inheritance from builtin list and override of methods.

2006-11-26 Thread Michalis Giannakidis
Dear all I tried to override methods of build in Python types, so as to change their behavior. I tried to override list.__getitem__ list.__setitem__ and some others alike The test case is: #!/usr/bin/env python class L(list): def __getitem__(self, i): print 'G', i

ANN: RuPy Ruby & Python Conference 2007

2006-11-26 Thread Katarzyna Bylec
Hello, we would like to invite you to one of the biggest Ruby and Python events in central-eastern Europe next year. RuPy Conference dedicated to Ruby and Python programming languages will take place in April 14-15, 2007 in Poznan, Poland and the idea behind it is to put together experts with youn

InProc COM server for Excel supporting several versions of Excel

2006-11-26 Thread [EMAIL PROTECTED]
Hi list, At the moment at work I have to maintain one Excel spreadsheet that has plenty of VBA code that performs validation of the data the user inserts, it must conform to certain business rules. I would like to replace the VBA code for one InPoc COM server DLL made in python. I read the Python P

Re: Installation problem

2006-11-26 Thread Diez B. Roggisch
Tommy Grav schrieb: > Trying to update my ActivePython installation I mistakenly downloaded > the Intel Mac version (rather than the PPC version) and tried to install > it. > The version did install but did not run of course. However, now trying > to install the PPC version of Activepython or even

Installation problem

2006-11-26 Thread Tommy Grav
Trying to update my ActivePython installation I mistakenly downloaded the Intel Mac version (rather than the PPC version) and tried to install it. The version did install but did not run of course. However, now trying to install the PPC version of Activepython or even the 2.5 version of macpython

Re: Ruby/Python/REXX as a MUCK scripting language

2006-11-26 Thread i
Tony Belding skrev: > I'm interested in using an off-the-shelf interpreted language as a > user-accessible scripting language for a MUCK. I'm just not sure if I > can find one that does everything I need. The MUCK must be able to > call the interpreter and execute scripts with it, but the interp

Re: Persistent Threads & Synchronisation

2006-11-26 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Matthew Tylee Atkinson wrote: > They way I want it to work is this: The downloading thread, when > spawned, stays alive for the duration of the program. Occasionally the > main program will call a function in it to download the data and save it > as files on disk. Then,

Oops!

2006-11-26 Thread Matthew Tylee Atkinson
Apologies for any repeated posts, my 'net connection died unexpectedly! -- Matthew Tylee Atkinson <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

Re: a -very- case sensitive search

2006-11-26 Thread Paul McGuire
"John Machin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > John - Thanks for the updates. Comments below... -- Paul > Paul McGuire wrote: > >> You may have to do some setup >> of your locale for proper handling of unicode.isupper, etc., > > Whatever gave you that impression?

Re: a -very- case sensitive search

2006-11-26 Thread John Machin
Paul McGuire wrote: > "Ola K" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi, > > I am pretty new to Python and I want to make a script that will search > > for the following options: > > 1) words made of uppercase characters -only- (like "YES") > > 2) words made of lowercase

Re: Dynamic function execution

2006-11-26 Thread Fredrik Lundh
Cameron Laird wrote: > ? Or am I missing the point that a better example of what > Mr. Wu really wants is > > def func(seconds = None, minutes = None, hours = None): > print seconds > print minutes > print hours > > dimension = "minutes" > func(**{dimension: 30}) I ass

Persistent Threads & Synchronisation

2006-11-26 Thread Matthew Tylee Atkinson
I appear to be having some problems with the isAlive() method of detecting if a thread is alive/active/running or not. I'd be grateful for any advice. I have a visualisation program (which uses PyGame Extended [1]) that presents content to the user and is meant to download the next batch of conte

Persistent Threads & Synchronisation

2006-11-26 Thread Matthew Tylee Atkinson
I appear to be having some problems with the isAlive() method of detecting if a thread is alive/active/running or not. I'd be grateful for any advice. I have a visualisation program (which uses PyGame Extended [1]) that presents content to the user and is meant to download the next batch of conte

Re: who is maintainer of xml-rpc module?

2006-11-26 Thread Fredrik Lundh
Mark Harrison wrote: > So, I've made a couple of small but useful additions to > the xml-rpc package. Is there an assigned maintainer > of the package I should communicate with? post your patch here: http://sourceforge.net/tracker/?group_id=5470&atid=305470 -- http://mail.python.org/mailman

Re: a -very- case sensitive search

2006-11-26 Thread Paul McGuire
"Ola K" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > I am pretty new to Python and I want to make a script that will search > for the following options: > 1) words made of uppercase characters -only- (like "YES") > 2) words made of lowercase character -only- (like "yes") > 3

Re: problem about list indexing

2006-11-26 Thread John Machin
Steven D'Aprano wrote: > On Sun, 26 Nov 2006 00:25:13 -0800, hollowspook wrote: > > > Hi, there > > > > a = range(100) > > > > if I want to use No 7, 11, 56,90 in a, then the only way I do is [a[7], > > a[11], a[56], a[90]]. > > Is there any other way? > > a = [7, 11, 56, 90] > > Are those numbers

Re: problem about list indexing

2006-11-26 Thread ZeD
hollowspook wrote: > how about indexing 1-7, 10 > [range(1:8),10] will generate [[1, 2, 3, 4, 5, 6, 7], 10], instead of > [1, 2, 3, 4, 5, 6, 7, 10] >>> range(1,8)+[10] [1, 2, 3, 4, 5, 6, 7, 10] -- Under construction -- http://mail.python.org/mailman/listinfo/python-list

Re: problem about list indexing

2006-11-26 Thread hollowspook
Thanks, bearophile. range(1, 8) + [10] is great! "[EMAIL PROTECTED] 写道: " > hollowspook: > > how about indexing 1-7, 10 > > [range(1:8),10] will generate [[1, 2, 3, 4, 5, 6, 7], 10], instead of > > [1, 2, 3, 4, 5, 6, 7, 10] > > (Note that range(1:8) is a syntax error). > > You can join and extend

Re: problem about list indexing

2006-11-26 Thread bearophileHUGS
hollowspook: > how about indexing 1-7, 10 > [range(1:8),10] will generate [[1, 2, 3, 4, 5, 6, 7], 10], instead of > [1, 2, 3, 4, 5, 6, 7, 10] (Note that range(1:8) is a syntax error). You can join and extend lists as you like: >>> range(1, 8) + [10] [1, 2, 3, 4, 5, 6, 7, 10] See also the list.a

Re: problem about list indexing

2006-11-26 Thread hollowspook
Thanks, John how about indexing 1-7, 10 [range(1:8),10] will generate [[1, 2, 3, 4, 5, 6, 7], 10], instead of [1, 2, 3, 4, 5, 6, 7, 10] "John Machin 写道: " > hollowspook wrote: > > Hi, there > > > > a = range(100) > > > > if I want to use No 7, 11, 56,90 in a, then the only way I do is [a[7], > >

Re: problem about list indexing

2006-11-26 Thread Steven D'Aprano
On Sun, 26 Nov 2006 00:25:13 -0800, hollowspook wrote: > Hi, there > > a = range(100) > > if I want to use No 7, 11, 56,90 in a, then the only way I do is [a[7], > a[11], a[56], a[90]]. > Is there any other way? a = [7, 11, 56, 90] Are those numbers supposed to be in some sort of series? They

Re: search versus match in re module

2006-11-26 Thread John Machin
John Machin wrote: [snip] > 2. Then realise that your test is equivalent to > > if not line.startswith('^From '): Whoops! That '^From ' (and all later ones) should have been 'From ' (the perils of over-hasty copy/paste) The timings are, if anything, a tiny bit faster than before. Cheers, John

Re: Generator question

2006-11-26 Thread Timothy Wu
On 11/26/06, Robert Kern <[EMAIL PROTECTED]> wrote: The only thing that the last line does is *create* a new generator object. You need to actually iterate over it and yield its values. E.g. In [2]: def test_gen(x): ...: yield x ...: x -= 1 ...: if x != 0: ...:

Re: problem about list indexing

2006-11-26 Thread John Machin
hollowspook wrote: > Hi, there > > a = range(100) > > if I want to use No 7, 11, 56,90 in a, then the only way I do is [a[7], > a[11], a[56], a[90]]. > Is there any other way? > I presume a = range(100) is just an indication that a is a list -- the literal answer to your question as asked is simpl

Re: Generator question

2006-11-26 Thread Robert Kern
Timothy Wu wrote: > Hi, > > Using generator recursively is not doing what I expect: > > def test_gen(x): > yield x > x = x - 1 > if x != 0: > test_gen(x) The only thing that the last line does is *create* a new generator object. You need to actually iterate over it and yield

Generator question

2006-11-26 Thread Timothy Wu
Hi, Using generator recursively is not doing what I expect: def test_gen(x): yield x x = x - 1 if x != 0: test_gen(x) for item in test_gen(3): print item This gives me a single number 3 and not printing 2 and 1 as I would expect. What is wrong?? Timothy -- http://mail.py

Re: who is maintainer of xml-rpc module?

2006-11-26 Thread Martin v. Löwis
Mark Harrison schrieb: > So, I've made a couple of small but useful additions to > the xml-rpc package. Is there an assigned maintainer > of the package I should communicate with? The author of the module is Fredrik Lundh; you can try to contact him. If you want to contribute your changes to the

urllib2 spinning CPU on read

2006-11-26 Thread kdotsky
Hello All, I've ran into this problem on several sites where urllib2 will hang (using all the CPU) trying to read a page. I was able to reproduce it for one particular site. I'm using python 2.4 import urllib2 url = 'http://www.wautomas.info' request = urllib2.Request(url) opener = urllib2.build

Re: utf - string translation

2006-11-26 Thread Dan
On 22 nov, 22:59, "John Machin" <[EMAIL PROTECTED]> wrote: > > processes (Vigenère) > So why do you want to strip off accents? The history of communication > has several examples of significant difference in meaning caused by > minute differences in punctuation or accents including one of which yo

problem about list indexing

2006-11-26 Thread hollowspook
Hi, there a = range(100) if I want to use No 7, 11, 56,90 in a, then the only way I do is [a[7], a[11], a[56], a[90]]. Is there any other way? Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

search versus match in re module

2006-11-26 Thread John Machin
wo_shi_big_stomach wrote: > Thanks for the great tip about fileinput.input(), and thanks to all who > answered my query. I've pasted the working code below. > [snip] > # check first line only > elif fileinput.isfirstline(): > if not re.search('^From ',line): This "works"

Re: case insensitive dictionary

2006-11-26 Thread John Henry
I don't think that's sufficient. See how many methods the author of http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/283455 had to redefine. Rob Williscroft wrote: > John Henry wrote in news:1164494606.514366.124810 > @l39g2000cwd.googlegroups.com in comp.lang.python: > > > I believe the s