Volume 2, Issue 2 of The Python Papers is now available! Download it from www.pythonpapers.org.

2007-05-22 Thread [EMAIL PROTECTED]
Volume 2, Issue 2 of The Python Papers is now available! Download it from www.pythonpapers.org. This issue marks a major landmark in our publication. We present a number of industry articles. These include Python in Education and MPD WebAMP, as well as a great insight into Python in Germany, a

converting text and spans to an ElementTree

2007-05-22 Thread Steven Bethard
I have some text and a list of Element objects and their offsets, e.g.:: text = 'aaa aaa aaabbb bbbaaa' spans = [ ... (etree.Element('a'), 0, 21), ... (etree.Element('b'), 11, 18), ... (etree.Element('c'), 18, 18), ... ] I'd like to produce the

Re: Lists vs tuples (newbie)

2007-05-22 Thread Hendrik van Rooyen
Szabolcs [EMAIL PROTECTED] wrote: I was wondering about why are there both tuples and lists? Is there anything I can do with a tuple that I cannot do with a list? In what circumstances is it advantageous to use tuples instead of lists? Is there a difference in performance? I am still

Re: tkinter button state = DISABLED

2007-05-22 Thread Hendrik van Rooyen
Hamilton, William [EMAIL PROTECTED] wrote: From: Eric Brunel On Thu, 17 May 2007 09:30:57 +0200, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 16 May 2007 03:22:17 -0300, Hendrik van Rooyen I have never seen this working in

Re: i/o prob revisited

2007-05-22 Thread Tim Roberts
[EMAIL PROTECTED] wrote: ok i am able to trace the error ...It says: Traceback (most recent call last): File C:\Projects\ODX Import\code_ini\odxparse_mod.py, line 294, in module input_xml_sec = open(output_file,'r') TypeError: coercing to Unicode: need string or buffer, file found

Re: howto check does module 'asdf' exist? (is available for import)

2007-05-22 Thread Asun Friere
On May 21, 11:17 pm, dmitrey [EMAIL PROTECTED] wrote: howto check does module 'asdf' exist (is available for import) or no? try : import asdf del asdf except ImportError : #do stuff ... (without try/cache of course) Oops sorry, you didn't want it the obvious way ... but why ever not?

Slightly OT: Why all the spam?

2007-05-22 Thread Joel Hedlund
Does anyone know why we get so much spam to this group? It's starting to get embarrasing to read at work and that's just not how it should be. Cheers! /Joel -- http://mail.python.org/mailman/listinfo/python-list

httpd: Syntax error on line 54

2007-05-22 Thread deepak
I installed apache 2.2.4 and modPython 3.3.1 on Fc6 while starting the apache server the following error occurs: httpd: Syntax error on line 54 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_python.so into server: /usr/ local/apache2/modules/mod_python.so:

Re: Slightly OT: Why all the spam?

2007-05-22 Thread bryan rasmussen
Well two things I would suppose: 1. relative popularity and volume of the group leads spammers to put more resources towards spamming the group. 2. I seem to remember that python-list is also a usenet group? non-moderated, meaning it is tough to ban people? Actually, it would be nice to know if

Re: Python Web Programming - looking for examples of solid high-traffic sites

2007-05-22 Thread Michael Ströder
John Nagle wrote: Sure they do. I have a complex web site, http://www.downside.com;, that's implemented with Perl, Apache, and MySQL. It automatically reads SEC filings and parses them to produce financial analyses. It's been running for seven years, and hasn't been modified in five,

Re: [Fwd: Re: managed lists?]

2007-05-22 Thread Jorgen Bodde
Hi, Thanks. I agree that it is only 'me' that is the one doing it wrong. But consider this scenario: - Somewhere in my app I add a wrong type to an open regular list - The app continues like it should - After a (long) while I need to perform some search on the list, or whatever - Exception

Re: doctest environment question

2007-05-22 Thread tag
On 21 May, 22:17, Peter Otten [EMAIL PROTECTED] wrote: If these don't work you'll have to give a bit more context. Peter Thanks again Peter. Here's something much closer to what I really want to do. You should be able to cut and paste this post into a file post.txt. Running the command `python

Re: questions about programming styles

2007-05-22 Thread [EMAIL PROTECTED]
Wildemar Wildenburger wrote: [EMAIL PROTECTED] wrote: Thanks a lot for all kind replies! I think I need a systematic learning of design patterns. I have found some tutorials about design pattern about python, but can somebody point me which is the best to start with ? When

Re: howto check does module 'asdf' exist? (is available for import)

2007-05-22 Thread Asun Friere
On May 21, 11:17 pm, dmitrey [EMAIL PROTECTED] wrote: howto check does module 'asdf' exist (is available for import) or no? try : import asdf del asdf except ImportError : print module asdf not available else : print module asdf available for loading You can generalise this, but at the

How do I parse simple entity references in XML like gt;lt?

2007-05-22 Thread Debajit Adhikary
I've written a SAX XML parser and cannot seem to be able to parse simple entity references e.g. pre lt; abc gt; /pre It looks the XML parser that i'm using hasn't implemented the startEntity() and endEntity() methods. How do I parse such simple entity references using Python?

Re: Installing Python in a path that contains a blank

2007-05-22 Thread Konrad Hinsen
On 21.05.2007, at 21:11, Stargaming wrote: You could give /foo/bar\ baz/ham or /foo/bar baz/ham (either escaping the blanks or wrapping the path in quotation marks) a try. I can't verify it either, just guess from other terminals' behaviour. I tried both already, but neither one works. If

Re: Installing Python in a path that contains a blank

2007-05-22 Thread Konrad Hinsen
On 22.05.2007, at 00:34, Greg Donald wrote: On 5/21/07, John Machin [EMAIL PROTECTED] wrote: Is there not a similar trick on MacOS X? It's called a symlink: ln -s /Users/gdonald /foo Right, but since I have no write permissions anywhere except in my home directory (whose path already has

Re: Cycle detection and object memory usage?

2007-05-22 Thread Gabriel Genellina
En Mon, 21 May 2007 22:15:14 -0300, Jim Kleckner [EMAIL PROTECTED] escribió: Gabriel Genellina wrote: En Sun, 20 May 2007 23:54:15 -0300, Jim Kleckner [EMAIL PROTECTED] escribió: What is the best way to go about finding these cycles? Avoid them in the first place :) Use the gc

Re: doctest environment question

2007-05-22 Thread Peter Otten
tag wrote: Thanks again Peter. Here's something much closer to what I really want to do. You should be able to cut and paste this post into a file post.txt. Running the command `python -c import doctest; doctest.testfile('post.txt')` gives a test failure even though everything works fine in

Printing dots in sequence ('...')

2007-05-22 Thread beertje
This is a very newbie question for my first post, perhaps appropriately. I want to print '' gradually, as a progress indicator. I have a for-loop that every 10 steps executes: print '.', This results in something like 'Loading. . . .', whereas I want 'Loading' A pet peeve, I can't for

Re: Printing dots in sequence ('...')

2007-05-22 Thread Peter Otten
beertje wrote: This is a very newbie question for my first post, perhaps appropriately. I want to print '' gradually, as a progress indicator. I have a for-loop that every 10 steps executes: print '.', This results in something like 'Loading. . . .', whereas I want 'Loading'

Re: doctest environment question

2007-05-22 Thread tag
On 22 May, 08:59, Peter Otten [EMAIL PROTECTED] wrote: [snip] inspect.getmodule(f) returns None because f() is not defined in a module. OK. But there was a module when I ran interactively? You can either move f() to a helper module and then from helper_module import f Yes. or modify

Re: Components for a client/server architecture

2007-05-22 Thread Duncan Grisby
In article [EMAIL PROTECTED], Samuel [EMAIL PROTECTED] wrote: [...] Sounds like CORBA to me. CORBA has a very mature and good implementation for Python called OmniORB, and interoperability with other orbs (the ones available for e.g. Java) is very good - as CORBA as standard is mature. I

Re: Printing dots in sequence ('...')

2007-05-22 Thread beertje
Perfect, thanks :) -- http://mail.python.org/mailman/listinfo/python-list

Re: converting text and spans to an ElementTree

2007-05-22 Thread Gabriel Genellina
En Tue, 22 May 2007 03:02:34 -0300, Steven Bethard [EMAIL PROTECTED] escribió: I have some text and a list of Element objects and their offsets, e.g.:: text = 'aaa aaa aaabbb bbbaaa' spans = [ ... (etree.Element('a'), 0, 21), ... (etree.Element('b'), 11, 18),

Re: doctest environment question

2007-05-22 Thread Peter Otten
tag wrote: On 22 May, 08:59, Peter Otten [EMAIL PROTECTED] wrote: inspect.getmodule(f) returns None because f() is not defined in a module. OK. But there was a module when I ran interactively? Yes. Looking into the doctest source, there is a -- deprecated -- class called Tester that

Re: [Fwd: Re: managed lists?]

2007-05-22 Thread Gabriel Genellina
En Tue, 22 May 2007 04:13:38 -0300, Jorgen Bodde [EMAIL PROTECTED] escribió: Thanks. I agree that it is only 'me' that is the one doing it wrong. But consider this scenario: - Somewhere in my app I add a wrong type to an open regular list - The app continues like it should - After a

Re: doctest environment question

2007-05-22 Thread Gabriel Genellina
En Tue, 22 May 2007 04:21:06 -0300, tag [EMAIL PROTECTED] escribió: Here's a function which rebinds a function at the top level of a module (it won't work for nested functions). def announce_function(f): ... Rebind f within a module so that calls to f are announced. ... import

Fastest Way To Iterate Over A Probability Simplex

2007-05-22 Thread Efrat Regev
Hello, Let's say a probability vector of dimension d is x_1, ..., x_d, where each one is a non-negative term, and they all sum up to 1. Now I'd like to iterate over all probability vectors, but this is impossible, since they're uncountable. So instead, let's say I want to

Re: A few questions

2007-05-22 Thread Dave Baum
In article [EMAIL PROTECTED], jay [EMAIL PROTECTED] wrote: Hi, I'm totally new to Python and was hoping someone might be able to answer a few questions for me: 1. What are your views about Python vs Perl? Do you see one as better than the other? I introduced Python into my group

Re: Fastest Way To Iterate Over A Probability Simplex

2007-05-22 Thread bearophileHUGS
On May 22, 11:19 am, Efrat Regev: I want to iterate over all such vectors under the constraint that the granularity of each component is at most some delta. You can think of this like your sum is an integer=1 and the single probabilities are integers=1 So given the sum, like 6, you can find

NOOOOB

2007-05-22 Thread jolly
Hey guys, I want to begin python. Does anyone know where a good starting point is? Thanks, Jem -- http://mail.python.org/mailman/listinfo/python-list

OSError[Error 5]

2007-05-22 Thread SamG
Hi, I do this on PowerPC.. import os os.listdir('/usr/bin') And endup getting this ... OSError: [Error 5] Input/output error:/usr/bin I use python 2.4.4 (Framework edition) Could anybody help PS: I have clean listing with python 2.3.5 but my requirement is for python 2.4.4. Thanx in

pipe tutorial

2007-05-22 Thread Gigs_
does anyone know some good tutorial on pipes in python? thx -- http://mail.python.org/mailman/listinfo/python-list

Re: Fastest Way To Iterate Over A Probability Simplex

2007-05-22 Thread Efrat Regev
[EMAIL PROTECTED] wrote: On May 22, 11:19 am, Efrat Regev: I want to iterate over all such vectors under the constraint that the granularity of each component is at most some delta. You can think of this like your sum is an integer=1 and the single probabilities are integers=1 So given the

Re: Components for a client/server architecture

2007-05-22 Thread Samuel
On May 22, 3:10 am, Josiah Carlson [EMAIL PROTECTED] wrote: That snippet of code shows that acquiring a lock does release the GIL. Of course, that does not mean that the (possible) issues no longer apply. However, I decided to hack up a quick prototype and see how it goes. If it doesn't work it

Restart Linux System

2007-05-22 Thread Robert Rawlins - Think Blue
Hello Guys, I'm looking to restart a Linux system from my python application. What's the best way to achieve this, is there something in the OS module? Thanks, Rob -- http://mail.python.org/mailman/listinfo/python-list

Shared Memory Space - Accross Apps Network

2007-05-22 Thread Robert Rawlins - Think Blue
Hello Guys, I've got an application that runs on an embedded system, the application uses a whole bunch or dicts and other data types to store state and other important information. I'm looking to build a small network of these embedded systems, and I'd love to have them all share the same

Particle Filter

2007-05-22 Thread parham haghighi rad
Hi All I have Grid with n number of rows and n number of columns, and there is an agent in the environment which it has to move freely while its avoiding obstacles I am using Particle Filter Algorithm (simplified Markov) with recursive update. My problem is that my virtual agents which i use

Re: A few questions

2007-05-22 Thread Urban, Gabor
Jay wrote: 1. What are your views about Python vs Perl? Do you see one as better than the other? They are different languages. Perl is very powerfull if you use it knowing potential problems. Python is definitely much easier to learn and use. 2. Is there a good book to start with while learning

Re: [Fwd: Re: managed lists?]

2007-05-22 Thread Jorgen Bodde
Hi Gabriel, Yep that basically covered my implementation as well. It was rather trivial to make it, and even for a python newbie it was simple which says enough about the language itself. ;-) Although I understand the opinions that you should not care about types, I do believe putting a

Re: doctest environment question

2007-05-22 Thread tag
On 22 May, 10:11, Gabriel Genellina [EMAIL PROTECTED] wrote: The version given by Peter Otten may do what you want, but I'd consider if you really need an announce_function in the first place, given all the other ways you already have to do the same thing. Implicitely rebinding globals does

Simple omniORBpy example throws exception with error 0x41540002

2007-05-22 Thread Samuel
Hi, I am trying to get the files from this tutorial to work: http://www.grisby.org/presentations/py10code.html Direct link to the files: http://www.grisby.org/presentations/py10code/adder.idl http://www.grisby.org/presentations/py10code/adderServer.py It produces the following error: $ omniidl

Re: Installing Python in a path that contains a blank

2007-05-22 Thread Neil Cerutti
On 2007-05-22, Konrad Hinsen [EMAIL PROTECTED] wrote: On 21.05.2007, at 21:11, Stargaming wrote: You could give /foo/bar\ baz/ham or /foo/bar baz/ham (either escaping the blanks or wrapping the path in quotation marks) a try. I can't verify it either, just guess from other terminals'

Re: help - python can't find file

2007-05-22 Thread enquiring mind
darren, thanks for your explanation. I copied my paths and listed them in my code file #! /bin/user1/ python and python finds the file and interprets it so that will keep me going until my buddy returns to the city to explain my errors. It appears that my problem arose from taking lesson

Re: Simple omniORBpy example throws exception with error 0x41540002

2007-05-22 Thread Diez B. Roggisch
Samuel wrote: Hi, I am trying to get the files from this tutorial to work: http://www.grisby.org/presentations/py10code.html Direct link to the files: http://www.grisby.org/presentations/py10code/adder.idl http://www.grisby.org/presentations/py10code/adderServer.py It produces the

Re: doctest environment question

2007-05-22 Thread tag
On 22 May, 10:11, Gabriel Genellina [EMAIL PROTECTED] wrote: The version given by Peter Otten may do what you want, but I'd consider if you really need an announce_function in the first place, given all the other ways you already have to do the same thing. Implicitely rebinding globals does

Re: doctest environment question

2007-05-22 Thread tag
On 22 May, 10:11, Gabriel Genellina [EMAIL PROTECTED] wrote: The version given by Peter Otten may do what you want, but I'd consider if you really need an announce_function in the first place, given all the other ways you already have to do the same thing. Implicitely rebinding globals does

omniORBpy: Error 0x41540002

2007-05-22 Thread Samuel
Hi, I am trying to get the files from this tutorial to work: http://www.grisby.org/presentations/py10code.html Direct link to the files: http://www.grisby.org/presentations/py10code/adder.idl http://www.grisby.org/presentations/py10code/adderServer.py It produces the following error: $ omniidl

Re: NEWBIE: Extending a For Statement.

2007-05-22 Thread Sion Arrowsmith
[EMAIL PROTECTED] wrote: mosscliffe: if key in xrange (60,69) or key == 3: I keep seeing again and again code like this, mostly from people not much expert of Python, but the PEP 260 shows the fast in was removed, so it's O(n). If you're going to point that out, you should at least also mention

[ANN] The Python Papers Volume 2 Issue 2

2007-05-22 Thread Maurice LING
Hi everyone, After some delays yesterday, Volume 2 Issue 2 of The Python Papers had been officially released today. Download it from www.pythonpapers.org This issue marks a major landmark in our publication. We present a number of industry articles. These include Python in Education and MPD

RE: Installing Python in a path that contains a blank

2007-05-22 Thread Hamilton, William
From: John Machin On 21/05/2007 11:30 PM, Konrad Hinsen wrote: I am trying to install Python from sources in my home directory on a Mac cluster (running MacOS X 10.4.8). The path to my home directory contains a blank, and since the installation procedure insists on getting an absolute

Re: howto check does module 'asdf' exist? (is available for import)

2007-05-22 Thread Carsten Haese
On Tue, 2007-05-22 at 00:27 -0700, Asun Friere wrote: You can generalise this, but at the expense of a couple of exec statements: def is_module_available (module) : try : exec('import %s' % module) exec('del %s' % module) except ImportError : return False

Re: NOOOOB

2007-05-22 Thread Giles Brown
On 22 May, 11:29, jolly [EMAIL PROTECTED] wrote: Hey guys, I want to begin python. Does anyone know where a good starting point is? Thanks, Jem My suggestion is have a look at www.python.org and see if you can find what you're looking for. Giles --

Re: Installing Python in a path that contains a blank

2007-05-22 Thread Tim Golden
Hamilton, William wrote: There's also short filename substitution. C:\Documents and Settings\foo can be replaced with C:\docume~1\foo. In general, you take the first six non-space characters and append ~digit to it. I've never run into a situation where digit was anything other than 1, but

Re: NOOOOB

2007-05-22 Thread [EMAIL PROTECTED]
On May 22, 11:29 am, jolly [EMAIL PROTECTED] wrote: Hey guys, I want to begin python. Does anyone know where a good starting point is? Thanks, Jem I went through the tutorial on python.org and found that really helpfull. If in a windows env the book by mark hammond is excellent. --

Re: NOOOOB

2007-05-22 Thread marc wyburn
On May 22, 11:29 am, jolly [EMAIL PROTECTED] wrote: Hey guys, I want to begin python. Does anyone know where a good starting point is? Thanks, Jem i went through the tutorials on the main site and then followed up with mark Hammonds book for windows stuff. I got a few other books as well

Re: omniORBpy: Error 0x41540002

2007-05-22 Thread Diez B. Roggisch
Samuel wrote: Hi, I am trying to get the files from this tutorial to work: http://www.grisby.org/presentations/py10code.html Direct link to the files: http://www.grisby.org/presentations/py10code/adder.idl http://www.grisby.org/presentations/py10code/adderServer.py It produces the

Re: Simple omniORBpy example throws exception with error 0x41540002

2007-05-22 Thread Samuel
On May 22, 1:54 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: It indeed does open a connection - because it wants to register with a NameServer. Ah, I see now how this works. I happen to run Ubuntu here, so I tried the following: - sudo apt-get install orbit-name-server-2 - orbit-name-server-2

Re: NOOOOB

2007-05-22 Thread kyosohma
On May 22, 7:26 am, Giles Brown [EMAIL PROTECTED] wrote: On 22 May, 11:29, jolly [EMAIL PROTECTED] wrote: Hey guys, I want to begin python. Does anyone know where a good starting point is? Thanks, Jem My suggestion is have a look atwww.python.organd see if you can find what you're

Re: Simple omniORBpy example throws exception with error 0x41540002

2007-05-22 Thread Diez B. Roggisch
Samuel wrote: On May 22, 1:54 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: It indeed does open a connection - because it wants to register with a NameServer. Ah, I see now how this works. I happen to run Ubuntu here, so I tried the following: - sudo apt-get install orbit-name-server-2

GUI to python scripts

2007-05-22 Thread ashish
Hi All, I need one help ,i started learning python few months back and i am comfortable with python now ,My intrest is, i want to genrate python scripts from GUI i.e. My GUI should be having macros or function of my intrest ,so if i select them it should generate corressponding python script

xml.dom.minidom: how to preserve CRLF's inside CDATA?

2007-05-22 Thread sim.sim
Hi all. i'm faced to trouble using minidom: #i have a string (xml) within CDATA section, and the section includes \r\n: iInStr = '?xml version=1.0?\nData![CDATA[BEGIN:VCALENDAR\r \nEND:VCALENDAR\r\n]]/Data\n' #After i create DOM-object, i get the value of Data without \r\n from xml.dom import

Re: omniORBpy: Error 0x41540002

2007-05-22 Thread Samuel
On May 22, 2:53 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: Please see my answer to your first post. Gaa, Google's web client reported an error where there was none. Sorry about the repost. -Samuel -- http://mail.python.org/mailman/listinfo/python-list

Re: [Fwd: Re: managed lists?]

2007-05-22 Thread Larry Bates
Jorgen Bodde wrote: Hi Gabriel, Yep that basically covered my implementation as well. It was rather trivial to make it, and even for a python newbie it was simple which says enough about the language itself. ;-) Although I understand the opinions that you should not care about types, I

Re: Printing dots in sequence ('...')

2007-05-22 Thread Larry Bates
beertje wrote: This is a very newbie question for my first post, perhaps appropriately. I want to print '' gradually, as a progress indicator. I have a for-loop that every 10 steps executes: print '.', This results in something like 'Loading. . . .', whereas I want 'Loading'

Re: pipe tutorial

2007-05-22 Thread Larry Bates
Gigs_ wrote: does anyone know some good tutorial on pipes in python? thx Pipes is specific only to Windows (you can use sockets on Windows/Linux/mac). The only specific treatment of pipes I've seen is in Python Programming for Win32 by Mark Hammond/Andy Robinson. -Larry --

Re: NOOOOB

2007-05-22 Thread kyosohma
On May 22, 7:16 am, marc wyburn [EMAIL PROTECTED] wrote: On May 22, 11:29 am, jolly [EMAIL PROTECTED] wrote: Hey guys, I want to begin python. Does anyone know where a good starting point is? Thanks, Jem i went through the tutorials on the main site and then followed up with mark

Re: Printing dots in sequence ('...')

2007-05-22 Thread Larry Bates
beertje wrote: This is a very newbie question for my first post, perhaps appropriately. I want to print '' gradually, as a progress indicator. I have a for-loop that every 10 steps executes: print '.', This results in something like 'Loading. . . .', whereas I want 'Loading'

Python on Vista installation issues

2007-05-22 Thread Chris Gonnerman
I'm having errors installing Python extensions on Vista. I'm running Python 2.5, and every extension install produces cannot create errors. For instance, win32all 210 says: Could Not Create: pywin32-py2.5 Could Not Set Key Value: Python 2.5 pywin32-210 Could Not Set Key Value: (followed by

Re: Simple omniORBpy example throws exception with error 0x41540002

2007-05-22 Thread Samuel
On May 22, 1:54 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: It indeed does open a connection - because it wants to register with a NameServer. Ah, I see now how this works. I happen to run Ubuntu here, so I tried the following: - sudo apt-get install orbit-name-server-2 - orbit-name-server-2

Re: pipe tutorial

2007-05-22 Thread Gabriel Genellina
En Tue, 22 May 2007 11:11:45 -0300, Larry Bates [EMAIL PROTECTED] escribió: Gigs_ wrote: does anyone know some good tutorial on pipes in python? Pipes is specific only to Windows (you can use sockets on Windows/Linux/mac). The only specific treatment of pipes I've seen is in Python

Re: Printing dots in sequence ('...')

2007-05-22 Thread Tim Williams
On 22 May 2007 01:02:31 -0700, beertje [EMAIL PROTECTED] wrote: This is a very newbie question for my first post, perhaps appropriately. I want to print '' gradually, as a progress indicator. I have a for-loop that every 10 steps executes: print '.', This results in something like

The use of universal_newlines in subprocess

2007-05-22 Thread Joel Andres Granados
Hi list: I have been working with the universal_newlines option that can be specified while using the subprocess module. I'm calling an app that uses sys.stdout.write('\r'+' '*80) to manage its stdout. The situation that I encountered was that when I wanted to log this output into a file

Create an XML document

2007-05-22 Thread kyosohma
Hi all, I am attempting to create an XML document dynamically with Python. It needs the following format: zAppointments reminder=15 appointment begin1179775800/begin duration1800/duration /appointment /zAppointments I tried using minidom with the

how to use python to checking password on servlet

2007-05-22 Thread sandeep patil
my application design on java servlet i want to check password in python return result again servlet to forward to next page. how to set session in python .get session -- http://mail.python.org/mailman/listinfo/python-list

Re: doctest environment question

2007-05-22 Thread Gabriel Genellina
En Tue, 22 May 2007 08:57:29 -0300, tag [EMAIL PROTECTED] escribió: On 22 May, 10:11, Gabriel Genellina [EMAIL PROTECTED] wrote: The version given by Peter Otten may do what you want, but I'd consider if you really need an announce_function in the first place, given all the other ways you

drag and drop with wxPython ?

2007-05-22 Thread stef
hello, I'm trying to move from Delphi to Python (move from MatLab to Python already succeeded, also thanks to this discussion group). From the discussions in this list about the best GUI for Python, it now seems to me that wxPython is thé choice for my kind of applications. I've no experience

Re: xml.dom.minidom: how to preserve CRLF's inside CDATA?

2007-05-22 Thread kyosohma
On May 22, 8:45 am, sim.sim [EMAIL PROTECTED] wrote: Hi all. i'm faced to trouble using minidom: #i have a string (xml) within CDATA section, and the section includes \r\n: iInStr = '?xml version=1.0?\nData![CDATA[BEGIN:VCALENDAR\r \nEND:VCALENDAR\r\n]]/Data\n' #After i create DOM-object,

'int' object is not callable in an threaded app

2007-05-22 Thread king kikapu
Hi, i have a problem with the following piece of code that id just drive me nuts (from the morning...) I think is more Python specific than Qt, folks from Qt forum have already give me directions of how to do it but that Python error message is just impossible for me to figure out. And i am sure

Re: xml.dom.minidom: how to preserve CRLF's inside CDATA?

2007-05-22 Thread harvey . thomas
On May 22, 2:45 pm, sim.sim [EMAIL PROTECTED] wrote: Hi all. i'm faced to trouble using minidom: #i have a string (xml) within CDATA section, and the section includes \r\n: iInStr = '?xml version=1.0?\nData![CDATA[BEGIN:VCALENDAR\r \nEND:VCALENDAR\r\n]]/Data\n' #After i create DOM-object,

Re: converting text and spans to an ElementTree

2007-05-22 Thread attn . steven . kuo
On May 21, 11:02 pm, Steven Bethard [EMAIL PROTECTED] wrote: I have some text and a list of Element objects and their offsets, e.g.:: text = 'aaa aaa aaabbb bbbaaa' spans = [ ... (etree.Element('a'), 0, 21), ... (etree.Element('b'), 11, 18), ...

RE: 'int' object is not callable in an threaded app

2007-05-22 Thread Hamilton, William
From: king kikapu Hi, i have a problem with the following piece of code that id just drive me nuts (from the morning...) I think is more Python specific than Qt, folks from Qt forum have already give me directions of how to do it but that Python error message is just impossible for me

Re: Slightly OT: Why all the spam?

2007-05-22 Thread Michael L Torrie
On Tue, 2007-05-22 at 09:08 +0200, bryan rasmussen wrote: Well two things I would suppose: 1. relative popularity and volume of the group leads spammers to put more resources towards spamming the group. 2. I seem to remember that python-list is also a usenet group? non-moderated, meaning

Re: py2exe compiling

2007-05-22 Thread Sick Monkey
Have you looked at the Tips and Tricks on Py2exe's website? http://www.py2exe.org/index.cgi/GeneralTipsAndTricks I believe this next link will help you add custom data to your app. http://www.py2exe.org/index.cgi/CustomDataInExe .dave On 5/21/07, Pyro [EMAIL PROTECTED] wrote: Hello, I have

Re: NOOOOB

2007-05-22 Thread kyosohma
On May 22, 7:16 am, marc wyburn [EMAIL PROTECTED] wrote: On May 22, 11:29 am, jolly [EMAIL PROTECTED] wrote: Hey guys, I want to begin python. Does anyone know where a good starting point is? Thanks, Jem i went through the tutorials on the main site and then followed up with mark

Re: Components for a client/server architecture

2007-05-22 Thread John Nagle
Duncan Grisby wrote: In article [EMAIL PROTECTED], Samuel [EMAIL PROTECTED] wrote: [...] Sounds like CORBA to me. CORBA has a very mature and good implementation for Python called OmniORB, and interoperability with other orbs (the ones available for e.g. Java) is very good - as CORBA as

Re: Restart Linux System

2007-05-22 Thread Michael L Torrie
On Mon, 2007-05-21 at 09:25 +0100, Robert Rawlins - Think Blue wrote: Hello Guys, I’m looking to restart a Linux system from my python application. What’s the best way to achieve this, is there something in the OS module? Probably not. You need to just spawn the reboot command, or run

Re: howto check does module 'asdf' exist? (is available for import)

2007-05-22 Thread Paul Rubin
Asun Friere [EMAIL PROTECTED] writes: howto check does module 'asdf' exist (is available for import) or no? try : import asdf del asdf except ImportError : print module asdf not available else : print module asdf available for loading But this has a side effect: if asdf is

Re: Create an XML document

2007-05-22 Thread Nis Jørgensen
[EMAIL PROTECTED] skrev: Hi all, I am attempting to create an XML document dynamically with Python. It needs the following format: zAppointments reminder=15 appointment begin1179775800/begin duration1800/duration /appointment /zAppointments

Re: Simple omniORBpy example throws exception with error 0x41540002

2007-05-22 Thread Duncan Grisby
In article [EMAIL PROTECTED], Samuel [EMAIL PROTECTED] wrote: [...] Ah, I see now how this works. I happen to run Ubuntu here, so I tried the following: - sudo apt-get install orbit-name-server-2 - orbit-name-server-2 - Add to /etc/omniORB4.cfg: InitRef = NameService=IOR:01002b00...

Re: Restart Linux System

2007-05-22 Thread Michael Bentley
On May 22, 2007, at 11:15 AM, Michael L Torrie wrote: I’m looking to restart a Linux system from my python application. What’s the best way to achieve this, is there something in the OS module? Probably not. You need to just spawn the reboot command, or run init 6. This requires root,

Re: Restart Linux System

2007-05-22 Thread Michael L Torrie
On Tue, 2007-05-22 at 09:34 -0700, Alexandre Gans wrote: You can use sudo on your user or the bit suid in your application... Just know that you cannot setuid any shebang executable, of which python scripts usually are. -- http://mail.python.org/mailman/listinfo/python-list

Re: drag and drop with wxPython ?

2007-05-22 Thread Larry Bates
stef wrote: hello, I'm trying to move from Delphi to Python (move from MatLab to Python already succeeded, also thanks to this discussion group). From the discussions in this list about the best GUI for Python, it now seems to me that wxPython is thé choice for my kind of applications.

Re: pipe tutorial

2007-05-22 Thread Larry Bates
Gabriel Genellina wrote: En Tue, 22 May 2007 11:11:45 -0300, Larry Bates [EMAIL PROTECTED] escribió: Gigs_ wrote: does anyone know some good tutorial on pipes in python? Pipes is specific only to Windows (you can use sockets on Windows/Linux/mac). The only specific treatment of pipes

xml.dom.minidom: how to preserve CRLF's inside CDATA?

2007-05-22 Thread sim.sim
Hi all. i'm faced to trouble using minidom: #i have a string (xml) within CDATA section, and the section includes \r\n: iInStr = '?xml version=1.0?\nData![CDATA[BEGIN:VCALENDAR\r \nEND:VCALENDAR\r\n]]/Data\n' #After i create DOM-object, i get the value of Data without \r\n from xml.dom import

trying to gzip uncompress a StringIO

2007-05-22 Thread bob
I'm using the code below to read the zipped, base64 encoded WMF file saved in an XML file with Save as XML from MS Word. As the At this point comment shows, I know that the base64 decoding is going fine, but unzipping from the decodedVersion StringIO object isn't getting me anything, because the

ANNOUNCE: pygtkmvc-1.0.1 has been released

2007-05-22 Thread Roberto Cavada
Version 1.0.1 of pygtkmvc has been released. pygtkmvc can be download from the project homepage: http://pygtkmvc.sourceforge.net == About pygtkmvc == pygtkmvc is a fully Python-based implementation of the Model-View-Controller (MVC) and Observer patterns for the PyGTK2

Re: Components for a client/server architecture

2007-05-22 Thread Irmen de Jong
John Nagle wrote: You don't hear much about CORBA any more. It used to be derided as a bulky way to marshall data, but then came XML. CORBA is much more than just a way to marshall data. GIOP (or its more often used implementation IIOP) is the marshaling protocolused in CORBA. And it is

dabo framework dependancies

2007-05-22 Thread daniel gadenne
Paul McNett wrote: Shameless plug: consider using Dabo on top of wxPython - we feel it makes wxPython even easier and more pythonic, but admittedly there's a bit of a learning curve there too. Even though Dabo is a full application framework originally meant for desktop database

  1   2   >