Why I've personally stopped using it: I've always had the impression
that decorators were intended to provide a convenient and obvious way
of augmenting functions. Having one that automatically executes the
function at definition just runs counter to the behaviour I expect
from a decorator. Espe
The example I gave earlier is a bit contrived, the real example
fundamentally requires a lambda since I am actually passing in local
variables into the functions the lambda is wrapping. Example:
def MyFunction():
localVariable = 20
CreateTask( lambda: SomeOtherFunction( localVariable ) ) #
Hello
I have the following problem in Python 2.5 on Windows XP.
On Ubuntu I do not see the problem.
I have a Tkinter application as in the following example
The entry-widget is somehow blocked (i cannot type characters into it)
when I call askopenfilename before I create the widget.
Calling asko
Marin Brkic schrieb:
I'm trying to find a way to write data to excel cells (or to be more
specific to an .xls file), let's say for the sake of argument, data
readen from a file (although it will be calculated in the process).
I've been searching, but couldn't find any examples which allows that.
Hello
I have subclassed code.InteractiveInterpreter for testing
an "interpreter" i have written myself.
The interpreter is a function (evaluate) that can raise
MyError exceptions. I want these to be reported with an
indication of the position (^) as in the python interactive
interpreter.
The co
defn noob schrieb:
How can I check how many cores my computer has?
Is it possible to do this in a Python-app?
processing (http://pyprocessing.berlios.de/)
has an utility function processing.cpuCount().
Leo
--
http://mail.python.org/mailman/listinfo/python-list
>> Yes, I understand that, but what is the geometrical
>> meaning of the square root of an arc length?
>
> That's a different question to your original question, which was asking
> about the square root of an angle.
>
>> And what would the units be?
>
> Angles are a ratio of two lengths, and
Cameron Walsh schrieb:
>
> If it's on linux you can just redirect the screen output to a file:
>
> python initialfile.py 1>stdout.txt 2>stderr.txt
> As for windows, I'll test it now...
>
> It turns out you can at least redirect the output to a file, I'm not
> sure what it does with standard er
Michael Yanowitz schrieb:
> Yeah, I am operating this on a Python script. However, I am working off
> a requirement that the script be pre-processed and the strings replaced
> before executing the script and that if there are any remaining (not
> replaced)
> names that I don't execute the script
John Salerno schrieb:
> Cameron Laird wrote:
>
>> Fredrik Lundh collects pyidioms:
>> http://effbot.org/zone/python-lists.htm
>
> Not working?
Try
http://effbot.org/zone/python-list.htm
Leonhard
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh schrieb:
> [EMAIL PROTECTED] wrote:
>
> > Please consider that example:
> > Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)]
> > on win32
> > Type "help", "copyright", "credits" or "license" for more information.
> s = 'foo'
> f = lambda x: s
> f(N
Please consider that example:
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> s = 'foo'
>>> f = lambda x: s
>>> f(None)
'foo'
>>> s = 'bar'
>>> f(None)
'bar'
>>> del(s)
>>> f(None)
Traceback (m
> But there is some ambiguity due to the the fact that applying '\7' to
> rawform() yields r'\a' and not r'\7'. So one needs more specification
> for disambiguation using e.g. an extra parameter.
>
>>> '\a'=='\7'
True
The two are actually the same thing, so how could a function decide
whether to
[EMAIL PROTECTED] schrieb:
> What's the difference between time.clock() and time.time()
> (and please don't say clock() is the CPU clock and time() is the actual
> time because that doesn't help me at all :)
clock (depending on the platform ?) measures the time spent by your program.
Time gives y
14 matches
Mail list logo