Peter Otten <__pete...@web.de> writes:
> genkuro wrote:
>
>> Newbie here. I may be missing something obvious, in which case,
>> please feel free to berate and laugh at me.
>>
>> Here's a dubious line of code:
>> logging = logging.getLogger(__name__)
>
> Dubious indeed. As a workaround you can im
Lawrence D'Oliveiro writes:
> In message , Roy Smith wrote:
>
>> C++, for all its flaws, had one powerful feature which made it very
>> popular. It is a superset of C.
>
> Actually, it never was.
Wondering off topic a bit - I am reminded of something I once read in
some MS blurb... it described
Bojan Sudarevic writes:
> Hi,
>
> I'm PHP developer and entirely new to Python. I installed it (version
> 2.5.2, from Debian repos) today on the persuasion of a friend, who is a
> Python addict.
>
> The first thing I typed into it was 3.2*3 (don't ask why I typed *that*,
> I don*t know, I just
superpollo writes:
> so why this does not work?
>
> 1 #!/usr/bin/python
> 2
> 3 import threading
> 4
> 5 e = threading.Event()
> 6 t = threading.Timer(3.0, e.set())
The second arg needs to be a callable - maybe you meant e.set without
the brackets?
--
http:
Bruno Desthuilliers writes:
> kj a écrit :
>> In <4a4e2227$0$7801$426a7...@news.free.fr> Bruno Desthuilliers
>> writes:
>>
>>> kj a écrit :
>>> (snipo
To have a special-case
re.match() method in addition to a general re.search() method is
antithetical to language minimalism,
>>
>
Laszlo Nagy writes:
>>> The building and installation went find. But I cannot "import kinterbasdb"
>>> because I get a "DLL load failed" error. I figured out that has something to
>>> do with msvcr90 and "_ftime". Can you please give me some advice how to
>>> solve this problem?
>>>
>>
>> Do
Ben Finney writes:
> Olof Bjarnason writes:
>
>> Most tutorials on the web still (I've read mostly Ubuntu-related
>> forums) mention apt-get; seems like an error?
>
> Not quite an error (since ‘apt-get’ continues to work), just habit of
> old-timers, and cargo-cult administration by newcomers.
Stephen Boulet writes:
> Does an arbitrary variable carry an attribute describing the text in
> its name? I'm looking for something along the lines of:
>
> x = 10
> print x.name
'x'
>
> Perhaps the x.__getattribute__ method? Thanks.
The first thing is... what is your use case for this? I'd
loial writes:
> I want to enable my end users to be able to schedule a task(actually
> running another python or shell script). Rather than scheduling it
> directly in cron, are there any python modules I could use?
First hit when googling "python schedule"?
--
http://mail.python.org/mailman/li
Alessandro writes:
> Hi, I'm a python newbie with a problem too hard to tackle.
>
> I have a string defining a path, were all the spaces have been
> converted to underscores.
> How can I find if it corresponds to a real path?
>
> e.g. a string like '/some/path_to/directory_1/and_to/directory_2'
>
"B. M. Whealton" writes:
> I did get a bit confused in reading about the concept of sets in
> python and why you would use them instead of a dictionary for example.
Use a set when something is naturally modelled as a set... it's a
collection of unordered objects that you can test for membership,
Kelson Zawack writes:
> Since an iterator having an end is not actually an exceptional case...
There's no requirement on iterators to be finite, so in a sense it is.
In general it may be impractical to know whether an iterator has reached
the end without calling next().
--
http://mail.python
Kelson Zawack writes:
> The example I have in mind is list like [2,2,2,2,2,2,1,3,3,3,3] where
> you want to loop until you see not a 2 and then you want to loop until
> you see not a 3.
"loop until you see not a 2" - you mean yield 2s as long as there are 2s
to be consumed?
"loop until you see
Andre Alexander Bell writes:
> I occasionally use LCs, if they seem useful. However, what I don't like
> about LCs is that they 'look-like' being a closed scope, while actually
> they are in the scope of there call. Example:
>
i = 5
l = [i**2 for i in range(3)]
i
> 2
>
Although:
Gregory Ewing writes:
> Brendan wrote:
>> I use
>> Python sporadically, and frequently use the dir command to learn or
>> remind myself of class methods.
>
> You can clean up dir() by defining __all__ as a list of
> names that you want to officially export. Other names will
> still be there, but
Steven D'Aprano writes:
> A fair point -- the built-in open comes up as hit #30, whereas searching
> for open in the PHP page brings up fopen as hit #1. But the PHP search
> also brings up many, many hits -- ten pages worth.
>
OTOH googling for "python open" gives you the correct (for 2.7) pag
Terry Reedy writes:
> Suppose I write an nasty C extension that mutates tuples. What then
> would be illegal about...
Depends on exactly what we mean by legal. If immutability is part of the
language spec (rather than an artifact of a particular implementation)
then a compiler could assume immut
John Bond writes:
> On 3/11/2010 11:17 AM, Steven D'Aprano wrote:
>> On Wed, 03 Nov 2010 08:02:29 +, John Bond wrote:
>>
>>> Hope this isn't too O/T - I was just wondering how people read/send to
>>> this mailing list, eg. normal email client, gmane, some other software
>>> or online service?
"danmcle...@yahoo.com" writes:
>> The problem is when I get to the last line. When the program sees '\n'
>> after the 9, everything works fine. However, when there isn't a '\n',
>> the program doesn't process the last line.
>>
>> What would be the best approach to handle the case of the possible
Lawrence D'Oliveiro writes:
> In message , Terry Reedy
> wrote:
>
>> To echo John Nagle's point, if you want non-masochist volunteers to read
>> your code, write something readable like:
>>
>> dict1 = {'ab': [[1,2,3,'d3','d4',5], 12],
>> 'ac': [[1,3,'78a','79b'], 54],
>> 'ad
xoff writes:
> I was wondering what the best method was in Python programming for 2
> discontinued ranges. e.g. I want to use the range 3 to 7 and 17 to 23.
> Am I obliged to use 2 for loops defining the 2 ranges like this:
>
> for i in range (3,7):
> do bla
> for i in range (7,17):
> do bla
>
Robert Kern writes:
> On 2010-11-10 17:14 , Christian Heimes wrote:
>> Am 10.11.2010 18:56, schrieb Simon Mullis:
>>
>> Yes, eval is evil, may lead to security issues and it's unnecessary
>> slow, too.
Still - it is used in the standard library...
--
http://mail.python.org/mailman/listinfo/pyth
201 - 222 of 222 matches
Mail list logo