ANN: pywinauto 0.3.0 released - now localization proof

2006-03-21 Thread Mark Mc Mahon
Hi, The 0.3.0 release of pywinauto is now available. pywinauto is a set of open-source (LGPL) modules for using Python as a GUI automation 'driver' for Windows NT based Operating Systems (NT/W2K/XP). SourceForge project page: http://sourceforge.net/projects/pywinauto Download from SourceForge

Nuxeo Calendar Server released in version 2

2006-03-21 Thread Fermigier Stefane
Nuxeo Calendar Server released in version 2 --- Nuxeo releases version 2 of it's calendar products for Python and Zope, updating to the latest technology frameworks. Nuxeo proudly presents version 2 of its calendar framework. The calendar framework

How to fork or spawn processes to second processor ?

2006-03-21 Thread Sabre
Hi everybody, how can I spawn or fork a second process onto the second processor of my dual core server ? Is there a possibility to determin the processor on which a process shall run ? Thanks in advance Bernd -- http://mail.python.org/mailman/listinfo/python-list

Error sending message [1142852913051.1792.rpppl] from [randpoly.com]

2006-03-21 Thread randpoly.com PostMaster
[00] V-POP3bounce: [EMAIL PROTECTED];Error=[550 Error: Invalid Attachment] [01] Error sending message [1142852913051.1792.rpppl] from [randpoly.com]. ID:SF1F0 Mail From: python-list@python.org Rcpt To: [EMAIL PROTECTED] Server:relaymaster.rapidns.com [209.120.245.170] [02] The

Re: ** Operator

2006-03-21 Thread Christoph Zwerschke
Christoph Zwerschke wrote: Kent Johnson wrote: The way to make this change happen is to submit a bug report with your suggested change. See the link at the bottom of the above page to find out how. I know, but I wanted to see at least one person assenting before doing so. Anyway, I took

Re: How to fork or spawn processes to second processor ?

2006-03-21 Thread Stefan Behnel
Sabre wrote: how can I spawn or fork a second process onto the second processor of my dual core server ? Is there a possibility to determin the processor on which a process shall run ? Hi, from your post it's not clear why you would want to do that or which operating system you are using.

Become another user

2006-03-21 Thread Joakim Hove
Hello, [Disclaimer: This might really be a Unix question ?!] I have written a cgi-script in python - it works reasonably well. The script is invoked by the apache web server and runs as user 'wwwrun'. During the execution of the script I want to save some files, as the script is run bu user

Re: user-supplied locals dict for function execution?

2006-03-21 Thread bruno at modulix
Lonnie Princehouse wrote: Beautiful is better than ugly. Explicit is better than implicit. Err... I see no contradiction nor conflict here. What to do when explicit is ugly and implicit is beautiful? Depends on your understanding of explicit/implicit. Side effects on globals or automatic

Re: Passing parameters to VB

2006-03-21 Thread Tim Roberts
koia [EMAIL PROTECTED] wrote: Hi, I am using win32com for the Python interface to my Excel shreadsheets. When I turn on Macro recordiong in Excel while filling a rectangle with text information, a part of the VB code produced is the following: With Selection.Characters(Start:=1,

Re: Become another user

2006-03-21 Thread Ant
Look at the os module: http://docs.python.org/lib/os-file-dir.html This has various functions you may find useful depending on how you want to go about it, such as chmod and chown. Cheers, -- Ant... -- http://mail.python.org/mailman/listinfo/python-list

Re: How to recgonize an USB device in FreeBSD?

2006-03-21 Thread Tim Roberts
Geoffery [EMAIL PROTECTED] wrote: I want to use Python to develop a software.Now, I have a question. How to recgonize USB device in FreeBSD? Presumably, with a device driver, which will not be written in Python. And , Is there any module that I can use? Could you be a bit more specific? -- -

Re: Python 2.5 Schedule

2006-03-21 Thread Ant
Looks like some good new stuff coming along. Does anyone know what's happened to the path PEP (http://www.python.org/doc/peps/pep-0355/) - I thought I'd seen somewhere that that was originally planned for 2.5... -- Ant... -- http://mail.python.org/mailman/listinfo/python-list

Re: ** Operator

2006-03-21 Thread Christoph Zwerschke
Ron Adam wrote: I agree and think the for language lawyers should be changed to something that encourages people to read it instead of encouraging them to avoid it. Maybe: The Python language structure for everyone. If it's hard to read and understand, then that can and should be

Re: whats your favourite object relational mapper?

2006-03-21 Thread Steve Holden
Jonathan Ellis wrote: Steve Holden wrote: I think describing this as Ian saying the code in its current form is a dead end is to read rather more into the words than is actually there. Well, that may be. However, given that the 0.x code is so crufty that the v2 refactor is a multi-day

should os.walk return a list instead of a tuple?

2006-03-21 Thread Ministeyr
Hello, os.walk doc: http://www.python.org/doc/2.4/lib/os-file-dir.html#l2h-1625 When walking top to bottom, it allows you to choose the directories you want to visit dynamically by changing the second parameter of the tuple (a list of directories). However, since it is a tuple, you cannot use

Re: user-supplied locals dict for function execution?

2006-03-21 Thread Steve Holden
Lonnie Princehouse wrote: Beautiful is better than ugly. Explicit is better than implicit. Err... I see no contradiction nor conflict here. What to do when explicit is ugly and implicit is beautiful? Aye, there's the rub. ;-) Realise that sometimes explicitly ugly can be implicitly

Re: Spidering Hacks for Python, not Perl

2006-03-21 Thread Duncan Booth
Enigma Curry wrote: I've been looking for similar stuff recently. I haven't found much, but this is the list of links I've come across so far: Harvest Man - http://harvestman.freezope.org/ Mechanize - http://wwwsearch.sourceforge.net/mechanize/ Beautiful Soup -

Re: How to recgonize an USB device in FreeBSD?

2006-03-21 Thread Geoffery
I want to add some applications to Freevo. Let Freevo recgonize the USB device is the one. Thank u for your answer. -- http://mail.python.org/mailman/listinfo/python-list

Re: should os.walk return a list instead of a tuple?

2006-03-21 Thread Duncan Booth
Ministeyr wrote: When walking top to bottom, it allows you to choose the directories you want to visit dynamically by changing the second parameter of the tuple (a list of directories). However, since it is a tuple, you cannot use filter on it, since it would mean reassigning it: for

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-21 Thread Dinko Tenev
[EMAIL PROTECTED] wrote: After the basic fact of generating the exclusion - a considerable achievement - the program should be interactive. What if the target set has thousands or millions of elements? There should be a loop-like way ('do' in Haskell, for example) to peel off the elements

Re: How to recgonize an USB device in FreeBSD?

2006-03-21 Thread Martin P. Hellwig
Geoffery wrote: I want to add some applications to Freevo. Let Freevo recgonize the USB device is the one. Thank u for your answer. Have a look at 'man 5 usbd.conf' -- mph -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-21 Thread Dinko Tenev
Dinko Tenev wrote: Speculation: the time for building-up a smart structure to speed-up enumeration, together with the time for enumerating the set using that structure, should sum up to roughly Theta( n*|S^n| ), even with a really smart algorithm. OK, maybe not. This might be the worst case,

Re: New-style Python icons

2006-03-21 Thread Joel Hedlund
http://www.doxdesk.com/img/software/py/icons.png Neat! /Joel Hedlund -- http://mail.python.org/mailman/listinfo/python-list

TaskQueue

2006-03-21 Thread Raymond Hettinger
I would like to get feedback on an idea I had for simplifying the use of queues with daemon consumer threads Sometimes, I launch one or more consumer threads that wait for a task to enter a queue and then work on the task. A recurring problem is that I sometimes need to know if all of the tasks

Re: TaskQueue

2006-03-21 Thread Rene Pijlman
Raymond Hettinger: There are some competing approaches. One is to attach sentinel objects to the end of the line as a way for consumer threads to know that they should shut down. Then a regular t.join() can be used to block until the consumers threads have shut-down. This approach is

[CODE] - Python Newcomer Starting with Coding

2006-03-21 Thread Ilias Lazaridis
Where can I find practical coding examples for real life coding problems? Something like a categorized solution guide? - My current problem: * create a folder * seems to be: os.mkdir(path) * obtain the path of a python package * copy the content of the package folder to the created folder

Re: Become another user

2006-03-21 Thread Joel Hedlund
Look at the os module: http://docs.python.org/lib/os-file-dir.html This has various functions you may find useful depending on how you want to go about it, such as chmod and chown. Correct me if I'm wrong, but doesn't this also require having a little chat with the admin to set things up so

Re: New-style Python icons

2006-03-21 Thread 3KWA
Superb! How about getting them in the 2.5 release? Part of the reason why I am asking is that I am not sure what I have to do to get Win XP to use these instead of the one coming with 2.4.2. Cheers, EuGeNe -- http://mail.python.org/mailman/listinfo/python-list

Re: Python compiler

2006-03-21 Thread Magnus Lycka
Rc wrote: But ,my question is when I start Python it is a Dos Window that opened.I think it is not possible on a XP computer? The Windows NT family, including XP, is not based on MS DOS. It still has a text more interface, and it is much better than DOS ever was. You can start that by clicking

Re: why isn't Unicode the default encoding?

2006-03-21 Thread Jon Ribbens
In article [EMAIL PROTECTED], Martin v. Löwis wrote: In any case, it doesn't matter what encoding the document is in: read(2) always returns two bytes. It returns *up to* two bytes. Sorry to be picky but I think it's relevant to the topic because it illustrates how it's difficult to change the

Re: [CODE] - Python Newcomer Starting with Coding

2006-03-21 Thread bruno at modulix
Ilias Lazaridis wrote: Where can I find practical coding examples for real life coding problems? Probably in real life code ?-) Something like a categorized solution guide? Look for the Python cookbook (google is your friend). - My current problem: * create a folder * seems to be:

Re: should os.walk return a list instead of a tuple?

2006-03-21 Thread bruno at modulix
Ministeyr wrote: Hello, os.walk doc: http://www.python.org/doc/2.4/lib/os-file-dir.html#l2h-1625 When walking top to bottom, it allows you to choose the directories you want to visit dynamically by changing the second parameter of the tuple (a list of directories). However, since it is a

Re: New-style Python icons

2006-03-21 Thread Luis M. González
This is strange... I've been trying to access this site since yesterday, but I couldn't (Firefox can't stabilish connection with server www.doxdesk.com). However, I seem to be the only one with this problem... -- http://mail.python.org/mailman/listinfo/python-list

recursive map on nested list

2006-03-21 Thread alexandre_irrthum
Hello, I'd like to apply a function to elements of a nested list and wondered if there is anything more idiomatic and/or shorter than this recursive way: def recur_map(f, data): ... if isinstance(data, list): ... mapped_list = [] ... for i in data: ...

Nuxeo Calendar Server released in version 2

2006-03-21 Thread Fermigier Stefane
Nuxeo Calendar Server released in version 2 --- Nuxeo releases version 2 of it's calendar products for Python and Zope, updating to the latest technology frameworks. Nuxeo proudly presents version 2 of its calendar framework. The calendar framework

Re: TaskQueue

2006-03-21 Thread Carl Banks
Raymond Hettinger wrote: I would like to get feedback on an idea I had for simplifying the use of queues with daemon consumer threads Sometimes, I launch one or more consumer threads that wait for a task to enter a queue and then work on the task. A recurring problem is that I sometimes need

TKinter problem

2006-03-21 Thread C D Wood
To whom this may concern, Below is the source code, which demonstrates a problem I am having making a GUI for my python project work. 'table.txt' is a file that is read from the same folder. My code writes to a text file 'table.txt', and 'table.txt' is

Re: New-style Python icons

2006-03-21 Thread Tim Parkin
Luis M. González wrote: This is strange... I've been trying to access this site since yesterday, but I couldn't (Firefox can't stabilish connection with server www.doxdesk.com). However, I seem to be the only one with this problem... You could try using a proxy (one of the anonymous proxies

Re: Python compiler

2006-03-21 Thread bruno at modulix
Rc wrote: DaveM [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] On Thu, 16 Mar 2006 13:34:14 +0100, Méta-MCI [EMAIL PROTECTED] wrote: Après, vous pourrez aussi fréquenter le newsgroup : fr.comp.lang.python qui a l'avantage d'être en français. But perhaps he's a Flemish

Re: [CODE] - Python Newcomer Starting with Coding

2006-03-21 Thread Ed Singleton
On 21/03/06, Ilias Lazaridis [EMAIL PROTECTED] wrote: Where can I find practical coding examples for real life coding problems? Something like a categorized solution guide? This sounds quite a lot like PLEAC. It certainly contains a lot that you would find useful.

Re: Spidering Hacks for Python, not Perl

2006-03-21 Thread gene tani
Duncan Booth wrote: Enigma Curry wrote: I've been looking for similar stuff recently. I haven't found much, but this is the list of links I've come across so far: http://awaretek.com/nowak/mygale.html http://cheeseshop.python.org/pypi/spider.py/0.5 http://sig.levillage.org/?p=599

Convert (sorted) list of dics to nested list ?

2006-03-21 Thread shearichard
Hi - I want to take something like ... lstIn = [] lstIn.append({'COM_AUTOID': 1, 'PRG_AUTOID': 10, 'LEA_AUTOID': 1000}) lstIn.append({'COM_AUTOID': 1, 'PRG_AUTOID': 11, 'LEA_AUTOID': 2000}) lstIn.append({'COM_AUTOID': 1, 'PRG_AUTOID': 11, 'LEA_AUTOID': 2001}) lstIn.append({'COM_AUTOID': 1,

Re: New-style Python icons

2006-03-21 Thread Bruce
3KWA skrev: Superb! How about getting them in the 2.5 release? Part of the reason why I am asking is that I am not sure what I have to do to get Win XP to use these instead of the one coming with 2.4.2. That`s easy: control panel Folder options File Types *scroll to py file* advanced change

Re: TaskQueue

2006-03-21 Thread Carl Banks
Rene Pijlman wrote: 2) complicating the producer logic to append one sentinel for each consumer when the data stream is done for i in range(self.numberOfThreads): self.workQueue.put(None) Or, you could just put one sentinel in the Queue, and subclass the Queue's _get

Re: Spidering Hacks for Python, not Perl

2006-03-21 Thread gene tani
gene tani wrote: Duncan Booth wrote: Enigma Curry wrote: a couple more http://cheeseshop.python.org/pypi/Orchid/1.0 http://cheeseshop.python.org/pypi/webstemmer/0.5.0 -- http://mail.python.org/mailman/listinfo/python-list

Re: recursive map on nested list

2006-03-21 Thread bearophileHUGS
I think for most purposes a program like this is short enough: def recur_map2(fun, data): if hasattr(data, __iter__): return [recur_map2(fun, elem) for elem in data] else: return fun(data) data = [set([1, 2]), [3], 4, [5, {6:4}, [7, 8]]] print recur_map2(lambda x: x*2,

Re: what's the general way of separating classes?

2006-03-21 Thread John Salerno
Ben Cartwright wrote: Er? Surely you've used C#'s using statement? Well yes, but really that's very different. 'Using' statements are solely for the purpose of convenience so you don't have to qualify classes with namespaces. They aren't necessary to actually *use* those classes. (The

Re: TaskQueue

2006-03-21 Thread Carl Banks
Carl Banks wrote: But yeah, something like an InterruptableQueue might be a nice thing to have. Ok, I see now that InterruptableQueue wouldn't help the OP, though it would have helped me in my situation, so it'd still be a good idea. Carl Banks --

Re: Convert (sorted) list of dics to nested list ?

2006-03-21 Thread Larry Bates
[EMAIL PROTECTED] wrote: Hi - I want to take something like ... lstIn = [] lstIn.append({'COM_AUTOID': 1, 'PRG_AUTOID': 10, 'LEA_AUTOID': 1000}) lstIn.append({'COM_AUTOID': 1, 'PRG_AUTOID': 11, 'LEA_AUTOID': 2000}) lstIn.append({'COM_AUTOID': 1, 'PRG_AUTOID': 11, 'LEA_AUTOID': 2001})

Module import information

2006-03-21 Thread Eric White
List: Is it possible to determine the name of the module that invoked import from within the imported module? Thanks, Eric -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pywinauto 0.3.0 released - now localization proof

2006-03-21 Thread Bryan
[EMAIL PROTECTED] wrote: ANN: pywinauto 0.3.0 released - now localization proof Hi, The 0.3.0 release of pywinauto is now available. pywinauto is a set of open-source (LGPL) modules for using Python as a GUI automation 'driver' for Windows NT based Operating Systems (NT/W2K/XP).

Re: Module import information

2006-03-21 Thread Peter Hansen
Eric White wrote: Is it possible to determine the name of the module that invoked import from within the imported module? Almost anything is possible in Python. On the other hand, some things are probably impractical, and others ill-advised. Perhaps you can describe your requirements,

Re: recursive map on nested list

2006-03-21 Thread johnzenger
Uglier than yours, but down to two lines: def recur_map(f, data): return [ not hasattr(x, __iter__) and f(x) or recur_map(f, x) for x in data ] -- http://mail.python.org/mailman/listinfo/python-list

Encoding newlines in XML?

2006-03-21 Thread skip
*argh!* I hate XML! There, now that that's off my chest... I am trying to save Python code as attributes of an XML tag with xml.dom.minidom machinery. The code, predicatbly enough, contains newlines. If I do nothing to my program text, upon output I get XML which looks like this:

Re: TKinter problem

2006-03-21 Thread ezd
C D Wood wrote: To whom this may concern, Below is the source code, which demonstrates a problem I am having making a GUI for my python project work. 'table.txt' is a file that is read from the same folder. My code writes to a text file

python on blackberry?

2006-03-21 Thread [EMAIL PROTECTED]
i use a blackberry as my pda, and was wondering fi there was anything going on in the python world for blackberry.. i googled a bit, but it seems like most of the area is untapped.. anyone else have anything they know about? thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: New-style Python icons

2006-03-21 Thread Ant
It's easier than that in this case. Just unpack the icons in yout Python directory over the top of the existing ones. The change should get picked up the next time you log on. -- Ant... -- http://mail.python.org/mailman/listinfo/python-list

How can I compare if 2 files has duplicate entries in python?

2006-03-21 Thread yinglcs
I am new to python. How can I compare if 2 files has duplicate entries in python? Is there an example for that? What if the files are big and I don't want to read the whole file in memory. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: user-supplied locals dict for function execution?

2006-03-21 Thread Ziga Seilnacht
Lonnie Princehouse wrote: Occaisionally, the first two lines of The Zen of Python conflict with one another. An API I'm working on involves a custom namespace implementation using dictionaries, and I want a pretty syntax for initializing the custom namespaces. The fact that these namespaces

Re: New-style Python icons

2006-03-21 Thread 3KWA
Thanks a lot! (Still think 2.5 could have spunky new icons:) EuGeNe -- http://mail.python.org/mailman/listinfo/python-list

Command line arguments question (Windows XP)

2006-03-21 Thread ezd
Hi, I run simple script # u.py import sys print 'args',sys.argv in Command Prompt window, with 2 command lines on 2 PCs: # Case (1L): C:\tmp u.py a b c args ['C:\\tmp\\u.py'] # Case (1D): C:\tmp u.py a b c args ['C:\\tmp\\u.py', 'a', 'b', 'c'] # Cases (2L) (2D): C:\tmp C:\Python24\python

Re: Can I use a conditional in a variable declaration?

2006-03-21 Thread Sion Arrowsmith
Ron Adam [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I want the equivalent of this: if a == yes: answer = go ahead else: answer = stop in [a] more compact form: I sometimes find it useful to do: answers = {True: go ahead, False: stop} answer = answers[a == yes]

Re: ** Operator

2006-03-21 Thread Christoph Zwerschke
Christoph Zwerschke wrote: Christoph Zwerschke wrote: Kent Johnson wrote: The way to make this change happen is to submit a bug report with your suggested change. See the link at the bottom of the above page to find out how. I know, but I wanted to see at least one person assenting before

Re: Encoding newlines in XML?

2006-03-21 Thread Robert Kern
[EMAIL PROTECTED] wrote: *argh!* I hate XML! There, now that that's off my chest... I think, rather, that you hate XML libraries. Which is perfectly understandable. I am trying to save Python code as attributes of an XML tag with xml.dom.minidom machinery. The code, predicatbly enough,

RE: Command line arguments question (Windows XP)

2006-03-21 Thread Tim Golden
[ezd] | # u.py | import sys | print 'args',sys.argv | | in Command Prompt window, with 2 command lines on 2 PCs: | | # Case (1L): | C:\tmp u.py a b c | args ['C:\\tmp\\u.py'] | | # Case (1D): | C:\tmp u.py a b c | args ['C:\\tmp\\u.py', 'a', 'b', 'c'] Almost certainly means that the

Can XML-RPC performance be improved?

2006-03-21 Thread Sion Arrowsmith
I've got an established client-server application here where there is now a need to shovel huge amounts of data (structured as lists of lists) between the two, and the performance bottleneck has become the amount of time spent parsing XML (it's taking 100% CPU on one or other end of the connection

Re: user-supplied locals dict for function execution?

2006-03-21 Thread Alex Martelli
Lonnie Princehouse [EMAIL PROTECTED] wrote: ... @namespace # indicates function should be executed in namespace def initialize_namespace(): x = 5 # versus the alternative __namespace__ = { 'x' : 5, } Hm, what about: ns = namespace(x=5) and perhaps later ns.update(y=6) if

Re: How can I compare if 2 files has duplicate entries in python?

2006-03-21 Thread Larry Bates
[EMAIL PROTECTED] wrote: I am new to python. How can I compare if 2 files has duplicate entries in python? Is there an example for that? What if the files are big and I don't want to read the whole file in memory. Thank you. You need to supply more info. If you just want to determine

Re: Can XML-RPC performance be improved?

2006-03-21 Thread Diez B. Roggisch
Sion Arrowsmith wrote: I've got an established client-server application here where there is now a need to shovel huge amounts of data (structured as lists of lists) between the two, and the performance bottleneck has become the amount of time spent parsing XML (it's taking 100% CPU on one or

Re: Module import information

2006-03-21 Thread Eric White
Peter: Thanks for the reply. Consider the following situation: A set of variable names is defined along with a list of possible values for each. A second set of variable names is defined along with an _expression_ for generating a value for each. For each possible permutation of variables

Re: Can XML-RPC performance be improved?

2006-03-21 Thread Gregory Piñero
Perhaps there's a hardware solution? Could you run more servers in parallel? Or have some sort of load distribution system? (Just some generic server tips, I don't know much about XML-RPC) -Greg On 3/21/06, Diez B. Roggisch [EMAIL PROTECTED] wrote: Sion Arrowsmith wrote: I've got an

creating website script in Myghty

2006-03-21 Thread piotr maliński
I'm learning Myghty from few weeks and now I'm making a simple forum script ;) and I have problem finding few things in python that I need: - how to strip all HTML tags leaving the text / strip all code (python/other) from a string? - how to highlight a python/html/other code (result in HTML

Re: Encoding newlines in XML?

2006-03-21 Thread Fredrik Lundh
Robert Kern wrote: Other libraries seem to get this right. In [89]: from lxml import etree In [90]: e = etree.Element('SomeTag', text=def _f():\n return 3\n) In [93]: e.attrib Out[93]: {'text': 'def _f():\n return 3\n'} In [94]: etree.dump(e) SomeTag text=def _f():#10; return 3#10;/

Re: TaskQueue

2006-03-21 Thread Rene Pijlman
Carl Banks: Rene Pijlman: for i in range(self.numberOfThreads): self.workQueue.put(None) Or, you could just put one sentinel in the Queue, and subclass the Queue's _get method not to take the sentinel out. Ah yes, clever trick. But you'd have to worry about thread-safety of

Re: How can I compare if 2 files has duplicate entries in python?

2006-03-21 Thread Rene Pijlman
[EMAIL PROTECTED]: I am new to python. How can I compare if 2 files has duplicate entries in python? What is an 'entry'? -- René Pijlman Wat wil jij leren? http://www.leren.nl -- http://mail.python.org/mailman/listinfo/python-list

Re: Can XML-RPC performance be improved?

2006-03-21 Thread Rene Pijlman
Sion Arrowsmith: I've got an established client-server application here where there is now a need to shovel huge amounts of data (structured as lists of lists) between the two, and the performance bottleneck has become the amount of time spent parsing XML http://xmlsucks.org/ Anyone got any good

Re: datetime iso8601 string input

2006-03-21 Thread skip
aurora I agree. I just keep rewriting the parse method again and again. aurora def parse_iso8601_date(s): aurora Parse date in iso8601 format e.g. 2003-09-15T10:34:54 and aurora returns a datetime object. aurora ... Why not dt =

Re: Can XML-RPC performance be improved?

2006-03-21 Thread Fredrik Lundh
Sion Arrowsmith wrote: I've got an established client-server application here where there is now a need to shovel huge amounts of data (structured as lists of lists) between the two, and the performance bottleneck has become the amount of time spent parsing XML (it's taking 100% CPU on one or

Re: Can XML-RPC performance be improved?

2006-03-21 Thread gregarican
Sion Arrowsmith wrote: shovel huge amounts of data That right there basically takes XML-RPC off the table as a viable solution. No matter how much fine tuning you try large amounts of data don't bode well using XML-RPC. The other posted alternatives are certainly worth a shot. From CORBA to

Re: creating website script in Myghty

2006-03-21 Thread Fredrik Lundh
piotr maliñski wrote: I'm learning Myghty from few weeks and now I'm making a simple forum script ;) and I have problem finding few things in python that I need: - how to strip all HTML tags leaving the text http://effbot.org/zone/re-sub.htm#strip-html might be helpful. strip all code

Installing PyExcelerator to write Excel files from Python

2006-03-21 Thread tkpmep
I downloaded PyExcelerator.zip as I need to write some data into Excel files, and tried unsuccessfully to install it. I unzipped the files into C:/Python24/Lib/site-packages/PyExcelerator, and in a python command line window typed os.chdir(C:/Python24/Lib/site-packages/PyExcelerator) followed by

Re: Installing PyExcelerator to write Excel files from Python

2006-03-21 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: I downloaded PyExcelerator.zip as I need to write some data into Excel files, and tried unsuccessfully to install it. I unzipped the files into C:/Python24/Lib/site-packages/PyExcelerator, and in a python command line window typed

Re: Can XML-RPC performance be improved?

2006-03-21 Thread Paul McGuire
Diez B. Roggisch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Sion Arrowsmith wrote: I've got an established client-server application here where there is now a need to shovel huge amounts of data (structured as lists of lists) between the two, and the performance bottleneck

Re: Can XML-RPC performance be improved?

2006-03-21 Thread skip
Diez Sion Arrowsmith wrote: I've got an established client-server application here where there is now a need to shovel huge amounts of data (structured as lists of lists) between the two, and the performance bottleneck has become the amount of time spent parsing XML ...

Re: ** Operator

2006-03-21 Thread Terry Reedy
... which was promptly rejected. ... but now it has been checked in by somebody else anyway. The Python gods sometimes move in mysterious ways ;-) The tracker item reviewers are people, including me, with different knowledge, viewpoints and experiences, who sometimes disagree. --

Re: Module import information

2006-03-21 Thread Steve Holden
Eric White wrote: Peter: Thanks for the reply. Consider the following situation: A set of variable names is defined along with a list of possible values for each. A second set of variable names is defined along with an expression for generating a value for each. For each possible

should os.walk return a list instead of a tuple?

2006-03-21 Thread Ministeyr
Seems i forgot about the [:] notation. Thanks for the help. -- http://mail.python.org/mailman/listinfo/python-list

Handling yes/no questions from the User

2006-03-21 Thread [EMAIL PROTECTED]
I'm writing a scipt that need to interact with the user. Lets say I have the: Do you want to continue [Y|n] Where just pressing return means Yes (since its uppercase). Its easy to write a function for this, but perhaps something like this already exists. Could someone point me to a class that

Re: [CODE] - Python Newcomer Starting with Coding

2006-03-21 Thread Ilias Lazaridis
bruno at modulix wrote: Ilias Lazaridis wrote: Where can I find practical coding examples for real life coding problems? Probably in real life code ?-) Something like a categorized solution guide? Look for the Python cookbook (google is your friend). ...

Re: Design mini-lanugage for data input

2006-03-21 Thread aurora
Yes. But they have different motivations. The mini-language concept is to design an input format that is convenient for human editor and that is close to the semi-structured data source. I think the benefit from ease of editing and flexibility would justify writing a little parsing code.

Re: Encoding newlines in XML?

2006-03-21 Thread skip
Robert [EMAIL PROTECTED] wrote: *argh!* I hate XML! There, now that that's off my chest... Robert I think, rather, that you hate XML libraries. Well, I guess I don't mind XML as long as I don't have to look at it. XML-RPC is one example I'm perfectly happy with. You could call

Re: Encoding newlines in XML?

2006-03-21 Thread skip
Fredrik I don't recommend putting non-trivial formatted stuff in Fredrik attributes ... Yeah, I sort of knew that going in, but didn't want to make big changes to the code to do it in a cleaner fashion. I'll figure something out. Skip --

Re: Python 2.5 Schedule

2006-03-21 Thread Terry Reedy
Ant [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Looks like some good new stuff coming along. Does anyone know what's happened to the path PEP (http://www.python.org/doc/peps/pep-0355/) - I thought I'd seen somewhere that that was originally planned for 2.5... It is still being

Re: [CODE] - Python Newcomer Starting with Coding

2006-03-21 Thread Ilias Lazaridis
Ed Singleton wrote: On 21/03/06, Ilias Lazaridis [EMAIL PROTECTED] wrote: Where can I find practical coding examples for real life coding problems? Something like a categorized solution guide? This sounds quite a lot like PLEAC. It certainly contains a lot that you would find useful.

Re: Can XML-RPC performance be improved?

2006-03-21 Thread Steve Holden
gregarican wrote: Sion Arrowsmith wrote: shovel huge amounts of data That right there basically takes XML-RPC off the table as a viable solution. No matter how much fine tuning you try large amounts of data don't bode well using XML-RPC. The other posted alternatives are certainly

Re: [CODE] - Python Newcomer Starting with Coding

2006-03-21 Thread Dave Hansen
On Tue, 21 Mar 2006 20:05:48 +0200 in comp.lang.python, Ilias Lazaridis [EMAIL PROTECTED] wrote: bruno at modulix wrote: [...] Look for the Python cookbook (google is your friend). ... http://www.oreilly.com/catalog/pythoncook/ sorry, I've not clarified that I mean an free internet resource.

Re: Design mini-lanugage for data input

2006-03-21 Thread aurora
P.S. Also it is a 'mini-language' because it is an ad-hoc design that is good enough and can be easily implemented for a given problem. This is oppose to a general purpose solution like XML that is one translation from the original data format and carries too much baggages. Just consider

Re: Can XML-RPC performance be improved?

2006-03-21 Thread skip
Steve I suppose there *was* a good reason for using XML-RPC in the Steve first place? I don't know about the OP, but in my case it was a drop-dead simple cross-language RPC protocol. At one point Mojam's XML-RPC server talked to clients written in Python, Perl and Objective-C (via a

Re: Installing PyExcelerator to write Excel files from Python

2006-03-21 Thread tkpmep
Thanks!!! I had a good laugh at myself after i got it working. -- http://mail.python.org/mailman/listinfo/python-list

Re: Can XML-RPC performance be improved?

2006-03-21 Thread gregarican
Skip wrote: I don't know about the OP, but in my case it was a drop-dead simple cross-language RPC protocol. Exactly. RPC implementations. Typically these are a quick do this with this sent from the client, with a brief okay, I did that, here's the result back from the server. Shovelling huge

  1   2   3   >