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

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 f

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 occurs

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 `

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

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

python-list@python.org

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. < abc > 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

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 alr

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

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

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 th

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 modi

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

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('

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 pr

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

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. " > ...

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 iterat

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

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 f

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

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 i

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 t

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 learni

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 constrain

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

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 ter

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 code

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 produc

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

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

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

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

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 F

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 -- http://mail.python.org/mailman

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 "~" to it. I've never run into a > situation where 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

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 produc

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

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 ca

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

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 f

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 = '\n\n' #After i create DOM-object, i get the value of "Data" without "\r\n" from xml.dom import minidom iDoc = minidom.parseString(iInStr) iDoc.childNodes[0].childN

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

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 -- http://mail.py

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 foll

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 t

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

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 Pyth

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

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 i

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: 1179775800 1800 I tried using minidom with the following code: from xml.dom.minidom import Document doc = Document() zappt = doc.crea

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

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 = '\n\n' > > #After i create DOM-object, i get the value of "Data" without "\r\n" > > from xml.dom im

'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 t

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 = '\n\n' > > #After i create DOM-object, i get the value of "Data" without "\r\n" > > from xml.dom im

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

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

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 ha

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 foll

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

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

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

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: > > > > 1179775800 > 1800 > > > > I tried using minidom with the following code: > > > > from xml.dom.minido

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

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 r

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 applicati

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 treatme

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 = '\n\n' #After i create DOM-object, i get the value of "Data" without "\r\n" from xml.dom import minidom iDoc = minidom.parseString(iInStr) iDoc.childNodes[0].childN

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 th

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

Make $404 a day from home!

2007-05-22 Thread deepbroke3
http://adsenseonline.info - Find out how to make a fortune working from home! -- http://mail.python.org/mailman/listinfo/python-list

Re: pipe tutorial

2007-05-22 Thread Walter Bumes
Larry Bates schrieb: > 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).

Re: Create an XML document

2007-05-22 Thread Matimus
> How do I get Python to put values into the elements by tag name? The same way you create put in new elements. Only, you use 'doc.createTextNode' instead of 'doc.createElement' to create it. from xml.dom.minidom import Document doc = Document() zappt = doc.createElement('zAppointments') zap

Re: converting text and spans to an ElementTree

2007-05-22 Thread Steven Bethard
[EMAIL PROTECTED] wrote: > 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), >> ... (etr

Inheritance

2007-05-22 Thread HMS Surprise
I am trying to understand the 'if' statement and the exec statement in the code below. I would like to add several common routines to this class and then inherit it into a class in another file. This other class would need to access these common functions as well as inherit the PyHttpTestCase clas

Resizing listbook's listview pane

2007-05-22 Thread mkPyVS
I'm having an issue I need help with. I want to resize the listview control in a listbook but have been unsuccessfull through setting the columnWidth of the 0'th column and trying to retrieve the listbooks sizer return's None Ideas? Thanks, -- http://mail.python.org/mailman/listinfo/python-l

using google search api for python

2007-05-22 Thread Gerardo Herzig
Hi all. Im looking for the pyGoogle for making google searchs y a python script. The thing is, all im founding is an AJAX api, but the application ill use is NOT a web app. So, someone know if there is a pure python api that i can download and use? Thanks! Gerardo -- http://mail.python.org/mai

  1   2   >