Re: Can I use python for this .. ??

2006-05-04 Thread Terry Reedy
"placid" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] .) > > When you hibernate/boot up/hibernate for a long time without a clean > reboot, Windows becomes unstable... This seems to depend on the system. I have gone at least a week, maybe two, with nightly hibernations and no pr

Re: Can I use python for this .. ??

2006-05-04 Thread placid
Petr Jakes wrote: > Why using Python? > What about? > 1. Open Power Options in Control Panel. (Click Start, click Control > Panel, and then double-click Power Options.) > 2.Click the Hibernate tab, select the Enable hibernate support check > box, and then click Apply. > (If the Hibernate tab is un

Re: Swaying A Coder Away From Python

2006-05-04 Thread Terry Reedy
"Tim Williams" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > idea how large its user-base is. As I said, the email was forwarded > to someone who thought I would be interested. Well, it got Fredrik to post the link to a really nice intro to Django, which I had not seen before

Re: Tuple assignment and generators?

2006-05-04 Thread Carl Banks
Larry Bates wrote: > You must be careful with this as they all point to > exactly the same object. Example: > > >>> q = r = s = t = u = v = 0 > >>> id(q) > 3301924 > >>> id(r) > 3301924 > >>> id(s) > 3301924 But: >>> q = 0 >>> r = 0 >>> s = 0 >>> id(q) 134536636 >>> id(r) 134536636 >>> id(s) 13

Re: Using time.sleep() in 2 threads causes lockup when hyper-threading is enabled

2006-05-04 Thread Tim Peters
[Tim Peters] >> I didn't run it for hours ;-) [EMAIL PROTECTED] > Please try. OK, I let the first test program run for over 24 hours by now. It never hung. Overnight, the box did go into sleep mode, but the test woke itself up after sleep mode ended, and the threads reported they were sleeping

Re: cross platform libraries

2006-05-04 Thread Ravi Teja
No! That's not the way things work. Such code needs to run locally (in this case, Windows). You can run this program as a daemon on Windows with some nice simple remote interface (Eg: xmlrpc) and send a message to trigger the shutdown. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question on code vetting

2006-05-04 Thread Edward Elliott
I have no deep connections to any open source projects. I do however know quite a few engineers. Bear that in mind. [EMAIL PROTECTED] wrote: > It seems to me that Open Source generally would be more pervasive if there > was more transparency with respect to the practices observed within the > p

Re: Using time.sleep() in 2 threads causes lockup when hyper-threading is enabled

2006-05-04 Thread OlafMeding
Marc > IIRC it was something like an NTP daemon that caused the clock to "jump" a > little and (Window's) sleep was confused. The problem is not a "jump" but a permanet lockup of the sleep statement. To all others, is there nobody out there that could run the test code at the beginning of this

Re: using urllib with ftp?

2006-05-04 Thread John Salerno
Fredrik Lundh wrote: > John Salerno wrote: > >> I've tried this already and it seems to work, but I'm curious if it's >> okay to use urllib when trying to access a url that begins with ftp:// >> instead of http://. Does this matter? It's only a text file, so it's not >> really an FTP server I'm

Re: Newbie question on code vetting

2006-05-04 Thread Ben Finney
<[EMAIL PROTECTED]> writes: > I hope the following message will not result in scorn being heaped > upon me. We try to heap scorn not upon individuals, but upon scorn-worthy ideas. Also, we heap scorn upon people who heap their responses on top of the quoted material. Please don't top-post. > It

Re: Tuple assignment and generators?

2006-05-04 Thread Ben Finney
[EMAIL PROTECTED] writes: > There is only one zero in Python! It can never change! +0.5 QOTW -- \"Madness is rare in individuals, but in groups, parties, | `\ nations and ages it is the rule." -- Friedrich Nietzsche | _o__)

Re: Gettings subdirectories

2006-05-04 Thread alex23
Florian Lindner wrote: > how can I get all subdirectories of a given directories? If you're not adverse to a solution outside of the standard lib, I highly recommend the 'path' module: >>> from path import path >>> c = path("C:\\") >>> c.dirs() [path(u'C:\\cmdcons'), path(u'C:\\Config.Msi'), path

RE: Newbie question on code vetting

2006-05-04 Thread Delaney, Timothy (Tim)
[EMAIL PROTECTED] wrote: > It seems to me that Open Source generally would be more pervasive if > there was more transparency with respect to the practices observed > within the projects. You mean something like: http://www.python.org/dev/ Tim Delaney -- http://mail.python.org/mailman/listinfo/

whois info from Python?

2006-05-04 Thread skip
I'm looking to get whois information for a given domain from Python. I'm mostly interested in record update and creation dates at the moment, but eventually might want more. I stumbled upon a couple modules/programs: rwhois.py and whois.py but neither seems to work. I can clearly issue a whois c

Re: Swaying A Coder Away From Python

2006-05-04 Thread Russ Salsbury
Adam Jones: """ User error, evidently. Sometimes the interface is more intelligent than its user, and every time this happens the interface is the one that gets the bad rap. """ Well that certainly explains my problems with Eclipse. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question on code vetting

2006-05-04 Thread william.boquist
All, I hope the following message will not result in scorn being heaped upon me. I know this is not a particularly fascinating topic for developers, but I believe it is worth pursuing. It seems to me that Open Source generally would be more pervasive if there was more transparency with respect to

Re: Tuple assignment and generators?

2006-05-04 Thread jemfinch
> Zero, in particular, is the same variable all throughout a Python interpreter. For the sake of accuracy let me note that I ought to have said, "is the same *value* all throughout a Python interpreter." Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Tuple assignment and generators?

2006-05-04 Thread jemfinch
Larry Bates wrote: > Just wrote: > > In article <[EMAIL PROTECTED]>, > > Larry Bates <[EMAIL PROTECTED]> wrote: > > > >> While I have never needed anything like this in my 5 years of Python > >> programming, here is a way: > >> > >> a,b,c = 3*[0] > >> q,r,s,t,u,v = 6*[0] > > > > This is (IMO) fai

Re: Can I use python for this .. ??

2006-05-04 Thread Martin P. Hellwig
san wrote: > Hi > > I am using windows xp and have installed python and win32. I am > familiar with basic Python. I wanted to control some of the > applications via python script. > > I would like to write a python script to say: > 1. Open firefox and log on to gmail > 2. Another firefox window t

Re: Can I use python for this .. ??

2006-05-04 Thread BartlebyScrivener
san, Take a look at this thread which features some smart and helpful people and good links. http://tinyurl.com/ggn5e I'm wagering you'll make more sense of it than I did. I have my hands full just making my way through tutorials and books at the moment. rick -- http://mail.python.org/mailman

Re: __init__.py, __path__ and packaging

2006-05-04 Thread Sandro Dentella
In comp.lang.python, hai scritto: > Sandro Dentella wrote: >> The structure of my package: >> >> python/ >> `-- dbg/ >>|-- __init__.py >>`-- lib >>|-- __init__.py >>|-- debug.py >>`-- gtk_dbg.py >> >> my sys.path includes 'python' and I wanted that the content of d

Re: Why does built-in set not take keyword arguments?

2006-05-04 Thread Serge Orlov
Jack Diederich wrote: > On Thu, May 04, 2006 at 02:08:30PM -0400, Steven Watanabe wrote: > > I'm trying to do something like this in Python 2.4.3: > > > > class NamedSet(set): > > def __init__(self, items=(), name=''): > > set.__init__(self, items) > > self.name = name > > > > class Name

Re: Why does built-in set not take keyword arguments?

2006-05-04 Thread Jack Diederich
On Thu, May 04, 2006 at 02:08:30PM -0400, Steven Watanabe wrote: > I'm trying to do something like this in Python 2.4.3: > > class NamedSet(set): > def __init__(self, items=(), name=''): > set.__init__(self, items) > self.name = name > > class NamedList(list): > def __init__(self, ite

Re: scope of variables

2006-05-04 Thread Gary Wessle
thank you -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I use python for this .. ??

2006-05-04 Thread san
Petr I dont want hibernation .. its more like starting a list of programs when i want to have fun time on my pc... but thanx for ur reply .. -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I use python for this .. ??

2006-05-04 Thread Petr Jakes
Why using Python? What about? 1. Open Power Options in Control Panel. (Click Start, click Control Panel, and then double-click Power Options.) 2.Click the Hibernate tab, select the Enable hibernate support check box, and then click Apply. (If the Hibernate tab is unavailable, your computer does not

Re: Python 2.4.2 to 2.4.3 transition issue

2006-05-04 Thread Panos Laganakos
Heh, Frederic, It seems that its Lilypond's (www.lilypond.org) fault. It registered its bin directory in the PATH variable, which seems to contain a python.exe too. So the result of: >>>import sys; sys.executable 'D:\\Program Files\\LilyPond\\usr\\bin\\python.exe' As for the instances of python24

Re: Using time.sleep() in 2 threads causes lockup when hyper-threading is enabled

2006-05-04 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Grant Edwards wrote: > On 2006-05-04, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> The sleep statement does not return! > > Never, or does it just take a long time? > >> And this should not happen. > > Dude, it's MS Windows. > > It does all _sorts_ of stuff that it s

Re: using urllib with ftp?

2006-05-04 Thread Fredrik Lundh
John Salerno wrote: > I've tried this already and it seems to work, but I'm curious if it's > okay to use urllib when trying to access a url that begins with ftp:// > instead of http://. Does this matter? It's only a text file, so it's not > really an FTP server I'm accessing, I don't think. I w

Re: Python sample code for PLSQL REF CURSORS

2006-05-04 Thread A.M
Exactly what I was looking for. Thanks alot "Gerhard Häring" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > A.M wrote: >> Hi, >> >> I am having hard time to find a sample that shows me how to return an OUT >> REF CURSOR from my oracle stored procedure to my python program. [...]

Re: Can I use python for this .. ??

2006-05-04 Thread BartlebyScrivener
For starters, you need the os and webbrowser modules import os import webbrowser webbrowser.open("http://mail.google.com/mail";) # need to know the shell keyword for starting the app os.system('start ' + 'Winword') # the equivalent of double-clicking on the doc or file os.startfile("c:/MyFiles/

Unable to use py2app

2006-05-04 Thread Pierre Thibault
Hello, I am unable to use py2app. I have an error when I try to import it: ImportError: No module named py2app I have installed pyobjc-1.3.7. I am on Mac OS 10.4.6. It does not work. It does not work with python 2.4 and it does not work with python 2.3. Is it working with someone else? -- ht

Re: Can I use python for this .. ??

2006-05-04 Thread san
btw i got the firefox to open and access some webpage and winamp running .. code below -- import os import os.path import subprocess # Web pages ffox_exe = r'C:\Program Files\Mozilla Firefox\firefox.exe' assert os.path.exists(ffox_exe) # open gmail url = "http://www.gmail.com"; child = su

using urllib with ftp?

2006-05-04 Thread John Salerno
I've tried this already and it seems to work, but I'm curious if it's okay to use urllib when trying to access a url that begins with ftp:// instead of http://. Does this matter? It's only a text file, so it's not really an FTP server I'm accessing, I don't think. I wasn't sure if using ftpli

Re: Python 2.4.2 to 2.4.3 transition issue

2006-05-04 Thread Fredrik Lundh
Panos Laganakos wrote: > OS: Windows XP + SP1 > > On this particular box, I hadn't moved to 2.4.3 yet. > So, earlier today, I uninstalled Python2.4.2 and installed 2.4.3 using > the .msi installer. > > It seems though everything looked great, that when I invoke 'python' > from the command line, I

Re: Swaying A Coder Away From Python

2006-05-04 Thread Stormcoder
I usually refer to it as "VILE!". As in what Vile thing do I have before me. Emacs all the way baby! -- http://mail.python.org/mailman/listinfo/python-list

Why does built-in set not take keyword arguments?

2006-05-04 Thread Steven Watanabe
I'm trying to do something like this in Python 2.4.3: class NamedSet(set): def __init__(self, items=(), name=''): set.__init__(self, items) self.name = name class NamedList(list): def __init__(self, items=(), name=''): list.__init__(self, items) self.name = name I can do: >>

Python 2.4.2 to 2.4.3 transition issue

2006-05-04 Thread Panos Laganakos
OS: Windows XP + SP1 On this particular box, I hadn't moved to 2.4.3 yet. So, earlier today, I uninstalled Python2.4.2 and installed 2.4.3 using the .msi installer. It seems though everything looked great, that when I invoke 'python' from the command line, I get Python2.4.2 (as the header states)

Re: CRC calculation

2006-05-04 Thread Stormcoder
Check out http://docs.python.org/lib/module-zlib.html comes with a CRC function. -- http://mail.python.org/mailman/listinfo/python-list

Re: Swaying A Coder Away From Python

2006-05-04 Thread Fredrik Lundh
Rony Steelandt wrote: > What s wrong with VI ??? :) it's spelled "vim". -- http://mail.python.org/mailman/listinfo/python-list

CRC calculation

2006-05-04 Thread mike7411
Does anyone know where I can get python code to perform a CRC calculation on an IP packet? -- http://mail.python.org/mailman/listinfo/python-list

Can I use python for this .. ??

2006-05-04 Thread san
Hi I am using windows xp and have installed python and win32. I am familiar with basic Python. I wanted to control some of the applications via python script. I would like to write a python script to say: 1. Open firefox and log on to gmail 2. Another firefox window to visit slickdeals 3. Open wi

regex to exctract informations

2006-05-04 Thread Bob
Dears, I am trying to search and replace strings with regex. The string is identified by a keyword : IDImage("1M234567"); DescriptionImage("Desc of the Image 1"); I want to exctract the IDImage (1M234567 ) and the Description. The ID are characters and numbers, the description too. Thx, Bert

Re: Tuple assignment and generators?

2006-05-04 Thread Tim Chase
> I don't think he was explicitly wanting to initialize > things to zero, but rather unpack an arbitrary sequence > into a tuple (could perhaps be the fibonnacci sequence > for example). Ant is correct here...Fibonnaci, digits of pi, the constant 42, an incrementing counter, a series of squares, w

[HOST] - Flexible Project Hosting with Python (similar to Assembla Breakout)

2006-05-04 Thread lazaridis_com
For a larger scale project, a collaboration infrastructure and toolset should be selected. More information about the overall project: http://lazaridis.com/pj The actually active system is a Dedicated Server (with Trac & SVN). A Project Host Candidate which comes close to the needed system is A

Re: Tuple assignment and generators?

2006-05-04 Thread Larry Bates
Just wrote: > In article <[EMAIL PROTECTED]>, > Larry Bates <[EMAIL PROTECTED]> wrote: > >> While I have never needed anything like this in my 5 years of Python >> programming, here is a way: >> >> a,b,c = 3*[0] >> q,r,s,t,u,v = 6*[0] > > This is (IMO) fairly idiomatic: > >a = b = c = 0 >

Re: Possible constant assignment operators ":=" and "::=" for Python

2006-05-04 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Yes, I know that "constant" A will also be modified as the b[0] points > to A. Obviously the [] should be marked as immutable, as A is declared > to be constant thus immutable. If somebody tries to modify this > immutable object an error would occur. > > When I furthe

Re: Possible constant assignment operators ":=" and "::=" for Python

2006-05-04 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Bruno Desthuilliers wrote: > >>[EMAIL PROTECTED] a écrit : >> >>>Hi Pythonians, >>> >>>To begin with I'd like to apologize that I am not very experienced >>>Python programmer so please forgive me if the following text does not >>>make any sense. >>> >>>I have been mis

how Can I programater in python similar to Delphi

2006-05-04 Thread Tomás Rodriguez Orta
Hello, friends. I can programter in python similar to delphi, enveloper form for capture ther data from user. some help.   sincerely TOMAS- Este correo fue escaneado en busca de virus con el MDaemon Antivirus 2.27 en el dom

Re: Newbie question on code vetting

2006-05-04 Thread Edward Elliott
[EMAIL PROTECTED] wrote: > I agree with your point, which is why I asked the question. Risk cannot be > eliminated, but it can be understood and managed so that useful work can > still be done. If there is any way I can find out what the commiters do > prior to reaching a decision to accept or reje

Re: __getattr__ for global namespace?

2006-05-04 Thread Bruno Desthuilliers
Harold Fellermann a écrit : > Hi, > > I am writing an application that initializes the global namespace, and > afterwards, leaves the user with the python prompt. Now, I want to > catch NameErrors in user input like e.g. > > some_name > > Traceback (most recent call last): > File "", line

Re: Subclassing array

2006-05-04 Thread Bruno Desthuilliers
Sion Arrowsmith a écrit : > Alex Martelli <[EMAIL PROTECTED]> wrote: > >>TG <[EMAIL PROTECTED]> wrote: >> >>>When I call Vector.__init__() in Stimulus, doesn't it also call __new__ >>>? I don't understand the detail of callings to __new__ and __init__ in >>>python inheritance ... >> >>Calling a (n

Re: noob question: "TypeError" wrong number of args

2006-05-04 Thread Edward Elliott
bruno at modulix wrote: > Edward Elliott wrote: >> Ah, well then, there's no need for a full-blown parser. It should >> suffice to recognize a class definition and modify the parameter list of >> every def indented one level further than that. > > won't do : > > class CounterExample(object): >

Re: Possible constant assignment operators ":=" and "::=" for Python

2006-05-04 Thread Edward Elliott
Michele Simionato wrote: >> >>> A = [] # let's declare a "constant" here >> >>> b = A # and let's assign the constant here >> >>> b.append('1') # OOPS! > > But it makes no sense to use a mutable object for a constant! > The user should use a tuple, Sure. Now show me the builtin immutable equ

Re: Python for Perl programmers

2006-05-04 Thread Paddy
I found this version of the phrasebook: http://wiki.python.org/moin/PerlPhrasebook its been edited recently but I didn't check for how current it is. -- Pad. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for Perl programmers

2006-05-04 Thread Andrew Gwozdziewycz
On May 4, 2006, at 12:36 PM, Aahz wrote: > In article <[EMAIL PROTECTED]>, > A.M <[EMAIL PROTECTED]> wrote: >> >> Is there any efficient online resource or book that help >> experienced Perl >> programmers to Python? I'd recommend http://www.diveintopython.org since you know how to program a

Re: Python for Perl programmers

2006-05-04 Thread John J. Lee
"A.M" <[EMAIL PROTECTED]> writes: > Is there any efficient online resource or book that help experienced Perl > programmers to Python? Worry instead about how you're going to keep maintaining your Perl code after you've developed an allergic response to it. <0.5 wink> John -- http://mail.py

Re: Python & SSL

2006-05-04 Thread John J. Lee
Sybren Stuvel <[EMAIL PROTECTED]> writes: > John J. Lee enlightened us with: > > Of course, remembering that the first thing to ask in response to > > "is it secure?" is "against what?", for lots of purposes it just > > doesn't matter that it ignores certificates. > > I'm curious. Can you give m

Re: Problem building extension under Cygwin (ImportError: Bad address)

2006-05-04 Thread Lars
Great! Thanks for the advice. Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple Version Install?

2006-05-04 Thread Tim Peters
[David C.Ullrich] > Would there be issues (registry settings, environment > variables, whatever) if a person tried to install > versions 1.x and 2.x simultaneously on one Windows > system? Windows 98, if it matters. > > (I can handle the file associations with no problem.) There are generally no i

pyuno and PDF output

2006-05-04 Thread Sells, Fred
I can use java to output a PDF file using uno, but when I try to do it in python, I get an IO Exception with no added information. The relevant code snippet follows: from com.sun.star.beans import PropertyValue PDF= PropertyValue( "FilterName" , 0 , "writer_pdf_Export", 0 ) doc2.storeAsURL("

Re: Tuple assignment and generators?

2006-05-04 Thread Just
In article <[EMAIL PROTECTED]>, Larry Bates <[EMAIL PROTECTED]> wrote: > While I have never needed anything like this in my 5 years of Python > programming, here is a way: > > a,b,c = 3*[0] > q,r,s,t,u,v = 6*[0] This is (IMO) fairly idiomatic: a = b = c = 0 q = r = s = t = u = v = 0 Jus

Re: Python & SSL

2006-05-04 Thread Sybren Stuvel
Edward Elliott enlightened us with: > Encryption has multiple meanings. In the general sense, it > encompasses all of cryptography and the information security > properties crypto provides. And if you already know who'll get the message, it's secure. I get it :) Thanks for the nice read ;-) >

cross platform libraries

2006-05-04 Thread diffuser78
I am using python on a linux terminal. I want to shutdown a remote windows box. I found a script which does something like this. My question is can we use windows libraries in linux as follows import win32api import win32con import win32netcon import win32security import win32wnet def shutd

Re: problem with reload(sys) (doing reload on the sys module)

2006-05-04 Thread nick
Looks like a bug (probably in IDLE): when I start IDLE from the command line, it pops up its interaction window and here is what it says about stdout: IDLE 1.1.2 >>> import sys >>> sys.stdout Then I try the reload and I get no output in the interaction window: >>> reload(sys) >>> sys.stdo

Re: Python for Perl programmers

2006-05-04 Thread Aahz
In article <[EMAIL PROTECTED]>, A.M <[EMAIL PROTECTED]> wrote: > >Is there any efficient online resource or book that help experienced Perl >programmers to Python? Don't use the Martin Brown book, whatever you do. The Perl/Python Phrasebook isn't bad, but it's ten years out of date. Really, you

Re: Tuple assignment and generators?

2006-05-04 Thread Ant
I don't think he was explicitly wanting to initialize things to zero, but rather unpack an arbitrary sequence into a tuple (could perhaps be the fibonnacci sequence for example). How about: >>> def zeros(count): ... for i in range(count): ... yield 0 ... >>> a,b,c = zeros(3) >>> a 0 >

Re: Mutable String

2006-05-04 Thread Pierre Thibault
Ok, That will do the job. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: Tuple assignment and generators?

2006-05-04 Thread Larry Bates
Tim Chase wrote: > Just as a pedantic exercise to try and understand Python a bit better, I > decided to try to make a generator or class that would allow me to > unpack an arbitrary number of calculatible values. In this case, just > zeros (though I just to prove whatever ends up working, having

Re: Progamming python without a keyboard

2006-05-04 Thread Philippe Martin
That reminds me a session in an R&D lab a long time ago One of the guys kept talking to himself, commenting code, bugs . he drove me nuts Eventually (weeks later) another guy silently stood up, went to the first guy, and without a word attempted to strangle him. He got stopped ... but did no

Python for Perl programmers

2006-05-04 Thread A.M
Hi, Is there any efficient online resource or book that help experienced Perl programmers to Python? Thank you, Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling superclass

2006-05-04 Thread Diez B. Roggisch
Florian Lindner wrote: > Hello, > I try to call the superclass of the ConfigParser object: > > class CustomizedConfParser(ConfigParser.SafeConfigParser): > def get(self, section, attribute): > try: > return super(CustomizedConfParser, self).get(section, > attri

Re: Swaying A Coder Away From Python

2006-05-04 Thread Adam Jones
Rony Steelandt wrote: > > "One problem is that python tools suck," he wrote. Wallace compared the > various IDEs and other developer tools available to Microsoft's freely > available Visual Studio Express and called them "toys." > > > > What s wrong with VI ??? :) User error, evidently. Someti

Re: Tuple assignment and generators?

2006-05-04 Thread Diez B. Roggisch
Tim Chase wrote: > Just as a pedantic exercise to try and understand Python a > bit better, I decided to try to make a generator or class > that would allow me to unpack an arbitrary number of > calculatible values. In this case, just zeros (though I > just to prove whatever ends up working, havi

Calling superclass

2006-05-04 Thread Florian Lindner
Hello, I try to call the superclass of the ConfigParser object: class CustomizedConfParser(ConfigParser.SafeConfigParser): def get(self, section, attribute): try: return super(CustomizedConfParser, self).get(section, attribute) # [...] but that gives only ret

Progamming python without a keyboard

2006-05-04 Thread Rony Steelandt
http://www.newscientisttech.com/article/dn9066 To nice to be true ? R_ -- --- Rony Steelandt BuCodi rony dot steelandt (at) bucodi dot com Visit the python blog at http://360.yahoo.com/bucodi -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem building extension under Cygwin (ImportError: Bad address)

2006-05-04 Thread Jason Tishler
On Thu, May 04, 2006 at 06:23:23AM -0700, Lars wrote: > But first compiling hello.c with gcc, then linking it with gnu-ld just > won't work. I only really need to compile one C-file to a shared > library so it doesn't matter so much for me. But bigger projects will > have a problem.. No, it works

Re: Swaying A Coder Away From Python

2006-05-04 Thread Rony Steelandt
"One problem is that python tools suck," he wrote. Wallace compared the various IDEs and other developer tools available to Microsoft's freely available Visual Studio Express and called them "toys." What s wrong with VI ??? :) R_ >> On 4 May 2006 05:24:40 -0700, BartlebyScrivener <[EMAIL P

Re: Subclassing array

2006-05-04 Thread Sion Arrowsmith
Alex Martelli <[EMAIL PROTECTED]> wrote: >TG <[EMAIL PROTECTED]> wrote: >> When I call Vector.__init__() in Stimulus, doesn't it also call __new__ >> ? I don't understand the detail of callings to __new__ and __init__ in >> python inheritance ... >Calling a (new-style) class does __new__ first, THE

pyuno and oootools with OpenOffice 2.0

2006-05-04 Thread Sells, Fred
I'm using windows xp and OpenOffice 2.0 and doing my first project with pyuno. I've got the basics to work,. An example I googled at http://blogs.nuxeo.com/sections/aggregators/openoffice_org/blogaggregator_vi ew?b_start:int=0 imported an ootools module. When I try to import it, it does not exis

Re: Swaying A Coder Away From Python

2006-05-04 Thread Sion Arrowsmith
>On 4 May 2006 05:24:40 -0700, BartlebyScrivener <[EMAIL PROTECTED]> wrote: >> I'm picking this up via clp on Google Groups. I can't tell what Mr. >> Lundh is referring to. The first line of his post is: "Tim Williams >> wrote" but there's nothing that comes before. Similarly, I'm reading this via

Re: Wake on LAN and Shutdown for Windows and Linux

2006-05-04 Thread diffuser78
Any help is appreciated -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple Version Install?

2006-05-04 Thread David C.Ullrich
On Thu, 4 May 2006 16:17:57 +0200, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: >David C.Ullrich wrote: > >> Would there be issues (registry settings, environment >> variables, whatever) if a person tried to install >> versions 1.x and 2.x simultaneously on one Windows >> system? Windows 98, if it m

Re: Unicode code has no method float() ?

2006-05-04 Thread Rony Steelandt
Works, thank you > Le 04-05-2006, Rony <[EMAIL PROTECTED]> nous disait: >> How can I get the value of a Unicode object ? >> >> When I do myobject.float() I get the error message that it doesn't have >> a float() attribute > > Try to use the float builtin function, as in: float(myobject) instead

Re: Python function returns:

2006-05-04 Thread Sion Arrowsmith
Michael Yanowitz <[EMAIL PROTECTED]> wrote: > In Python, there does not seem to be an easy way to have functions return >multiple values except it can return a list such as: >strHostname, nPortNumber, status = get_network_info (strIpAddress, >strHostname, >

Re: stripping unwanted chars from string

2006-05-04 Thread Alex Martelli
Edward Elliott <[EMAIL PROTECTED]> wrote: > I'm looking for the "best" way to strip a large set of chars from a filename > string (my definition of best usually means succinct and readable). I > only want to allow alphanumeric chars, dashes, and periods. This is what I > would write in Perl (bl

Tuple assignment and generators?

2006-05-04 Thread Tim Chase
Just as a pedantic exercise to try and understand Python a bit better, I decided to try to make a generator or class that would allow me to unpack an arbitrary number of calculatible values. In this case, just zeros (though I just to prove whatever ends up working, having a counting generator

Re: Subclassing array

2006-05-04 Thread Alex Martelli
TG <[EMAIL PROTECTED]> wrote: ... > When I call Vector.__init__() in Stimulus, doesn't it also call __new__ > ? I don't understand the detail of callings to __new__ and __init__ in > python inheritance ... Calling a (new-style) class does __new__ first, THEN calls the class's __init__ on the re

Re: Unicode code has no method float() ?

2006-05-04 Thread Alexandre Fayolle
Le 04-05-2006, Rony <[EMAIL PROTECTED]> nous disait: > How can I get the value of a Unicode object ? > > When I do myobject.float() I get the error message that it doesn't have > a float() attribute Try to use the float builtin function, as in: float(myobject) instead of a method. -- Alexandr

Unicode code has no method float() ?

2006-05-04 Thread Rony Steelandt
How can I get the value of a Unicode object ? When I do myobject.float() I get the error message that it doesn't have a float() attribute tia R_ -- --- Rony Steelandt BuCodi rony dot steelandt (at) bucodi dot com Visit the python blog at http://360.yahoo.com/bucodi -- http://mail.python.o

Re: python strings

2006-05-04 Thread Sion Arrowsmith
Bryan <[EMAIL PROTECTED]> wrote: > >>> s = '\x00' > >>> s[0] == chr(0) >True That's a little excessive when: >>> s = '\0' >>> s[0] == chr(0) True Oh, and to reassure the OP that that null really is *in* the string: >>> len(s) 1 -- \S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/ _

Re: Calling a Postgres Function using CGI written in Python

2006-05-04 Thread Fuzzydave
cheers :) thats what i wanted to know :) David -- http://mail.python.org/mailman/listinfo/python-list

Re: simultaneous assignment

2006-05-04 Thread Paul Rubin
Dave Hansen <[EMAIL PROTECTED]> writes: > Well, if you want something minimalist, you could try > >def truth_test(seq): > return sum(1 for item in seq if item) == 1 def truth_test(seq): return sum(map(bool, seq)) == 1 -- http://mail.python.org/mailman/listinfo/python-list

Re: simultaneous assignment

2006-05-04 Thread Dave Hansen
On Tue, 02 May 2006 18:52:48 GMT in comp.lang.python, John Salerno <[EMAIL PROTECTED]> wrote: [...] > >Yeah, after trying some crazy things, I just wrote it this way: > >def truth_test(seq): > truth = 0 > for item in seq: > if item: > truth += 1 > if truth == 1: >

Re: Because of multithreading semantics, this is not reliable.

2006-05-04 Thread Christophe
[EMAIL PROTECTED] a écrit : > Christophe > > >>Same reason that there is a warning in the "os.access" manual > > > I understand the if file exists open it code. > > I looked at the os.access documentation and see no "warning" or "not > reliable" wording there. > 6.1.4 Files and Directories >

Re: Sorting a list of dictionaries by dictionary key

2006-05-04 Thread Alex Martelli
Tim Chase <[EMAIL PROTECTED]> wrote: > > assuming that DateTime returns something that compares correctly, you can > > do something like: > > > > def sortkey(item): > > return item.get("from_datetime") > > > > data.sort(key=sortkey) > > > > (assuming Python 2.4 or later) > > Bu

Re: Multiple Version Install?

2006-05-04 Thread Fredrik Lundh
David C.Ullrich wrote: > Would there be issues (registry settings, environment > variables, whatever) if a person tried to install > versions 1.x and 2.x simultaneously on one Windows > system? Windows 98, if it matters. > > (I can handle the file associations with no problem.) in general, no. (

Re: pleac

2006-05-04 Thread Thomas Guettler
Am Thu, 04 May 2006 04:05:49 -0700 schrieb jonas: > Hi, > > I'm new to python. > After a search on > http://pleac.sourceforge.net/pleac_python/index.html > why python have a low %? Python has the highest percentage of all languages at pleac. For those who don't know pleac: """Following the gre

Re: Because of multithreading semantics, this is not reliable.

2006-05-04 Thread OlafMeding
Christophe > Same reason that there is a warning in the "os.access" manual I understand the if file exists open it code. I looked at the os.access documentation and see no "warning" or "not reliable" wording there. 6.1.4 Files and Directories access(path, mode) Olaf -- http://mail.python

Re: Python sample code for PLSQL REF CURSORS

2006-05-04 Thread Gerhard Häring
A.M wrote: > Hi, > > I am having hard time to find a sample that shows me how to return an OUT > REF CURSOR from my oracle stored procedure to my python program. [...] import cx_Oracle con = cx_Oracle.connect("me/[EMAIL PROTECTED]") cur = con.cursor() outcur = con.cursor() cur.execute("""

  1   2   >