Re: spaces at ends of filenames or directory names on Win32

2006-02-24 Thread Tim Roberts
rtilley <[EMAIL PROTECTED]> wrote: > >For example... tell windows to move a file named ' XXX ' (one space >before and one space after the filename). Windows will complain that >file 'XXX' does not exist. It's correct of course, 'XXX' does not exist, >but ' XXX ' does indeed exist. Are you sure

Modifying body of select message in a 'mbox' file.

2006-02-24 Thread Michael March
I am been playing with the 'email' and 'mailbox' modules trying to read in an email at a time from an mbox file, add something to the body of a message and then write that change back out in 'mbox' format again. Is there any code floating around out there that allows you to take a message from 'ma

Re: Optimize flag question

2006-02-24 Thread Steve Holden
Olivier Langlois wrote: > Hi, > > > > This is my first post on the list. I played with the –O flag option and > I found the hard way that it was breaking the scripts I am using because > they rely on the assert statement that the optimize flag remove. From > there, I tried to find more infor

Re: python-list/python-dev quoting style

2006-02-24 Thread Michael Hoffman
[me] Does anyone have a script to convert more conventional USENET quoting style... to the commonly used python-dev/python-list style... [me] >>I think this style is *much* clearer and cleaner. It does require a >>lot more hand editing though, although this encourages more judicious >>quo

Re: Trolling for New Web Host . . .

2006-02-24 Thread Steve Holden
Ben Wilson wrote: > I've had the same web host (imhosted.com) for the past three years, and > have had decent service. However, I'm also trying to learn Python the > hard way--by doing. So, I figured I'd write a few Python CGIs > (non-Zope). Unfortunately, my web host does not have mod_python. They

Re: python-list/python-dev quoting style

2006-02-24 Thread Aahz
In article <[EMAIL PROTECTED]>, Michael Hoffman <[EMAIL PROTECTED]> wrote: >[me] >>>Does anyone have a script to convert more conventional USENET quoting >>>style... to the commonly used python-dev/python-list style... > >[Aahz] >> Blech. Stick with the standard Usenet quoting style for both! >

Re: mimicing pg 398 of practical python

2006-02-24 Thread MARK LEEDS
i should have mentioned that i am on linux and using python 2.4. my apologies.   - Original Message - From: MARK LEEDS To: python-list@python.org Sent: Friday, February 24, 2006 10:00 PM Subject: mimicing pg 398 of practical python I am trying to duplicate

mimicing pg 398 of practical python

2006-02-24 Thread MARK LEEDS
I am trying to duplicate the sunspots graph on page 398 of Practical Python. I don''t have those reportlab modules so i downloaded them from their website  and tried to put them somewhere ( not clear where i should  put them ) and then i added that place to my sys.path by doig sys.path.append

Re: webmail-SquirrelMail Fetcher In Python

2006-02-24 Thread Paul Rubin
<[EMAIL PROTECTED]> writes: > I wish I could do that; however our IT department is ... Zelis ... About > security; it's a school district, so lots of confidential data, etc, etc > (their reason). > Oh well, I'll look for an imap server on the network if I can, but I doubt > I'll find it normally. >

webmail-SquirrelMail Fetcher In Python

2006-02-24 Thread brandon.mcginty
Thanks for your help. I wish I could do that; however our IT department is ... Zelis ... About security; it's a school district, so lots of confidential data, etc, etc (their reason). Oh well, I'll look for an imap server on the network if I can, but I doubt I'll find it normally. If anyone else ha

Re: list assignment using concatenation "*"

2006-02-24 Thread Steve R. Hastings
I suggest you should build your list using a list comprehension: >>>a = [[0]*3 for i in range(3)] >>>a [[0, 0, 0], [0, 0, 0], [0, 0, 0]] >>>a[0][1] = 1 [[0, 1, 0], [0, 0, 0], [0, 0, 0]] -- Steve R. Hastings"Vita est" [EMAIL PROTECTED]http://www.blarg.net/~steveha -- http://mail.python.

Re: PyGTK + Glade = weird problem

2006-02-24 Thread sapo
Anyway, now i tried in my glade app and i m getting this error when i try to show the window: GtkWarning: gtk_paint_flat_box: assertion `style->depth == gdk_drawable_get_depth (window)' failed here is the code: class main: def __init__(self): self.principal = gtk.glade.XML("scc.glade

Re: PyGTK + Glade = weird problem

2006-02-24 Thread sapo
Man, you saved my day. I spent all day writing and rewriting stuff, i asked several times on the #python channel on irc.freenode.org, asked in the ubuntuforums, asked all people i know that uses python.. and nobody solved it. And it was a very simple and stupid thing! thanx a lot it worked perfe

Re: PyGTK + Glade = weird problem

2006-02-24 Thread gsteff
Sorry about that. Your problem is that the show_hide_janela method is setup to be called both on a gtk signal ("destroy") and an event("delete_event"). Callback methods for events take a slightly different signature than signals; they take one extra argument, which represents the triggering even

Re: A C-like if statement

2006-02-24 Thread Kay Schluehr
Paul Rubin wrote: > "Kay Schluehr" <[EMAIL PROTECTED]> writes: > > Hmm. A statement has side-effects but it returns no value. And yes, you > > can create a name within an expression producing a value in Python, > > using a list/generator comprehension. The solution to Bob's problem > > would look

Re: PyGTK + Glade = weird problem

2006-02-24 Thread gsteff
Oops- I didn't read your question carefully enough. That's probably not the problem. Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: PyGTK + Glade = weird problem

2006-02-24 Thread gsteff
We'd need to see your "scc.glade" file to be sure, but basically, calling the "show" method on the "w_cadcli" object only shows it, not the objects it contains. Again, to be clear, showing a container object doesn't automatically show the objects it contains. In glade, use the "common" tab of the

unicode question

2006-02-24 Thread Edward Loper
I would like to convert an 8-bit string (i.e., a str) into unicode, treating chars \x00-\x7f as ascii, and converting any chars \x80-xff into a backslashed escape sequences. I.e., I want something like this: >>> decode_with_backslashreplace('abc \xff\xe8 def') u'abc \\xff\\xe8 def' The best I c

Re: webmail-SquirrelMail Fetcher In Python

2006-02-24 Thread Paul Rubin
<[EMAIL PROTECTED]> writes: > I've been looking on the net for a program to gather e-mails from the > squirrelmail interface, and haven't found any. > My office only allows me to get e-mail access via webmail, at least > when I'm outside of the corperate network. Squirrelmail is an IMAP client so

Re: why don't many test frameworks support file-output?

2006-02-24 Thread kanchy kang
one question for you: have anyone teach you how to listen to other's idea before? this mail-list is only for exchanging idea, and aslo i provided my suggestion or "practice" or idea for test framework. if what i said is wrong, you can point it out as you like. did i order anybody, or you? you

webmail-SquirrelMail Fetcher In Python

2006-02-24 Thread brandon.mcginty
Hi all, I've been looking on the net for a program to gather e-mails from the squirrelmail interface, and haven't found any. My office only allows me to get e-mail access via webmail, at least when I'm outside of the corperate network. I'm wondering if anyone's found something like the screen-scrap

Re: Pure python implementation of string-like class

2006-02-24 Thread bearophileHUGS
Maybe you can create your class using an array of 'L' with the array standard module. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: list assignment using concatenation "*"

2006-02-24 Thread Steve R. Hastings
> if I do: > > a = [ [0] * 3 ] * 3 > a[0][1] = 1 > > I get > > a = [[0,1,0],[0,1,0],[0,1,0]] The language reference calls '*' the "repetition" operator. It's not making copies of what it repeats, it is repeating it. Consider the following code: >>> a = [] >>> b = [] >>> a == b True >>> a is

list assignment using concatenation "*"

2006-02-24 Thread liquid
If I do: a = [ [0,0,0], [0,0,0], [0,0,0] ] a[0][1] = 1 I get: a = [ [0,1,0],[0,0,0],[0,0,0] ] as expected But if I do: a = [ [0] * 3 ] * 3 a[0][1] = 1 I get a = [[0,1,0],[0,1,0],[0,1,0]] AFAIC, "*" is supposed to generate multiple copies of the given token. Therefore I thought both cases w

Re: Playing with modules

2006-02-24 Thread jjcassidy
> You're going to have to create the home.base module somewhere. If you > want to put in that some code that basically imports another module's > namespace into the home.base module's namespace, then that may do what > you want. Thanks, Jonathon, but I think I've tried what you are saying. I've tr

PyGTK + Glade = weird problem

2006-02-24 Thread sapo
Hi all, i ve started learning pygtk with glade, i m just making some test stuff. but i got some problems with simple things. I designed 2 windows on glade, then exported it and loaded in the python script, the second window is hidden by default, then i wrote a function to show it up, ok it shows,

Pure python implementation of string-like class

2006-02-24 Thread Akihiro KAYAMA
Hi all. I would like to ask how I can implement string-like class using tuple or list. Does anyone know about some example codes of pure python implementation of string-like class? Because I am trying to use Python for a text processing which is composed of a large character set. As the characte

Re: Playing with modules

2006-02-24 Thread Jonathan Gardner
You're going to have to create the home.base module somewhere. If you want to put in that some code that basically imports another module's namespace into the home.base module's namespace, then that may do what you want. -- http://mail.python.org/mailman/listinfo/python-list

Re: python-list/python-dev quoting style

2006-02-24 Thread Michael Hoffman
[me] >>Does anyone have a script to convert more conventional USENET quoting >>style... to the commonly used python-dev/python-list style... [Aahz] > Blech. Stick with the standard Usenet quoting style for both! I think this style is *much* clearer and cleaner. It does require a lot more hand

Re: Module written in C does not repond to Ctrl-C interruption.

2006-02-24 Thread Bo Peng
Daniel Dittmar wrote: > > You could set up your own signal handler when entering the C extension. > This should abort the extension (tricky) and call the Python signal > handler. This can be done under linux using things in signal.h but I am not sure whether or not there is a portable way to do

Re: Best python module for Oracle, but portable to other RDBMSes

2006-02-24 Thread Jonathan Gardner
On database portability... While it is noble to try to have a generic interface to these libraries, the end result is that the databases are always different enough that the interface just has to work differently. My experience in going from one database to another is that you should revisit your

Re: How to move optparse from main to function?

2006-02-24 Thread Jason Drew
You're welcome! As usual, each of us is free to write the code whichever way works best for the particular problem at hand. That's why the module documentation often avoids advocating here-is-the-one-best-way-to-do-it. I just like sticking all the option setup stuff in a single function because i

Re: Regular expression fun. Repeated matching of a group Q

2006-02-24 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Hi all, > > I've spent all morning trying to work this one out: > > I've got the following string: > > 04/01/2006Wednesday 09:1412:4412:5017:5808:14 > > from which I'm attempting to extract the date, and the five times from > into a list. Only the very last time i

Optimize flag question

2006-02-24 Thread Olivier Langlois
Hi,   This is my first post on the list. I played with the –O flag option and I found the hard way that it was breaking the scripts I am using because they rely on the assert statement that the optimize flag remove. From there, I tried to find more information on the effect that this flag

Re: Multiple versions of Python / PythonWin on the same machine?

2006-02-24 Thread Fuzzyman
[EMAIL PROTECTED] wrote: > I have Python 2.1 / PythonWin 2.1 installed on my machine because I > need it for use with ESRI's ArcGIS Desktop software, but I want to play > with a more recent version of Python. > > Is it safe to install more than one version of Python / PythonWin on > the same machi

Re: Is Forth for real?

2006-02-24 Thread rickman
[EMAIL PROTECTED] wrote: > rickman wrote: > > The original post seems to be missing, but my answer to the title > > question is, No, Forth is not real. > > Not for real, for Integer. :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple versions of Python / PythonWin on the same machine?

2006-02-24 Thread Olivier
[EMAIL PROTECTED] a écrit : > > Is it safe to install more than one version of Python / PythonWin on > the same machine? Sure, it is, just specify a different path for the installer. You'll probably want to create two scripts python21.bat and python24.bat and put them in your path to launch the

Problem solved: Re: time.sleep(1) sometimes runs for 200 seconds under windows

2006-02-24 Thread Paul Probert
Thanks everyone for your help. It was the "Abouttime.exe" program, a time synch utility. To get the problem, you have to run it as a service, and possibly it has to have trouble connecting to its time servers. It would cause time.sleep(1) to sometimes block for 200 seconds. Not "about" 200 se

Re: Best python module for Oracle, but portable to other RDBMSes

2006-02-24 Thread Olivier
[EMAIL PROTECTED] a écrit : > I'm a little confused about what's out there for database modules at: > > http://python.org/topics/database/modules.html > > What I'd like to do is use Python to access an Oracle 9.X database for > exporting a series of tables into one aggregated table as a text fi

Re: "Temporary" Variable

2006-02-24 Thread darthbob88
Reply to all: I realize that naming a variable "spam" is not entirely kosherized. It was originally named secret, but I renamed it in a fit of whimsy. The language is named after Monty Python's Flying Circus, is it not? Remember the Spam Sketch. http://en.wikipedia.org/wiki/Spam_sketch I thank you

Multiple versions of Python / PythonWin on the same machine?

2006-02-24 Thread dananrg
I have Python 2.1 / PythonWin 2.1 installed on my machine because I need it for use with ESRI's ArcGIS Desktop software, but I want to play with a more recent version of Python. Is it safe to install more than one version of Python / PythonWin on the same machine? I don't want the latest release t

Best python module for Oracle, but portable to other RDBMSes

2006-02-24 Thread dananrg
I'm a little confused about what's out there for database modules at: http://python.org/topics/database/modules.html What I'd like to do is use Python to access an Oracle 9.X database for exporting a series of tables into one aggregated table as a text file, for import into a mainframe database

PyWeek Python Game Programming Challenge, The Second!

2006-02-24 Thread richard
The date for the second PyWeek challenge has been set: Sunday 26th March to Sunday 2nd April (00:00UTC to 00:00UTC). The PyWeek challenge invites entrants to write a game in one week from scratch either as an individual or in a team. Entries must be developed in Python, during the challenge, and

Re: Encryption

2006-02-24 Thread dirvine
perfect thanks a lot and I can be cross platform too. cool -- http://mail.python.org/mailman/listinfo/python-list

Re: A C-like if statement

2006-02-24 Thread Paul Rubin
"Kay Schluehr" <[EMAIL PROTECTED]> writes: > Hmm. A statement has side-effects but it returns no value. And yes, you > can create a name within an expression producing a value in Python, > using a list/generator comprehension. The solution to Bob's problem > would look like this: > > if (I for I i

Re: time.sleep(1) sometimes runs for 200 seconds under windows

2006-02-24 Thread Bryan Olson
Paul Probert wrote: [...] > Its happening roughly 4 times a day total on our 20 machines, ie about > once every 5 days on a given machine. Do they all have similar anti-virus programs? Some of those can freeze out other tasks from time to time. Just one more candidate. -- --Bryan -- http://ma

Reading from socket file handle took too long

2006-02-24 Thread Etienne Desautels
Hi, I'm working on project where I need to grab video from an Axis IP camera. This camera send a stream of a multipart message on HTTP. I write this code (at the bottom of the message) to read and uncompress each jpeg images. I call nextFrame() 24 times per seconds (or every 0,0416 sec.)

Re: Regular expression fun. Repeated matching of a group Q

2006-02-24 Thread plahey
Doesn't this do what you want? import re DATE_TIME_RE = re.compile(r'((\d{2}\/\d{2}\/\d{4})|(\d{2}:\d{2}))<\/td>') test = '04/01/2006' \ 'Wednesday' \ ' ' \ '09:14' \ '12:44' \ '12:50' \ '17:58' \ ' ' \ ' '

unsubscribe

2006-02-24 Thread Mandy Owens
Can you please unsubscribe me from this list? Thank you, Mandy Owens JNetDirect (703) 880-3842 www.jnetdirect.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Holden Sent: Friday, February 24, 2006 4:16 PM To: python-list@python.org Subject:

Re: a little more help with python server-side scripting

2006-02-24 Thread John Salerno
Paul Boddie wrote: > To sum up: > > 1. Copy the three line "CGI with Python" example, save it as > yourfile.py, upload it, test it. If it works, celebrate and move > on to step 2. If it doesn't, move on to step 2 anyway. ;-) > > 2. Copy the Web page example from the Microsoft link, sav

PyCon blog

2006-02-24 Thread Steve Holden
Relaxing in the complete absence of any responsibility for the organization, I am for the first time trying to record impressions of each of the PyCon sessions I attend in my blog. http://holdenweb.blogspot.com/ Any reactions will be received with interest. regards Steve -- Steve Holden

Re: remote module importing (urlimport)

2006-02-24 Thread Jure Vrscaj
ajones wrote: >What plans do you have for security in this? I would think that in >order to trust this over the network you would at least need a >certificate identifying the server as well as some method of verifying >package contents. > >Either way, cool stuff. > > > I'm currently fighting wit

Re: Regular expression fun. Repeated matching of a group Q

2006-02-24 Thread Paul McGuire
Here's a (surprise!) pyparsing solution. -- Paul (Get pyparsing at http://pyparsing.sourceforge.net.) data = [ """04/01/2006Wednesday 09:1412:4412:5017:5808:14""", """03/01/2006TuesdayAnnual_Holiday08:00""" ] from pyparsing import * startTD,endTD = makeHTMLTags("TD") startTD = start

Re: execfile error exception line number?

2006-02-24 Thread André
Brian Blais wrote: > Hello, > > I'd like to do the following: > > import sys > try: > execfile("somefile.py") > except: > s=sys.exc_info() > print "Error '%s' happened on line %d" % (s[1],s[2].tb_lineno) > How about this: === input: try: execfile("somefile.py") except Ex

Quality Labs release PDbSeed - Database-driven testing in Python

2006-02-24 Thread Mandy Owens
 Exciting new announcement in the Python community!  Read more information about PDbSeed and Quality Labs @ www.qualitylabs.org/pdbseed/Quality Labs, an open-source repository that hosts projects which address software quality, just released PDbSeed, a database seeding and verification tool

Re: Using ElementTree to tidy up an XML string to my liking

2006-02-24 Thread Heikki Toivonen
[EMAIL PROTECTED] wrote: > Yes I am but, I'm using a DOM Serializer in Firefox which for some > reason turns myCamelNames into MYCAMELNAMES for the nodenames. I'll > therefore need to control the case-spelling of these things as I'm > formatting the XML string. I am almost certain there is somethi

Re: ls files --> list packer

2006-02-24 Thread kpp9c
that is nice but the little further wrinkle, which i have no idea how to do, would be to have the contents of each directory packed into a different list since you have no idea before hand how many lists you will need (how many subdirs you will enounter) ... well that is where the hairy pa

Re: a little more help with python server-side scripting

2006-02-24 Thread Paul Boddie
John Salerno wrote: > > Well, I appreciate the help. I'm trying to figure it out, but it seems > like with each new post, there is some new technology being mentioned or > new method to do what I'm trying to do. Let's just consolidate what we've learned here. Your provider says that you can serve

Re: What are COM-enabled applications?

2006-02-24 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Duncan Booth <[EMAIL PROTECTED]> wrote: >Cameron Laird wrote: > >> Python has good COM abilities. While, to my surprise, I just >> realized that I'm unaware of anyone having put together a COM >> "explorer" with Python, it would be a straightforward project. > >Don

Re: PyQt - multiple window instances?

2006-02-24 Thread gregarican
Diez B. Roggisch wrote: > > The window isn't being created as a new class instance or anything. > > > Yes it is. QWidget() creates a new instance of QWidget. > > > The > > > > > main class is the application main window as a whole and this > > particular window is just part of that class. I have

Trolling for New Web Host . . .

2006-02-24 Thread Ben Wilson
I've had the same web host (imhosted.com) for the past three years, and have had decent service. However, I'm also trying to learn Python the hard way--by doing. So, I figured I'd write a few Python CGIs (non-Zope). Unfortunately, my web host does not have mod_python. They only way I can run a pyth

Re: Exception not raised

2006-02-24 Thread Diez B. Roggisch
> This code are inside a method into class that have no try/except. And > called from a method inside a wx.Frame derivate. The other strange thing > is that if I try the same code just before the "caller" to that method, > it raise an exception: So maybe the C-layer of wx in-between doesn't pro

Re: Is python very slow compared to C

2006-02-24 Thread igouy
Magnus Lycka wrote: > Isaac Gouy wrote: > >>I think it is wrong to call Python "very slow" just because it is slower > >>than some other language or languages, for the same reason it would be > >>wrong to describe the population of the UK as "very low" because 60 > >>million people is a smaller nu

Re: PyQt - multiple window instances?

2006-02-24 Thread Diez B. Roggisch
gregarican schrieb: > The window isn't being created as a new class instance or anything. Yes it is. QWidget() creates a new instance of QWidget. > The > main class is the application main window as a whole and this > particular window is just part of that class. I have typed data into > the win

Re: editor for Python on Linux

2006-02-24 Thread Ben Wilson
You know, I have that for Perl, but seem never to have set up folding for Python. I must remedy this tonight. Ben -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQLdb slow on MySQL 5

2006-02-24 Thread Jarek Zgoda
Magnus Lycka napisał(a): > For those who don't know, Oracle bought a small Finnish > company which developed the transaction-aware table- > backend for MySQL. As far as I understand, this means > nothing for GPL licensed MySQL installations, but if > MySQL sells commercial MySQL-database with tran

Python/Spyce outputting

2006-02-24 Thread Kenny
I am accessing a database through python and displaying it through the web using spyce. My goal is to get a table on my webpage that displays the queries that I am doing but in a table format that looks good rather than the raw text output. Is there a reference out there that can help me do that?

Re: PyQt - multiple window instances?

2006-02-24 Thread gregarican
The window isn't being created as a new class instance or anything. The main class is the application main window as a whole and this particular window is just part of that class. I have typed data into the window, then tried to open up a new window. But when I do the window where I have typed data

Re: A C-like if statement

2006-02-24 Thread Kay Schluehr
Roy Smith wrote: > Bob Greschke <[EMAIL PROTECTED]> wrote: > >I miss being able to do something like this in Python > > > >1f (I = a.find("3")) != -1: > >print "It's here: ", I > >else: > >print "No 3's here" > > > >where I gets assigned the index returned by find() AND the if statement ge

Re: PyQt - multiple window instances?

2006-02-24 Thread Diez B. Roggisch
gregarican schrieb: > I have an PyQt app were I need one of the windows to be able to be > opened more than one at a time. When I try to open it I only get one > instance at the same time. The main class is the QWidget() class with a > QGridLayout() displaying the various window components. > > Is

PyQt - multiple window instances?

2006-02-24 Thread gregarican
I have an PyQt app were I need one of the windows to be able to be opened more than one at a time. When I try to open it I only get one instance at the same time. The main class is the QWidget() class with a QGridLayout() displaying the various window components. Is there a certain flag I need to

Playing with modules

2006-02-24 Thread jjcassidy
I know that this is not particularly "pythonic", but I would like to mess with modules a bit. I would like to develop a modular module which allows different services to plug themselves into the module and become the implementation for a named module. Say I have a suite of "cassidy.blah.blah.blah

Re: How to send an email with non-ascii characters in Python

2006-02-24 Thread Sybren Stuvel
Lad enlightened us with: > and can give me an example of Python code that can send such > email?? Not really, but I'm sure this will help you. In fact, my last name has an umlaut on the 'u'. This is the From header in my emails, encoded in Latin-1: From: Sybren =?iso-8859-1?Q?St=FCvel?= <[EMAIL

Re: MySQLdb slow on MySQL 5

2006-02-24 Thread Magnus Lycka
Gerhard Häring wrote: >> Oh well, Oracle will probably kill MySQL soon. > > Did you read too much Slashdot to spread such FUD? :) I guess I should have used half a smiley, since I was only half serious. Buying InnoBase OY was...an interesting move. Cheap too! It's a while since I visited /. For

ReadEventLog doesn't return, CPU usage increases

2006-02-24 Thread Jeff Quandt
Title: ReadEventLog doesn't return, CPU usage increases This is running Python 2.3 on windows 2003/windows xp. I have written a script to display and filter the Win32 event log in a scrolling list to the command line (it also does some summary tasks).  It uses the win32evtlog.ReadEventLog t

Re: Exception not raised

2006-02-24 Thread Michele Petrazzo
Michele Petrazzo wrote: > Michele Petrazzo wrote: >> Hi list, I have a strange error on my software on win 2k/xp and >> debian 3.1 with py 2.3.5 / 2.4.1 + twisted + wxpython: > Opss, I forgot some words :) > Just for give evidence to my _failed_ tests, my a debugger (eric3), it with a debugger

Re: time.sleep(1) sometimes runs for 200 seconds under windows

2006-02-24 Thread Roel Schroeven
Dennis Lee Bieber schreef: > On Fri, 24 Feb 2006 08:44:49 -0600, Paul Probert <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> This is now our leading suspect. All the affected machines have >> "abouttime.exe" running as a service, something our sysadmin put in a >> few ye

Re: Exception not raised

2006-02-24 Thread Michele Petrazzo
Michele Petrazzo wrote: > Hi list, I have a strange error on my software on win 2k/xp and > debian 3.1 with py 2.3.5 / 2.4.1 + twisted + wxpython: Just for give evidence to my _failed_ tests, my a debugger (eric3), it see the exception, so it break with a KeyError! And the same code, no! Thanks,

Re: KPanelApplet using Python

2006-02-24 Thread Varun Hiremath
On Fri, 24 Feb, 2006 at 09:55:59AM -0800, David Boddie wrote: > Varun Hiremath wrote: > > > I was wondering if there is any way to make KDE PanelApplets > > using Python. I have made a small window using Qt, kdeui nad > > kdecore libs. Now I want to add it to the KDE kicker. Can I > > get any help

Re: a little more help with python server-side scripting

2006-02-24 Thread John Salerno
Magnus Lycka wrote: > Listen John. This will be the last time I respond > to this thread, since you just ask more and more > instead of digesting all the information you are > given. Why should we spend time on answers if you > don't read them properly anyway. Well, I appreciate the help. I'm try

Re: python-list/python-dev quoting style

2006-02-24 Thread Aahz
In article <[EMAIL PROTECTED]>, Michael Hoffman <[EMAIL PROTECTED]> wrote: >Does anyone have a script to convert more conventional USENET quoting >style like this: > >John wrote: >> Jacob Jingleheimer Schmidt <[EMAIL PROTECTED]> wrote in message-id > on 29 February 2004: >>> Lambda is the best P

Re: [ANN] httpy 0.9.0 -- a sane and robust HTTP library for Python

2006-02-24 Thread Claudio Grondi
Rene Pijlman wrote: > Chad Whitacre: > >>I am pleased to announce the first public release of httpy -- a sane and >>robust HTTP library for Python. With httpy, you write "responders," and >>put them on the network with "couplers." Here is a trivial responder: >> >> import httpy >> >> class Res

Re: datetime iso8601 string input

2006-02-24 Thread Magnus Lycka
Rubic wrote: > Yeah, it's a trivial function that's rewritten for each new project > that passes datetime objects as strings <0.2 wink>. On the basis of it > being a trivial convenience, I could propose removing hundreds of > "redundant" functions from the library. ;-) I think the big issue is t

Re: Using ElementTree to tidy up an XML string to my liking

2006-02-24 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: > Yes I am but, I'm using a DOM Serializer in Firefox which for some > reason turns myCamelNames into MYCAMELNAMES for the nodenames. I'll > therefore need to control the case-spelling of these things as I'm > formatting the XML string. I realize that it's difficult to mak

Re: editor for Python on Linux

2006-02-24 Thread Robert Boyd
On 2/19/06, Mladen Adamovic <[EMAIL PROTECTED]> wrote: > Hi! > > I wonder which editor or IDE you can recommend me for writing Python > programs. I tried with jEdit but it isn't perfect. > I know you said in the thread that you had problems with jEdit for Python, and didn't care for Emacs or Vi(m)

Re: KPanelApplet using Python

2006-02-24 Thread Varun Hiremath
On Fri, 24 Feb, 2006 at 05:51:55AM -0800, [EMAIL PROTECTED] wrote: I want to make a PanelApplet and not a systray application. I tried KSystemTray and it works flawlessly but I want to add a widget to the taskbar like knews or kweather. I am trying to use the pyKDE's KPanelApplet class but I don'

Re: KPanelApplet using Python

2006-02-24 Thread David Boddie
Varun Hiremath wrote: > I was wondering if there is any way to make KDE PanelApplets > using Python. I have made a small window using Qt, kdeui nad > kdecore libs. Now I want to add it to the KDE kicker. Can I > get any help regarding this matter. The other responses in this thread have covered s

Re: Module written in C does not repond to Ctrl-C interruption.

2006-02-24 Thread Daniel Dittmar
Diez B. Roggisch wrote: > """ > Although Python signal handlers are called asynchronously as far as the > Python user is concerned, they can only occur between the ``atomic'' > instructions of the Python interpreter. This means that signals arriving > during long calculations implemented purely in

Re: Exception not raised

2006-02-24 Thread Michele Petrazzo
Diez B. Roggisch wrote: > Not here: > > t_fields = {} > #code > def test(): > print type(t_fields), 11 in t_fields > print t_fields[11] > print "I'm here" > > print "ok" > test() > print "ok" > #end code > > Gives me > > KeyError: 11 Also on my environ when I try this 4 line code. My pr

Re: Tkinter canvas size determination

2006-02-24 Thread Dean Allen Provins
Martin: Martin Franklin wrote: > Dean Allen Provins wrote: > >> Cameron: >> >> Cameron Laird wrote: >> >>> In article <[EMAIL PROTECTED]>, >>> Dean Allen Provins <[EMAIL PROTECTED]> wrote: >>> I need to determine the size of a canvas while the process is running. Does anyone know of a

Re: Exception not raised

2006-02-24 Thread Larry Bates
Michele Petrazzo wrote: > Hi list, I have a strange error on my software on win 2k/xp and debian > 3.1 with py 2.3.5 / 2.4.1 + twisted + wxpython: > > python, on a piece of code doesn't raise a KeyError on a dict (that > don't have that key), but the strange thing is that the try/except code > see

Re: Exception not raised

2006-02-24 Thread Diez B. Roggisch
Michele Petrazzo wrote: > Simple example extract from my code: > > #code > def test(): > print type(t_fields), 11 in t_fields > print t_fields[11] > print "I'm here" > > print "ok" > test() > print "ok" > #end code > > Output: > > ok > False > > Here I see only one "ok" and not the "I'm here

Re: remote module importing (urlimport)

2006-02-24 Thread ajones
What plans do you have for security in this? I would think that in order to trust this over the network you would at least need a certificate identifying the server as well as some method of verifying package contents. Either way, cool stuff. -- http://mail.python.org/mailman/listinfo/python-lis

Exception not raised

2006-02-24 Thread Michele Petrazzo
Hi list, I have a strange error on my software on win 2k/xp and debian 3.1 with py 2.3.5 / 2.4.1 + twisted + wxpython: python, on a piece of code doesn't raise a KeyError on a dict (that don't have that key), but the strange thing is that the try/except code see that exception. Other strange thing

Re: Regular expression fun. Repeated matching of a group Q

2006-02-24 Thread matteosartori
Yes, it's easier to read without a doubt. I just wondered if i was failing to do what i was trying to do because it couldn't be done or because i hadn't properly understood what i was doing. Alas, it was probably the latter. Thanks for your help, M@ -- http://mail.python.org/mailman/listinfo/py

Re: a little more help with python server-side scripting

2006-02-24 Thread Magnus Lycka
John Salerno wrote: > But isn't this code: > > Response.Write('Python Test') > Response.write('Smaller heading') > > written using ASP instead of Python? Listen John. This will be the last time I respond to this thread, since you just ask more and more instead of digesting all the information yo

Re: regular expresson for Unix and Dos Lineendings wanted

2006-02-24 Thread Franz Steinh�usler
On Fri, 24 Feb 2006 07:21:04 -0500, John Zenger <[EMAIL PROTECTED]> wrote: >Franz Steinhaeusler wrote: >> >> Thank you all for the replies. >> But I still don't have a solution. >> >> Of course with more lines it is possible, >> but it would be fine to have a "oneliner". > >re.sub(r"\s+[\n\r]+"

Re: Unintended inheritance

2006-02-24 Thread Kay Schluehr
Alex Martelli wrote: > Kay Schluehr <[EMAIL PROTECTED]> wrote: >... > > To prevent unintended inheritance C# introduced a relatively complex > > contract semantics using three modifiers virtual, override and new. Is > > this issue serious for Python programmers, in particular for those > > wor

Re: editor for Python on Linux

2006-02-24 Thread Lee Phillips
The indentation-based folding in vim makes it great for python; other folding editors might be almost as good. -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular expression fun. Repeated matching of a group Q

2006-02-24 Thread johnzenger
You can check len(sanesplit) to see how big your list is. If it is < 2, then there were no 's, so move on to the next line. It is probably possible to do the whole thing with a regular expression. It is probably not wise to do so. Regular expressions are difficult to read, and, as you discover

  1   2   3   >