ANN: pywinauto 3.6 released

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

Skeletonz: The pythonic CMS system

2006-07-31 Thread 4mir Salihefendic
Hi everyone I am very glad to announce a pythonic content management system (CMS) called Skeletonz. Say goodbye to tedius backend administration and say hello to insite dynamic editing of your site! The system is a CMS refreshment - - it represents a whole new way of editing! Say goodbye to

Wing IDE 2.1.1 released

2006-07-31 Thread Wingware Announce
We're happy to announce the release of Wing IDE version 2.1.1, an advanced development environment for the Python programming language. This is a bugfix release, fixing several editor, subprocess, and startup bugs. The release can be downloaded from: http://wingware.com/downloads A complete

Re: How do you implement this Python idiom in C++

2006-07-31 Thread alainpoint
Pierre Barbier de Reuille wrote: [EMAIL PROTECTED] wrote: Pierre Barbier de Reuille wrote: [...] I thank you for your response. The equivalent of your solution is posted hereunder: class cA(object): count=0 def __init__(self): self.__class__.count

import a user created python file as module

2006-07-31 Thread Phoe6
Hi, I have the following directory structure in my project. Base: file1.py file2.py Directory1: file1-dir1.py I am able to import file1 into file2.py What I need to do is, import file1 in the file file1-dir1.py. I did not create the entire

Re: BCD List to HEX List

2006-07-31 Thread Paul Rubin
Philippe Martin [EMAIL PROTECTED] writes: Why are you avoiding naming the chip and its compiler? I must disagree on that one: There are many threads on this site where people just have fun talking algorithm. I'm not an algo. expert and I know there are many here. This is just like the very

Re: Nested function scope problem (- variable definition branch)

2006-07-31 Thread H J van Rooyen
Gerhard Fiedler [EMAIL PROTECTED] wrote: 8- | I'm not sure where you're trying to go. I think that most people (and even | Bruno, who argued this issue most strongly) call Python variables | variables every now and then, or maybe even usually. But it was helpful |

Re: import a user created python file as module

2006-07-31 Thread Amit Khemka
On 30 Jul 2006 23:07:07 -0700, Phoe6 [EMAIL PROTECTED] wrote: Hi, I have the following directory structure in my project. Base: file1.py file2.py Directory1: file1-dir1.py I am able to import file1 into file2.py What I need to do is,

Re: Html character entity conversion

2006-07-31 Thread Claudio Grondi
John Machin wrote: Claudio Grondi wrote: [EMAIL PROTECTED] wrote: Claudio Grondi wrote: [EMAIL PROTECTED] wrote: Here is my script: from mechanize import * from BeautifulSoup import * import StringIO b = Browser() f = b.open(http://www.translate.ru/text.asp?lang=ru;) b.select_form(nr=0)

Re: import a user created python file as module

2006-07-31 Thread Rob Wolfe
How and what should I do to import file1.py into file1-dir1.py ? Please give me some references to the tutorial topic which I can study as well. And some reference: http://docs.python.org/tut/node8.html Regards, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: non-blocking PIPE read on Windows

2006-07-31 Thread Durumdara
Hi !If you don't want to use MS-specific things, you can use the normal pipes.See this code. If you want to use non-blocking version, you need to create a thread that handle the reads/writes. import os, sys, time, binascii, cPicklebpath,bname=os.path.split(sys.argv[0])def

Re: Small problem with print and comma

2006-07-31 Thread Diez B. Roggisch
Dustan wrote: Dennis Lee Bieber wrote: for i in range(0,len(param)): print a[i], for it in param: print it, That's one way. However, if you need the position (this is for future reference; you don't need the position number here): for i in range(len(param)+1): print a[i],

Re: Need a compelling argument to use Django instead of Rails

2006-07-31 Thread Ben Sizer
Paul Boddie wrote: Ben Sizer wrote: Even C++ comes with OpenGL in the standard library. Which standard library? Sorry, it was a long day, and I used entirely the wrong term here. By that, I meant typically shipped with each compiler. I've never had to even install a development library to

Re: Need a compelling argument to use Django instead of Rails

2006-07-31 Thread Ben Sizer
Sybren Stuvel wrote: Ben Sizer enlightened us with: PyGame was barely maintained for a year, and is based on SDL which was also barely maintained for a year, and which hasn't kept up with hardware advances at all. Still, ID Software and Epic both use SDL + OpenGL for their games. Why is

Newbie help - test for data type

2006-07-31 Thread Jonathan Bowlas
Hi Listers, I have a requirement to test for a data type could someone tell me if this is possible in python? Basically I have a ZPT in Zope that users can select checkboxes in a form which pass arguments for a python function, however if there is only one checkbox selected it is passed as a

Re: Need a compelling argument to use Django instead of Rails

2006-07-31 Thread Ben Sizer
Terry Reedy wrote: Ben Sizer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] PyGame was barely maintained for a year, and is based on SDL which was also barely maintained for a year, and which hasn't kept up with hardware advances at all. I believe there is a recent release of

Re: XML parsing and writing

2006-07-31 Thread Stefan Behnel
c00i90wn wrote: Hey, I'm having a problem with the xml.dom.minidom package, I want to generate a simple xml for storing configuration variables, for that purpose I've written the following code, but before pasting it I'll tell you what my problem is. On first write of the xml everything goes

Re: Windows vs. Linux

2006-07-31 Thread 3KWA
I am not a programming expert but I use python everyday on Windows XP: * python standard distribution (CPython) * iPython * cygwin for the command line interaction, add a unix/linux flavour to the blend EuGeNe -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie help - test for data type

2006-07-31 Thread John Machin
Jonathan Bowlas wrote: Hi Listers, I have a requirement to test for a data type could someone tell me if this is possible in python? Basically I have a ZPT in Zope that users can select checkboxes in a form which pass arguments for a python function, however if there is only one checkbox

Re: Newbie help - test for data type

2006-07-31 Thread Dennis Benzinger
Jonathan Bowlas wrote: Hi Listers, I have a requirement to test for a data type could someone tell me if this is possible in python? Basically I have a ZPT in Zope that users can select checkboxes in a form which pass arguments for a python function, however if there is only one checkbox

Re: Has anyone used davlib by Greg Stein?

2006-07-31 Thread Joel Hedlund
Has anyone worked with this? Is it any good? I'll take the palpable silence as a no then. :-) Thank's anyway! /Joel -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie help - test for data type

2006-07-31 Thread Jonathan Bowlas
Thanks for everyones help, much appreciated, Ill check out the isinstance function. Jon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Benzinger Sent: 31 July 2006 10:20 To: python-list@python.org Subject: Re: Newbie help - test for

Re: Newbie help - test for data type

2006-07-31 Thread Rob Wolfe
This is my function: selecteddeptcodes = context.REQUEST.DEPTCODE currentstatus = context.REQUEST.STATUS if currentstatus == 'pending': for dptcd in selecteddeptcodes: context.changetolive(DEPTCODE=dptcd) if currentstatus == 'old': for dptcd in selecteddeptcodes:

Re: [OT]Newbie help - test for data type

2006-07-31 Thread Bruno Desthuilliers
Jonathan Bowlas wrote: Hi Listers, I have a requirement to test for a data type could someone tell me if this is possible in python? Basically I have a ZPT in Zope that users can select checkboxes in a form which pass arguments for a python function, however if there is only one checkbox

Re: Newbie help - test for data type

2006-07-31 Thread Bruno Desthuilliers
John Machin wrote: Jonathan Bowlas wrote: Hi Listers, I have a requirement to test for a data type could someone tell me if this is possible in python? Basically I have a ZPT in Zope that users can select checkboxes in a form which pass arguments for a python function, however if there is

Re: Newbie help - test for data type

2006-07-31 Thread Bruno Desthuilliers
Dennis Benzinger wrote: Jonathan Bowlas wrote: Hi Listers, I have a requirement to test for a data type could someone tell me if this is possible in python? Basically I have a ZPT in Zope that users can select checkboxes in a form which pass arguments for a python function, however if

Re: Newbie help - test for data type

2006-07-31 Thread Bruno Desthuilliers
Rob Wolfe wrote: This is my function: selecteddeptcodes = context.REQUEST.DEPTCODE currentstatus = context.REQUEST.STATUS if currentstatus == 'pending': for dptcd in selecteddeptcodes: context.changetolive(DEPTCODE=dptcd) if currentstatus == 'old': for dptcd in selecteddeptcodes:

Re:Newbie help - test for data type

2006-07-31 Thread Jonathan Bowlas
Thanks Bruno, Ill use this. Much appreciated. Jon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bruno Desthuilliers Sent: 31 July 2006 10:37 To: python-list@python.org Subject: Re: [OT]Newbie help - test for data type Jonathan Bowlas

Re: how to stop python

2006-07-31 Thread victor
or if u want explicit exit of program then use: import sys sys.exit(1) or raise SystemExit, 'message' Dan wrote: bruce bedouglas at earthlink.net posted: perl has the concept of die. does python have anything similar. how can a python app be stopped? I see this sort of statement a

Re: Fastest Way To Loop Through Every Pixel

2006-07-31 Thread nikie
Chaos wrote: nikie wrote: Chaos wrote: As my first attempt to loop through every pixel of an image, I used for thisY in range(0, thisHeight): for thisX in range(0, thisWidth): #Actions here for Pixel thisX, thisY But it takes

Re: class variables

2006-07-31 Thread Bruno Desthuilliers
Colin J. Williams wrote: Andre Meyer wrote: Hi all I am trying to understand the magic of Python's class variables and tried the following code (see below). Just out of curiosity, I tried to define a property that provides access to a seemingly instancae variable which is in fact a class

how to safely extract dict values

2006-07-31 Thread David Zaret
i have a dict with a particular key - the values for this key will be None, one valid scalar, or a list: {mykey, None} {mykey, foo} {mykey, [bar, baz]} let's ignore the None case - in the case of the one or many values, i want to suck the values into a list. here's one

Re: Nested function scope problem

2006-07-31 Thread Bruno Desthuilliers
Antoon Pardon wrote: On 2006-07-29, Gerhard Fiedler [EMAIL PROTECTED] wrote: On 2006-07-29 13:47:37, Antoon Pardon wrote: I think the important thing to remember is that the assignment in Python is a alias maker and not a copy maker. In languages like C, Fortran, pascal, the assignment makes

Re: how to safely extract dict values

2006-07-31 Thread Paul Rubin
David Zaret [EMAIL PROTECTED] writes: my way is ugly. what's a better way? Untested: for key in mydict: if isinstance(mydict[key], list): vals.extend(mydict[key]) else: vals.append(mydict[key]) -- http://mail.python.org/mailman/listinfo/python-list

Re: how to safely extract dict values

2006-07-31 Thread Bruno Desthuilliers
Paul Rubin wrote: David Zaret [EMAIL PROTECTED] writes: my way is ugly. what's a better way? Untested: for key in mydict: if isinstance(mydict[key], list): vals.extend(mydict[key]) else: vals.append(mydict[key]) Too much useless lookup IMHO...

Re: how to safely extract dict values

2006-07-31 Thread Amit Khemka
On 7/31/06, David Zaret [EMAIL PROTECTED] wrote: i have a dict with a particular key - the values for this key will be None, one valid scalar, or a list: {mykey, None} {mykey, foo} {mykey, [bar, baz]} let's ignore the None case - in the case of the one or many

Re: how to safely extract dict values

2006-07-31 Thread Bruno Desthuilliers
David Zaret wrote: i have a dict with a particular key - the values for this key will be None, one valid scalar, or a list: {mykey, None} {mykey, foo} {mykey, [bar, baz]} let's ignore the None case - in the case of the one or many values, i want to suck the values into a

Re: how to safely extract dict values

2006-07-31 Thread Paul Rubin
Bruno Desthuilliers [EMAIL PROTECTED] writes: Too much useless lookup IMHO... Actually, you, me, and Amit all mis-read David's original exapmle. What he really wanted was (let's see if I get it right this time): if mykey in mydict: v = mydict[mykey] if not isinstance(v, list):

Re: how to safely extract dict values

2006-07-31 Thread Bruno Desthuilliers
Amit Khemka wrote: On 7/31/06, David Zaret [EMAIL PROTECTED] wrote: i have a dict with a particular key - the values for this key will be None, one valid scalar, or a list: {mykey, None} {mykey, foo} {mykey, [bar, baz]} let's ignore the None case - in the case of

Re: Windows vs. Linux

2006-07-31 Thread jean-michel bain-cornu
Hi, [EMAIL PROTECTED] a écrit : Is Windows an okay enviornment in which to program under Python, or do you recommend that I run a dual-boot of Linux or maybe a VMWare install to program under Python? I'm used to practice windows linux and it makes sense to use python on both because the

Re: How do you implement this Python idiom in C++

2006-07-31 Thread benben
You are heading the wrong way... There are a number of ways to implement this but the easiest I can think of is to use RTTI. To get around with counting sub-objects you can rely on virtual inheritance, which only happens at the top of the inheritance tree. Here is a simple demo: #include

Re: how to safely extract dict values

2006-07-31 Thread David Zaret
thanks for the many responses. i have zero control over the dict. in practice, i'm using turbogears which is automatically populating the result dict with zero-to-many choices from a generated list of HTML checkboxes. the user can select none, one, or many, and submit. cherrypy packs the

Re: how to safely extract dict values

2006-07-31 Thread Bruno Desthuilliers
Paul Rubin wrote: Bruno Desthuilliers [EMAIL PROTECTED] writes: Too much useless lookup IMHO... Actually, you, me, and Amit all mis-read David's original exapmle. Actually, I plea not guilty - cf my answer to the OP !-) -- bruno desthuilliers python -c print '@'.join(['.'.join([w[::-1] for

Re: how to safely extract dict values

2006-07-31 Thread Bruno Desthuilliers
David Zaret wrote: thanks for the many responses. i have zero control over the dict. in practice, i'm using turbogears which is automatically populating the result dict with zero-to-many choices from a generated list of HTML checkboxes. the user can select none, one, or many, and submit.

Re: Windows vs. Linux

2006-07-31 Thread Andy Dingley
[EMAIL PROTECTED] wrote: Is Windows an okay enviornment in which to program under Python, or do you recommend that I run a dual-boot of Linux or maybe a VMWare install to program under Python? Python is one of the best languages I've found for platform-independence - significantly better

Re: how to safely extract dict values

2006-07-31 Thread Amit Khemka
oops ! my mistake :-D On 7/31/06, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Amit Khemka wrote: how about: vals = [] for val in mydict.values(): try: vals.extend(val) except: vals.append(val) l = [] l.extend((1, 2)) l [1, 2] l.extend('ab') l [1, 2, 'a', 'b'] Oops,

to automate an interactive shell

2006-07-31 Thread Murugesh
Hi all, I'm a newbie and would like to how python is efficient in automating an interative shell(I have a CLI executable which interatcs with the user). Any starters would be greatly appreciated. Thanks, Murugesh -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows vs. Linux

2006-07-31 Thread jean-michel bain-cornu
Andy Dingley a écrit : I'd never recommend dual-boot for anything! Don't agree man, it's good for testing... -- http://mail.python.org/mailman/listinfo/python-list

Re: non-blocking PIPE read on Windows

2006-07-31 Thread Durumdara
Hi !A new version with binary data handling. 103 seconds with 1000 data exchange.import os, sys, time, binascii, cPicklebpath,bname=os.path.split(sys.argv[0])def Log(Msg,IsMaster,First=False): fn=sys.argv[0]+'.'+['c','m'][int(IsMaster)]+'.log' mode='aw'[int(First)] f=open(fn,mode)

Re: ANN: pywinauto 3.6 released

2006-07-31 Thread david_wahler
I'll be out of the office until approximately August 20th. If you have any questions, please email [EMAIL PROTECTED] -- David Wahler -- http://mail.python.org/mailman/listinfo/python-list

Nuther problem with 'dive into Python'

2006-07-31 Thread Ben Edwards
Am going through Chapter 9 - HTTP Web Services in dive into Python. It uses the following: data = urllib.urlopen('http://diveintomark.org/xml/atom.xml').read() The page no longer exists, can anyone recommend an alternative page to use? Ben --

Another problem with 'Dive Into Python'

2006-07-31 Thread Ben Edwards (lists)
Am going through Chapter 9 - HTTP Web Services in dive into Python. It uses the following: data = urllib.urlopen('http://diveintomark.org/xml/atom.xml').read() The page no longer exists, can anyone recommend an alternative page to use? Ben --

gaierror: (8, 'hostname nor servname provided, or not known')

2006-07-31 Thread Laszlo Nagy
Hello, I asked this question about a week ago, but I did not provide a traceback. Here is the traceback: File /usr/local/lib/python2.4/xmlrpclib.py, line 1096, in __call__ return self.__send(self.__name, args) File /usr/local/lib/python2.4/xmlrpclib.py, line 1383, in __request

Re: Windows vs. Linux

2006-07-31 Thread metaperl
Andy Dingley wrote: Python is one of the best languages I've found for platform-independence - significantly better than Perl. The reason I'm going with vmware is because I'm afraid that I will need to compile a C portiion of a Python module and that will not be a pretty picture under

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
Paul Rubin wrote: Philippe Martin [EMAIL PROTECTED] writes: Why are you avoiding naming the chip and its compiler? I must disagree on that one: There are many threads on this site where people just have fun talking algorithm. I'm not an algo. expert and I know there are many here. This

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
John Machin wrote: Philippe Martin wrote: 3. How does the device manage to compute the 8-decimal-digit number that is your input?? What device manager ? think about it before being rude No device manager [noun] was mentioned. You may have inferred rudeness where astonishment

Multiple Telnet sessions through one script

2006-07-31 Thread vmalhotra
Hi I am new in python scripting. I want to open a Multiple telnet session through once script. In other way i can tell i want to open two linux consoles through one script. I wrote one script, but the issue is I am not able to open multiple consoles. The Scripts which i wrote is as follows:

Re: Need a compelling argument to use Django instead of Rails

2006-07-31 Thread Gerhard Fiedler
On 2006-07-29 01:07:12, Tim Roberts wrote: Vincent Delporte [EMAIL PROTECTED] wrote: BTW, what is the advantage of running a CherryPy/Django server instead of the regular way of code in pages? Improved performance because the Python interpreter is already up and running? Exactly. The Python

Re: Windows vs. Linux

2006-07-31 Thread William Witteman
On Mon, Jul 31, 2006 at 04:30:50AM -0700, Andy Dingley wrote: [EMAIL PROTECTED] wrote: Is Windows an okay enviornment in which to program under Python, or do you recommend that I run a dual-boot of Linux or maybe a VMWare install to program under Python? Python is one of the best languages

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
John Machin wrote: Philippe Martin wrote: Yes I had arm in mind (for some reason) while it is the Smc8831

getting debug from urllib2

2006-07-31 Thread Ben Edwards
Have been experimenting with HTTP stuff in python 2.4 and am having a problem getting debug info. If I use utllib.utlopen I get debug but if I user utllib2 I do not. Below is the probram and the output I am getting. Any insight? Ben * Code * import urllib, urllib2, httplib url =

Re: Need a compelling argument to use Django instead of Rails

2006-07-31 Thread Ben Sizer
Gerhard Fiedler wrote: On 2006-07-29 01:07:12, Tim Roberts wrote: Vincent Delporte [EMAIL PROTECTED] wrote: BTW, what is the advantage of running a CherryPy/Django server instead of the regular way of code in pages? Improved performance because the Python interpreter is already up and

Re: BCD List to HEX List

2006-07-31 Thread Paul Rubin
Philippe Martin [EMAIL PROTECTED] writes: I actually need numbers much larger than 32 bits. What is the max size hex number you need? What is the application if you don't mind my asking? -- http://mail.python.org/mailman/listinfo/python-list

Re: Fastest Way To Loop Through Every Pixel

2006-07-31 Thread Paul McGuire
Chaos [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Paul McGuire wrote: Paul McGuire [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Chaos [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] myCol = (0.3 * image.GetRed(thisX, thisY)) + (0.59 *

Re: Windows vs. Linux

2006-07-31 Thread Duncan Booth
metaperl wrote: The reason I'm going with vmware is because I'm afraid that I will need to compile a C portiion of a Python module and that will not be a pretty picture under Windows... true or false? Provided you have the correct compilers installed it is no harder compiling C extensions

Re: Fastest Way To Loop Through Every Pixel

2006-07-31 Thread nikie
Paul McGuire wrote: Chaos [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Paul McGuire wrote: Paul McGuire [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Chaos [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] myCol = (0.3 *

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
Paul Rubin wrote: Philippe Martin [EMAIL PROTECTED] writes: I actually need numbers much larger than 32 bits. What is the max size hex number you need? What is the application if you don't mind my asking? Well I am under NDA so I cannot tell you what the application is - I need numbers

Re: Fastest Way To Loop Through Every Pixel

2006-07-31 Thread Fredrik Lundh
Chaos wrote: I have tried PIL. Not only that, but the Image.eval function had no success either. I did some tests and I found out that Image.eval only called the function a certain number of times either 250, or 255. Unless I can find a working example for this function, its impossible to

Re: BCD List to HEX List

2006-07-31 Thread Paul Rubin
Philippe Martin [EMAIL PROTECTED] writes: Well I am under NDA so I cannot tell you what the application is - I need numbers (dec) with up to 24 digits. You actually need to represent numbers up to 10**24?? As I said, I went the other way - more data on the line (from dev 1 to dev 2) - but I

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
Paul Rubin wrote: Philippe Martin [EMAIL PROTECTED] writes: Well I am under NDA so I cannot tell you what the application is - I need numbers (dec) with up to 24 digits. You actually need to represent numbers up to 10**24?? As I said, I went the other way - more data on the line (from

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
Paul Rubin wrote: Philippe Martin [EMAIL PROTECTED] writes: Well I am under NDA so I cannot tell you what the application is - I need numbers (dec) with up to 24 digits. You actually need to represent numbers up to 10**24?? As I said, I went the other way - more data on the line (from

Re: BCD List to HEX List

2006-07-31 Thread Paul Rubin
Philippe Martin [EMAIL PROTECTED] writes: On device #1 no constraint for my purpose. On the smartcard, the tradeoff is between using EEPROM (plenty + slow + small life expectancy) for temp variables versus RAM (very little) ... but I do not think it is an issue eather in my case. Speed is what

poll() on OSX 10.3.9

2006-07-31 Thread Norman Khine
Hello, I need to use the 'select' module in python, but get an error on the: Python 2.5b2 (r25b2:50512, Jul 31 2006, 15:01:51) [GCC 3.3 20030304 (Apple Computer, Inc. build 1640)] on darwin Type help, copyright, credits or license for more information. import select dir(select) ['__doc__',

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
Paul Rubin wrote: Philippe Martin [EMAIL PROTECTED] writes: On device #1 no constraint for my purpose. On the smartcard, the tradeoff is between using EEPROM (plenty + slow + small life expectancy) for temp variables versus RAM (very little) ... but I do not think it is an issue eather in my

trouble understanding super()

2006-07-31 Thread John Salerno
Here's some code from Python in a Nutshell. The comments are lines from a previous example that the calls to super replace in the new example: class A(object): def met(self): print 'A.met' class B(A): def met(self): print 'B.met' # A.met(self)

Re: Multiple Telnet sessions through one script

2006-07-31 Thread Carl J. Van Arsdall
Well, although you spawn seperate telnet processes there is still only one thread of control in your pythons script. If you need to do two things simultaneously you'll need to setup a parallel control mechanism. For example you could use python threads, each thread spawns a separate telnet

FTP (ftplib) output capture

2006-07-31 Thread ChaosKCW
Hi Has anyone caputerd the output from the std ftp lib? It seems a bit annoying that everything is printed to stdout. It means incorporating this into any real program is a problem. It would have been much better if they used the std logging module and hooked up a console logger for the feault

Using Python for my web site

2006-07-31 Thread northband
Hi, I am interested in re-writing my website in Python vs PHP but have a few questions. Here are my specs, please advise as to which configuration would be best: 1.Dell Poweredge Server, w/IIS, currently Windows but considering FreeBSD 2. Site consists of result pages for auctions and items for

Re: BCD List to HEX List

2006-07-31 Thread bryanjugglercryptographer
Philippe Martin wrote: Yes, I came here for the algorithm question, not the code result. To turn BCD x to binary integer y, set y to zero for each nibble n of x: y = (((y shifted left 2) + y) shifted left 1) + n Do you need instruction on extracting nibbles, and shifting and adding

Re: Mouse LED Control in Python

2006-07-31 Thread Chris Lambacher
There is not enough information in that post to be able to reimpliment what he did in any language. You will have to try and get in touch with the author. -Chris On Sun, Jul 30, 2006 at 01:26:40PM -0700, [EMAIL PROTECTED] wrote: I found this link that describes the byte arrays to control the

Questions

2006-07-31 Thread Paré , Richard
Hi, I find Python very interesting and usefulas adeveloping matrix and other mathematical applications. Iwent through the tutorial to try tounderstandand work withvarious concepts. I have the following questions: Where could I find more information on the "self" classes. The use

Re: Possible error in 'dive into Python' book, help!

2006-07-31 Thread Sion Arrowsmith
In article [EMAIL PROTECTED], Ben Edwards (lists) [EMAIL PROTECTED] wrote: I have been going through Dive into Python which up to now has been excellent. I am now working through Chapter 9, XML Processing. I am 9 pages in (p182) in the 'Parsing XML section. The following code is supposed to

Re: Using Python for my web site

2006-07-31 Thread Norman Khine
northband wrote: Hi, I am interested in re-writing my website in Python vs PHP but have a few questions. Here are my specs, please advise as to which configuration would be best: 1.Dell Poweredge Server, w/IIS, currently Windows but considering FreeBSD 2. Site consists of result pages for

Re: getting debug from urllib2

2006-07-31 Thread Chris Lambacher
On Mon, Jul 31, 2006 at 02:43:36PM +0100, Ben Edwards wrote: Have been experimenting with HTTP stuff in python 2.4 and am having a problem getting debug info. If I use utllib.utlopen I get debug but if I user utllib2 I do not. Below is the probram and the output I am getting. Any insight?

Re: trouble understanding super()

2006-07-31 Thread Simon Forman
John Salerno wrote: Here's some code from Python in a Nutshell. The comments are lines from a previous example that the calls to super replace in the new example: class A(object): def met(self): print 'A.met' class B(A): def met(self): print 'B.met'

Re: Using Python for my web site

2006-07-31 Thread northband
Thanks I will look into it. -Adam Norman Khine wrote: northband wrote: Hi, I am interested in re-writing my website in Python vs PHP but have a few questions. Here are my specs, please advise as to which configuration would be best: 1.Dell Poweredge Server, w/IIS, currently Windows

Re: FTP (ftplib) output capture

2006-07-31 Thread Simon Forman
ChaosKCW wrote: Hi Has anyone caputerd the output from the std ftp lib? It seems a bit annoying that everything is printed to stdout. It means incorporating this into any real program is a problem. It would have been much better if they used the std logging module and hooked up a console

Re: Need a compelling argument to use Django instead of Rails

2006-07-31 Thread Vincent Delporte
On 31 Jul 2006 07:05:27 -0700, Ben Sizer [EMAIL PROTECTED] wrote: Typically you run PHP as a module in your webserver, so there should be no process startup overhead. mod_python provides the same sort of functionality for Python, but is not as popular or widely installed as the PHP Apache module.

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
[EMAIL PROTECTED] wrote: Philippe Martin wrote: Yes, I came here for the algorithm question, not the code result. To turn BCD x to binary integer y, set y to zero for each nibble n of x: y = (((y shifted left 2) + y) shifted left 1) + n Do you need instruction on extracting

Re: Need a compelling argument to use Django instead of Rails

2006-07-31 Thread Terry Reedy
Ben Sizer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] As for PyGame, it's good that development there has picked up again but I'd love to see it broaden its horizons beyond SDL. Maybe that is impractical, however. By wrapping SDL and interfacing to Numeric, Pete Shinners picked

Re: Using Python for my web site

2006-07-31 Thread Bruno Desthuilliers
northband wrote: Hi, I am interested in re-writing my website in Python vs PHP but have a few questions. Here are my specs, please advise as to which configuration would be best: 1.Dell Poweredge Server, w/IIS, currently Windows but considering FreeBSD I may be a bit biased, but I would

running an app as user foo

2006-07-31 Thread bruce
hi. within python, what's the best way to automatically spawn an app as a given user/group. i'm testing an app, and i'm going to need to assign the app to a given user/group, as well as assign it certain access rights/modes (rwx) i then want to copy the test app to a given dir, and then spawn a

Abstract the storage of an app

2006-07-31 Thread Panos Laganakos
Hello, I'm trying to think of an OO way to abstract the storage of an application I am working on. The classes are (example): FamilyMember (base class) Family (container class) I've been thinking of using a FamilyDoc class to interface the Family container class to a storage location

Re: how to make python socket server work with the app.MainLoop() in wxpython?

2006-07-31 Thread Vincent
I think you should use thread. I just write a similar program using thread. It works well You can try it, good luck! -- http://mail.python.org/mailman/listinfo/python-list

Problem with using unittest module

2006-07-31 Thread Olivier Langlois
Hi, I have the following statement in my test : self.assertRaises(CDKeyException, ValidationObject.Validate, 1001,'NonExistantKey') and the test fails as if assertRaises was not catching the thrown exception: == ERROR: test

Re: trouble understanding super()

2006-07-31 Thread John Salerno
Simon Forman wrote: In this case the object's (instance of D) mro will be (D, B, C, A, object), so as super gets called in each class, it looks in that list (tuple, whatever) for the class following it (actually the next class following it that implements the method). Since no class

Re: trouble understanding super()

2006-07-31 Thread Duncan Booth
John Salerno wrote: But after super(D, self).met() is called, doesn't that then call both super(B, self).met() and super(C, self).met()? If so, how does that avoid calling A.met twice? Or is that not what's happening? If you have an instance of a B then super(B,self).met() will call

Re: Using Python for my web site

2006-07-31 Thread northband
Thanks for the info. Reason why we are interested in PSP is because we think our developers would be able to quickly adapt to the migration, they are familiar with php and asp. I agree on the windows webserver, we are looking into using FreeBSD instead. What would postgre's advantage over MySQL

Re: Need a compelling argument to use Django instead of Rails

2006-07-31 Thread Bruno Desthuilliers
Vincent Delporte wrote: On 31 Jul 2006 07:05:27 -0700, Ben Sizer [EMAIL PROTECTED] wrote: Typically you run PHP as a module in your webserver, so there should be no process startup overhead. mod_python provides the same sort of functionality for Python, but is not as popular or widely

Python Docs Fix

2006-07-31 Thread Terry Reedy
A month ago, someone posted, under Python Docs Bugs, a complaint about the difficulty of finding the library ref sub-subsection on string methods. That's because it is section 2.3.6.1, and the table of contents only goes to 3 levels. I followed up the me-to's with an SF bug-report suggesting

  1   2   3   >