Re: PyPy 1.0: JIT compilers for free and more

2007-03-28 Thread Bruno Desthuilliers
Carl Friedrich Bolz a écrit : > == > PyPy 1.0: JIT compilers for free and more > == > > Welcome to the PyPy 1.0 release - a milestone integrating the results > of four years of research, engineering, management and spr

Re: XML Parsing

2007-03-28 Thread Amit Khemka
On 28 Mar 2007 00:38:38 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I want to parse this XML file: > > > > > > > filename > > Hello > > > > > filename2 > > Hello2 > > > > > > This XML will be in a file called filecreate.xml > > As you might have guessed, I want to create files

Freeze problem(second time do not imported)

2007-03-28 Thread dyp
Hi, I am using DLLs from freez.py and these dll are running inside a program(Not OS level). If I have 2 dlls such as A.dll, B.dll, I can import and run a(A.run()) function in A.dl, next I can import and run a function(B.run()) in B.dll Next if I try to run A.run(), it doesn't work at all. Anyon

Re: socket read timeout

2007-03-28 Thread Steve Holden
hg wrote: > Facundo Batista wrote: > >> hg wrote: >> >>> Do you mean use select ? >> No, socket's timeout: >> > import socket > s = socket.socket() > s.settimeout(5) > ... >> Regards, >> >> -- >> . Facundo >> . >> Blog: http://www.taniquetil.com.ar/plog/ >> PyAr: http://www.pytho

Re: PyDoc -g call to Alt-Installed Python

2007-03-28 Thread D.Hering
On Mar 28, 3:09 am, Peter Otten <[EMAIL PROTECTED]> wrote: > D.Hering wrote: > > I have both python2.4 and 2.5 installed on a (k)ubuntu linux box. I'm > > trying to get the call to pydoc -g (pydoc server called from the > > system console) to recognize python2.5 rather than the system's > > default

Re: with timeout(...):

2007-03-28 Thread Nick Craig-Wood
Hendrik van Rooyen <[EMAIL PROTECTED]> wrote: > "Nick Craig-Wood" <[EMAIL PROTECTED]> wrote: > > Hendrik van Rooyen <[EMAIL PROTECTED]> wrote: > > > But would be useful to be able to do without messing with > > > threads and GUI and imports. > > > Could be hard to implement as the interpreter

Re: PyPy 1.0: JIT compilers for free and more

2007-03-28 Thread Carl Friedrich Bolz
Hi Luis! Luis M. González wrote: > Carl Friedrich Bolz wrote: >> == >> PyPy 1.0: JIT compilers for free and more >> == [snip] > > > Congratulations! Thanks :-) > I just have a couple of questions: > > Attem

Re: XML Parsing

2007-03-28 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > I want to parse this XML file: > > > > > > > filename > > Hello > > > > > filename2 > > Hello2 > > > > > > This XML will be in a file called filecreate.xml > > As you might have guessed, I want to create files from this XML file > contents, so how can I

Re: Beginner GTK question

2007-03-28 Thread dashawn888
On Mar 25, 5:00 pm, Dave Cook <[EMAIL PROTECTED]> wrote: > On 2007-03-25, dashawn888 <[EMAIL PROTECTED]> wrote: > > > gui.py:79: GtkWarning: Quit: missing action > > menubar = uimanager.get_widget('/MenuBar') > > > > This should probably be action="Quit". > > Dave Cook

Re: XML Parsing

2007-03-28 Thread harvey . thomas
On Mar 28, 10:51 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I want to parse this XML file: > > > > > > > > > > > filename > > > > Hello > > > > > > > > > filename2 > > > > Hello2 > > > > > > > > > > This XML will be in a file called filecreate.xml >

Re: wxPython, Syntax highlighting

2007-03-28 Thread Christian
Eric von Horst wrote: > Hi, > > I am looking for wx widget that has the ability to show text, edit the > text (like a TextCtrl) but also does syntax highlighting (if the text > is e.g. XML or HTML). > I have been looking in the latest wxPython version but I could not > really find anything. Have

Re: XML Parsing

2007-03-28 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > I want to parse this XML file: > As you might have guessed, I want to create files from this XML file > contents, so how can I do this? > What modules should I use? What options do I have? Where can I find > tutorials? Will I be able to put > this on the internet (on

Re: XML Parsing

2007-03-28 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > I want to parse this XML file: > > > > > > > filename > > Hello > > > > > filename2 > > Hello2 > > > > > > This XML will be in a file called filecreate.xml > > As you might have guessed, I want to create files from this XML file > contents, so how can

pygtk: how to make a screenlocking window?

2007-03-28 Thread André Wyrwa
Hi, can anyone please point me to the relevant pygtk window properties i need to set to make a window - fullscreen - stay in front - grab all input focus so that i can use it as a screen lock the likes that gksu or gnome-power-manager do? Thanks. André. signature.asc Description: This is a dig

Re: XML Parsing

2007-03-28 Thread Diez B. Roggisch
> > The example is valid well-formed XML. It is permitted to use the ":" > character in element names. Whether one should in a non namespace > context is a different matter. It is? I was always under the impression one has to declare a namespace. But this might be shaped from the usage of XSLT an

Re: PyPy 1.0: JIT compilers for free and more

2007-03-28 Thread Kay Schluehr
On Mar 27, 11:48 pm, Carl Friedrich Bolz <[EMAIL PROTECTED]> wrote: > == > PyPy 1.0: JIT compilers for free and more > == > > Welcome to the PyPy 1.0 release - a milestone integrating the results > of four years of rese

Re: XML Parsing

2007-03-28 Thread Christian
[EMAIL PROTECTED] wrote: > I want to parse this XML file: > > > > > > > filename > > Hello > > > > > filename2 > > Hello2 > > > > > > This XML will be in a file called filecreate.xml > > As you might have guessed, I want to create files from this XML file > contents, so how can I

Re: Auto execute python in USB flash disk

2007-03-28 Thread Graeme Glass
Or take a look at http://www.truecrypt.org/ (Unless like Brain said, you are doing this to learn) On Mar 27, 11:17 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > Brian Erhard wrote: > > I am still fairly new to python and wanted to attempt a home made > > password protection program. There are file

Re: socket read timeout

2007-03-28 Thread skip
hg> My issue with that is the effect on write: I only want a timeout on hg> read ... but anyway ... So set a long timeout when you want to write and short timeout when you want to read. Skip -- http://mail.python.org/mailman/listinfo/python-list

how to check whether a drive is a network drive or drive from attached hard-disk

2007-03-28 Thread shailesh
Hi, Few very simple questions. Is there a way to detect whether a drive is a mapped network drive or not in Windows? Also, how can I get a list of drive letters currently in use in the system? Your help is highly appreciated. Thanks in advance. With regards, -Shailesh -- http://mail.python.o

Re: PyPy 1.0: JIT compilers for free and more

2007-03-28 Thread Paul Boddie
On 28 Mar, 14:12, "Kay Schluehr" <[EMAIL PROTECTED]> wrote: > > A somewhat unrelated question. With Py3K Python gets optional type > annotations. No, I believe the consensus is that Python 3000 gets optional annotations which aren't specifically for type information... nudge nudge, wink wink! That

Re: how to check whether a drive is a network drive or drive from attached hard-disk

2007-03-28 Thread Tim Golden
shailesh wrote: > Hi, > > Few very simple questions. > > Is there a way to detect whether a drive is a mapped network drive or > not in Windows? > > Also, how can I get a list of drive letters currently in use in the > system? http://tgolden.sc.sabren.com/python/wmi_cookbook.html#find-drive-typ

Re: looking for RSS generator

2007-03-28 Thread kyosohma
On Mar 27, 9:42 pm, "alex23" <[EMAIL PROTECTED]> wrote: > > I'm looking for sample code to generate an RSS feed. > > For this, I highly recommend > PyRSS2Gen:http://www.dalkescientific.com/Python/PyRSS2Gen.html > > Very straightforward. > > > I can annotate > > my html code with comments/tags to m

Re: XML Parsing

2007-03-28 Thread Urban, Gabor
HI, I could suggest you to use the minidom xml parser from xml module. Your XML schema does not seem to complocated. You will find detailed descriptions, and working code in the book: Dive ino Python. Google for it :-)) Gabor Urban NMC - ART -- http://mail.python.org/mailman/listinfo/pyth

Re: PyPy 1.0: JIT compilers for free and more

2007-03-28 Thread Paul Boddie
On 28 Mar, 14:12, "Kay Schluehr" <[EMAIL PROTECTED]> wrote: > > A somewhat unrelated question. With Py3K Python gets optional type > annotations. No, I believe the consensus is that Python 3000 gets optional annotations which aren't specifically for type information... nudge nudge, wink wink! That

Re: shutil.copy Problem

2007-03-28 Thread David Nicolson
Hi John, That was an excellent idea and it was the cause problem. Whether this is a bug in shutil I'm not sure. Here is the traceback, Python 2.4.3 on Windows XP: > C:\Documents and Settings\Güstav>C:\python243\python Z:\sh.py > Copying u'C:\\Documents and Settings\\G\xfcstav\\My Documents\\M

Why doesnt __getattr__ with decorator dont call __get_method in decorator

2007-03-28 Thread glomde
Hi, I tried to write a decorator for that should be for methods but for some reasons it doens seem to work when you try to do it on the __getattr__ method in a class. Could anybody give some hints why this is? Example: class decoratorTest(object): def __init__(self, func): self.func =

Re: PyPy 1.0: JIT compilers for free and more

2007-03-28 Thread Paul Rubin
"Kay Schluehr" <[EMAIL PROTECTED]> writes: > A somewhat unrelated question. With Py3K Python gets optional type > annotations. Are you already architecting an annotation handler that > can process these annotations? This feature is somewhat competitive to > all the complicated type inference and ji

Re: Why doesnt __getattr__ with decorator dont call __get_method in decorator

2007-03-28 Thread Alex Martelli
glomde <[EMAIL PROTECTED]> wrote: > Hi, > > I tried to write a decorator for that should be for methods but for > some reasons > it doens seem to work when you try to do it on the __getattr__ method > in a class. > Could anybody give some hints why this is? ... > a.test # This doesnt call the __g

using PyUnit to test with multiple threads

2007-03-28 Thread winston . yang
Is it possible to use PyUnit to test with multiple threads? I want to send many commands to a database at the same time. The order of execution of the commands is indeterminate, and therefore, so is the status message returned. For example, say that I send the commands "get" and "delete" for a gi

Re: socket read timeout

2007-03-28 Thread hg
[EMAIL PROTECTED] wrote: > > hg> My issue with that is the effect on write: I only want a timeout > on > hg> read ... but anyway ... > > So set a long timeout when you want to write and short timeout when you > want to read. > > Skip Not bad .. thanks -- http://mail.python.org

Re: Why doesnt __getattr__ with decorator dont call __get_method in decorator

2007-03-28 Thread glomde
On Mar 28, 4:47 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > glomde <[EMAIL PROTECTED]> wrote: > > Hi, > > > I tried to write a decorator for that should be for methods but for > > some reasons > > it doens seem to work when you try to do it on the __getattr__ method > > in a class. > > Could any

Re: Python automatic testing: mocking an imported module?

2007-03-28 Thread Mark T
"Silfheed" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Heyas > > So we have the following situation: we have a testee.py that we want > to automatically test out and verifiy that it is worthy of being > deployed. We want our tester.py to test the code for testee.py > without ch

Re: PyPy 1.0: JIT compilers for free and more

2007-03-28 Thread Christian Tismer
On 28.03.2007, at 10:38, Carl Friedrich Bolz wrote: > Brain error on our side: the gc_pypy.dll is the dll of the Boehm > garbage > collector, which you would need to compile yourself (which makes > precompiled binaries a bit useless :-) ). We updated the zip file, > would > you mind checking

Re: Numeric Soup

2007-03-28 Thread Harry George
"Erik Johnson" <[EMAIL PROTECTED]> writes: > "Robert Kern" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > http://www.scipy.org/History_of_SciPy > > > > numpy is the current array package and supercedes Numeric and numarray. > scipy > > provides a bunch of computational routin

Re: PyPy 1.0: JIT compilers for free and more

2007-03-28 Thread Kay Schluehr
On Mar 28, 2:54 pm, "Paul Boddie" <[EMAIL PROTECTED]> wrote: > On 28 Mar, 14:12, "Kay Schluehr" <[EMAIL PROTECTED]> wrote: > > > > > A somewhat unrelated question. With Py3K Python gets optional type > > annotations. > > No, I believe the consensus is that Python 3000 gets optional > annotations wh

Re: PyPy 1.0: JIT compilers for free and more

2007-03-28 Thread Carl Friedrich Bolz
Hi Christian! Christian Tismer wrote: > On 28.03.2007, at 10:38, Carl Friedrich Bolz wrote: > >> Brain error on our side: the gc_pypy.dll is the dll of the Boehm >> garbage >> collector, which you would need to compile yourself (which makes >> precompiled binaries a bit useless :-) ). We update

Re: Why doesnt __getattr__ with decorator dont call __get_method in decorator

2007-03-28 Thread 7stud
On Mar 28, 8:28 am, "glomde" <[EMAIL PROTECTED]> wrote: > Hi, > > I tried to write a decorator for that should be for methods but for > some reasons > it doens seem to work when you try to do it on the __getattr__ method > in a class. > Could anybody give some hints why this is? > All you have to

Re: Fortran vs Python - Newbie Question

2007-03-28 Thread Michael Tobis
I feel obligated to fan the flames a bit by pointing to http://www.fortranstatement.com/ a site which advocates discontinuing development of Fortran and does a good job of summarizing the problems with the contemporary development of that language. I am not convinced that a new high performance la

Re: PyPy 1.0: JIT compilers for free and more

2007-03-28 Thread Kay Schluehr
On Mar 28, 4:34 pm, Paul Rubin wrote: > "Kay Schluehr" <[EMAIL PROTECTED]> writes: > > A somewhat unrelated question. With Py3K Python gets optional type > > annotations. Are you already architecting an annotation handler that > > can process these annotations? This featu

very strange syntax errors

2007-03-28 Thread hg
Hi, I'v been facing some very strange errors lately: one example: def __init__(self): import my_info some_text = my_info.T_SOME_TEXT ^ syntax error I manage to get rid of that one by moving the import on top of my file. Note: Python 2

Re: Fortran vs Python - Newbie Question

2007-03-28 Thread Terry Reedy
"Tim Roberts" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Well, I'm being a bit argumentative here, but it's hard to deny that the | use of "compiled" in the context of .pyc (or .javac) is very different from | the use of "compiled" in the context of running gcc. Besides the f

Hpw make lists that are easy to sort.

2007-03-28 Thread Anton Vredegoor
Python's sorting algorithm takes advantage of preexisting order in a sequence: #sort_test.py import random import time def test(): n = 1000 k = 2**28 L = random.sample(xrange(-k,k),n) R = random.sample(xrange(-k,k),n) t = time.time() LR = [(i+j) for i in L for j i

Re: very strange syntax errors

2007-03-28 Thread hg
hg wrote: > Hi, > > I'v been facing some very strange errors lately: > > one example: > > def __init__(self): > > import my_info > some_text = my_info.T_SOME_TEXT > ^ syntax error > > > I manage to get rid of that one by moving the im

Re: Why doesnt __getattr__ with decorator dont call __get_method in decorator

2007-03-28 Thread Arnaud Delobelle
On Mar 28, 3:47 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > glomde <[EMAIL PROTECTED]> wrote: > > Hi, > > > I tried to write a decorator for that should be for methods but for > > some reasons > > it doens seem to work when you try to do it on the __getattr__ method > > in a class. > > Could any

Re: very strange syntax errors

2007-03-28 Thread Terry Reedy
"hg" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | I'v been facing some very strange errors lately: | one example: | | def __init__(self): | |import my_info |some_text = my_info.T_SOME_TEXT | ^ syntax error | | I manage to

Re: very strange syntax errors

2007-03-28 Thread David Nicolson
This might be stating the obvious, but have you detabbed your text, if you are using spaces? On 28/03/2007, at 8:18 PM, hg wrote: > hg wrote: > >> Hi, >> >> I'v been facing some very strange errors lately: >> >> one example: >> >> def __init__(self): >> >> import my_info >>

Re: very strange syntax errors

2007-03-28 Thread Peter Otten
hg wrote: > I'v been facing some very strange errors lately: > > one example: > > def __init__(self): > > import my_info > some_text = my_info.T_SOME_TEXT > ^ syntax error > > > I manage to get rid of that one by moving the import on t

Re: very strange syntax errors

2007-03-28 Thread skip
>> I'v been facing some very strange errors lately: >> >> one example: >> >> def __init__(self): >> >> import my_info >> some_text = my_info.T_SOME_TEXT >>^ syntax error >> >> I manage to get rid of that

XML/encoding/prolog/python hell...

2007-03-28 Thread fscked
I am a beginning pythoner and I am having a terrible time trying to figure out how to do something that (it would seeme to me) should be fairly simple. I have a CSV file of unknown encoding and I need to parse that file to get the fields <--- DONE I need to create an xml document that has the prop

Re: pattern search

2007-03-28 Thread Fabian Braennstroem
Hi, Gabriel Genellina schrieb am 03/27/2007 10:09 PM: > En Tue, 27 Mar 2007 18:42:15 -0300, Diez B. Roggisch <[EMAIL PROTECTED]> > escribió: > >> Paul McGuire schrieb: >>> On Mar 27, 10:18 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: Fabian Braennstroem wrote: > wh

Re: very strange syntax errors

2007-03-28 Thread Facundo Batista
hg wrote: > I'v been facing some very strange errors lately: > > one example: You'll need to paste here the exact code and the traceback. Regards, -- . Facundo . Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ -- http://mail.python.org/mailman/listinfo/python-lis

Re: very strange syntax errors

2007-03-28 Thread Georg Brandl
Peter Otten schrieb: > hg wrote: > >> I'v been facing some very strange errors lately: >> >> one example: >> >> def __init__(self): >> >> import my_info >> some_text = my_info.T_SOME_TEXT >> ^ syntax error >> >> >> I manage to get rid

Re: PyPy 1.0: JIT compilers for free and more

2007-03-28 Thread bearophileHUGS
Kay Schluehr: > RPython is heuristically defined as a subset of Python "static enough > to be translatable to C". So it is actually static analysis that is > done here, not on a local scale but on a simpler sublanguage. It is > not clear to me whether for a sufficiently annotated Py3K program the >

Re: Hpw make lists that are easy to sort.

2007-03-28 Thread kyosohma
On Mar 28, 12:12 pm, Anton Vredegoor <[EMAIL PROTECTED]> wrote: > Python's sorting algorithm takes advantage of preexisting order in a > sequence: > > #sort_test.py > import random > import time > > def test(): > n = 1000 > k = 2**28 > > L = random.sample(xrange(-k,k),n) > R = r

Re: XML/encoding/prolog/python hell...

2007-03-28 Thread kyosohma
On Mar 28, 12:40 pm, "fscked" <[EMAIL PROTECTED]> wrote: > I am a beginning pythoner and I am having a terrible time trying to > figure out how to do something that (it would seeme to me) should be > fairly simple. > > I have a CSV file of unknown encoding and I need to parse that file to > get the

Re: very strange syntax errors

2007-03-28 Thread hg
Facundo Batista wrote: > hg wrote: > > >> I'v been facing some very strange errors lately: >> >> one example: > > You'll need to paste here the exact code and the traceback. > > Regards, > > -- > . Facundo > . > Blog: http://www.taniquetil.com.ar/plog/ > PyAr: http://www.python.org/ar/ Hi,

Re: Hpw make lists that are easy to sort.

2007-03-28 Thread Paul Rubin
Anton Vredegoor <[EMAIL PROTECTED]> writes: > Presorting the second sequence gains us more than three seconds. I > wonder if there is a way to generate the combined items in such a way > that sorting them is even faster? Is there some other sorting > algorithm that can specifically take advantage o

newbi question on python rpc server, how it works?

2007-03-28 Thread krishnakant Mane
hello, searched a lot of places including google search but can't find answers to python-rpc. I am also very new to rpc. I am very clear about its meaning and where it is to be used, but not about how it is done. I have a need where I need to create a layer of business logic that will connect to

Re: very strange syntax errors

2007-03-28 Thread Peter Otten
Georg Brandl wrote: > Peter Otten schrieb: >> A guess: you may have mixed Unix ("\n") and Windows ("\r\n") newlines. >> Try to ensure that every line ends with "\r\n". > > That shouldn't be a problem since Python reads source files in universal > newline mode. Oops, I should have guessed /that/

Re: newbi question on python rpc server, how it works?

2007-03-28 Thread Larry Bates
krishnakant Mane wrote: > hello, > searched a lot of places including google search but can't find > answers to python-rpc. I am also very new to rpc. I am very clear > about its meaning and where it is to be used, but not about how it is > done. > I have a need where I need to create a layer of

Question about extending tuple

2007-03-28 Thread abcd
I wanted to extend tuple but ran into a problem. Here is what I thought would work class MyTuple(tuple): def __init__(self, *args): tuple.__init__(self, args) x = MyTuple(1,2,3,4) That gives me... TypeError: tuple() takes at most 1 argument (4 given). However, this call works: x

Re: Question about extending tuple

2007-03-28 Thread Georg Brandl
abcd schrieb: > I wanted to extend tuple but ran into a problem. Here is what I > thought would work > > class MyTuple(tuple): > def __init__(self, *args): > tuple.__init__(self, args) > > x = MyTuple(1,2,3,4) > > That gives me... > > TypeError: tuple() takes at most 1 argument (4

Finding a module's sub modules at runtime

2007-03-28 Thread Joshua J. Kugler
[If this is documented somewhere, please just point me there. I googled on the terms that made sense to me, and didn't find anything.] So, I have: ModTest __init__.py AModule.py BModule.py CModule.py All works fine. However, when I import ModTest, I would like i

Re: PyPy 1.0: JIT compilers for free and more

2007-03-28 Thread dmitrey
Hi! Suppose I have a py-written module. Is it possible somehow run PyPy on the whole module? I didn't find it in documentation. And if yes (or if just run in every module func) what will be after computer restart? Should I restart PyPy on the module once again? And are there any chances/intends fo

Re: newbi question on python rpc server, how it works?

2007-03-28 Thread Jeff McNeil
I've built a bit of an account provisioning/support framework here based on SimpleXMLRPCServer (which is the one bundled w/ Python). Take a look at http://docs.python.org/lib/module-SimpleXMLRPCServer.html as it also includes a bit of a code example. It seems to work fine for my needs in that I

Re: Question about extending tuple

2007-03-28 Thread Lawrence Oluyede
abcd <[EMAIL PROTECTED]> wrote: > I wanted to extend tuple but ran into a problem. Here is what I > thought would work I think you should take a look at this to do it properly from the Python devs: http://svn.python.org/view/python/trunk/Lib/collections.py Look for NamedTuple -- Lawrence, oluy

Re: Question about extending tuple

2007-03-28 Thread abcd
> As an immutable type, tuple makes use of __new__. > > class MyTuple(tuple): > def __new__(cls, *args): > return tuple.__new__(cls, args) > > should work. > > Georg strange. not very consistent. -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding a module's sub modules at runtime

2007-03-28 Thread kyosohma
On Mar 28, 2:44 pm, "Joshua J. Kugler" <[EMAIL PROTECTED]> wrote: > [If this is documented somewhere, please just point me there. I googled on > the terms that made sense to me, and didn't find anything.] > > So, I have: > > ModTest > __init__.py > AModule.py > BModule.py >

dynamic module does not define init function (initpsycopgmodule)

2007-03-28 Thread kickslop
Clearly I am doing something braindead here with psycopg 1.1.21 (psycopg2 is not an option). Any ideas? I get the same results when I build it with Red Hat's GCC 3.4.6 setup as well as our in-house GCC 3.3.5 setup. Linux rcf-temp3 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:32:02 EDT 2006 x86_64 x86_64

SimpleXMLRPCServer and Threading

2007-03-28 Thread Achim Domma
Hi, is SimpleXMLRPCServer multithreaded or how does it handle multiple clients? I want to implement a simple server which will be queried by multiple processes for work to be done. The server will simply hold a queue with files to process. The clients will ask for the next file. Do I have to s

Re: Hpw make lists that are easy to sort.

2007-03-28 Thread Anton Vredegoor
Paul Rubin wrote: > Well there are various hacks one can think of, but is there an actual > application you have in mind? Suppose both input lists are sorted. Then the product list is still not sorted but it's also not completely unsorted. How can I sort the product? I want to know if it is n

Re: newbi question on python rpc server, how it works?

2007-03-28 Thread Goldfish
> > I have a need where I need to create a layer of business logic that > > will connect to mysql database at one end and a wxpython based thin > > client at the other end. Spring Python offers something similar (http://springpython.python- hosting.com/wiki/DistributedRemoting) to link up clients

Re: Question about extending tuple

2007-03-28 Thread Georg Brandl
abcd schrieb: >> As an immutable type, tuple makes use of __new__. >> >> class MyTuple(tuple): >> def __new__(cls, *args): >> return tuple.__new__(cls, args) >> >> should work. >> >> Georg > > strange. not very consistent. On the contrary -- __new__ *and* __init__ exist for all typ

Re: Finding a module's sub modules at runtime

2007-03-28 Thread Joshua J. Kugler
On Wednesday 28 March 2007 12:04, [EMAIL PROTECTED] wrote: >> All works fine. However, when I import ModTest, I would like it to >> discover and store the names of the modules beneath it, and construct a >> list, say mod_list, that I can access later to find the names of the >> sub-modules in >> t

Re: SimpleXMLRPCServer and Threading

2007-03-28 Thread Jeff McNeil
I do it this way and it's always worked great for me. SimpleXMLRPCServer is based on SocketServer, so you can use the ForkingMixIn or ThreadingMixIn classe to create something to handle requests in parallel. from SocketServer import ThreadingMixIn import SimpleXMLRPCServer class ThreadedXMLRPCS

manually implementing staticmethod()?

2007-03-28 Thread 7stud
Hi, Can someone show me how to manually implement staticmethod()? Here is my latest attempt: def smethod(func): def newFunc(): pass def newGet(): print "new get" newFunc.__get__ = newGet return newFunc class Tes

Finding User Profile path

2007-03-28 Thread kyosohma
Hi, I am trying to query our domain to get a list of our users profile locations. I thought I might be able to use WMI, but I can't get it to work. I am using a Windows XP Pro workstation and Python 2.4 on a mixed environment of Debian Linux (with Samba) and Windows servers. We are in the process

Re: XML/encoding/prolog/python hell...

2007-03-28 Thread fscked
[EMAIL PROTECTED] wrote: <---SNIP---> > I've never done this, but I found a recipe on the ActiveState website > that looks like it would be helpful: > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/159100 I tried looking at that but couldn't figure out how to get the property file wor

Re: PyPy 1.0: JIT compilers for free and more

2007-03-28 Thread Carl Friedrich Bolz
Hi! dmitrey wrote: > Hi! > Suppose I have a py-written module. > Is it possible somehow run PyPy on the whole module? > I didn't find it in documentation. > And if yes (or if just run in every module func) what will be after > computer restart? > Should I restart PyPy on the module once again? >

Creating a new data structure while filtering its data origin.

2007-03-28 Thread mmara
Hi everyone. I'm trying to work with very simple data structures but I'm stuck in the very first steps. If someone has the luxury of a few minutes and can give an advice how to resolve this, I'll really appreciate it. 1- I have a list of tuples like this: lista= [(162, 141, 3), (162, 141, 3), (

Re: PyPy 1.0: JIT compilers for free and more

2007-03-28 Thread Jarek Zgoda
Carl Friedrich Bolz napisał(a): > Welcome to the PyPy 1.0 release - a milestone integrating the results > of four years of research, engineering, management and sprinting > efforts, concluding the 28 months phase of EU co-funding! So it took 4 yars of work and over 2 yaers of consumption of EU fu

Re: PyPy 1.0: JIT compilers for free and more

2007-03-28 Thread Carl Friedrich Bolz
Kay Schluehr wrote: > Nice to read that things are going on. I've still a PyPy 0.7 version > on my notebook. I guess I will upgrade :) > > A somewhat unrelated question. With Py3K Python gets optional type > annotations. Are you already architecting an annotation handler that > can process th

Re: PyPy 1.0: JIT compilers for free and more

2007-03-28 Thread Christian Tismer
On 28.03.2007, at 23:36, Jarek Zgoda wrote: > Carl Friedrich Bolz napisał(a): > >> Welcome to the PyPy 1.0 release - a milestone integrating the results >> of four years of research, engineering, management and sprinting >> efforts, concluding the 28 months phase of EU co-funding! > > So it took

Re: manually implementing staticmethod()?

2007-03-28 Thread Michael Spencer
"7stud" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > Can someone show me how to manually implement staticmethod()? Here is > my latest attempt: > Raymond Hettinger can: http://users.rcn.com/python/download/Descriptor.htm#static-methods-and-class-methods

Re: PDB does not allow jumping to first statement?

2007-03-28 Thread Chris Lasher
I have submitted this as a bug via SourceForge: or if munged The Python folks would like a test case and/or a patch. This is well beyond my ken as a humble Python user. Could anybody m

How can I find out the size of a file

2007-03-28 Thread Marko . Cain . 23
Hi, How can I find out the size of a file in a disk in python? i try this, but it does not work: size = open(inputFileNameDir + "/" + file, 'r').size() Thank for any help. -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I find out the size of a file

2007-03-28 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: > How can I find out the size of a file in a disk in python? os.path.getsize(filename) -Irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: Hpw make lists that are easy to sort.

2007-03-28 Thread Terry Reedy
"Anton Vredegoor" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Paul Rubin wrote: | | > Well there are various hacks one can think of, but is there an actual | > application you have in mind? | | Suppose both input lists are sorted. Then the product list is still not | sorted but

how can I clear a dictionary in python

2007-03-28 Thread Marko . Cain . 23
Hi, I create a dictionary like this myDict = {} and I add entry like this: myDict['a'] = 1 but how can I empty the whole dictionary? Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating a new data structure while filtering its data origin.

2007-03-28 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Hi everyone. > > I'm trying to work with very simple data structures but I'm stuck in the very > first steps. If someone has the luxury of a few minutes and can give an > advice how to resolve this, I'll really appreciate it. > > 1- I have a list of tuples like this:

Re: how can I clear a dictionary in python

2007-03-28 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Hi, > > I create a dictionary like this > myDict = {} > > and I add entry like this: > myDict['a'] = 1 > but how can I empty the whole dictionary? >>> help(dict) Help on class dict in module __builtin__: class dict(object) (...) | Methods defined here: (...)

Re: how can I clear a dictionary in python

2007-03-28 Thread Aahz
In article <[EMAIL PROTECTED]>, Larry Bates <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] wrote: >> >> I create a dictionary like this >> myDict = {} >> >> and I add entry like this: >> myDict['a'] = 1 >> but how can I empty the whole dictionary? > >just point myDict to an empty dictionary again

Re: how can I clear a dictionary in python

2007-03-28 Thread Christian Tismer
On 29.03.2007, at 00:48, Larry Bates wrote: > [EMAIL PROTECTED] wrote: >> Hi, >> >> I create a dictionary like this >> myDict = {} >> >> and I add entry like this: >> myDict['a'] = 1 >> but how can I empty the whole dictionary? >> >> Thank you. >> > > just point myDict to an empty dictionary agai

Re: XML/encoding/prolog/python hell...

2007-03-28 Thread Gabriel Genellina
En Wed, 28 Mar 2007 15:06:28 -0300, <[EMAIL PROTECTED]> escribió: > You could probably also use a combination of the csv module and the > pyxml module (links below). > > http://pyxml.sourceforge.net/topics/ Note the pyxml summary page on SourceForge: "PyXML is no longer maintained." -- Gabrie

Re: XML/encoding/prolog/python hell...

2007-03-28 Thread Diez B. Roggisch
fscked schrieb: > I am a beginning pythoner and I am having a terrible time trying to > figure out how to do something that (it would seeme to me) should be > fairly simple. Show us code. As concise as possible. Then we might be able to help you. Diez -- http://mail.python.org/mailman/listinfo/p

Re: Hpw make lists that are easy to sort.

2007-03-28 Thread Anton Vredegoor
Terry Reedy wrote: > One could generate the items in order in less space by doing, for instance, > an m-way merge, in which only the lowest member of each of the m sublists > is present at any one time. But I don't know if this (which is > O(m*n*log(m))) would be any faster (in some Python imp

Re: SimpleXMLRPCServer and Threading

2007-03-28 Thread Erik Johnson
"Achim Domma" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > is SimpleXMLRPCServer multithreaded or how does it handle multiple > clients? I want to implement a simple server which will be queried by > multiple processes for work to be done. The server will simply hold a > q

Re: how can I clear a dictionary in python

2007-03-28 Thread Christian Tismer
On 29.03.2007, at 00:38, [EMAIL PROTECTED] wrote: > Hi, > > I create a dictionary like this > myDict = {} > > and I add entry like this: > myDict['a'] = 1 > but how can I empty the whole dictionary? Reading the Python docs might help. But before, I would try a dir(myDict). Maybe you will find an

Re: how can I clear a dictionary in python

2007-03-28 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Hi, > > I create a dictionary like this > myDict = {} > > and I add entry like this: > myDict['a'] = 1 > but how can I empty the whole dictionary? > > Thank you. > just point myDict to an empty dictionary again myDict={} Larry Bates -- http://mail.python.org/mail

  1   2   >