Re: xml.parsers.expat loading xml into a dict and whitespace

2007-05-22 Thread kaens
Now the code looks like this: import xml.etree.ElementTree as etree optionsXML = etree.parse("options.xml") options = {} for child in optionsXML.getiterator(): if child.tag != optionsXML.getroot().tag: options[child.tag] = child.text for key, value in options.items(): print key,

Re: how to execute a system command?

2007-05-22 Thread Justin Ezequiel
On May 23, 2:25 pm, wrb <[EMAIL PROTECTED]> wrote: > i want to open a excel file in a button click event. > i found that os.popen4("excel.xls") would work but it is too slow have you tried os.startfile -- http://mail.python.org/mailman/listinfo/python-list

how to execute a system command?

2007-05-22 Thread wrb
i want to open a excel file in a button click event. i found that os.popen4("excel.xls") would work but it is too slow (much slower than i execute "excel.xls" in command line. ) even worse, until excel is closed, the GUI has no response to user action. any advice would be helpful. -- http://mail

Re: xml.parsers.expat loading xml into a dict and whitespace

2007-05-22 Thread kaens
> [1] ElementTree is in the 2.5 standard library, but if you're stuck with > an earlier python, just Google for it -- there are standalone versions I've got 2.5, and I'm not attached to expat at all. I'll check it out, thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: xml.parsers.expat loading xml into a dict and whitespace

2007-05-22 Thread kaens
Ok, I can fix it by modifying if self.inOptions and self.curTag != "options": to if self.inOptions and self.curTag != "options" and self.curTag != "" but this feels really freaking ugly. Sigh. Any suggestions? I know I must be missing something. Also, I hate the tendency I have to figure st

Re: xml.parsers.expat loading xml into a dict and whitespace

2007-05-22 Thread Steven Bethard
kaens wrote: > Let's say I write a simple xml parser, for an xml file that just loads > the content of each tag into a dict (the xml file doesn't have > multiple hierarchies in it, it's flat other than the parent node) [snip] > > hey > bee > eff > > > it prints out: > " : > > three : eff > two

Re: xml.parsers.expat loading xml into a dict and whitespace

2007-05-22 Thread kaens
Wait. . . it's because the curTag is set to "", thus it sets the whitespace after a tag to that part of the dict. That doesn't explain why it does it on a xml file containing no whitespace, unless it's counting newlines. Is there a way to just ignore whitespace and/or xml comments? On 5/23/07, k

xml.parsers.expat loading xml into a dict and whitespace

2007-05-22 Thread kaens
Hey everyone, this may be a stupid question, but I noticed the following and as I'm pretty new to using xml and python, I was wondering if I could get an explanation. Let's say I write a simple xml parser, for an xml file that just loads the content of each tag into a dict (the xml file doesn't ha

Re: Can I reference 1 instance of an object by more names ?

2007-05-22 Thread Steven D'Aprano
On Wed, 23 May 2007 01:44:22 +0200, Stef Mientki wrote: > Now I want to assign a more logical name to that port, (In JAL: "var > byte My_New_Name IS port_D") > > Is that possible ? > > I think the answer is "no", > because the object itself is not mutable. Am I right ? > > But I read: "An objec

Re: Windows Debugging w/o MS

2007-05-22 Thread Martin v. Löwis
> I am trying to build an extension module written in C++ on windows XP. > I am trying to use only open-source tools, such as mingw. I'm using > the Python 2.5 official, and it seems to compile my module just fine > (I'm using the --compiler=mingw32). I can also import the module. The > problem is,

Re: Cherrypy setup questions

2007-05-22 Thread fumanchu
On May 22, 6:38 pm, Brian Blais <[EMAIL PROTECTED]> wrote: > I'd like to start trying out some cherrypy apps, but I've > been having some setup problems. I think I need some > bone-head simple example to clear my understanding. :) > > I'm on a system running Apache, that I don't have root > acces

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

2007-05-22 Thread Paul Rubin
kaens <[EMAIL PROTECTED]> writes: > I think that's there because you just wanted to check if it was > available for import, implying that you didn't actually want to import > it right then. Whether it's available for import and whether you've already imported it are two separate questions. Maybe

Re: questions about programming styles

2007-05-22 Thread kaens
> Thanks. I think what I actually want to learn is design pattern in a > looser sense, not in the computer-science-vocabulary-sense. > > I'm a graduate student in science, and python is my favourite programming > language in daily work. I can solve most of the problems with python, but > my program

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

2007-05-22 Thread kaens
I think that's there because you just wanted to check if it was available for import, implying that you didn't actually want to import it right then. On 22 May 2007 09:09:02 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: > Asun Friere <[EMAIL PROTECTED]> writes: > > > howto check does m

Re: OSError[Error 5]

2007-05-22 Thread kaens
Try adding a trailing slash? On 22 May 2007 03:52:23 -0700, SamG <[EMAIL PROTECTED]> wrote: > 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) >

New Python articles blog

2007-05-22 Thread Eiwot
Hi all, I created this blog --> http://pyarticles.blogspot.com to provide Python technique. Check it out please ! Cheers, _ Create the ultimate e-mail address book. Import your contacts to Windows Live Hotmail. www.windowslive-

Windows Debugging w/o MS

2007-05-22 Thread Christopher Anderson
Hello all. I have a fairly fundamental question that I have been googling like crazy, but I can only seem to find really outdated or unreliable info: I am trying to build an extension module written in C++ on windows XP. I am trying to use only open-source tools, such as mingw. I'm using the Pytho

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

2007-05-22 Thread rzed
"Tim Williams" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: [...] > maybe this: (on Win32, don't know about *nix) > > for x in range(10): > print '.\b', better: print '\b.', -- rzed -- http://mail.python.org/mailman/listinfo/python-list

Cherrypy setup questions

2007-05-22 Thread Brian Blais
Hello, I'd like to start trying out some cherrypy apps, but I've been having some setup problems. I think I need some bone-head simple example to clear my understanding. :) I'm on a system running Apache, that I don't have root access to. I will be publishing the html/image/python files in

Re: trying to gzip uncompress a StringIO

2007-05-22 Thread bob
Perfect, thanks! Now I have a working WMF file and everything. Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: trying to gzip uncompress a StringIO

2007-05-22 Thread bob
Perfect, thanks! Now I have a working WMF file and everything. Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: Create an XML document

2007-05-22 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > I am attempting to create an XML document dynamically with Python. It > needs the following format: > > > > 1179775800 > 1800 > > Try lxml.objectify. http://codespeak.net/lxml/dev/objectify.html >>> from lxml import etre

Re: Can I reference 1 instance of an object by more names ?

2007-05-22 Thread Terry Reedy
"Stef Mientki" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | port_D = IO_port('D') | | Now I want to assign a more logical name to that port, | (In JAL: "var byte My_New_Name IS port_D") | | Is that possible ? | | I think the answer is "no", | because the object itself is not

Re: Slightly OT: Why all the spam?

2007-05-22 Thread Terry Reedy
"Michael L Torrie" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | 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 grou

Re: Can I reference 1 instance of an object by more names ?

2007-05-22 Thread Brian van den Broek
Stef Mientki said unto the world upon 05/22/2007 07:44 PM: > hello, > > I'm trying to build a simple functional simulator for JAL (a Pascal-like > language for PICs). > My first action is to translate the JAL code into Python code. > The reason for this approach is that it simplifies the simulato

Can I reference 1 instance of an object by more names ?

2007-05-22 Thread Stef Mientki
hello, I'm trying to build a simple functional simulator for JAL (a Pascal-like language for PICs). My first action is to translate the JAL code into Python code. The reason for this approach is that it simplifies the simulator very much. In this translation I want to keep the JAL-syntax as much

Re: using google search api for python

2007-05-22 Thread Larry Bates
Gerardo Herzig wrote: > 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! > Gerar

querying dictionary / list of dictionary like SQL

2007-05-22 Thread [EMAIL PROTECTED]
Hi Is there a module /add on in python that will let me query a dictionary [ or a list of dictionary] exactly like an SQL query? For ex: a=[{'id':1, 'name':'mark'}, {'id':2,'name': 'richard'}] select * from a where id =1 should give me the a[0] or something similar to this. thanks -- http://mail.

Weekly Python Patch/Bug Summary

2007-05-22 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 364 open ( +2) / 3769 closed ( +3) / 4133 total ( +5) Bugs: 986 open (+18) / 6701 closed ( +9) / 7687 total (+27) RFE : 258 open ( +2) / 287 closed ( +1) / 545 total ( +3) New / Reopened Patches __ syslog sy

Re: trying to gzip uncompress a StringIO

2007-05-22 Thread bob
Perfect, thanks! Now I have a working WMF file and everything. Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: trying to gzip uncompress a StringIO

2007-05-22 Thread bob
Perfect, thanks! Now I have a working WMF file and everything. Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: trying to gzip uncompress a StringIO

2007-05-22 Thread John Machin
On 23/05/2007 7:48 AM, Gabriel Genellina wrote: > En Tue, 22 May 2007 14:22:25 -0300, <[EMAIL PROTECTED]> escribió: > >> 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 tha

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

2007-05-22 Thread king kikapu
> It appears that worker.start gets set to the result of > count.ui.spFrom.value(). If that result is an int, then worker.start() is > going to generate the TypeError you received. Did you actually mean to call > worker.run() instead? > > --- > -Bill Hamilton Some friend pointed out to me an ho

Re: using google search api for python

2007-05-22 Thread Gabriel Genellina
En Tue, 22 May 2007 15:34:08 -0300, Gerardo Herzig <[EMAIL PROTECTED]> escribió: > 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 > pur

Re: trying to gzip uncompress a StringIO

2007-05-22 Thread Gabriel Genellina
En Tue, 22 May 2007 14:22:25 -0300, <[EMAIL PROTECTED]> escribió: > 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 fr

Re: NOOOOB

2007-05-22 Thread sbroscious
On May 22, 6: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 really liked How to Think Like a Computer Scientist learning with python foound at http://www.ibiblio.org/obp/thinkCSpy/. Unlike most

Re: The use of universal_newlines in subprocess

2007-05-22 Thread Gabriel Genellina
En Tue, 22 May 2007 12:00:48 -0300, Joel Andres Granados <[EMAIL PROTECTED]> escribió: > 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 sit

Re: Python on Vista installation issues

2007-05-22 Thread will
Vista is a 64 bit OS and there is no port of pywin32 for either Vista or 64-bit XP -- http://mail.python.org/mailman/listinfo/python-list

Re: NOOOOB

2007-05-22 Thread Michael Tobis
Different strokes for different folks. You might get better advice about where to start if you tell us a bit about yourself. Do you have any other programming experience? Do you have specific goals in mind as a programmer? mt -- http://mail.python.org/mailman/listinfo/python-list

Re: OSError[Error 5]

2007-05-22 Thread Miki
Hello SamG, > I do this on PowerPC.. > > >>> import os > >>> os.listdir('/usr/bin') > > And endup getting this ... > > OSError: [Error 5] Input/output error:/usr/bin What happens when you run "ls /usr/bin" in the terminal? HTH, -- Miki <[EMAIL PROTECTED]> http://pythonwise.blogspot.com -- http:

Re: converting text and spans to an ElementTree

2007-05-22 Thread Steven Bethard
Gabriel Genellina wrote: > the idea would be as follows: > > - For each span generate two tuples: (start_offset, 1, end_offset, > element) and (end_offset, 0, -start_offset, element). If start==end use > (start_offset, -1, start_offset, element). > - Collect all tuples in a list, and sort them.

Re: how to use python to checking password on servlet

2007-05-22 Thread Miki
Hello sandeep, > 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 It depends on the web platform you use, can you elaborate more? (To make the browser send a GET method, jus

^ Blondes Take it on the face!

2007-05-22 Thread deepbroke7
http://goofythroat.info - Must see this blonde take 3 loads on the face! -- http://mail.python.org/mailman/listinfo/python-list

Re: [Fwd: Re: managed lists?]

2007-05-22 Thread Bruno Desthuilliers
Jorgen Bodde a écrit : (snip) > class ObjListException(Exception): >pass > > class ObjListIterator(object): >def __init__(self, objlist): >self.__objlist = objlist >self.__idx = 0 You should use a single underscore here. -- http://mail.python.org/mailman/listinfo/python

Re: [Fwd: Re: managed lists?]

2007-05-22 Thread Bruno Desthuilliers
Jorgen Bodde a écrit : > Hi Bruno, > > Thanks for your answer. > > Well what I am after is a list of relations to some class type. And in > that list I do not wish to have accidentally put ints, strings, So don't do it !-) > only > one type of object, or interface. Now I can make the list inter

Re: drag and drop with wxPython ?

2007-05-22 Thread kyosohma
On May 22, 10:00 am, stef <[EMAIL PROTECTED]> 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 wxPyth

Re: too much memory use

2007-05-22 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, rohit wrote: > i am making a program for desktop search. > in order to make it more effective im implementing the records in the > form of a tree(files starting with 'a','b','c'have different > trees ..so 26 trees in all) in memory and writing it down in file. > the max

Re: Create an XML document

2007-05-22 Thread kyosohma
On May 22, 10:00 am, [EMAIL PROTECTED] wrote: > 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: > > >

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: Lists vs tuples (newbie)

2007-05-22 Thread Duncan Booth
"Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > Aside from the hashing issue, there is nothing that a tuple can do > that can't be done as well or better by a list. There are a few other cases where you have to use a tuple, for example in a try..except statement the exception specification mus

Re: Inheritance

2007-05-22 Thread Duncan Booth
HMS Surprise <[EMAIL PROTECTED]> wrote: > I am trying to understand the 'if' statement and the exec statement in > the code below. > > from PyHttpTestCase import PyHttpTestCase > from com.bitmechanic.maxq import Config > global validatorPkg > if __name__ == 'main': > validatorPkg = Config.ge

reading 3-d (multi-page) tiff images with python/pil

2007-05-22 Thread wbsmith
hello all, i am using python (2.5) with the PIL (latest [last?] release), and i am trying to read in these 3-d tiff images we have. basically, i am following some example code that iterates through the images in the 3-d tiff file like this: import Image import numpy img = Image.open("myFile.tif

Re: Inheritance

2007-05-22 Thread Brian van den Broek
HMS Surprise said unto the world upon 05/22/2007 02:40 PM: > 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

too much memory use

2007-05-22 Thread rohit
hi , i am making a program for desktop search. in order to make it more effective im implementing the records in the form of a tree(files starting with 'a','b','c'have different trees ..so 26 trees in all) in memory and writing it down in file. the max size file has 16000 records...now to imple

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1   2   >