Re: how to get name of function from within function?

2005-06-03 Thread Andrew Dalke
I'm with Steven Bethard on this; I don't know what you (Christopher J. Bottaro) are trying to do. Based on your example, does the following meet your needs? >>> class Spam(object): ... def funcA(self): ... print "A is called" ... def __getattr__(self, name): ... if name.startswith("_"

Re: For review: PEP 343: Anonymous Block Redux and Generator Enhancements

2005-06-03 Thread Andrew Dalke
Nicolas Fleury wrote: > There's no change in order of deletion, it's just about defining the > order of calls to __exit__, and they are exactly the same. BTW, my own understanding of this is proposal is still slight. I realize a bit better that I'm not explaining myself correctly. > As far as I

Re: any macro-like construct/technique/trick?

2005-06-03 Thread Paddy
If you still must have something like the c preprocessor then unix has m4 (and it seems there is a windows version http://gnuwin32.sourceforge.net/packages/m4.htm). The start of the doc reads: GNU M4 ** GNU `m4' is an implementation of the traditional UNIX macro processor. It is mostly SVR4

Re: Scope

2005-06-03 Thread Terry Reedy
"Elliot Temple" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I want to write a function, foo, so the following works: > > def main(): > n = 4 > foo(n) > print n > > #it prints 7 > > if foo needs to take different arguments, that'd be alright. > > Is this possible? No,

Re: how to get name of function from within function?

2005-06-03 Thread Christopher J. Bottaro
Steven Bethard wrote: [...snip...] > Yes, has's suggestion is probably the right way to go here. I'm still > uncertain as to your exact setup here. Are the functions you need to > wrap in a list you have? Are they imported from another module? A > short clip of your current code and what you wa

Re: For review: PEP 343: Anonymous Block Redux and Generator Enhancements

2005-06-03 Thread Ilpo =?iso-8859-1?Q?Nyyss=F6nen?=
Nicolas Fleury <[EMAIL PROTECTED]> writes: > What about making the ':' optional (and end implicitly at end of current > block) to avoid over-indentation? > > def foo(): > with locking(someMutex) > with opening(readFilename) as input > with opening(writeFilename) as output > ... H

Re: couple of new python articles on onlamp

2005-06-03 Thread George Yoshida
Kongulo(google crawling tool) seems to be using your App, py2exe. Great work, Thomas! Thomas Heller wrote: > Jeremy Jones <[EMAIL PROTECTED]> writes: > > >>I've got a couple of new articles on ONLamp: >> >>Writing Google Desktop Search Plugins >>http://www.onlamp.com/pub/a/python/2005/06/01/kong

weird cgi problem w/ apache

2005-06-03 Thread nephish
Hello all. i have a strange problem with some python cgi scripts. the deal is. i keep loosing permission to write to a file created by a cgi script. the file is created in a directory created by a python script. but after the file is created by the cgi script, another script in the same folder

Re: Scope

2005-06-03 Thread James Stroud
On Friday 03 June 2005 07:17 pm, Elliot Temple wrote: > Nothing is wrong with it in this case. I just want to know if Python > can do what I said. Read the python-list "working with pointers" thread from Tuesday. Good answers were posted there. James -- James Stroud UCLA-DOE Institute for Gen

Re: Scope

2005-06-03 Thread Robert Kern
Elliot Temple wrote: > Nothing is wrong with it in this case. I just want to know if Python > can do what I said. With a number of difficult hacks, yes. Passing around objects as namespaces, however, is vastly easier and far superior. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell

Re: Scope

2005-06-03 Thread Elliot Temple
On Jun 4, 2005, at 2:13 AM, Leif K-Brooks wrote: > Elliot Temple wrote: > >> I want to write a function, foo, so the following works: >> >> def main(): >> n = 4 >> foo(n) >> print n >> >> #it prints 7 >> > > What's wrong with: > > def foo(n): > return 7 > > def main(): > n = 4

Re: Scope

2005-06-03 Thread Leif K-Brooks
Elliot Temple wrote: > I want to write a function, foo, so the following works: > > def main(): > n = 4 > foo(n) > print n > > #it prints 7 What's wrong with: def foo(n): return 7 def main(): n = 4 n = foo(n) print n Anything else (including the tricks involving mu

Scope

2005-06-03 Thread Elliot Temple
I want to write a function, foo, so the following works: def main(): n = 4 foo(n) print n #it prints 7 if foo needs to take different arguments, that'd be alright. Is this possible? I already tried this (below), which doesn't work. foo only changes the global n. n = 3 def

Re: tutorial

2005-06-03 Thread J. W. McCall
zzz wrote: > May I know where is the good website for Python tutorial? Many thanks. How about...the Python website? (www.python.org) Google is also a good place to find a great multitude of things, including Python Tutorials. -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python config problem

2005-06-03 Thread grahamd
David Stanek wrote: > On Fri, Jun 03, 2005 at 01:16:17PM -0600, Manuel Pellecer wrote: > > i want to use mod_python with Apache2 and i made a .htaccess in the > > subdirectory where i have all my scripts: > > > > The .htacces goes like this: > > > > AddHandler mod_python .py > > PythonHandler mpte

Re: optparse.py: FutureWarning error

2005-06-03 Thread Kent Johnson
Terry Reedy wrote: > "Kent Johnson" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Terry Reedy wrote: >> >>>"kosuke" <[EMAIL PROTECTED]> wrote in message >>>news:[EMAIL PROTECTED] >>> >>> man python --- COMMAND LINE OPTIONS >>> >>> >>>This should REALLY be on the d

Re: how to get name of function from within function?

2005-06-03 Thread Steven Bethard
Christopher J. Bottaro wrote: > Basically I want to wrap every function in try/except automatically. [snip] > every function (err, method) is enclosed in the exact > same try/except error handling code. Everytime I make a new function, I > copy/paste that try/catch block. Yes, has's suggestion is

Re: Removing a warnings filter?

2005-06-03 Thread Dave Benjamin
Torsten Bronger wrote: > When I add a warning filter with warnings.filterwarnings, how can I > get rid of it? I've read about resetwarnings(), but it removes all > filters, even those that I didn't install in a certain function. I have never used this module, but judging by a quick glance of the

Re: What are OOP's Jargons and Complexities?

2005-06-03 Thread Matthias Buelow
Xah Lee wrote: > to be continued tomorrow. Please don't... mkb. -- http://mail.python.org/mailman/listinfo/python-list

Re: tutorial

2005-06-03 Thread Sandman
I'm a beginner as well, and I liked this one: http://docs.python.org/tut/tut.html But I ended up buying the "Learning Python" book anyway. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to get name of function from within function?

2005-06-03 Thread has
Christopher J. Bottaro wrote: > Basically I want to wrap every function in try/except automatically. Simplest way to do that would be something like: def wrapFunction(func): def wrapper(*args, **kargs): try: return func(*args, **kargs) except Exception, e:

Controlling source IP address within urllib2

2005-06-03 Thread Dan
Does anybody know how to control the source IP address (IPv4) when using the urllib2 library? I have a Linux box with several IP addresses in the same subnet, and I want to simulate several individuals within that subnet accessing web pages independently. I need the functionality of urllib2 becau

Re: The need to put "self" in every method

2005-06-03 Thread Ron Adam
Fernando M. wrote: > Hi, > > i was just wondering about the need to put "self" as the first > parameter in every method a class has because, if it's always needed, > why the obligation to write it? couldn't it be implicit? > > Or is it a special reason for this being this way? > > Thanks. Here'

Re: how to get name of function from within function?

2005-06-03 Thread Christopher J. Bottaro
Steven Bethard wrote: > Christopher J. Bottaro wrote: >> I want to get the name of the function from within the function. >> Something like: >> >> def myFunc(): >> print __myname__ >> > myFunc() >> 'myFunc' > > There's not a really good way to do this. Can you give some more detail > on

Re: For review: PEP 343: Anonymous Block Redux and Generator Enhancements

2005-06-03 Thread Nicolas Fleury
Andrew Dalke wrote: >>def foo(): >> with locking(someMutex) >> with opening(readFilename) as input >> with opening(writeFilename) as output >> ... > > > Nothing in Python ends at the end of the current block. > They only end with the scope exits. The order

Re: how to get name of function from within function?

2005-06-03 Thread Steven Bethard
Christopher J. Bottaro wrote: > I want to get the name of the function from within the function. Something > like: > > def myFunc(): > print __myname__ > myFunc() > 'myFunc' There's not a really good way to do this. Can you give some more detail on what exactly you're trying to do here

Re: mod_python config problem

2005-06-03 Thread Luis M. Gonzalez
Getting mod_python to work is hard because there are many things to get into account. Your Apache version should match the proper mod_python version, as well as the python version amd so on... If you are having many problems, I suggest installing Apache2Triad, which is a package that will install e

Re: provide 3rd party lib or not... philosophical check

2005-06-03 Thread Paul Rubin
Maurice LING <[EMAIL PROTECTED]> writes: > Just a philosophical check here. When a program is distributed, is it > more appropriate to provide as much of the required 3rd party > libraries, like SOAPpy, PLY etc etc, in the distribution itself or it > is the installer's onus to get that part done?

Re: What are OOP's Jargons and Complexities?

2005-06-03 Thread Christopher J. Bottaro
Paul McGuire wrote: > we just recently on > this forum had someone ask about "polymorphism" when what they really > meant was "overloaded method signatures." (It is even more unfortunate > that language features such as overloaded method signatures and > operator overloading get equated with OO

Re: Pressing A Webpage Button

2005-06-03 Thread J Correia
"Esben Pedersen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > How do i know which methods the ie object has? dir(ie) doesn't show > Navigate. For ie object: http://msdn.microsoft.com/workshop/browser/webbrowser/reference/ifaces/IWebBrowser2/IWebBrowser2.asp For document object: h

Re: calling ksh script from python

2005-06-03 Thread Donn Cave
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > thanks for your input... > well I just find out that modifying environment through ksh call is not > possible (can't get the new evironment back to python). I think the > best thing to do is to translate all my ksh to pure python... I tho

Re: calling ksh script from python

2005-06-03 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > * Cameron Laird (2005-06-02 18:08 +0100) > > In article <[EMAIL PROTECTED]>, > > Donn Cave <[EMAIL PROTECTED]> wrote: > >>Meanwhile, it might be worthwhile to reconsider the use > >>of ksh here, if you have any choice in

how to get name of function from within function?

2005-06-03 Thread Christopher J. Bottaro
I want to get the name of the function from within the function. Something like: def myFunc(): print __myname__ >>> myFunc() 'myFunc' Really what I want to do is to easily strip off the prefix of a function name and call another function. Like this: def prefix_myFunc(a, b, c): name = __myn

Re: Python interest group software

2005-06-03 Thread dstanek
> > David> Is there already any software out there to manage a Python > David> Interest Group? Something that can register users, take RSVPs > for > David> meetings, etc. > > I suspect a fair number take advantage of meetup.com. > > Skip > > The original group did use meetup.com. I'm n

Re: Python interest group software

2005-06-03 Thread Tim Churches
Skip Montanaro wrote: > David> Is there already any software out there to manage a Python > David> Interest Group? Something that can register users, take RSVPs for > David> meetings, etc. > > I suspect a fair number take advantage of meetup.com. And a fair number of people now suspec

Re: Python interest group software

2005-06-03 Thread Tim Churches
David Stanek wrote: > Is there already any software out there to manage a Python Interest > Group? Something that can register users, take RSVPs for meetings, > etc. I dare say that Roundup - http://roundup.sourceforge.net/ - (not to be confused with Roundup - http://www.roundup.com/ ) - could be

Re: For review: PEP 343: Anonymous Block Redux and Generator Enhancements

2005-06-03 Thread Andrew Dalke
Nicolas Fleury wrote: > What about making the ':' optional (and end implicitly at end of current > block) to avoid over-indentation? > > def foo(): > with locking(someMutex) > with opening(readFilename) as input > with opening(writeFilename) as output > ... > > would be equiva

Re: Python interest group software

2005-06-03 Thread Grig Gheorghiu
Try upcoming.org. In addition to the Web interface, they also offer a REST-ful API that you can use from your own app. Grig -- http://mail.python.org/mailman/listinfo/python-list

Re: Python interest group software

2005-06-03 Thread Skip Montanaro
David> Is there already any software out there to manage a Python David> Interest Group? Something that can register users, take RSVPs for David> meetings, etc. I suspect a fair number take advantage of meetup.com. Skip -- http://mail.python.org/mailman/listinfo/python-list

Python interest group software

2005-06-03 Thread David Stanek
Is there already any software out there to manage a Python Interest Group? Something that can register users, take RSVPs for meetings, etc. -- David Stanek www.roninds.net GPG keyID #6272EDAF on http://pgp.mit.edu Key fingerprint = 8BAA 7E11 8856 E148 6833 655A 92E2 3E00 6272 EDAF pgprkGXMh0x

Re: mod_python config problem

2005-06-03 Thread David Stanek
On Fri, Jun 03, 2005 at 01:16:17PM -0600, Manuel Pellecer wrote: > i want to use mod_python with Apache2 and i made a .htaccess in the > subdirectory where i have all my scripts: > > The .htacces goes like this: > > AddHandler mod_python .py > PythonHandler mptest > PythonDebug On Try adding th

Re: What are OOP's Jargons and Complexities?

2005-06-03 Thread Xah Lee
The Rise of “Inheritance” In well-thought-out languages, functions can have inner functions, as well as taking other functions as input and return function as output. Here are some examples illustrating the use of such facilities: subroutine generatePower(n) { return subroutine (x) {return x^n};

Re: For review: PEP 343: Anonymous Block Redux and Generator Enhancements

2005-06-03 Thread Nicolas Fleury
Guido van Rossum wrote: > After many rounds of discussion on python-dev, I'm inviting public > comments for PEP 343. Rather than posting the entire PEP text here, > I'm inviting everyone to read it on line > (http://www.python.org/peps/pep-0343.html) and then post comments on a > Wiki page I've cre

mod_python config problem

2005-06-03 Thread Manuel Pellecer
i want to use mod_python with Apache2 and i made a .htaccess in the subdirectory where i have all my scripts: The .htacces goes like this: AddHandler mod_python .py PythonHandler mptest PythonDebug On and I changed the main configuracion file of Apache2 like this: #--memepelle All

Formatting Time

2005-06-03 Thread Ognjen Bezanov
I never thought id need help with such a thing as time formatting (admittadly i never did it before) but ok, i guess there is a first for everything. I have a float variable representing seconds, and i want to format it like this: 0:00:00 (h:mm:ss) Now search as I might i am finding this quite

Re: thread vs GC

2005-06-03 Thread =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
Paul Rubin wrote: > Any suggestions for the cleanest way to get rid of the thread? As Jeff explains, it is rather unlikely that GC will collect primegen objects, since the generating thread holds self as a local variable. You should make background_generator have explicit q and event arguments, a

[ANN] Snakelets 1.41 and Frog 1.6

2005-06-03 Thread Irmen de Jong
I'm happy to announce the release of Snakelets 1.41 and at the same time Frog 1.6. Snakelets is a Python web application server. This project provides a threaded web server, Ypages (HTML+Python language, similar to Java's JSPs) and Snakelets: code-centric page request handlers (similar to Java's

Re: scripting browsers from Python

2005-06-03 Thread John J. Lee
[Michele Simionato] > > I would like to know what is available for scripting browsers from > > Python. [...] > > to do POST requests too. I don't want to use urllib to emulate a > > browser, I am > > interested in checking that browser X really works as intended with my > > application. Any suggest

Re: scripting browsers from Python

2005-06-03 Thread John J. Lee
Olivier Favre-Simon <[EMAIL PROTECTED]> writes: [...] > > I'd like to have a reimplementation of ClientForm on top of something > > like BeautifulSoup... > > > > > > John > > When taken separately, either ClientForm, HTMLParser or SGMLParser work > well. > > But it would be cool that competent

Re: Pressing A Webpage Button

2005-06-03 Thread Esben Pedersen
J Correia wrote: > "Elliot Temple" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>How do I make Python press a button on a webpage? I looked at >>urllib, but I only see how to open a URL with that. I searched >>google but no luck. >> >>For example, google has a button how

Re: couple of new python articles on onlamp

2005-06-03 Thread Terry Reedy
"Jeremy Jones" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've got a couple of new articles on ONLamp: > > Writing Google Desktop Search Plugins > http://www.onlamp.com/pub/a/python/2005/06/01/kongulo.html Wow, another use for Python. I should get this. Thanks. I would add t

Re: optparse.py: FutureWarning error

2005-06-03 Thread Terry Reedy
"Kent Johnson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Terry Reedy wrote: >> "kosuke" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>>man python --- >>> >>>COMMAND LINE OPTIONS >> >> >> This should REALLY be on the doc page of the Python site. > > Hear,

Re: couple of new python articles on onlamp

2005-06-03 Thread Thomas Heller
Jeremy Jones <[EMAIL PROTECTED]> writes: > I've got a couple of new articles on ONLamp: > > Writing Google Desktop Search Plugins > http://www.onlamp.com/pub/a/python/2005/06/01/kongulo.html > > and > > Python Standard Logging > http://www.onlamp.com/pub/a/python/2005/06/02/logging.html > > > Comm

Re: saving .zip or .txt email attachments instead of deleting them

2005-06-03 Thread scrimp
Here is the complete traceback..sorry about that though. I used the run button and entered in "C:\email.txt" for the msgfile parameter thats used for input This email.txt file has a zip file attached to it and is all in text, so hopefully I am working with the correct input file. I used the pop3

Re: ANN: Cleveland Area Python Interest Group

2005-06-03 Thread dale
Is the first meeting on June 6th, I only ask due to short notice. If so I'll be there. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Win32 and Condor

2005-06-03 Thread pythonUser_07
It's been a while since I've experimented with Condor, but it looks like " 'Access is denied.'", You might want to figure out what user the condor service is running as and log in as that user and try to run your code. -- http://mail.python.org/mailman/listinfo/python-list

Re: odbc and python

2005-06-03 Thread Scott David Daniels
MM wrote: > Are there any other odbc packages other than the win32all and mxodbc > ones? The win32all odbc.pyd can't access table structure info like > SQLColumns, and mxobdc requires a commercial license which is > unjustifiable for this tiny project. Any other OS alternatives for > win32?. Th

Compile debug packages on windows

2005-06-03 Thread mg
First, I compiled Python in DEBUG on Win32 with MSCV.net and the solution distributed in the Python packages. Second, I try to compiled NUMARRAY with my python debug : python_d setup.py build And the compilation crash with the following message : the file python25.lib does not exist (it

Re: bdist_wininst to distribute a patched python

2005-06-03 Thread Thomas Heller
mg <[EMAIL PROTECTED]> writes: > Hi, > > Because of I have patched Python, I would like to create a Windows > installer containing my patched-Python. So, I try to use the option > 'bdist_wininst' on the setup.py file distributed by python it is > supported ? bdist_wininst can only be used to

couple of new python articles on onlamp

2005-06-03 Thread Jeremy Jones
I've got a couple of new articles on ONLamp: Writing Google Desktop Search Plugins http://www.onlamp.com/pub/a/python/2005/06/01/kongulo.html and Python Standard Logging http://www.onlamp.com/pub/a/python/2005/06/02/logging.html Comments, criticisms, flames all welcome. Jeremy Jones -- ht

Re: minidom Node to Element

2005-06-03 Thread Richard Lewis
Hang on! It *knows*! Wow, you can call getElementsByTagName() on a Node object and it does the right thing. Weird, but I like it! Very Python! R. On Fri, 03 Jun 2005 17:07:37 +0100, "Richard Lewis" <[EMAIL PROTECTED]> said: > Hey, > > Can I convert an xml.dom.Node object to an xml.dom.Element ob

bdist_wininst to distribute a patched python

2005-06-03 Thread mg
Hi, Because of I have patched Python, I would like to create a Windows installer containing my patched-Python. So, I try to use the option 'bdist_wininst' on the setup.py file distributed by python it is supported ? If yes, I have a problem : the run tell me that pyconfig.h does not exist

minidom Node to Element

2005-06-03 Thread Richard Lewis
Hey, Can I convert an xml.dom.Node object to an xml.dom.Element object? I want to do the conversion inside a condition like this: if node.nodeType == Node.ELEMENT_NODE: # do conversion: element = Element(node) element = node.toElement() so it definitely won't cause problems. I just c

RE: Formatting Time

2005-06-03 Thread Andrew Dalke
Coates, Steve (ACHE) wrote: import time t=36100.0 time.strftime('%H:%M:%S',time.gmtime(t)) > '10:01:40' But if t>=24*60*60 then H cycles back to 0 >>> import time >>> t=24*60*60 >>> time.strftime('%H:%M:%S',time.gmtime(t)) '00:00:00' >>> Andrew

RE: tempfile.gettempdir() result on Windows

2005-06-03 Thread Tim Golden
| [Leo Breebaart] | | | | On MS Windows, I am trying to find out a good default location to | | save some temporary files. | | | | The tempfile module seemed to have exactly what I wanted: | | | | >>> import tempfile | | >>> tempfile.gettempdir() | | 'c:\\docume~1\\admini~1\\locals~1\\temp' | |

RE: tempfile.gettempdir() result on Windows

2005-06-03 Thread Tim Golden
[Leo Breebaart] | | On MS Windows, I am trying to find out a good default location to | save some temporary files. | | The tempfile module seemed to have exactly what I wanted: | | >>> import tempfile | >>> tempfile.gettempdir() | 'c:\\docume~1\\admini~1\\locals~1\\temp' | >>> | | My problem (e

tempfile.gettempdir() result on Windows

2005-06-03 Thread Leo Breebaart
On MS Windows, I am trying to find out a good default location to save some temporary files. The tempfile module seemed to have exactly what I wanted: >>> import tempfile >>> tempfile.gettempdir() 'c:\\docume~1\\admini~1\\locals~1\\temp' >>> My problem (entirely cosmetic, but still) is that I al

Re: Python 2.4 and BLT

2005-06-03 Thread John Roth
Could you please expand the BLT acronym. For the life of me, the only thing I associate it with is a Bacon, Lettuce and Tomato sandwich, and I'm sure that's not what you meant. John Roth "Lyddall's" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello. > > I am new to this list, b

Re: Formatting Time

2005-06-03 Thread Thomas Guettler
Am Fri, 03 Jun 2005 09:29:41 +0100 schrieb Ognjen Bezanov: > I never thought id need help with such a thing as time formatting > (admittadly i never did it before) but ok, i guess there is a first for > everything. > > I have a float variable representing seconds, and i want to format it > like t

Removing a warnings filter?

2005-06-03 Thread Torsten Bronger
Hallöchen! When I add a warning filter with warnings.filterwarnings, how can I get rid of it? I've read about resetwarnings(), but it removes all filters, even those that I didn't install in a certain function. In particular, I want to transform one special form of warning in an exception to kee

Re: Just remember that Python is sexy

2005-06-03 Thread Scott Kirkwood
Yes, but we don't want it to get out of hand, like calling it orgy() instead of join(). Or condom() instead of secure(). Or onClimax() instead of onFinished() :-)On 5/31/05, Eric Pederson <[EMAIL PROTECTED]> wrote: > I often can't remember that to remove spaces from a string whether it's> strip()

Re: compile python in release...

2005-06-03 Thread =?iso-8859-1?Q?Fran=E7ois?= Pinard
[mg] > My problem is here : all the source files are compiled with the -g > flag which might be the debug flag. (On the other hand, the option > -DNDEBUG is defined : it's normal !) Then my question is : Is exist > a flag/option to run the shell script named 'configure' allowing to > remove the '-

Re: anygui,anydb, any opinions?

2005-06-03 Thread Magnus Lycka
Skip Montanaro wrote: > Glade is fine for building Gtk user interfaces. I have no idea if there are > similar tools for other widget sets, though I wouldn't be surprised if such > tools existed. Once the GUI is fairly stable, most of the development after > that occurs in the underlying functiona

compile python in release...

2005-06-03 Thread mg
Hi, I try to install two Python environments on my platform: one in release, the other in debug. I generate the RELEASE Python environment with the following instructions : > ./configure --prefix=/usr/local/python --enable-shared > make My problem is here : all the source files are comp

RRArray for Python?

2005-06-03 Thread Edvard Majakari
I was wondering if there is already some 'official' module for round robin arrays. Of course, it is relatively easy to implement your own if you need it, but IMHO it feels like there should be one, because they are so general-purpose. Here's my implementation, if someone needs one. If there are e

Question about 'wave' module

2005-06-03 Thread [EMAIL PROTECTED]
Hello Python World! I've been playing with the 'wave' and 'audioop' modules in the library, and I have a question. When I tried to read a "wav" file with samples in 32-bit float, I got the following error: Traceback (most recent call last): File "Play.py", line 111, in ? playWAV(sys.argv[1

Re: Importing and source structure troubles

2005-06-03 Thread =?ISO-8859-1?Q?Tiago_St=FCrmer_Daitx?=
The "best" way depends on how you have structured your program. From what you've told I believe that setting the directories like dir1 dir2 dir3 is a good approach. As for the import errors you're getting, check this section from the tutorial: http://docs.python.org/tut/node8.html#

Re: Problem calling Python methods from C

2005-06-03 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, Stephen Kellett <[EMAIL PROTECTED]> writes Following my posting with the solution for anyone else that wants to know the answer. The solution appears to be not to use: >module = PyImport_AddModule("gc"); But to use module = PyImport_ImportModule("gc");

Re: decimal and trunkating

2005-06-03 Thread Peter Hansen
chris wrote: > I'm new to Python ... and I've used decimal._round() as above. What's the > deal with using underscore methods? (A link will do if that'll save you some > typing). Generally the underscore methods provide *internal* functionality that might be used by other, more externally accessi

Re: SFTP

2005-06-03 Thread Martin Franklin
Kornfeld Rick (sys1rak) wrote: > Good Morning > > I have scoured the internet looking for an Python SFTP API. So far, I > have been unable to find a suitable answer. Our needs are pretty basic. > FTP & TELNET are being removed from our environment and I need to > utilize SFTP for file transfer

Re: Beginner question: Logs?

2005-06-03 Thread Peter Hansen
Robert Kern wrote: > Greg Ewing wrote: [about the "from xxx import *" syntax] >> Better still, don't even *mention* it to a beginner. >> They don't need to know about it. At all. Really. > > Well, the OP's use is precisely why "from xxx import *" exists: the > interactive prompt. In that case (a

SFTP

2005-06-03 Thread Kornfeld Rick (sys1rak)
Title: Message Good Morning   I have scoured the internet looking for an Python SFTP API. So far, I have been unable to find a suitable answer. Our needs are pretty basic. FTP & TELNET are being removed from our environment and I need to utilize SFTP for file transfers.   As is probably sai

Problem calling Python methods from C

2005-06-03 Thread Stephen Kellett
Hello everyone, I'm trying to do something in C calling Python and its failing. I'd be grateful if you could take a look and hopefully you have an answer. What I'm trying to do is determine the address of the "collect" function in the "gc" module. I want to do this so that we can determine when a

Re: optparse.py: FutureWarning error

2005-06-03 Thread Michael Hoffman
John Machin wrote: > Michael Hoffman wrote: > >> Terry Reedy wrote: >> >>> c) Check to see if Python has a startup option for suppressing warnings >>> >>> As to c) python -h gives a list indicating what I thought, that -W >>> controls warnings, but gives insufficient info for me to use it, and >

Re: Formatting Time

2005-06-03 Thread darren kirby
quoth the Ognjen Bezanov: > I never thought id need help with such a thing as time formatting > (admittadly i never did it before) but ok, i guess there is a first for > everything. > > I have a float variable representing seconds, and i want to format it > like this: > > 0:00:00 (h:mm:ss) > > Now

RE: Formatting Time

2005-06-03 Thread Coates, Steve (ACHE)
> -Original Message- > From: Ognjen Bezanov [mailto:[EMAIL PROTECTED] > Sent: 03 June 2005 09:30 > To: python-list@python.org > Subject: Formatting Time > > I never thought id need help with such a thing as time > formatting (admittadly i never did it before) but ok, i guess > there is a f

Re: decimal and trunkating

2005-06-03 Thread chris
"Reinhold Birkenfeld" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Peter Hansen wrote: > > Reinhold Birkenfeld wrote: > >> He is speaking of Decimals... > >> > >> d = Decimal("199.999") > >> d._round(5, decimal.ROUND_DOWN) > > > > Is one really supposed to call the underscore meth

Re: optparse.py: FutureWarning error

2005-06-03 Thread Kent Johnson
Terry Reedy wrote: > "kosuke" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>man python --- >> >>COMMAND LINE OPTIONS > > > This should REALLY be on the doc page of the Python site. Hear, hear! I never even knew this existed! Where should it go in the docs? In the Language

Re: metaclass that inherits a class of that metaclass?

2005-06-03 Thread Michele Simionato
You should read the metaclass book, if you can find it. For the reference, see http://www-106.ibm.com/developerworks/linux/library/l-pymeta.html http://www-128.ibm.com/developerworks/linux/library/l-pymeta2/index.html Michele Simionato -- http://mail.python.org/mailman/listinfo

Re: calling ksh script from python

2005-06-03 Thread Thorsten Kampe
* Cameron Laird (2005-06-02 18:08 +0100) > In article <[EMAIL PROTECTED]>, > Donn Cave <[EMAIL PROTECTED]> wrote: >>Meanwhile, it might be worthwhile to reconsider the use >>of ksh here, if you have any choice in the matter. Ksh >>is fine for interactive use, but has some unfortunate >>flaws as a

Re: Information about Python Codyng Projects Ideas

2005-06-03 Thread Michael Hudson
"M1st0" <[EMAIL PROTECTED]> writes: > I hope that here is the right place for this kind of discussion. There's a new mailing list [EMAIL PROTECTED] which is probably more appropriate for specifics, but this list is probably OK for general discussion. Cheers, mwh -- Solaris: Shire horse that

Re: Simple Kiosks Serve The World

2005-06-03 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Jeff_Relf wrote: > > >>As I've told you a quintillion times, Earthlink's insanity aside, >>Win_XP is a virtual network, quite indepent of the connection used. >>Linux is hardly an OS, it's just a kernel. > > > The world doesn't need a 'virtual network'...it needs an I

Re: metaclass that inherits a class of that metaclass?

2005-06-03 Thread Steve Holden
infidel wrote: > Ok, forget everything I've said. The more I think about this the less > I understand it. I'm way out of my league here. > > sitting-down-and-shutting-up-ly y'rs, > > Well, that's a sign of maturity right there ;-) some-people-just-don't-know-when-to-ly y'rs - steve -- Steve

Re: odbc and python

2005-06-03 Thread Thomas Heller
Giles Brown schrieb: > MM wrote: > >>Are there any other odbc packages other than the win32all and mxodbc >>ones? The win32all odbc.pyd can't access table structure info like >>SQLColumns, and mxobdc requires a commercial license which is >>unjustifiable for this tiny project. Any other OS alterna

Re: calling ksh script from python

2005-06-03 Thread ronan_boisard
thanks for your input... well I just find out that modifying environment through ksh call is not possible (can't get the new evironment back to python). I think the best thing to do is to translate all my ksh to pure python... I thought that I could re-use some stufff, but I guest I'm going to tran

Re: [python-gtk] problem with multiple inheritance

2005-06-03 Thread Taki Jeden
Greg Ewing wrote: > Taki Jeden wrote: > >> class view_tree_model(gtk.GenericTreeModel,gtk.TreeSortable): >> >> raises a "TypeError: multiple bases have instance lay-out conflict" >> Is this a bug in gtk, or python-gtk, or something? > > It's not a bug, it's a limitation of the way Python > hand

Re: read input for cmd.Cmd from file

2005-06-03 Thread Peter Otten
Achim Domma (Procoders) wrote: > I'm writing a simple shell using cmd.Cmd. It would be very usefull if I > could read the commands as batchjob from a file. I've tried the following: [...] Your original approach should work too if you clear the use_rawinput flag and provide a do_EOF() method that

Re: Console Scripts

2005-06-03 Thread Simon Brunning
On 3 Jun 2005 01:21:04 -0700, Prema <[EMAIL PROTECTED]> wrote: > Just something which will be a simple answer for someone . > With an interactive python script, sometimes it seems necessary to > clear the terminal in order to provide a clear presentation to users > > With Bash then we just do

Formatting Time

2005-06-03 Thread Ognjen Bezanov
I never thought id need help with such a thing as time formatting (admittadly i never did it before) but ok, i guess there is a first for everything. I have a float variable representing seconds, and i want to format it like this: 0:00:00 (h:mm:ss) Now search as I might i am finding this quite

Console Scripts

2005-06-03 Thread Prema
Hi People ! Just something which will be a simple answer for someone . With an interactive python script, sometimes it seems necessary to clear the terminal in order to provide a clear presentation to users With Bash then we just do a 'clear' statement but this does not seem to work well in p

  1   2   >