Re: Canceling/interrupting raw_input

2005-04-18 Thread Daniel Cer
Just a little bit of a follow up on this... If you use win32api.TerminateProcess() instead of sys.exit(), everything works as it should on Windows. That is, there is no longer a need to hit 'enter' one last time in order to get "inputLoop" to terminate. So, modifying the sample code I posted ear

Re: Do You Want To Know For Sure That You Are Going To Heaven? The reason some people don't know for sure if they are going to Heaven when they die is because they just don't know. The good news is that you can know for sure that you are going to Heaven wh

2005-04-18 Thread thesonoftruth
I wonder if anyone yells VISHNU !! VISHNU ! when making out, -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Veusz 0.5 - a scientific plotting package

2005-04-18 Thread hemanth
Why not matplotlib? Of late, it has seemed to have picked up a lot of attention. I would prefer that the different plotting packages developers join hands and implement missing features into a single plotting package and make this a part of Python standard library. In contrast to the various web fr

Re: MS SQL Server/ODBC package for Python

2005-04-18 Thread Francois Lepoutre
Hi Peter Running your benchmark, I ran into a couple of interesting points. Using mx.ODBC, my times were 0.54 seconds and 6.56 seconds respectively, while using adodbapi my results are 3.55 seconds and 25.9 seconds respectively. mx.ODBC is faster with the simple query you provide. We agree on figu

Parse command line options

2005-04-18 Thread hue
I am trying to parse command line options using getopt module. I have written the following Code import string import getopt def usage(): print '''haarp_make.py -- uses getopt to recognize options Options: -n -- No -t -- Time -h -- help -i -- image_file

Re: need help in PySparse

2005-04-18 Thread David Fraser
monocalibro wrote: Hello all! I need ready-for-use installable version of PySparse (for FiPy), because I can't compile it with MingW. Or, may be, somebody knows step-by-step instruction to complie this package under Win32 using Mingw? Best regards At least describe the web site you got it from, th

Re: Apache mod_python

2005-04-18 Thread David Fraser
Dan wrote: I've been writing a server application in Python. The app listens on a socket and interfaces to a database. Now I'd like to write a web application to also access the database. It seems natural to use Python. I've installed mod_python (Debian libapache2-mod-python2.3, mod_python 3.1.3-

Re: Parse command line options

2005-04-18 Thread Klaus Alexander Seistrup
Hue wrote: > try: > > opts,args = getopt.getopt(sys.argv[1:], 'n:t:h:i:o:', > ["Number=","time=","help=","image_file=","Output Filename="]) > > except getopt.GetoptError: > print 'Unrecognized argument or option' > usage() > sys.exit(0) Proceed with e.g.:

Re: Python 2.4 killing commercial Windows Python development ?

2005-04-18 Thread Stefan Behnel
Roger Binns schrieb: As far as I can tell, they failed at two hurdles. One is that there is a new BitPim release every two weeks and they can't really keep up with that. (eg it takes around two weeks for packages with a lot of attention on Gentoo to become stable and often is a lot longer) This i

Re: Glade for Windows and Python

2005-04-18 Thread flupke
Richard Lyons wrote: Has anyone been successful in using Glade for Windows with Python? Yeah, i'm using it right now. See the previous email for the links Benedict -- http://mail.python.org/mailman/listinfo/python-list

Re: Parse command line options

2005-04-18 Thread Tim Daneliuk
hue wrote: try: opts,args = getopt.getopt(sys.argv[1:], 'n:t:h:i:o:', ^^^ This may be the problem. As I recall, a colon following an option indicates that it is followed by an argument as in "-f filename". For options that

distutils, PyBison and Mac OS X

2005-04-18 Thread Maarten Sneep
I'm trying to build PyBison[1] on Mac OS X, and I'm running into some problems with the distutils. Just for starters: PyBison requires Pyrex[2]. This is not a problem, and Pyrex seems to work without problems, at least the primes sample module shows a nice 25 to 30 fold speed increase over the pur

Re: re module methods: flags(), pattern()

2005-04-18 Thread Andrà SÃreng
A flag is just an int. From the re doc, you can see there is a ignorecase flag: " I IGNORECASE Perform case-insensitive matching; expressions like [A-Z] will match lowercase letters, too. This is not affected by the current locale. " Using the ignorecase flag: >>> import re >>> print re.I 2 >

Re: pre-PEP: Suite-Based Keywords

2005-04-18 Thread Reinhold Birkenfeld
Bengt Richter wrote: > On Sun, 17 Apr 2005 15:25:04 +0200, Reinhold Birkenfeld <[EMAIL PROTECTED]> > wrote: >>> Note that there is no problem adding other parameters, because :: is >>> just >>> a unary expression returning dict subtype instance, e.g., >>> >>> y = f(11,22,**:: >>>

Re: ANN: Veusz 0.5 - a scientific plotting package

2005-04-18 Thread Jeremy Sanders
On Mon, 18 Apr 2005 00:55:17 -0700, hemanth wrote: > Why not matplotlib? Of late, it has seemed to have picked up a lot of > attention. I would prefer that the different plotting packages developers > join hands and implement missing features into a single plotting package > and make this a part o

Re: Do You Want To Know For Sure That You Are Going To Heaven? The reason some people don't know for sure if they are going to Heaven when they die is because they just don't know. The good news is that you can know for sure that you are going to Heaven wh

2005-04-18 Thread Mike brown
In article <[EMAIL PROTECTED]>, "thesonoftruth" <[EMAIL PROTECTED]> wrote: > I wonder if anyone yells VISHNU !! VISHNU ! when making > out, I might have. It's been so long that I've forgotten. MJRB -- http://mail.python.org/mailman/listinfo/python-list

[PythonWin] MakePy and gencache.EnsureModule() do different things.

2005-04-18 Thread Paul Keating
I used MakePy to generate .py support for a COM dll. That created the file 30D58DAF-B538-45F1-8EFF-F69ABA2BA798x0x1x13.py I want to be sure that this file is present and so I used MakePy -i to construct a call to gencache.EnsureModule(). This is what it said: {30D58DAF-B538-45F1-8EFF-F69ABA2BA7

Re: Compute pi to base 12 using Python?

2005-04-18 Thread Nick Craig-Wood
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Nick Craig-Wood wrote: > > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > I'm using GMPY (see code). > > [snip] > > > > If you are using gmpy you might as well do it like this. > > > > gmpy.pi() uses the Brent-Salamin Arithmetic-Geometric Mea

Strings and Lists

2005-04-18 Thread Tom Longridge
My current Python project involves lots repeatating code blocks, mainly centred around a binary string of data. It's a genetic algorithm in which there are lots of strings (the chromosomes) which get mixed, mutated and compared a lot. Given Python's great list processing abilities and the relative

Removing dictionary-keys not in a set?

2005-04-18 Thread Tim N. van der Leeuw
Hi, I'd like to remove keys from a dictionary, which are not found in a specific set. So it's kind of an intersection-operation. I can create a new dictionary, or a loop over all keys and test them for set-membership, but I was wondering if there was a smart way to express this in 1 or 2 concise

Can a function be called within a function ?

2005-04-18 Thread Peter Moscatt
Is it possible to write code and allow a function to be called within another like I have shown below ? Pete def populatelist(): f=open(_globals.appath + "dxcluster.svr","r") while true: text = f.readline() if text =="": b

Problem using py2exe

2005-04-18 Thread Glauco Silva
Hi, I´m with problem to create a executable program in python. I´m using py2exe but i don´t know if it´s right. My setup.py:   from distutils.core import setupimport py2exefrom glob import glob   setup(    # The first three parameters are not required, if at least a    # 'version' is give

(Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-18 Thread Bill Davy
I downlaoded and installed http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi I'm trying to build an extension using SWIG 1.3.24 and the linker needs python24_d.lib (I do not have the DLL either). I've not found it in any of the downloads. So I tried to download the source to build it mys

compiling python 2.4.1 on Linux_X86_64 using PGI compiler fails

2005-04-18 Thread Berthold Höllmann
I am trying to compile Python on an Opteron machine using the PGI C compiler under Linux. I use: CC=pgcc ./configure --prefix=/usr/local/gltools/python/Python-2.2.1 \ --exec-prefix=/usr/local/gltools/python/Python-2.2.1/$GL_ARCH \ --with-cxx=pgCC but make fails with: pgCC -Xlinker -expo

Re: Can a function be called within a function ?

2005-04-18 Thread Tim N. van der Leeuw
Hiya, That's certainly possible, it's standard practice. (It might be cleaner to pass filenames using parameters though) cheers, --Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: pydoc preference for triple double over triple single quotes--anyreason?

2005-04-18 Thread Kent Johnson
Brian van den Broek wrote: Kent Johnson said unto the world upon 2005-04-17 16:17: Brian van den Broek wrote: Kent Johnson said unto the world upon 2005-04-16 16:41: Brian van den Broek wrote: I've just spent a frustrating bit of time figuring out why pydoc didn't extract a description from my mod

Re: Can a function be called within a function ?

2005-04-18 Thread Kent Johnson
Peter Moscatt wrote: Is it possible to write code and allow a function to be called within another like I have shown below ? Yes, of course. In fact you do it six times in the code below, to call open(), readline(), append(), close(), main() and populatelist(). Kent Pete def populatelist():

Re: Removing dictionary-keys not in a set?

2005-04-18 Thread Satchidanand Haridas
Hi, I am not sure if this way is a good one, but it certainly is consise. Also sometimes, it's better to go for a simple approach than the consise one (for readability). With the abive disclaimer, I present my solution: d1 = {1 : 2, 3 : 4, 5 : 6, 7 : 8, 9 : 10 } s1 = [ 1, 5, 7 ] # assuming you a

Re: Strings and Lists

2005-04-18 Thread [EMAIL PROTECTED]
Hello Tom, I think it is more efficient if we can use list (with True,False) member to do genetics algorithms. Of course a lot of works to do to change from string binary into boolean list. I do programming genetics algorithms in C# I guess I have to modify my program also because my old program

Re: Strings and Lists

2005-04-18 Thread Sidharth Kuruvila
Hi, I not sure what sorts of operations you plan to do. But if you intend to use fixed length arrays or even carrying out repetetive operations. You should probably look at numeric http://numeric.scipy.org/ On 18 Apr 2005 04:42:17 -0700, Tom Longridge <[EMAIL PROTECTED]> wrote: > My current Py

fpectl

2005-04-18 Thread Sébastien Boisgérault
Hi all, Can anybody tell me why I can't load the fpectl module in my Python interpreter: >>> import fpectl Traceback: ... ... ImportError: No module named fpectl My platform is Linux (Mandrake 10.x) + Python2.4, built from the (python.org) sources and configured with the --with-fpectl option. A

Re: ANN: Python 2.3.2 for PalmOS available

2005-04-18 Thread Lucio Torre
Make sure you write the expression in the lower text-area, and then press the send button. This should do it. I did the port something like a year ago (when i didnt knew metroweks for Palm was discontinued) and when i tried it last week i couldnt figure out how to use it. Then i realized that i mu

Re: Strings and Lists

2005-04-18 Thread Bill Mill
On 18 Apr 2005 04:42:17 -0700, Tom Longridge <[EMAIL PROTECTED]> wrote: > My current Python project involves lots repeatating code blocks, > mainly centred around a binary string of data. It's a genetic > algorithm in which there are lots of strings (the chromosomes) which > get mixed, mutated and

Re: ANN: Python 2.3.2 for PalmOS available

2005-04-18 Thread beliavsky
What are the potential applications of Python on PalmOS? Just curious. -- http://mail.python.org/mailman/listinfo/python-list

trying to parse a file...

2005-04-18 Thread bruce
hi, i'm trying to modify an app (gforge) that uses python to do some file parsing/processing... i have the following shell file that uses python. if i understand it correctly, it's supposed to modify the 'viewcvs.conf' file, and replace/update the section with 'svn_roots'. it isn't working corre

Re: Strings and Lists

2005-04-18 Thread Peter Hansen
Tom Longridge wrote: My current Python project involves lots repeatating code blocks, mainly centred around a binary string of data. It's a genetic algorithm in which there are lots of strings (the chromosomes) which get mixed, mutated and compared a lot. Given Python's great list processing abilit

Can't compile with --enable-shared on MacOSX

2005-04-18 Thread Lothar Scholz
Help, i tried to generate a dynamic library from the official Python-2.4.0.tgz on MacOSX 10.3 but when i do the ./configure --enable-shared ; make ; sudo make install or ./configure --enable-shared=yes ; make ; sudo make install It links statically. It's also strange that i can't find a libp

accesing pages (or ranges of pages) via Reportlab

2005-04-18 Thread Rajarshi Guha
Hi, I've been using pdflatex to dump ranges of pages from a PDF file via Python. However, I was looking at the Reportlab toolkit and was wondering if this operation would be possible using this toolkit as well. Admittedly, I have'nt read the documentation in detail, but I was wondering if anybody

Re: ANN: Python 2.3.2 for PalmOS available

2005-04-18 Thread Peter Hansen
[EMAIL PROTECTED] wrote: What are the potential applications of Python on PalmOS? Just curious. Python is a general purpose programming language, as you know. Doesn't that suggest that the set of potential applications is pretty much all those which don't require the raw performance of C or perhap

Re: accesing pages (or ranges of pages) via Reportlab

2005-04-18 Thread Peter Hansen
Rajarshi Guha wrote: Hi, I've been using pdflatex to dump ranges of pages from a PDF file via Python. However, I was looking at the Reportlab toolkit and was wondering if this operation would be possible using this toolkit as well. Admittedly, I have'nt read the documentation in detail, but I was w

Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-18 Thread A.B., Khalid
Bill Davy wrote: > I downlaoded and installed > http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi > > I'm trying to build an extension using SWIG 1.3.24 and the linker needs > python24_d.lib (I do not have the DLL either). I've not found it in any of > the > downloads. > > So I tried to down

Re: ANN: Python 2.3.2 for PalmOS available

2005-04-18 Thread Lucio Torre
Most likely you run out of stack. The amount of memory this beast required for initialization was too much for most old Palms. Ive tried it on PalmOS simulator mainly, and on some version of OS5 hardware. Lucio. -- http://mail.python.org/mailman/listinfo/python-list

ANN: Python Training In South Africa

2005-04-18 Thread Gerrit van Dyk
AgileWorks (Pty) Ltd will be presenting an "Introduction to Python" training course at "The Innovation Hub" from the 4-6th of May 2005. For more detail visit our website: (http://www.agileworks.net/AgileWorks/Training/Python/) -- http://mail.python.org/mailman/listinfo/python-list

(PHP or Python) Developing something like www.tribe.net

2005-04-18 Thread Mir Nazim
Hi there. I am about to undertake a project. My employer wants it to be developed in PHP. While I was thinking that Python will be better for this job. The project will implement the functionality similar to Yahoo360 (http://www.360.yahoo.com), http://www.Tribe.net, Orkut etc. 1) There will be a

Working with method-wrapper objects

2005-04-18 Thread Peer Dr. Griebel
Hi, I'm currently working on a Python Management Console. During inspection of my objects I stumbled over method-wrapper objects. Such an object may be obtained e.g. as method_wrapper = [].__str__ My problem is: This object is not a method, not a function, not a method descriptor. And it is

Zope3 and Plone

2005-04-18 Thread Mir Nazim
Hi, I wanted to know what will happen to plone once Zope3 will be official version. Is plone being ported to Zope3. I googled it but did not come accross anything stating the plone's migration to zope3. I am thinking to take up a project. plone is a candidate for it. should i want to take benifi

Re: Slight discrepancy with filecmp.cmp

2005-04-18 Thread Ivan Van Laningham
Hi All-- John Machin wrote: > > On Sun, 17 Apr 2005 22:06:04 -0600, Ivan Van Laningham > <[EMAIL PROTECTED]> wrote: > [snip] > > So I wrote a set of > >programs to both index the disk versions with the cd versions, and to > >compare, using filecmp.cmp(), the cd and disk version. Works fine. > >T

Re: accesing pages (or ranges of pages) via Reportlab

2005-04-18 Thread Larry Bates
ReportLab doesn't support this in the free version but they sell an add-on called PageCatcher that has this feature. I've used it on a couple of projects and it works EXTREMELY well. -Larry Rajarshi Guha wrote: > Hi, I've been using pdflatex to dump ranges of pages from a PDF file via > Python.

Re: (PHP or Python) Developing something like www.tribe.net

2005-04-18 Thread Larry Bates
Don't write off Zope2/Plone too quickly. Zope is making many of the extensions/features in Zope3 available in Zope2 (V2.8+). As with any LARGE application, Zope2 is much more mature than the newer Zope3. It will also be extremely difficult to find programmers/consultants with any Zope3 experienc

Behaviour of str.split

2005-04-18 Thread Will McGugan
Hi, I'm curious about the behaviour of the str.split() when applied to empty strings. "".split() returns an empty list, however.. "".split("*") returns a list containing one empty string. I would have expected the second example to have also returned an empty list. What am I missing? TIA, Will

Re: Can't compile with --enable-shared on MacOSX

2005-04-18 Thread Maarten Sneep
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Lothar Scholz) wrote: > i tried to generate a dynamic library from the official > Python-2.4.0.tgz on MacOSX 10.3 but when i do the > > ./configure --enable-shared ; make ; sudo make install > > It links statically. It's also strange that i can

Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-18 Thread Bill Davy
"A.B., Khalid" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Bill Davy wrote: >> I downlaoded and installed >> http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi >> >> I'm trying to build an extension using SWIG 1.3.24 and the linker > needs >> python24_d.lib (I do not have t

Re: Nokia to speak at Python-UK next week

2005-04-18 Thread Nick Craig-Wood
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote: > I am please to announce that Tapio Tallgren of Nokia Research > Labs is coming to Python-UK to talk about Python on the Nokia Series > 60 phones. If you want to get hands-on, upgrade that handset now! Cool! Not entirely on topic, but does anyon

Re: pre-PEP: Simple Thunks

2005-04-18 Thread Serhiy Storchaka
Brian Sabbey wrote: do f in with_file('file.txt'): print f.read() def with_file(filename): f = open(filename) yield f f.close() for f in with_file('file.txt'): print f.read() t = "no file read yet" do f in with_file('file.txt'): t = f.read() t = "no file read yet" for f in w

Re: Zope3 and Plone

2005-04-18 Thread Josef Meile
Hi Mir, you are asking in the wrong place. This is a python specific list. You can find a suitable list here: http://mail.zope.org/mailman/listinfo Regards, Josef Mir Nazim wrote: Hi, I wanted to know what will happen to plone once Zope3 will be official version. Is plone being ported to Zope3. I g

Re: Zope3 and Plone

2005-04-18 Thread bruno modulix
Mir Nazim wrote: Hi, I wanted to know what will happen to plone once Zope3 will be official version. (snip) what should be done. Ask on the Plone mailing list ?-) -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')]

How standard is the standard library?

2005-04-18 Thread steve.leach
Newbie question: Looking through my stack of books and various on-line references, I have seen several libraries and library functions listed as depreciated. Is there a road map or concrete list of what parts of the standard library are to be considered reliable and permanent? Coming from C, I

Re: pre-PEP: Simple Thunks

2005-04-18 Thread Ron_Adam
On Sun, 17 Apr 2005 19:56:10 -0700, Brian Sabbey <[EMAIL PROTECTED]> wrote: >I also wouldn't do it that way. I don't see a class as being much better, >though. If I understand you correctly, with classes you would have >something like: > >p = Pickled('pickled.txt') >p.load() >p.data.append('mo

Re: Behaviour of str.split

2005-04-18 Thread runes
The behaviour of "".split("*") is not that strange as the splitpoint always disappear. The re.split() have a nice option to keep the splitpoint which the str.split should have, I think. One expectation I keep fighting within myself is that I expect "mystring".split('') to return ['m', 'y', 's',

Re: Strings and Lists

2005-04-18 Thread Donn Cave
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Tom Longridge) wrote: > My current Python project involves lots repeatating code blocks, > mainly centred around a binary string of data. It's a genetic > algorithm in which there are lots of strings (the chromosomes) which > get mixed, mutated a

Re: Removing dictionary-keys not in a set?

2005-04-18 Thread Steven Bethard
Tim N. van der Leeuw wrote: Hi, I'd like to remove keys from a dictionary, which are not found in a specific set. So it's kind of an intersection-operation. I can create a new dictionary, or a loop over all keys and test them for set-membership, but I was wondering if there was a smart way to expre

Re: How standard is the standard library?

2005-04-18 Thread TZOTZIOY
On Mon, 18 Apr 2005 11:43:15 -0400, rumours say that "steve.leach" <[EMAIL PROTECTED]> might have written: >Newbie question: Looking through my stack of books and various on-line >references, I have seen several libraries and library functions listed >as depreciated. > >Is there a road map or co

Re: Python 2.4 killing commercial Windows Python development ?

2005-04-18 Thread Roger Binns
"Stefan Behnel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Roger Binns schrieb: >> As far as I can tell, they failed at two hurdles. One is that there >> is a new BitPim release every two weeks and they can't really keep up >> with that. (eg it takes around two weeks for pac

Re: Removing dictionary-keys not in a set?

2005-04-18 Thread Aahz
In article <[EMAIL PROTECTED]>, Tim N. van der Leeuw <[EMAIL PROTECTED]> wrote: > >I'd like to remove keys from a dictionary, which are not found in a >specific set. So it's kind of an intersection-operation. Why not just use the builtin set operations? -- Aahz ([EMAIL PROTECTED]) <*>

SQLite Database Manager

2005-04-18 Thread dcrespo
Hi all... Does anybody know about the best SQLite Database Manager open source web-based or standalone app under windows? I tried: - SQLiteManager (web-based - http://sqlitemanager.sourceforge.net/) but I can't get it working. (When I try to just create a new database, it does nothing... If anyone

Re: MS SQL Server/ODBC package for Python

2005-04-18 Thread M.-A. Lemburg
Peter Herndon wrote: :) Knock away, as my info isn't scientific anyway. In my case, ASA is *not* local. The db is running on a 500MHz x 2 server with 768MB RAM, over 100BaseT connection. That same server is also running the MSSQL instance, and IIS. Running your benchmark, I ran into a couple of

Any movement on FreeBSD segfaults when using threads?

2005-04-18 Thread Mike C. Fletcher
There was a post a few months ago from "snacktime" in which they described a failure when running under Twisted: http://mail.python.org/pipermail/python-list/2005-February/265137.html which they eventually narrowed down to an apparent problem with pycrypto: http://mail.python.org/piperma

Re: fpectl

2005-04-18 Thread Matt
Sébastien Boisgérault wrote: > Hi all, > > Can anybody tell me why I can't load the fpectl module in my Python > interpreter: > > >>> import fpectl > Traceback: ... > ... > ImportError: No module named fpectl > > My platform is Linux (Mandrake 10.x) + Python2.4, built from the > (python.org) sourc

Re: pre-PEP: Suite-Based Keywords

2005-04-18 Thread Ron_Adam
On Mon, 18 Apr 2005 12:50:24 +0200, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: >y = (f(11, 22, x=1, y='y for f') * > g(*args_from_somewhere, > x='x for g', y='y for g', > foo=lambda: return 'foo for g')) > >would be my current way to express this. But still, the less lines, >th

How to get a Function object from a Frame object

2005-04-18 Thread Gigi
Hi, I need access to a function object that corresponds to a frame object in a certain case from inside the function. I can get the frame object using: f = sys._getframe(0) But the resulting frame object doesn't contain the information I need. There is a lot of information in the code object (f.

Re: MS SQL Server/ODBC package for Python

2005-04-18 Thread Peter Herndon
> > Next I modified the benchmark to reflect my particular circumstances > > more accurately (?Maybe? Comments invited). I changed the query to > > one of the queries in regular use in my application. This query > > selects 26 columns from 3 joined tables, with a where clause "where > > f476 = ?

Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-18 Thread James Carroll
Hi Bill, Python 2.4 requires VC7.1 I just ran into this recently. Once I installed VC7.1, I could easily compile the Python source to create a debug lib. Winzip should be able to read the python source tarball... There is one trick though. Once you download it, it might get renamed to python.ta

(no subject)

2005-04-18 Thread franceschini
-- Virus Warning Message (on cesio.consuldata.com.br) Found virus WORM_MYDOOM.M in file document.pif (in document.zip) The uncleanable file is deleted. Para maiores informacoes, contate o suporte da ConsulData: +55 (13) 3219-6522 ou [EMAIL PROTECTED] ---

EasyDialogs module problem with python 2.4.1

2005-04-18 Thread scott
First my setup: I'm using the framework build of Python 2.4.1 ( http://bob.pythonmac.org/archives/2005/03/31/macpython-241-installer/ ) on an ibook G4 running Mac OS 10.3.8. I installed wxPython 2.5.5.1 ( Unicode runtime 2.5.5.1 for the Panther version of Macpython-OSX 2.4 ) ( http://wxpython.org

Re: compiling python 2.4.1 on Linux_X86_64 using PGI compiler fails

2005-04-18 Thread "Martin v. Löwis"
Berthold Höllmann wrote: > Has anyone compiled python successfully using PGI compilers under 64 > bit Linux. If yes, what are the neccesarry switches? As a starting point, I would try to compile without optimization. If the compiler has something similar to gcc's -fno-strict-aliasing, you should

Re: EasyDialogs module problem with python 2.4.1

2005-04-18 Thread "Martin v. Löwis"
scott wrote: > EasyDialogs module > > ( http://www.python.org/doc/2.4.1/mac/module-EasyDialogs.html ) > > works with pyshell (interactive python program included with wxPython) > but not with python launched at the terminal: Could you be more precise what "works not" means? What do you expect t

Re: EasyDialogs module problem with python 2.4.1

2005-04-18 Thread scott
scott wrote: First my setup: I'm using the framework build of Python 2.4.1 ( http://bob.pythonmac.org/archives/2005/03/31/macpython-241-installer/ ) on an ibook G4 running Mac OS 10.3.8. I installed wxPython 2.5.5.1 ( Unicode runtime 2.5.5.1 for the Panther version of Macpython-OSX 2.4 ) ( http:/

Re: Removing dictionary-keys not in a set?

2005-04-18 Thread Tim N. van der Leeuw
Hi Aahz, The problem with using the builtin set operations is, that the dictionary keys don't represent a set, so you can't directly create a new dictionary using set methods. So I'm looking for what's a concise way to update a dictionary, or create a new dictionary, using basically an intersecti

Re: Removing dictionary-keys not in a set?

2005-04-18 Thread Tim N. van der Leeuw
Hi Klaus, I think I like the looks of your version the best, so far. Readable and clear, to me. cheers and thanks, --Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with unpack hex to decimal

2005-04-18 Thread [EMAIL PROTECTED]
Thank you all very much. It looked like I was not the only one confused. Jake. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get a Function object from a Frame object

2005-04-18 Thread Steven Bethard
Gigi wrote: I need access to a function object that corresponds to a frame object in a certain case from inside the function. I can get the frame object using: f = sys._getframe(0) But the resulting frame object doesn't contain the information I need. There is a lot of information in the code ob

Re: Removing dictionary-keys not in a set?

2005-04-18 Thread Steven Bethard
Tim N. van der Leeuw wrote: In my taste, using generator expressions with conditions actually doesn't look very readable; it hides the set-membership test under the syntactic clutter. You might try different indentation. I find that I write a lot of my list comprehensions and generator expression

Re: Behaviour of str.split

2005-04-18 Thread Tim N. van der Leeuw
runes wrote: > The behaviour of "".split("*") is not that strange as the splitpoint > always disappear. The re.split() have a nice option to keep the > splitpoint which the str.split should have, I think. > > One expectation I keep fighting within myself is that I expect > > "mystring".split('') t

Re: ANN: Python 2.3.2 for PalmOS available

2005-04-18 Thread Fraca7
On Fri, 15 Apr 2005 16:40:05 -0700, [EMAIL PROTECTED] wrote: > Hello, > While talking with Facundo while in a PyAr meeting (python-argentina, > http://www.python.org/ar ) he told me that there is some interest in > this platform. You bet there is. i almost bought a Pocket PC instead of my Clié T

Re: Behaviour of str.split

2005-04-18 Thread runes
[Tim N. van der Leeuw] > Fortunately, this is easy to write as: list("mystring"). Sure, and map(None, "mystring") Anyways, I have settled with this bevaviour, more or less ;-) Rune -- http://mail.python.org/mailman/listinfo/python-list

packages

2005-04-18 Thread Mage
Hello, I read about modules and packages in the tutorial. I think I understand how to use packages and modules, even I know how to create a module (as far I understand it's a simple .py) file , but I don't know how can I create a package and when should I do it. Where should I look for mor

Re: Removing dictionary-keys not in a set?

2005-04-18 Thread Oren Tirosh
"Tim N. van der Leeuw" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Hi, > > I'd like to remove keys from a dictionary, which are not found in a > specific set. Here's my magic English-to-Python translator: "I'd like to ... keys which ..." -> "for key in" "keys from a di

Re: packages

2005-04-18 Thread Chris Cioffi
Check out http://docs.python.org/tut/node8.html#SECTION00840 Basically a package is a directory with one or more Python modules along with the "special" module called __init__.py. Chris On 18/04/05, Mage <[EMAIL PROTECTED]> wrote: > Hello, > > I read about modules and pack

Re: packages

2005-04-18 Thread Jaime Wyant
A package is a collection of related modules. The modules are 'collected' in a directory that contains a special __init__.py script. Put this directory some where in your PYTHONPATH and you can do stuff like -> from mypackage.mymodule import MyObject The tutorial uses a sound package as its exam

Replaying multimedia data.

2005-04-18 Thread [EMAIL PROTECTED]
Hello, On a robotic project I am working on, I am taking data through different sensors (cameras, acceleration, gyroscopes,) and store the attendant data into files for further processing. When I am done gathering data, I read them offline using nearly the same script as the one I used to gat

Re: Replaying multimedia data.

2005-04-18 Thread Diez B. Roggisch
> When I am done gathering data, I read them offline using nearly the > same script as the one I used to gather them. While I don't have a > problem with reading them in a text format, I would like to display > them to others than myself in a way that is visually appealing. > Something along the li

Re: Pattern Matching Given # of Characters and no String Input; use RegularExpressions?

2005-04-18 Thread tiissa
Synonymous wrote: tiissa <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... tiissa wrote: If you know the number of characters to match can't you just compare slices? If you don't, you can still do it by hand: In [7]: def cmp(s1,s2): : diff_map=[chr(s1[i]!=s2[i]) for i in r

Re: packages

2005-04-18 Thread F. Petitjean
Le Mon, 18 Apr 2005 20:29:39 +0200, Mage a écrit : >Hello, > > I read about modules and packages in the tutorial. I think I understand > how to use packages and modules, even I know how to create a module (as > far I understand it's a simple .py) file , but I don't know how can I > create

Re: packages

2005-04-18 Thread tiissa
Jaime Wyant wrote: What I *dont* like about the example is the PascalStyleCasing used for the package names. Is their not some *suggested* standard on naming conventions? There is: see PEP 8. http://www.python.org/peps/pep-0008.html However, I understood there was no definitive convention hence va

Twisted for online games

2005-04-18 Thread sir.shz
Hi, I'm just starting to play with Twisted, and planning to use it for sone online games (e.g., casino games, etc.), have people done that before, are there any pointers? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Do You Want To Know For Sure That You Are Going To Heaven? The reason some people don't know for sure if they are going to Heaven when they die is because they just don't know. The good news is that you can know for sure that you are going to Heaven wh

2005-04-18 Thread sheltech
No, but I know some cowboys who are ... (how can I put this delicately?) er... inclined towards the bovine , who yell "Bramah !" . Did I say I knew them?... I meant "knew OF" them. Yeah , "OF". HTH DS "Mike brown" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In article <[EMAIL PR

Re: Parse command line options

2005-04-18 Thread thomasadunham
Hue, It looks like you may have options and arguments confused. Arguments are the pieces of information that your program needs to run. Options are used to tune the behaviour of your program. For example: grep -i foo bar Tries to match the expression "foo" in the file "bar", ignoring the case of t

Re: Python 2.4 killing commercial Windows Python development ?

2005-04-18 Thread Jarek Zgoda
Roger Binns napisał(a): The distutils approach is mainly useful for packages and libraries, not for applications. And of course it still has the prerequisites issues mentioned earlier. This reminds me, that there is still no clear direction as to where install Python applications on Linux if one

Re: fpectl

2005-04-18 Thread tiissa
Matt wrote: Sébastien Boisgérault wrote: My platform is Linux (Mandrake 10.x) I'm assuming that means you can't use it on a Windows platform It's harsh to say Mandrake is a Windows platform. ;o) -- http://mail.python.org/mailman/listinfo/python-list

def a((b,c,d),e):

2005-04-18 Thread AdSR
Fellow Pythonistas, Please check out http://spyced.blogspot.com/2005/04/how-well-do-you-know-python-part-3.html if you haven't done so yet. It appears that you can specify a function explicitly to take n-tuples as arguments. It actually works, checked this myself. If you read the reference manua

  1   2   >