"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
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
"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
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
[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
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
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
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
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
<[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
[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__)
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
[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/
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
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
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
> 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
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
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
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
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
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
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
thank you
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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. [...]
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/
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
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
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
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
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
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:
>>
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)
Check out http://docs.python.org/lib/module-zlib.html comes with a CRC
function.
--
http://mail.python.org/mailman/listinfo/python-list
Rony Steelandt wrote:
> What s wrong with VI ??? :)
it's spelled "vim".
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
> 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
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
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
>
[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
[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
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
[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
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
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
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):
>
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
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
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
"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
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
Great!
Thanks for the advice.
Lars
--
http://mail.python.org/mailman/listinfo/python-list
[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
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("
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
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 ;-)
>
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
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
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
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
>
Ok,
That will do the job. Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
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
"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
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
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
>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
Any help is appreciated
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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,
>
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
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
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
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
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
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/
_
cheers :)
thats what i wanted to know :)
David
--
http://mail.python.org/mailman/listinfo/python-list
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
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:
>
[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
>
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
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.
(
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
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
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 - 100 of 170 matches
Mail list logo