Re: COM access sooo slow !?

2005-08-15 Thread Do Re Mi chel La Si Do
Hi ! I use a COM server, made with Python & Win32all (PyWin32). The speed of function's call is : 5 seconds, for 100 000 calls. Only the first call is slow (due to time to load Python...) Config : W-XP, P.2.4.1, 1.6 GHz, 512MB RAM @-salutations & sorry for my bad english Michel Claveau --

Re: How can I exclude a word by using re?

2005-08-15 Thread could ildg
Thank you, you code using pyparsing works very well. Now I got the "number" and the "url". But I still want to get the "name". I'll turn to pyparsing and see how to get the "name" from the html. But I hope you can enlighten me for one more time since I'm not farmiliar with the pyparsing module. O

Re: How can I exclude a word by using re?

2005-08-15 Thread Paul McGuire
Given the example re that you've been trying to get working, here is a pyparsing approach that might be more, um, approachable. Unfortunately, since I don't have the URL of the page you are working with, I'm unable to test this before posting. Good luck, -- Paul # getMP3s.py # get pyparsing at ht

Re: How to obtain GMT offset?

2005-08-15 Thread John Machin
new pip wrote: > I'm using Windows os. If the current system date time is '28 Jun 2001 > 14:17:15 +0700', how can I obtain the value '+0700' using python? If the current system date is in 2001, obtaining "GMT offset" is the least of your concerns :-) Have you read the section on the time module

Re: How to obtain GMT offset?

2005-08-15 Thread Erik Max Francis
new pip wrote: > I'm using Windows os. If the current system date time is '28 Jun 2001 > 14:17:15 +0700', how can I obtain the value '+0700' using python? time.timezone gives you the timezone offset in minutes. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA

JOBs............JOBs............JOBs

2005-08-15 Thread hardikh2000
DON'T SEND YOUR CV TO ME PLEASE. DON'T SEND YOUR CV TO ME PLEASE. DON'T SEND YOUR CV TO ME PLEASE. 1 Windows NT or 2000 server 2 worked on active directory and exchange server 3 Unix/ Solaris/ HPUX/ AIX Admin 4 Exp in C++/VC++ 5 Exp in Operating system 6 Exp in Datastructure 7 Exp in SQL Q

How to obtain GMT offset?

2005-08-15 Thread new pip
I'm using Windows os. If the current system date time is '28 Jun 2001 14:17:15 +0700', how can I obtain the value '+0700' using python? Thank you -- http://mail.python.org/mailman/listinfo/python-list

Re: Bug in slice type

2005-08-15 Thread bryanjugglercryptographer
Michael Hudson wrote: > Bryan Olson writes: > In some sense; it certainly does what I intended it to do. [...] > I'm not going to change the behaviour. The docs probably aren't > especially clear, though. The docs and the behavior contradict: [...] these are the /start/ and /stop/ indices

Re: Invoking GUI for app running in background with a keypress

2005-08-15 Thread Mike Meyer
Mathias Dahl <[EMAIL PROTECTED]> writes: > How does one go about doing this? I found a small program written in C > (xbindkeys) that can do this and understand that it probably involves > a lot of "low-level" stuff in X which feels a bit "scary" :). Any > clues of doing this "easily" in Python + s

Reading portions of a wave file

2005-08-15 Thread Nadie
Greeting list readers, I noticed that the wave read object has an *implementation dependent* setpos(pos) method. When reading audio files, it is useful to be able to set the position to a specific sample. While setpos(pos) may do this on certain implementations (haven't tried it), it would no

Re: Is Tkinter compatible with GNOME?

2005-08-15 Thread Mulac
- Original Message - From: <[EMAIL PROTECTED]> Newsgroups: comp.lang.python To: Sent: Tuesday, August 16, 2005 12:14 PM Subject: Re: Is Tkinter compatible with GNOME? > Have you tried starting it in a .xsession file with something like: > exec gnome-session & > button_prog.py > Doesnt .

Re: __del__ pattern?

2005-08-15 Thread Peter Hansen
Tom Anderson wrote: > Only one socket can be bound to a given port at any time, so the second > instance of SpecialClass will get an exception from the bind call, and > will be stillborn. This is a bit of a crufty hack, though - you end up > with an open port on your machine for no good reason.

Re: sniffer in python

2005-08-15 Thread Peter Hansen
billiejoex wrote: > Thank you for your fast reply. You're right. I'll be more specific, sorry. > The example source is the one you can find on the 'Impacket' page on the > same site of pcapy: > http://oss.coresecurity.com/impacket/sniff.py > I use a Win XP prof sp2 system, python ver. 2.4.1. > Her

Re: How can I exclude a word by using re?

2005-08-15 Thread Jordan Rastrick
could ildg said: > I want to use re because I want to extract something from a html. It > will be very complicated without using re. But while using re, I > found that I must exlude a hole word "", certainly, there are > many many "" in this html. Actually, for properly processing html, you shou

Re: SOAP and XMLRPC

2005-08-15 Thread phil hunt
On Mon, 15 Aug 2005 20:04:55 +0200, Magnus Lycka <[EMAIL PROTECTED]> wrote: >dcrespo wrote: >> Hi to all... >> Someone knows if is there possible to have a Python SOAP or XMLRPC >> server that works with VB? I would like you to include the examples >> clients and server programs. > >If you can writ

Re: How can I exclude a word by using re?

2005-08-15 Thread could ildg
I want to use re because I want to extract something from a html. It will be very complicated without using re. But while using re, I found that I must exlude a hole word "", certainly, there are many many "" in this html. My re is as below: _ r=re.comp

Re: Is Tkinter compatible with GNOME?

2005-08-15 Thread [EMAIL PROTECTED]
Have you tried starting it in a .xsession file with something like: exec gnome-session & button_prog.py -- http://mail.python.org/mailman/listinfo/python-list

Re: EasyDialogs - select multiple files?

2005-08-15 Thread alex23
I haven't used EasyDialogs myself but a quick scan of both the Mac & Windows docs doesn't show any explicit support for multiple file selection. EasyGUI is similar to EasyDialogs but uses Tkinter instead of native OS calls: http://www.ferg.org/easygui/index.html While it provides simple functions

Re: robust html parser

2005-08-15 Thread James Stroud
http://www.crummy.com/software/BeautifulSoup/ On Monday 15 August 2005 03:33 pm, BRA_MIK wrote: > I'm looking for a good and robust html parser that could parse complex > html/xhtml document without crashing (possibly free) > > Could you help me please ? > > TIA > MB -- James Stroud UCLA-DOE Ins

Re: Bug on Python2.3.4 [FreeBSD]?

2005-08-15 Thread Terry Reedy
"Donn Cave" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In article <[EMAIL PROTECTED]>, > "Terry Reedy" <[EMAIL PROTECTED]> wrote: > ... >> If there is a hole in the standard, 'innovation' is required. > > I hope this perspective is a rarity. I think you over interpreted. The

robust html parser

2005-08-15 Thread BRA_MIK
I'm looking for a good and robust html parser that could parse complex html/xhtml document without crashing (possibly free) Could you help me please ? TIA MB -- http://mail.python.org/mailman/listinfo/python-list

Is Tkinter compatible with GNOME?

2005-08-15 Thread Mulac
Is Tkinter also compatible wih GNOME? I wrote a program in python that displays 2 buttons for starting and stopping the execution of a program. I used Tkinter for the gui. I want the program to run as a daemon when linux is booted. I want the buttons to be displayed at the presession login screen

Re: Invoking GUI for app running in background with a keypress

2005-08-15 Thread Don
Mathias Dahl wrote: > Jeremy Moles <[EMAIL PROTECTED]> writes: > >> If you want to get crazy you can poll() on one of the evdev nodes >> (/dev/input/event*) and behave accordingly. I do this in a C application >> we use to do the exact same thing you're talking about. >> >> Each successful read

Re: GUI tookit for science and education

2005-08-15 Thread Grant Edwards
On 2005-08-15, phil <[EMAIL PROTECTED]> wrote: > >> >> Tkinter is the default GUI for Python, it runs on lots of platforms >> and often comes already installed (on Linux or Unix distributions). >> > > > I use Tkinter for a geometry course. I think it is fairly easy to > learn, much easier than s

Re: GUI tookit for science and education

2005-08-15 Thread phil
> > Tkinter is the default GUI for Python, it runs on lots of platforms > and often comes already installed (on Linux or Unix distributions). > I use Tkinter for a geometry course. I think it is fairly easy to learn, much easier than say VB. VERY portable and pretty well documented and very

Re: Windows 32 service problem (ImportError)

2005-08-15 Thread Martin v. Löwis
Laszlo Zsolt Nagy wrote: > exceptions.ImportError: dynamic module does not define init function > (initzlib) > - > > Where is the problem? Please help. My guess is that you have a zlib.dll somewhere, which gets used before zlib.pyd. Regards, Martin -- http://mail.python.org/mailman/

Re: Py_DECREF Question:

2005-08-15 Thread Raymond Hettinger
[Jeremy Moles] > When I add an object created locally to a mapping or sequence (that will > be returned from a function into an running instance of the Python > interpreter), I need to call Py_DECREF on the object, right? It depends on the the function or macro, but usually the answer is Yes. The

Resetting modification time

2005-08-15 Thread Greg Peretti
I'm new to Python and would appreciate being pointed in the right direction. I'm trying to create a simple script that would note the modification time of a file, perform some changes to the file and then reset the modification time to the pre-change time. The area I'm having difficulty with is t

Re: Invoking GUI for app running in background with a keypress

2005-08-15 Thread Mathias Dahl
Jeremy Moles <[EMAIL PROTECTED]> writes: > If you want to get crazy you can poll() on one of the evdev nodes > (/dev/input/event*) and behave accordingly. I do this in a C application > we use to do the exact same thing you're talking about. > > Each successful read from the device returns a 16-

Implementing class methods in C

2005-08-15 Thread nmichaud
I am having a problem implementing some methods of a python class in C. The class is defined in python, but I would like to rewrite some methods in c. Here is an example of what I want to do: file _test.c: #include static PyObject * func2(PyObject *self, PyObject *args) { if (self == NULL) {

Re: socket setdefaulttimeout

2005-08-15 Thread bryanjugglercryptographer
Michael P. Soulier wrote: > On 13/08/05 Bryan Olson said: > > > The seperate thread-or-process trick should work. Start a deamon > > thread to do the gethostbyname, and have the main thread give up > > on the check if the deamon thread doesn't report (via a lock or > > another socket) within, say,

Re: GUI tookit for science and education

2005-08-15 Thread phil hunt
On Mon, 15 Aug 2005 04:59:29 +0200, Mateusz £oskot <[EMAIL PROTECTED]> wrote: >Hi, > >I'd like to ask some scientists or students >which GUI toolkit they would recommend >to develop scientific prototypes (for education and >testing some theories). >I think such toolkit should fill a bit different >

Re: Library vs Framework (was Dr. Dobb's Python-URL!)

2005-08-15 Thread rafi
Simon Brunning wrote: > On 8/15/05, Rocco Moretti <[EMAIL PROTECTED]> wrote: > >>Which lead me to the question - what's the difference between a library >>and a framework? > > If you call its code, it's a library. If it calls yours, it's a framework. Trying to add my 2 cents (As I do not agree

Re: SOAP and XMLRPC

2005-08-15 Thread Magnus Lycka
dcrespo wrote: > Hi to all... > Someone knows if is there possible to have a Python SOAP or XMLRPC > server that works with VB? I would like you to include the examples > clients and server programs. If you can write an XML-RPC client in VB, it will work with XML-RPC servers written in any languag

Re: Py_DECREF Question:

2005-08-15 Thread Scott David Daniels
Jeremy Moles wrote: > When I add an object created locally to a mapping or sequence ... > I need to call Py_DECREF on the object, right? ... for example: > PyObject* list = Py_Buildvalue("[]"); > ... > PyObject* num = Py_BuildValue("i", 10); > PyList_Append(list, num); > ..

Re: Using for in one-liner

2005-08-15 Thread BranoZ
Paul Watson wrote: > Using a '$' before the string works in the ksh that is part of FC4. > However, it does not work on the pdksh that is in FC3 and Cygwin. It > also does not work on AIX ksh. > > $ print $'now' > $now In bash you can also use Ctrl-v followed by special character. (I used to rese

Re: Invoking GUI for app running in background with a keypress

2005-08-15 Thread Jeremy Moles
If you want to get crazy you can poll() on one of the evdev nodes (/dev/input/event*) and behave accordingly. I do this in a C application we use to do the exact same thing you're talking about. Each successful read from the device returns a 16-byte input_event struct (or similar, I'm going from

Re: Library vs Framework (was Dr. Dobb's Python-URL!)

2005-08-15 Thread Terry Hancock
On Monday 15 August 2005 09:54 am, Simon Brunning wrote: > On 8/15/05, Rocco Moretti <[EMAIL PROTECTED]> wrote: > > Which lead me to the question - what's the difference between a library > > and a framework? > > If you call its code, it's a library. If it calls yours, it's a framework. Such conc

Re: GUI tookit for science and education

2005-08-15 Thread TPJ
Recently I was considering the choice of PyGTK or wxPython. They are both rich GUI libraries, and they both are cross-platform ones (well... they work on GNU/Linux and on Windows). I chose PyGTK, because it has *much* better documentation (I wasn't very happy when I had to look for information in

Re: Library vs Framework (was Dr. Dobb's Python-URL!)

2005-08-15 Thread Magnus Lycka
Simon Brunning wrote: > On 8/15/05, Rocco Moretti <[EMAIL PROTECTED]> wrote: > >>Which lead me to the question - what's the difference between a library >>and a framework? > > > If you call its code, it's a library. If it calls yours, it's a framework. Erh, it's not quite that simple. I don't k

Py_DECREF Question:

2005-08-15 Thread Jeremy Moles
When I add an object created locally to a mapping or sequence (that will be returned from a function into an running instance of the Python interpreter), I need to call Py_DECREF on the object, right? Unfortunately, I really feel like the following code leaks memory... --- for example --- PyObjec

Re: zlib + Windows 32 service problem (ImportError)

2005-08-15 Thread vincent wehren
"Laszlo Zsolt Nagy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] | Sorry, I realized that the import zlib was not executed from my | (working) service. | So here is the question: why can't I use zlib from a win32 service? Is | there any way to make it working? | | >---

Re: Determining win32 dll dependency

2005-08-15 Thread Robin Becker
Thomas Heller wrote: > Robin Becker <[EMAIL PROTECTED]> writes: . > > For a discussion about the rights (or not) to distribute msvcr71.dll you > could read the py2exe-users lists archive. thanks for the tip, I believe there was a discussion on clpy recently as well >>I would like to au

Re: Library vs Framework (was Dr. Dobb's Python-URL!)

2005-08-15 Thread Rocco Moretti
Simon Brunning wrote: > On 8/15/05, Rocco Moretti <[EMAIL PROTECTED]> wrote: > >>Which lead me to the question - what's the difference between a library >>and a framework? > > > If you call its code, it's a library. If it calls yours, it's a framework. Although that definition probably makes se

Re: Using for in one-liner

2005-08-15 Thread Paul Watson
BranoZ wrote: > In "man python" > "Here command may contain multiple statements separated by > newlines. Leading whitespace is significant in Python statements!" > > In "man bash" search for \n (/\\n) > Frankly, I know bash for 10 years, but this has surprised me, too. > > BranoZ Using a '$' be

EasyDialogs - select multiple files?

2005-08-15 Thread wcc
Hello group, Can I use EasyDialogs to select multiple files? I saw the function AskFileForOpen but which does not have a flag allowing selection of multiple files. Did I miss something? Thanks very much, - wcc -- http://mail.python.org/mailman/listinfo/python-list

Re: Using for in one-liner

2005-08-15 Thread BranoZ
In "man python" "Here command may contain multiple statements separated by newlines. Leading whitespace is significant in Python statements!" In "man bash" search for \n (/\\n) Frankly, I know bash for 10 years, but this has surprised me, too. BranoZ -- http://mail.python.org/mailman/listinfo/

Re: Bug on Python2.3.4 [FreeBSD]?

2005-08-15 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "Terry Reedy" <[EMAIL PROTECTED]> wrote: ... > If there is a hole in the standard, 'innovation' is required. I hope this perspective is a rarity. When you exploit an opportunity to make something work differently while conforming to the existing standards, you're

Re: Using for in one-liner

2005-08-15 Thread Paul Watson
BranoZ wrote: > Paul Watson wrote: > >>Can a for loop be used in a one-liner? What am I missing? >> >>$ python -c "import sys;for i in range(5): print i," >> File "", line 1 >> import sys;for i in range(5): print i, >> ^ >>SyntaxError: invalid syntax > > > This was tricky

Re: Using for in one-liner

2005-08-15 Thread Paul Watson
[EMAIL PROTECTED] wrote: > to me it seems the ',' is superfluous, this works: python -c "import > sys;print ''.join([l for l in sys.stdin.readlines()])" in 2.4.1 - with > the comma it works as well but it looks weird, as if you want to > un-pack a tuple. Without the comma, an additional newline i

Re: client server question

2005-08-15 Thread Irmen de Jong
Robert Wierschke wrote: > John schrieb: > >> I have a simple script that runs a server where one client can connect. >> I would like to make it so that many clients can connect to one server >> on the same port. Where can I find how to do this? >> >> Thanks, >> --j >> > > use sockets. Or, if you

Re: Using for in one-liner

2005-08-15 Thread BranoZ
Paul Watson wrote: > Can a for loop be used in a one-liner? What am I missing? > > $ python -c "import sys;for i in range(5): print i," >File "", line 1 > import sys;for i in range(5): print i, > ^ > SyntaxError: invalid syntax This was tricky.. python -c $'import sys;

Re: Using for in one-liner

2005-08-15 Thread [EMAIL PROTECTED]
to me it seems the ',' is superfluous, this works: python -c "import sys;print ''.join([l for l in sys.stdin.readlines()])" in 2.4.1 - with the comma it works as well but it looks weird, as if you want to un-pack a tuple. -- http://mail.python.org/mailman/listinfo/python-list

Re: Standalone applications ?

2005-08-15 Thread TPJ
It's just the same as with Java, GTK+, Qt or any other library/platform. If you're doing development with Java, you can use any version that you like (for example the version 1.5) - and your application probably won't be able to run by an older version of Java. The same is with, for example, GTK+ l

Re: seeking Python developers

2005-08-15 Thread BranoZ
> If anyone has ideas for how to find such people within > this geographic area, I'd much appreciate suggestions.. Try to post it at http://www.python.org/Jobs.html BranoZ -- http://mail.python.org/mailman/listinfo/python-list

Using for in one-liner

2005-08-15 Thread Paul Watson
Can a for loop be used in a one-liner? What am I missing? $ python -c "import sys;print ''.join([line for line in sys.stdin.readlines()])," now is the time now is the time $ python -c "import sys;for line in sys.stdin.readlines(): print line," File "", line 1 import sys;for line in sys.

Re: socket setdefaulttimeout

2005-08-15 Thread Michael P. Soulier
On 13/08/05 Bryan Olson said: > The seperate thread-or-process trick should work. Start a deamon > thread to do the gethostbyname, and have the main thread give up > on the check if the deamon thread doesn't report (via a lock or > another socket) within, say, 8 seconds. Wouldn't an alarm be much

Re: __del__ pattern?

2005-08-15 Thread Tom Anderson
On Mon, 15 Aug 2005, Chris Curvey wrote: > Is there a better pattern to follow than using a __del__ method? I just > need to be absolutely, positively sure of two things: An old hack i've seen before is to create a server socket - ie, make a socket and bind it to a port: import socket class

Re: get a list of mounted filesystems under MacOSX

2005-08-15 Thread rafi
[EMAIL PROTECTED] wrote: > Hi all, > I am trying to port my (linux) program to MacOSX, and I need to get a > list of mounted filesystems. Under linux, it was easy, I was parsing > /etc/mtab (or /proc/mounts), this works also on some other unices. > But I have no idea how to do it on MacOSX, apart f

Re: __del__ pattern?

2005-08-15 Thread Michael Hudson
"Chris Curvey" <[EMAIL PROTECTED]> writes: > I need to ensure that there is only one instance of my python class on > my machine at a given time. I recommend modifying your requirements such that you ensure that there is only one "active" instance of your class at any one time (or something like

Re: seeking Python developers

2005-08-15 Thread jean-marc
What level? and is geography important? JM -- http://mail.python.org/mailman/listinfo/python-list

Re: SOAP and XMLRPC

2005-08-15 Thread jean-marc
why isn't this good? http://www.enappsys.com/backend.jsp Seems to be what you're looking for... (second entry of a googled 'xml-rpc visual basic' search!) JM PS Tell us why the refered *.dll don't do, so I won't refer to it again if it's of no value. -- http://mail.python.org/mailman/listinfo/p

seeking Python developers

2005-08-15 Thread [EMAIL PROTECTED]
I'm conducting a search for people with a background in Python for software development involving the web and large databases in greater Boston, MA. If anyone has ideas for how to find such people within this geographic area, I'd much appreciate suggestions... or, even better, referrals. Arnie Fe

Re: Python's Exception, and Capitalization

2005-08-15 Thread Michael Hudson
"Ray" <[EMAIL PROTECTED]> writes: > D H wrote: >> Yeah, the python standard library has been built by lots of different >> people. It wasn't designed by one entity using one standard like the >> java standard library or .NET/Mono class library. > > Um, OK, so is it customary in modern Python prog

Re: Determining win32 dll dependency

2005-08-15 Thread Thomas Heller
Robin Becker <[EMAIL PROTECTED]> writes: > A client requested that I send MSVCR71.DLL along with the rest of an > application as it wasn't present on his machine. > > That is allowed as > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_c_run.2d.time_libraries.asp

RE: get a list of mounted filesystems under MacOSX

2005-08-15 Thread Tim Golden
[EMAIL PROTECTED] | And when we are at this, how to find out a list of mounted filesystems | under MS Windows? (yes, I know, there is a difference between cygwin | python and native port, and the term "mounted" is not used in | MS Windows | world much) WMI will do it under Win32. (Don't know abou

Determining win32 dll dependency

2005-08-15 Thread Robin Becker
A client requested that I send MSVCR71.DLL along with the rest of an application as it wasn't present on his machine. That is allowed as http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_c_run.2d.time_libraries.asp seems to explicitly allow for this. I would lik

Re: Permutation Generator

2005-08-15 Thread Gerard Flanagan
Talin wrote: > I'm sure I am not the first person to do this, but I wanted to share > this: a generator which returns all permutations of a list: > > def permute( lst ): > if len( lst ) == 1: > yield lst > else: > head = lst[:1] > for x in permute( lst[1:] ): >

Re: SOAP and XMLRPC

2005-08-15 Thread dcrespo
I'm looking for code under VB6 :(... I'm looking everywhere. I hope I get luck. -- http://mail.python.org/mailman/listinfo/python-list

get a list of mounted filesystems under MacOSX

2005-08-15 Thread garabik-news-2005-05
Hi all, I am trying to port my (linux) program to MacOSX, and I need to get a list of mounted filesystems. Under linux, it was easy, I was parsing /etc/mtab (or /proc/mounts), this works also on some other unices. But I have no idea how to do it on MacOSX, apart from calling "mount" as an external

Re: Gotchas in user-space matplotlib install?

2005-08-15 Thread Matt Feinstein
On Mon, 15 Aug 2005 09:02:57 -0500, John Hunter <[EMAIL PROTECTED]> wrote: >> "Matt" == Matt Feinstein <[EMAIL PROTECTED]> writes: > >Matt> All in all, not actually excruciating-- and now I have a >Matt> working version of matplotlib! Matt Feinstein > >Great! While this is all fresh

Re: Library vs Framework (was Dr. Dobb's Python-URL!)

2005-08-15 Thread Simon Brunning
On 8/15/05, Rocco Moretti <[EMAIL PROTECTED]> wrote: > Which lead me to the question - what's the difference between a library > and a framework? If you call its code, it's a library. If it calls yours, it's a framework. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/

Re: Wheel-reinvention with Python

2005-08-15 Thread David E. Konerding DSD staff
In article <[EMAIL PROTECTED]>, Ben Finney wrote: > Brian Victor <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >> > Torsten Bronger wrote: >> >> I've been having a closer look at wxPython which is not Pythonic at >> >> all and bad documented. Probably I'll use it nevertheless. >> > Aye.

Library vs Framework (was Dr. Dobb's Python-URL!)

2005-08-15 Thread Rocco Moretti
Cameron Laird wrote: > Andy Smith rails against "frameworks": > http://an9.org/devdev/why_frameworks_suck?sxip-homesite=&checked=1 > Slapdash Summary: Libraries good, frameworks bad - they are a straightjackets and limit sharing. Which lead me to the question - what's the dif

zlib + Windows 32 service problem (ImportError)

2005-08-15 Thread Laszlo Zsolt Nagy
Sorry, I realized that the import zlib was not executed from my (working) service. So here is the question: why can't I use zlib from a win32 service? Is there any way to make it working? >- >Python could not import the service's module > File "T:\Python\Projects\NamedConnector\Serv

Re: SOAP and XMLRPC

2005-08-15 Thread Robin Becker
Robin Becker wrote: > dcrespo wrote: > >>Hi... Thanks for your answer, but can you give me his contact or tell >>him to post here the answer I'm looking for? I'm needing it seriously. >> > > Well I'm not a VB person so perhaps you need to ask on a VB list. > Unfortunately > the student has vani

Re: __del__ pattern?

2005-08-15 Thread BranoZ
> So when my class is instantiated, I create a little lock file, and I > have a __del__ method that deletes the lock file. Unfortunately, there > seem to be some circumstances where my lock file is not getting > deleted. Maybe the interpreter died by the signal.. in that case the __del__ is not c

Re: SOAP and XMLRPC

2005-08-15 Thread Robin Becker
dcrespo wrote: > Hi... Thanks for your answer, but can you give me his contact or tell > him to post here the answer I'm looking for? I'm needing it seriously. > Well I'm not a VB person so perhaps you need to ask on a VB list. Unfortunately the student has vanished into the real world. -- Robin

Re: SOAP and XMLRPC

2005-08-15 Thread dcrespo
Hi... Thanks for your answer, but can you give me his contact or tell him to post here the answer I'm looking for? I'm needing it seriously. -- http://mail.python.org/mailman/listinfo/python-list

Re: Gotchas in user-space matplotlib install?

2005-08-15 Thread John Hunter
> "Matt" == Matt Feinstein <[EMAIL PROTECTED]> writes: Matt> All in all, not actually excruciating-- and now I have a Matt> working version of matplotlib! Matt Feinstein Great! While this is all fresh in your mind, would you be able to add a wiki entry at http://www.scipy.org/wikis/

Re: SOAP and XMLRPC

2005-08-15 Thread Robin Becker
dcrespo wrote: > Hi to all... > Someone knows if is there possible to have a Python SOAP or XMLRPC > server that works with VB? I would like you to include the examples > clients and server programs. > > My examples are: > .. > > These programs work perfect. The thing is that I need to acces

Re: Gotchas in user-space matplotlib install?

2005-08-15 Thread Matt Feinstein
>If you do a --prefix=~/usr for all 'configure' and 'python setup.py >install' commands, and set your PATH, C_INCLUDE_PATH, >CPLUS_INCLUDE_PATH, LIBRARY_PATH, and LD_LIBRARY_PATH variables >accordingly, and set the MATPLOTLIBDATA environment variable to point >to ~/usr/share/matplotlib, it should

__del__ pattern?

2005-08-15 Thread Chris Curvey
I need to ensure that there is only one instance of my python class on my machine at a given time. (Not within an interpreter -- that would just be a singleton -- but on the machine.) These instances are created and destroyed, but there can be only one at a time. So when my class is instantiated

Re: tuple assign variables

2005-08-15 Thread dimitri pater
hi, I'm fond of Greg Stein's dtuple module[1]. I've never used it withMySQL, so YMMV, but using it might look something like: thanks for pointing that out, works like a breeze        self.cursor.execute( "SELECT * FROM customer WHERE name ='sarah'")        descriptor = dtuple.TupleDescriptor(sel

SOAP and XMLRPC

2005-08-15 Thread dcrespo
Hi to all... Someone knows if is there possible to have a Python SOAP or XMLRPC server that works with VB? I would like you to include the examples clients and server programs. My examples are: #Server.py import SOAPpy def sum(x,y): return x+y server = SOAPpy.SOAPServer(("localhost", 8080))

Re: help with mysql cursor.execute()

2005-08-15 Thread William Gill
Steve Holden wrote: > William Gill wrote: > >> I have been testing and it seems that: >> >> 1- Cursor.execute does not like '?' as a placeholder in sql >> > The particular format required by each DBI-compatible module should be > available as the module's "paramstyle" variable. mxODBC, for exam

Re: Wheel-reinvention with Python

2005-08-15 Thread Ben Finney
Brian Victor <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Torsten Bronger wrote: > >> I've been having a closer look at wxPython which is not Pythonic at > >> all and bad documented. Probably I'll use it nevertheless. > > Aye. Couldn't agree more. > > You know, whenever someone ment

Re: sniffer in python

2005-08-15 Thread billiejoex
Thank you for your fast reply. You're right. I'll be more specific, sorry. The example source is the one you can find on the 'Impacket' page on the same site of pcapy: http://oss.coresecurity.com/impacket/sniff.py I use a Win XP prof sp2 system, python ver. 2.4.1. Here's the output: C:\Python24>1

Re: Wheel-reinvention with Python

2005-08-15 Thread Brian Victor
[EMAIL PROTECTED] wrote: > Torsten Bronger wrote: >> I've been having a closer look at wxPython which is not Pythonic at >> all and bad documented. Probably I'll use it nevertheless. > Aye. Couldn't agree more. You know, whenever someone mentions wxPython being badly documented, I have to wonder

Windows 32 service problem (ImportError)

2005-08-15 Thread Laszlo Zsolt Nagy
Hi All! I have a running service (a small web server) implemented in python, running as a win32 service. I wrote another program that is very similar to the web server but I cannot start the service. From the event log, I can read this traceback: - Python could not import the se

Re: How can I exclude a word by using re?

2005-08-15 Thread John Machin
could ildg wrote: > In re, the punctuation "^" can exclude a single character, but I want > to exclude a whole word now. for example I have a string "hi, how are > you. hello", I want to extract all the part before the world "hello", > I can't use ".*[^hello]" because "^" only exclude single char "

Re: sniffer in python

2005-08-15 Thread Peter Hansen
billiejoex wrote: > For python exist a porting called pcapy: > http://oss.coresecurity.com/projects/pcapy.html > ...that I'd like to use BUT... all the examples reported on the sites don't > works!! It usually helps to describe *in what way* things don't work. Do they crash? If so, provide the

Re: How can I exclude a word by using re?

2005-08-15 Thread John Machin
Bruno Desthuilliers wrote: > could ildg a écrit : > >> Thank you. >> But what should I do if there are more than one hello and I only want >> to extract what's before the first "hello". > > > Read The Fine Manual ?-) > > >> For example, the raw >> string is "hi, how are you? hello I'm fine, t

Re: Permutation Generator

2005-08-15 Thread Tom Anderson
On Mon, 15 Aug 2005, Matt Hammond wrote: > Just satisfied my curiosity wrt this problem, so I might as well share :-) > def permute(list): How about: def permutation(l, i): "Makes the ith permutation of the sequence l." # leave out the reverses if you don't care about the or

Re: cgi form validation problems

2005-08-15 Thread Steve Holden
googleboy wrote: > Hi. > > I am writing up my own web form. I'm a bit of a newb, and read up many > different how-tos and examples and documentaion. I finally had it > working just great until I decided that I wanted to add some extra > logic because there's one form that submits a particular typ

Re: tuple assign variables

2005-08-15 Thread Simon Brunning
On 8/13/05, dimitri pater <[EMAIL PROTECTED]> wrote: > selecting a record from a MySQL database results in a tuple like this: > (('Evelyn', 'Dog', 'No'),) > I want to assign every item of that tuple to a variable using this code > (deep_list is taken from the Python Cookbook): > > def deep_li

Re: help with mysql cursor.execute()

2005-08-15 Thread Steve Holden
William Gill wrote: > I have been testing and it seems that: > > 1- Cursor.execute does not like '?' as a placeholder in sql > The particular format required by each DBI-compatible module should be available as the module's "paramstyle" variable. mxODBC, for example, uses the "qmark" style, but

Invoking GUI for app running in background with a keypress

2005-08-15 Thread Mathias Dahl
I am creating a small app called PyQe (http://klibb.com/cgi-bin/wiki.pl/PyQe) to launch commands and programs quickly. I works more or less as I want it now and I have managed to make my window manager (Metacity) under Mandrake GNU/Linux start my program so that it can be started easily with just a

sniffer in python

2005-08-15 Thread billiejoex
Hi! I made a little, simple program that sends strings over an ICMP packet. The source here: http://billiejoex.altervista.org/a1.txt Now all I need is create a simple network sniffer able to sniff the ICMP packets and print the strings on the screen. A useful library known in a lot of other prog

Re: client server question

2005-08-15 Thread Robert Wierschke
John schrieb: > I have a simple script that runs a server where one client can connect. > I would like to make it so that many clients can connect to one server > on the same port. Where can I find how to do this? > > Thanks, > --j > use sockets. the socket accept mehtoh returns a new socket (

  1   2   >