Re: I could use some help making this Python code run faster using only Python code.

2007-09-20 Thread George Sakkis
On Sep 20, 7:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Sep 20, 5:46 pm, Paul Hankin <[EMAIL PROTECTED]> wrote: > > > > > On Sep 20, 10:59 pm, Python Maniac <[EMAIL PROTECTED]> wrote: > > > > I am new to Python however I would like some feedback from those who > > > know more about

Re: UTF-8 characters in doctest

2007-09-20 Thread Peter Otten
John J. Lee wrote: > Peter Otten <[EMAIL PROTECTED]> writes: > [...] >> # -*- coding: utf8 -*- >> r""" > f("äöü".decode("utf8")) >> (u'\xe4\xf6\xfc',) >> """ >> def f(s): >> return (s,) > > Forgive me if this is a stupid question, but: What purpose does > function f serve? Like the OP's

Re: Drawing a 640x480 Raw Image

2007-09-20 Thread Marc 'BlackJack' Rintsch
On Thu, 20 Sep 2007 20:49:59 -0700, W. Watson wrote: > W. Watson wrote: >> I'm getting a 640x480 greyscale image from a video device. I'd like to >> place it on a canvas and then draw on the image. Does PIL or some image >> facility allow me to do that? > > Corrected misspelling in Subject. The

Re: global name is not defined - but this is actually a function's name

2007-09-20 Thread Amit Khemka
On 9/21/07, Mridula Ramesh <[EMAIL PROTECTED]> wrote: > hi. > > i'm a beginner and i'm trying to get the hang of classes and functions. my > code looks like this: > > > > class showRecord(main): > def __init__(self): > global gmax > #now to create the screen by placing all the

Re: Google and Python

2007-09-20 Thread Alex Martelli
Bryan Olson <[EMAIL PROTECTED]> wrote: ... > TheFlyingDutchman asked of someone: > > Would you know what technique the custom web server uses > > to invoke a C++ app > > No, I expect he would not know that. I can tell you > that GWS is just for Google, and anyone else is almost > certainly bet

global name is not defined - but this is actually a function's name

2007-09-20 Thread Mridula Ramesh
hi. i'm a beginner and i'm trying to get the hang of classes and functions. my code looks like this: class showRecord(main): def __init__(self): global gmax #now to create the screen by placing all the widgets rt = Tk() showbuttons() #call the scrolle

Re: newb: BeautifulSoup

2007-09-20 Thread Stefan Behnel
TheFlyingDutchman wrote: > On Sep 20, 8:04 pm, crybaby <[EMAIL PROTECTED]> wrote: >> I need to traverse a html page with big table that has many row and >> columns. For example, how to go 35th td tag and do regex to retireve >> the content. After that is done, you move down to 15th td tag from >>

Re: re question

2007-09-20 Thread Dan Bar Dov
On 9/20/07, Matt McCredie <[EMAIL PROTECTED]> wrote: > > > > Any common knowledge IP matching RE? > > I don't know if there is any common knowledge RE, but I came up with > the following: > > > r"((1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.){3}(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)") Thank you. I will u

Re: validating parser

2007-09-20 Thread Stefan Behnel
David wrote: > On 9/20/07, Robert Schweikert <[EMAIL PROTECTED]> wrote: >> Is there a Python module which will do XSD validation? > > http://mail.python.org/pipermail/xml-sig/2006-June/011527.html ... of which lxml (i.e. libxml2) is definitely the most standards compliant (and feature rich anyway

calling extension's autoconf/make from distutils

2007-09-20 Thread Gary Jefferson
I've got a python extension that comes with its own standard autoconf/ automake system, and I can "python setup.py build" just fine with it as long as I have previously done "./configure" in that directory. However, 'python setup.py bdist_rpm' can't hope to have done './ configure' first, as it un

Re: newb: BeautifulSoup

2007-09-20 Thread TheFlyingDutchman
On Sep 20, 8:04 pm, crybaby <[EMAIL PROTECTED]> wrote: > I need to traverse a html page with big table that has many row and > columns. For example, how to go 35th td tag and do regex to retireve > the content. After that is done, you move down to 15th td tag from > 35th tag (35+15) and do regex

Re: distutils, extensions, and missing headers

2007-09-20 Thread Gary Jefferson
On Sep 20, 12:08 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > Gary Jefferson wrote: > > On Sep 20, 1:22 am, Robert Kern <[EMAIL PROTECTED]> wrote: > >> Use the "headers" keyword to setup() to list theheaderfiles you want > >> installed. > > > I've tried "headers=['header1.h', 'header2.h']" in se

Re: Drawing a 640x480 Raw Image

2007-09-20 Thread W. Watson
Corrected misspelling in Subject. The image here is nothing more than a 640x480 byte array. Each byte is a gra[e]yscale value. W. Watson wrote: > I'm getting a 640x480 greyscale image from a video device. I'd like to > place it on a canvas and then draw on the image. Does PIL or some image > fa

Re: An Editor that Skips to the End of a Def

2007-09-20 Thread W. Watson
How about in the case of MS Win? Ben Finney wrote: > "W. Watson" <[EMAIL PROTECTED]> writes: > >> Is vim just an editor or is it capable of running and debugging a >> program, as well? > > (Please don't top-post. Instead, reply below each point to which > you're responding, removing quoted text

Re: An Editor that Skips to the End of a Def

2007-09-20 Thread Ben Finney
"W. Watson" <[EMAIL PROTECTED]> writes: > Is vim just an editor or is it capable of running and debugging a > program, as well? (Please don't top-post. Instead, reply below each point to which you're responding, removing quoted text irrelevant to your response.) Both Emacs and Vim are highly cus

Drawing a 640x480 Ras Image

2007-09-20 Thread W. Watson
I'm getting a 640x480 greyscale image from a video device. I'd like to place it on a canvas and then draw on the image. Does PIL or some image facility allow me to do that? -- Wayne Watson (Nevada City, CA) Web Page: -- http://mail.python.org

Re: An Editor that Skips to the End of a Def

2007-09-20 Thread W. Watson
Is vim just an editor or is it capable of running and debugging a program, as well? W. Watson wrote: > Maybe I'll take a look. When I left the world of Unix/Linux 10 years > ago, emacs went with it, as did vi. > > Paul Rudin wrote: >> "W. Watson" <[EMAIL PROTECTED]> writes: >> >>> Thanks, but n

Re: UTF-8 characters in doctest

2007-09-20 Thread J. Cliff Dyer
J. Cliff Dyer wrote: > John J. Lee wrote: > >> Peter Otten <[EMAIL PROTECTED]> writes: >> [...] >> >> >>> def f(s): >>> return (s,) >>> >>> >> Forgive me if this is a stupid question, but: What purpose does >> function f serve? >> >> >> John >> >> > > Well, it has

Re: UTF-8 characters in doctest

2007-09-20 Thread J. Cliff Dyer
John J. Lee wrote: > Peter Otten <[EMAIL PROTECTED]> writes: > [...] > >> def f(s): >> return (s,) >> > > Forgive me if this is a stupid question, but: What purpose does > function f serve? > > > John > Well, it has nothing to do with the unicode bit that came before it. It just ta

newb: BeautifulSoup

2007-09-20 Thread crybaby
I need to traverse a html page with big table that has many row and columns. For example, how to go 35th td tag and do regex to retireve the content. After that is done, you move down to 15th td tag from 35th tag (35+15) and do regex to retrieve the content? -- http://mail.python.org/mailman/li

Re: Can't import Stackless in Pythonwin

2007-09-20 Thread Christian Tismer
[EMAIL PROTECTED] wrote: ... > But for pythonwin i get import sys print sys.version > 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] print sys.executable > C:\Python25\Lib\site-packages\pythonwinPythonwin.exe > > So does this mean stackless is not usable with py

Re: Killing A Process By PID

2007-09-20 Thread Arvind Singh
file('/var/lock/Application.lock', 'w').write(str(os.getpid())) > > Which to be honest appears to run just fine, when I look in that file it > always contains the correct process ID, for instance, 3419 or something like > that. > I honestly doubt that. The I/O is buffered and you need to flush()/

Re: A struct for 2.4 that supports float's inf and nan?

2007-09-20 Thread Grant Edwards
On 2007-09-20, Joshua J. Kugler <[EMAIL PROTECTED]> wrote: >> import struct >> >> pack_double_workaround = { >> 'inf': struct.pack('Q', 0x7ff0L), >> '-inf': struct.pack('Q', 0xfff0L), >> 'nan': struct.pack('Q', 0x7ff8L) >> } >> >> def pack_one_safe(f, a)

Re: executing list of methods (and collecting results)

2007-09-20 Thread gherzig
> Gerardo Herzig wrote: > >> I want the collect_validators() method is to execute any of the >> above methods, and collect their names as items of a list (wich >> will be the collect_validators() return value). > > (inside class definition -- untested) > validators = {"is a number": is_really_a_num

looking for ocbc example

2007-09-20 Thread Carl K
I am sure this is what I want: http://www.python.org/topics/database/docs.html "The documentation for the PythonWin ODBC module." but it is 404. google isn't being nice. Anyone know where I can find some simple examples? I have used odbc in other environments, so just need to know what modules,

Re: M2Crypto 0.18 - new version, same old build bugs.

2007-09-20 Thread John Nagle
Paul Boddie wrote: > On 20 Sep, 22:12, John Nagle <[EMAIL PROTECTED]> wrote: > >>That was for M2Crypto 0.17. >> >>It's still broken in M2Crypto 0.18. >> >>And there's no RPM or Windows binary. >> >>Nobody actually uses this stuff, do they? > > > I can find Ubuntu packages for 0.1

Re: Python,SWIG and libjvm

2007-09-20 Thread Graham Dumpleton
On Sep 21, 9:00 am, sapsi <[EMAIL PROTECTED]> wrote: > Hello, > I'm not sure if this the correct list but here goes (and sorry for the > noise). I've been attempting to wrap python around libhdfs. > So far so good (i've attached the SWIG template at the end). The > compilation works without errors

Re: Python,SWIG and libjvm

2007-09-20 Thread sapsi
On Sep 20, 8:22 pm, sapsi <[EMAIL PROTECTED]> wrote: > On Sep 20, 7:00 pm, sapsi <[EMAIL PROTECTED]> wrote: > > > Hello, > > I'm not sure if this the correct list but here goes (and sorry for the > > noise). I've been attempting to wrap python around libhdfs. > > So far so good ( > > I should point

Re: I could use some help making this Python code run faster using only Python code.

2007-09-20 Thread Istvan Albert
On Sep 20, 7:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > How come it's not? Then I noticed you don't have brackets in > the join statement. So I tried without them and got If memory serves me right newer versions of python will recognize and optimize string concatenation via the += op

Re: The meaning of a = b in object oriented languages

2007-09-20 Thread John W. Kennedy
Russell Wallace wrote: > Summercool wrote: >> so most or all object oriented language do assignment by reference? >> is there any object oriented language actually do assignment by >> value? I kind of remember in C++, if you do >> >> Animal a, b; >> >> a = b will actually be assignment by value. >

Re: Tapping into the access of an int instance

2007-09-20 Thread James Stroud
Tor Erik Sønvisen wrote: > Hi, > > Does anyone know how to interrupt the lookup of an integer value? I > know I need to subclass int, since builtin types can't be altered > directly... > > Below is how far I've come... What I want is to tap into the access of > instance i's value 1... > cla

Re: executing list of methods (and collecting results)

2007-09-20 Thread Bjoern Schliessmann
Gerardo Herzig wrote: > I want the collect_validators() method is to execute any of the > above methods, and collect their names as items of a list (wich > will be the collect_validators() return value). (inside class definition -- untested) validators = {"is a number": is_really_a_number,

Re: executing list of methods (and collecting results)

2007-09-20 Thread James Stroud
Gerardo Herzig wrote: > Hi all. Im in this situation: I want to perform several kind of > (validating) methods to a given value. > Lets say i have a class named Number, and the following methods: > is_really_a_number(), > is_even(), > is_greater_than_zero(), > and so on. All of them returning bool

Who can develop the following Python script into working application ?

2007-09-20 Thread http://members.lycos.co.uk/dariusjack/
Hi, I am happy user of Nokia 770 tablett and one application for Nokia 770 is maemo mapper (beta navigation application). And the following script should run under mm (for Debian). Its developer told me it wans intended for other developers. I have no idea how to write Python script so please tel

Re: Python,SWIG and libjvm

2007-09-20 Thread sapsi
On Sep 20, 7:00 pm, sapsi <[EMAIL PROTECTED]> wrote: > Hello, > I'm not sure if this the correct list but here goes (and sorry for the > noise). I've been attempting to wrap python around libhdfs. > So far so good ( I should point out that libhdfs is a c library to Hadoop Distributed FileSystem.

Re: HTTP Protocol Client

2007-09-20 Thread Ian Clark
[EMAIL PROTECTED] wrote: > h = httplib.HTTP('http://Google.com',80) This should be: h = httplib.HTTP('Google.com',80) And I certainly agree with the others, check out urllib*. Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Regex Question

2007-09-20 Thread crybaby
On Sep 20, 4:12 pm, Tobiah <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I need to extract the number on each > > i.e 49.950 from the following: > > >  49.950  > > > The actual number between:  49.950  can be any number of > > digits before decimal and after decimal. > > >  ##.

Zope review

2007-09-20 Thread Norm
Hi, without meaning to start a flame war between the various python web tools, I was wondering if anyone had a review of the status of Zope. For example, is it being used for new projects or just maintenance? I really like the look of Zope 3, and the interface/schema pattern for defining objects

Re: I could use some help making this Python code run faster using only Python code.

2007-09-20 Thread Ian Clark
[EMAIL PROTECTED] wrote: > On Sep 20, 5:46 pm, Paul Hankin <[EMAIL PROTECTED]> wrote: >> On Sep 20, 10:59 pm, Python Maniac <[EMAIL PROTECTED]> wrote: >> >>> I am new to Python however I would like some feedback from those who >>> know more about Python than I do at this time. >>> def scrambleLine(

Re: I could use some help making this Python code run faster using only Python code.

2007-09-20 Thread Paul Rubin
Python Maniac <[EMAIL PROTECTED]> writes: > I am new to Python however I would like some feedback from those who > know more about Python than I do at this time. Use the array module and do 32-bit or 64-bit operations with it. See http://nightsong.com/phr/crypto/p3.py for a more serious encryption

Re: I could use some help making this Python code run faster using only Python code.

2007-09-20 Thread [EMAIL PROTECTED]
On Sep 20, 5:46 pm, Paul Hankin <[EMAIL PROTECTED]> wrote: > On Sep 20, 10:59 pm, Python Maniac <[EMAIL PROTECTED]> wrote: > > > I am new to Python however I would like some feedback from those who > > know more about Python than I do at this time. > > > def scrambleLine(line): > > s = '' > >

Re: I could use some help making this Python code run faster using only Python code.

2007-09-20 Thread Python Maniac
On Sep 20, 3:57 pm, "Matt McCredie" <[EMAIL PROTECTED]> wrote: > On 9/20/07, Python Maniac <[EMAIL PROTECTED]> wrote: > > > I am new to Python however I would like some feedback from those who > > know more about Python than I do at this time. > > Well, you could save some time by not applying the

Re: I could use some help making this Python code run faster using only Python code.

2007-09-20 Thread Michael Spencer
Python Maniac wrote: > I am new to Python however I would like some feedback from those who > know more about Python than I do at this time. > > def scrambleLine(line): > s = '' > for c in line: > s += chr(ord(c) | 0x80) > return s > > def descrambleLine(line): > s = '' >

Re: I could use some help making this Python code run faster using only Python code.

2007-09-20 Thread Tim Williams
On 21/09/2007, Tim Williams <[EMAIL PROTECTED]> wrote: > On 20/09/2007, Python Maniac <[EMAIL PROTECTED]> wrote: > > I am new to Python however I would like some feedback from those who > > know more about Python than I do at this time. > > > > def scrambleLine(line): > >s = '' > >for c in

Python,SWIG and libjvm

2007-09-20 Thread sapsi
Hello, I'm not sure if this the correct list but here goes (and sorry for the noise). I've been attempting to wrap python around libhdfs. So far so good (i've attached the SWIG template at the end). The compilation works without errors and the shared objects do have references to all the functions.

Re: I could use some help making this Python code run faster using only Python code.

2007-09-20 Thread Tim Williams
On 20/09/2007, Python Maniac <[EMAIL PROTECTED]> wrote: > I am new to Python however I would like some feedback from those who > know more about Python than I do at this time. > > def scrambleLine(line): >s = '' >for c in line: >s += chr(ord(c) | 0x80) >return s > > def descramb

executing list of methods (and collecting results)

2007-09-20 Thread Gerardo Herzig
Hi all. Im in this situation: I want to perform several kind of (validating) methods to a given value. Lets say i have a class named Number, and the following methods: is_really_a_number(), is_even(), is_greater_than_zero(), and so on. All of them returning booleans. I want the collect_validators

Re: I could use some help making this Python code run faster using only Python code.

2007-09-20 Thread Matt McCredie
On 9/20/07, Python Maniac <[EMAIL PROTECTED]> wrote: > I am new to Python however I would like some feedback from those who > know more about Python than I do at this time. Well, you could save some time by not applying the scramble one line at a time (that is if you don't mind losing the line end

Re: I could use some help making this Python code run faster using only Python code.

2007-09-20 Thread Diez B. Roggisch
Python Maniac schrieb: > I am new to Python however I would like some feedback from those who > know more about Python than I do at this time. > > def scrambleLine(line): > s = '' > for c in line: > s += chr(ord(c) | 0x80) > return s > > def descrambleLine(line): > s = ''

Re: I could use some help making this Python code run faster using only Python code.

2007-09-20 Thread Paul Hankin
On Sep 20, 10:59 pm, Python Maniac <[EMAIL PROTECTED]> wrote: > I am new to Python however I would like some feedback from those who > know more about Python than I do at this time. > > def scrambleLine(line): > s = '' > for c in line: > s += chr(ord(c) | 0x80) > return s > > de

Re: re question

2007-09-20 Thread Matt McCredie
On 9/20/07, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > Dan Bar Dov wrote: > > I'm trying to construct a regular expression to match valid IP address, > > without leading zeroes (i.e > > 1.2.3.4 , 254.10.0.0 , but not > > 324.1.1.1, nor 010.10.10.1

Re: about __str__

2007-09-20 Thread Paul Hankin
On Sep 20, 10:08 pm, Konstantinos Pachopoulos <[EMAIL PROTECTED]> wrote: > > The __str__ method of "list" doesn't seem to call the __str__ method of > the objects > ie, __str__ is not equicalent to the Java toString() method... Anyway, > how can i fix this? For whatever reason, __str__ of list

Re: re question

2007-09-20 Thread Ricardo Aráoz
Dan Bar Dov wrote: > I'm trying to construct a regular expression to match valid IP address, > without leading zeroes (i.e > 1.2.3.4 , 254.10.0.0 , but not > 324.1.1.1, nor 010.10.10.1 ) > > This is what I come up with, and it does not work. >

Re: about __str__

2007-09-20 Thread TheFlyingDutchman
I read here recently that the __str__ method of a list calls the __repr__ method of each of its members. So you need to add a __repr__ method to your class: class CmterIDCmts: def __init__(self,commiterID,commits): self.commiterID_=long(commiterID) self.commits_=long(commits)

Re: Tapping into the access of an int instance

2007-09-20 Thread Ben Finney
"Tor Erik Sønvisen" <[EMAIL PROTECTED]> writes: > Does anyone know how to interrupt the lookup of an integer value? AFAIK, int values *aren't* "looked up", in my understanding of that term. Can you explain what events you want to intercept? > Below is how far I've come... What I want is to tap

about __str__

2007-09-20 Thread Konstantinos Pachopoulos
Hi, i have the following class: === class CmterIDCmts: def __init__(self,commiterID,commits): self.commiterID_=long(commiterID) self.commits_=long(commits) def __str__(self): s="" s+="<"+str(self.commiterID_

I could use some help making this Python code run faster using only Python code.

2007-09-20 Thread Python Maniac
I am new to Python however I would like some feedback from those who know more about Python than I do at this time. def scrambleLine(line): s = '' for c in line: s += chr(ord(c) | 0x80) return s def descrambleLine(line): s = '' for c in line: s += chr(ord(c) &

Re: M2Crypto 0.18 - new version, same old build bugs.

2007-09-20 Thread Paul Boddie
On 20 Sep, 22:12, John Nagle <[EMAIL PROTECTED]> wrote: > > That was for M2Crypto 0.17. > > It's still broken in M2Crypto 0.18. > > And there's no RPM or Windows binary. > > Nobody actually uses this stuff, do they? I can find Ubuntu packages for 0.16 and 0.17: http://packages.ubu

Re: re question

2007-09-20 Thread David
On 9/19/07, Dan Bar Dov <[EMAIL PROTECTED]> wrote: > I'm trying to construct a regular expression to match valid IP address, > without leading zeroes (i.e > 1.2.3.4, 254.10.0.0, but not 324.1.1.1, nor 010.10.10.1) > > This is what I come up with, and it does not work. > > r'(^[12]?\d{0,2}\.){3,3}[1

Re: re question

2007-09-20 Thread Matt McCredie
On 9/19/07, Dan Bar Dov <[EMAIL PROTECTED]> wrote: > I'm trying to construct a regular expression to match valid IP address, > without leading zeroes (i.e > 1.2.3.4, 254.10.0.0, but not 324.1.1.1, nor 010.10.10.1) > > This is what I come up with, and it does not work. > > r'(^[12]?\d{0,2}\.){3,3}[1

Re: validating parser

2007-09-20 Thread David
On 9/20/07, Robert Schweikert <[EMAIL PROTECTED]> wrote: > Is there a Python module which will do XSD validation? http://mail.python.org/pipermail/xml-sig/2006-June/011527.html -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess: returncode v. poll()

2007-09-20 Thread David
On 9/20/07, 7stud <[EMAIL PROTECTED]> wrote: > On Sep 20, 1:25 pm, 7stud <[EMAIL PROTECTED]> wrote: > > On Sep 20, 1:17 pm, 7stud <[EMAIL PROTECTED]> wrote: > > > > > > > > > Hi, > > > > > What is the difference between: > > > > > 1) getting the returncode directly from the subprocess object > > >

Re: cannot create my own dict

2007-09-20 Thread David
> The reason for this problem is that we are busy re-structuring a large Python > program, and we want to ensure nobody is messing up our data structures (at > least not until we are finished). python-egenix-mxproxy (Debian package name) may be useful. http://www.egenix.com/products/python/mxBase

Re: An Editor that Skips to the End of a Def

2007-09-20 Thread Gary Coulbourne
John J. Lee wrote: > Eclipse must be able to do this. Not by default... but I am certain there are plugins that provide python integration. (And jython integration) Peace, Gary -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Regex Question

2007-09-20 Thread Gerardo Herzig
[EMAIL PROTECTED] wrote: >I need to extract the number on each >i.e 49.950 from the following: > > 49.950  > >The actual number between:  49.950  can be any number of >digits before decimal and after decimal. > > ##.  > >How can I just extract the real/integer number using regex? > > >

Re: Lookup values from one table to another based on a value

2007-09-20 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : (snip) > > If I flipped the Table being looked up not to repeat, would that make > things easier to look up a value in? Don't repeat informations. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Regex Question

2007-09-20 Thread Tobiah
[EMAIL PROTECTED] wrote: > I need to extract the number on each > i.e 49.950 from the following: > >  49.950  > > The actual number between:  49.950  can be any number of > digits before decimal and after decimal. > >  ##.  > > How can I just extract the real/integer number using rege

Re: Tapping into the access of an int instance

2007-09-20 Thread David
On 9/20/07, Tor Erik Sønvisen <[EMAIL PROTECTED]> wrote: > Hi, > > Does anyone know how to interrupt the lookup of an integer value? I > know I need to subclass int, since builtin types can't be altered > directly... > > Below is how far I've come... What I want is to tap into the access of > insta

M2Crypto 0.18 - new version, same old build bugs.

2007-09-20 Thread John Nagle
Back in March, I posted this: > Hit that with OpenSSL. Red Hat took elliptical curve cryptography > out of Fedora 6 for patent reasons. With that missing, M2Crypto won't > build. It ought to; the implementor of M2Crypto thought of that, because > it's an optional feature. But M2Crypto uses

Re: A struct for 2.4 that supports float's inf and nan?

2007-09-20 Thread Joshua J. Kugler
On Thursday 20 September 2007 11:19, Paul Hankin wrote: >> I suppose I could get the relevant source from the 2.5 source and compile >> it as a custom package, but that wouldn't be very transparent for my >> users, and would probably be getting in way over my head. :) >> >> Ideas? Suggestions? >

Re: An Editor that Skips to the End of a Def

2007-09-20 Thread W. Watson
Maybe I'll take a look. When I left the world of Unix/Linux 10 years ago, emacs went with it, as did vi. Paul Rudin wrote: > "W. Watson" <[EMAIL PROTECTED]> writes: > >> Thanks, but no thanks. The learning curve is way too steep. > > Up to you but, these days emacs comes with all sorts of > poi

Python Imaging Library Handbook--Printing It?

2007-09-20 Thread W. Watson
Is there a pdf file for this somewhere, or another type of file. It would be good to print the whole thing at once. Ah, I see there's a pdf for an earlier version. Apparently, nothing for 1.1.4. -- Wayne

Re: frange() question

2007-09-20 Thread Carsten Haese
On Thu, 2007-09-20 at 18:55 +, John J. Lee wrote: > Functions are never generators, senso stricto. There are "generator > functions", which *return* (or yield) generators when you call them. Actually, a generator function is a function that returns a generator. The generator, in turn, is an o

Python Regex Question

2007-09-20 Thread joemystery123
I need to extract the number on each  49.950  The actual number between:  49.950  can be any number of digits before decimal and after decimal.  ##.  How can I just extract the real/integer number using regex? -- http://mail.python.org/mailman/listinfo/python-list

Re: An Editor that Skips to the End of a Def

2007-09-20 Thread Paul Rubin
[EMAIL PROTECTED] (John J. Lee) writes: > Seriously for a moment, I read something recently (maybe here?) about > an Apple study that claimed to show that people who perceived keyboard > bindings as being much faster than mouseing did not, on average, take > less time to complete the actions that w

Re: subprocess: returncode v. poll()

2007-09-20 Thread 7stud
On Sep 20, 1:25 pm, 7stud <[EMAIL PROTECTED]> wrote: > On Sep 20, 1:17 pm, 7stud <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > What is the difference between: > > > 1) getting the returncode directly from the subprocess object > > 2) calling poll() on the subprocess object? > > > Here is an exampl

Re: An Editor that Skips to the End of a Def

2007-09-20 Thread Michael v. Fondern
W. Watson: > Is there an editor that allows one to position to put the cursor and > then by pushing some button goes to the end of the def? Eclipse, together with the pydev plugin. (Ctrl-Shift-Down) Greetings - Michael - -- http://mail.python.org/mailman/listinfo/python-list

Re: UTF-8 characters in doctest

2007-09-20 Thread John J. Lee
Peter Otten <[EMAIL PROTECTED]> writes: [...] > # -*- coding: utf8 -*- > r""" f("äöü".decode("utf8")) > (u'\xe4\xf6\xfc',) > """ > def f(s): > return (s,) Forgive me if this is a stupid question, but: What purpose does function f serve? John -- http://mail.python.org/mailman/listinfo/p

Re: subprocess: returncode v. poll()

2007-09-20 Thread 7stud
On Sep 20, 1:17 pm, 7stud <[EMAIL PROTECTED]> wrote: > Hi, > > What is the difference between: > > 1) getting the returncode directly from the subprocess object > 2) calling poll() on the subprocess object? > > Here is an example: > > import subprocess > > p = subprocess.Popen("ls", stdout=subproce

Re: A struct for 2.4 that supports float's inf and nan?

2007-09-20 Thread Paul Hankin
Both str(f) should be str(a) in pack_one_safe. -- Paul Hankin -- http://mail.python.org/mailman/listinfo/python-list

Re: cannot create my own dict

2007-09-20 Thread John J. Lee
"A.T.Hofkamp" <[EMAIL PROTECTED]> writes: [...] > I can derive from dict, but the problem with that is that I start with a > read/write dictionary, and I can only hope to plug all holes to prevent my > data > from leaking out. > By starting from 'object', I certainly don't have that problem, I sta

validating parser

2007-09-20 Thread Robert Schweikert
Is there a Python module which will do XSD validation? Thanks, Robert -- Robert Schweikert MAY THE SOURCE BE WITH YOU ([EMAIL PROTECTED]) LINUX -- http://mail.python.org/mailman/listinfo/python-list

Re: A struct for 2.4 that supports float's inf and nan?

2007-09-20 Thread Paul Hankin
On Sep 19, 9:58 pm, "Joshua J. Kugler" <[EMAIL PROTECTED]> wrote: > I'm trying to put some values into a struct. Some of these values are NaN > and Inf due to the nature of the data. As you well may know, struct (and > other things) in Python <= 2.4 doesn't support inf and nan float values. > You

Re: Lookup values from one table to another based on a value

2007-09-20 Thread koutoo
On Sep 20, 11:51 am, Bruno Desthuilliers wrote: > [EMAIL PROTECTED] a écrit : > > > On Sep 20, 10:34 am, Bruno Desthuilliers > [EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] a écrit : > (snip) > >>> Normally in Access I would just use a Dlookup and be done with it, or > >>> use a Recordset in V

Re: Python tickets summary

2007-09-20 Thread John J. Lee
"Facundo Batista" <[EMAIL PROTECTED]> writes: [...] > Based on an idea from Dennis Benzinger, now the temporal bars show the > moments where each comment was made, so it's easy to see the "rhythm" > of the ticket activity: > > http://www.taniquetil.com.ar/facundo/py_tickets.html I like that. I'

subprocess: returncode v. poll()

2007-09-20 Thread 7stud
Hi, What is the difference between: 1) getting the returncode directly from the subprocess object 2) calling poll() on the subprocess object? Here is an example: import subprocess p = subprocess.Popen("ls", stdout=subprocess.PIPE) print p.returncode print p.poll() print print p.stdout.read()

Re: Saving parameters between Python applications?

2007-09-20 Thread David
On 9/16/07, Stodge <[EMAIL PROTECTED]> wrote: > I'm trying to do the following. I have a Python application that is > run: > > python app1.py --location=c:\test1 > > What I want to do is save the location parameter, so I can then do (in > the same window): > > python app2.py > > And have app2.py au

Re: An Editor that Skips to the End of a Def

2007-09-20 Thread John J. Lee
"W. Watson" <[EMAIL PROTECTED]> writes: > Thanks, but no thanks. The learning curve is way too steep. [...] Eclipse must be able to do this. Eclipse is emacs for stupid people ;-) Seriously for a moment, I read something recently (maybe here?) about an Apple study that claimed to show that peop

Re: frange() question

2007-09-20 Thread John J. Lee
George Trojan <[EMAIL PROTECTED]> writes: > A while ago I found somewhere the following implementation of frange(): > > def frange(limit1, limit2 = None, increment = 1.): > """ > Range function that accepts floats (and integers). > Usage: > frange(-2, 2, 0.1) > frange(10) >

Re: Tapping into the access of an int instance

2007-09-20 Thread chris . monsanto
On Sep 20, 1:21 pm, "Tor Erik Sønvisen" <[EMAIL PROTECTED]> wrote: > Hi, > > Does anyone know how to interrupt the lookup of an integer value? I > know I need to subclass int, since builtin types can't be altered > directly... > > Below is how far I've come... What I want is to tap into the access

Re: An Editor that Skips to the End of a Def

2007-09-20 Thread alex
> Paul Rudin wrote: >> "W. Watson" <[EMAIL PROTECTED]> writes: >> >>> Is there an editor that allows one to position to put the cursor and >>> then by pushing some button goes to the end of the def? >> >> C-M-e in emacs/python-mode. > W. Watson wrote: > Thanks, but no thanks. The learning curve i

Re: Odd files; just left behind?

2007-09-20 Thread Bruno Desthuilliers
Robin Becker a écrit : > John J. Lee wrote: > >> Robin Becker <[EMAIL PROTECTED]> writes: >> >>> I see a folder .python-eggs in my home directory on one of our servers >>> with various .so files >>> >>> ~/.python-eggs/MySQL_python-1.2.2-py2.3-freebsd-6.1-SECURITY-i386.egg-tmp/_mysql.so >>> >>> >

Re: Will Python 3.0 remove the global interpreter lock (GIL)

2007-09-20 Thread Bruno Desthuilliers
Ben Finney a écrit : (snip) > One common response to that is "Processes are expensive on Win32". My > response to that is that if you're programming on Win32 and expecting > the application to scale well, you already have problems that must > first be addressed that are far more fundamental than th

Re: Will Python 3.0 remove the global interpreter lock (GIL)

2007-09-20 Thread Terry Reedy
"Paul Rubin" <"http://phr.cx"@NOSPAM.invalid> wrote in message news:[EMAIL PROTECTED] | It does sound like removing the GIL from CPython would have very high | costs in more than one area. Is my hope that Python will transition | from CPython to PyPy overoptimistic? I presume you mean 'will the

Re: Will Python 3.0 remove the global interpreter lock (GIL)

2007-09-20 Thread Terry Reedy
"Paul Rubin" <"http://phr.cx"@NOSPAM.invalid> wrote in message news:[EMAIL PROTECTED] | funding into PyPy development, since I think I saw something about the | EU funding being interrupted. As far as I know, the project was completed and promised funds paid. But I don't know of any major foll

Re: python-mcrypt install on Mac OSX

2007-09-20 Thread Ahmad ㋡ Baitalmal
On Sep 19, 2007, at 11:04 PM, Diez B. Roggisch wrote: > Ahmad ㋡ Baitalmal schrieb: >> Hi, >> I'm having a hard time getting python-mcrypt extension to build. >> I installed libmcrypt with --prefix=/usr and I checked that the >> library >> exists >> >> -rwxr-xr-x 1 root wheel352K Sep 19 1

Re: distutils, extensions, and missing headers

2007-09-20 Thread Robert Kern
Gary Jefferson wrote: > On Sep 20, 1:22 am, Robert Kern <[EMAIL PROTECTED]> wrote: >> Use the "headers" keyword to setup() to list the header files you want >> installed. > > I've tried "headers=['header1.h', 'header2.h']" in setup() as well > as in Extension(), and neither seem to get the file

Re: Sets in Python

2007-09-20 Thread Terry Reedy
"Chris Mellon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | On 9/20/07, Dustan <[EMAIL PROTECTED]> wrote: | > On Sep 19, 10:58 pm, Bryan Olson <[EMAIL PROTECTED]> wrote: | > > Bad news: Python 3000 has no immutable type for byte-strings. | > > The new bytes type cannot serve for

Internationalize a Tkinter application

2007-09-20 Thread Kevin Walzer
I'm investigating the possibility of internationalizing a Tkinter application that I develop. Tcl/Tk provides facilities for internationalizing applications via its msgcat package, documented in "how-to" fashion below: http://www.tcl.tk/doc/howto/i18n.html As far as I can tell, Tkinter does no

Re: python-mcrypt install on Mac OSX

2007-09-20 Thread Ahmad ㋡ Baitalmal
On Sep 19, 2007, at 11:04 PM, Diez B. Roggisch wrote: > Ahmad ㋡ Baitalmal schrieb: >> Hi, >> I'm having a hard time getting python-mcrypt extension to build. >> I installed libmcrypt with --prefix=/usr and I checked that the >> library >> exists >> >> -rwxr-xr-x 1 root wheel352K Sep 19 16

  1   2   >