Shane Hathaway wrote:
That was pretty fun. Good for a Friday. Too bad it comes to an abrupt
"temporary end".
Shane
P.S. I hope I didn't hammer your server on step 3. I was missing the
mark. :-)
Interestingly step 3 is actually wrong... there is an additional
solution, which looks like cqqmsxk.
Fredrik Lundh wrote:
> Monu Agrawal wrote:
>
>> Hi I am making a gui based tool. When user preses a perticular button I
>> am running a heavy command, before this I want to say user to wait with
>> a image showing infront of her.
>>
>> My code is like:
>>
>> def loadData(self):
>>top=Toplevel(
[EMAIL PROTECTED] wrote:
> Here's one case where it's bad to call update.
>
> def perform_longrunning_calculation():
> time.sleep(1)
> app.update()
> time.sleep(1)
>
would it be advisable to guard against this with something like this?
def perform
Fredrik Lundh wrote:
> running a piece of python code as a script isn't the same thing as
> importing it as a module:
I ran into the same problem some time ago and even wanted to post here
about it, but found out that it had been reported as a bug three times
at sourceforge (if i remember correctl
Fredrik Lundh wrote:
> David Murmann wrote:
>
>> I ran into the same problem some time ago and even wanted to post here
>> about it, but found out that it had been reported as a bug three times
>> at sourceforge (if i remember correctly). The comments there explained
>
hi all!
i just built revision 41809 under winxp using a rather uncommon
setup (at least i think so). since i have no visual studio here,
i only used freely available tools: cygwin to get the source, the
microsoft compiler/linker and NAnt (nant.sf.net) as the build tool
to interpret the .vcproj-fil
Tim Peters schrieb:
> [David Murmann]
> ...
>>> second, the build order in "pcbuild.sln" for elementtree seems to be
>>> wrong, nant tried to build elementtree before pythoncore (which failed).
>>> i fixed this by building elementtree separately.
>
&
Fredrik Lundh schrieb:
> try setting the locale (via the locale module) from the interactive prompt,
> and see if Python still handles floating point values correctly.
>
well, it does not:
>>> import locale
>>> locale.setlocale(locale.LC_ALL, '')
'German_Germany.1252'
>>> 3.141592
3.0
so this i
David Murmann schrieb:
> i will try building 2.4.2 with nant later and see what that does...
>
FYI i did this now and it worked fine, all tests passed.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] schrieb:
> [izip() eats one line]
as far as i can see the current implementation cannot be changed
to do the Right Thing in your case. pythons iterators don't allow
to "look ahead", so izip can only get the next element. if this
fails for an iterator, everything up to that point
Claudio Grondi schrieb:
> Stuart D. Gathman wrote:
>> for (_idx = 0; _idx < NLST; ++_idx) {
>> int *i = lst[_idx];
>> if (*i == *_i2)
> ^-- I have trouble with this line. Is it as is should be? I suppose
> it is not.
>
i think he meant
if (*i == _i2)
but i think python does
if (i
Ich schrieb:
> but i think python does
>
> if (i == &_i2)
>
> because there is only one integer object holding the value 2, so
> it is sufficient to compare the addresses (i'm not sure about this,
> perhaps someone smarter can clarify?).
well, as far as i can see the relevant function is
stat
Ich schrieb:
> well, as far as i can see the relevant function is
> in Objects/intobject.c, which does compare by value. so, this is
> either special-cased elsewhere or not optimized (should/can it be?).
it is special-cased, but still compares by value. the relevant
parts from "Python/ceval.c":
c
Dan Sommers schrieb:
> int **_idx;
> for( _idx = lst; _idx < lst + NLST; ++_idx ) {
> int *i;
> i = *_idx;
>
> /* compare "the item to which i is bound" to "a constant" */
> if( *i == *(&_i2) )
> /* rebind i to _i4 */
> i = &_i4;
> }
>
> for( _idx = lst; _idx < lst
Paul Moore schrieb:
>> btw, if anyone is interested in the (rather small) build-script for
>> nant, just ask,
>
> I haven't seen anyone ask, so can I? I'd love to see the build script.
sorry it took me so long, i have been busy the last couple of days,
but here it is:
"PCBuild/nant-sln.build":
-
http://effbot.org/F
;)
--
http://mail.python.org/mailman/listinfo/python-list
hi!
i find it rather hard to understand your problem, but i'll try anyway:
[EMAIL PROTECTED] schrieb:
> So.. for my future Python script, the input data are in form of:
> 1
> 1233.2E-3 2123.2323 2E+2 3453.3E+1
> 1233.2E-3 2123.2323 2E+2 3453.3E+1
> 1233.2E-3 2123.2323 2E+2 3453.
Steve Holden schrieb:
> Kevin wrote:
>> Can you tell me what to look for in an HTTPMessage that is an error? I
>> have looked at the header objects and I cannot determine an error
>> message.
>>
> I was thinking of a number between one and a thousand, and I forgot it.
> Could someone please remin
Peter Hansen schrieb:
> Matt's answer is still the only one that passes the tests.
well, here's another one:
-
def mysplit(s, sep):
x = s.rsplit(sep, 1)
return x + ['']*(2-len(x))
def stripZeros(x):
intpart, frac = mysplit(x, '.')
frac = frac.rstrip('0
Robin Becker schrieb:
> Is there some smart/fast way to flatten a level one list using the
> latest iterator/generator idioms.
>
> The problem arises in coneverting lists of (x,y) coordinates into a
> single list of coordinates eg
>
> f([(x0,y0),(x1,y1),]) --> [x0,y0,x1,y1,] or
>
> g([
[EMAIL PROTECTED] schrieb:
> I am still left with a difficult to express feeling of
> dissatifaction at this process.
>
> Plese try to see it from the point of view of
> someone who it not a expert at Python:
>
> ... [explains his POV]
i more or less completely agree with you, IOW i'd like izip
x, y):
> '''D Murman'''
> return list(_flatten(zip(x, y)))
well, i would really like to take credit for these, but they're
not mine ;) (credit goes to Michael Spencer). i especially like
flatten4, even if its not as fast as the phenomenally faster
flatten7.
--
David Murmann (NN!) ;)
--
http://mail.python.org/mailman/listinfo/python-list
Marco Meoni schrieb:
> Hi all! I've a problem with a C++ class that has to be included in a
> python application. One way to do it is Extending and Embedding the
> Python Interpreter
> Now i have 2 questions
> 1) Is there a one-file version of this tutorial?
i'm not sure what tutorial you mean. ar
[EMAIL PROTECTED] schrieb:
> "Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message
>> *what* the value is is defined by the operations that the object supports
>> (via its
>> type).
>
> Well, that is already better than what is in the Lang Ref.
> But there must be more to it than that. int(1) and
yawgmoth7 schrieb:
> Hello, I'm sure that this has been discussed before, but I have a
> question. I have written a few port scanners, banner grabbers in the
> past and have never found a good way to get a range of IP's.
> Obviously, in my opinion the best and simplest way to do somethign
> like an
yawgmoth7 schrieb:
> Well, I seem to have a bit of a problem:
> >>>import IPy
> >>>ip =IP('127.0.0.1/30')
> Traceback (Most recent call last):
> File "". line `, in ?
> NameError: name 'IP' is not defined
> >>>
to make this work with "import IPy" you need
to use "ip = IPy.IP('127.0.0.1/30')".
> I
yawgmoth7 schrieb:
> I was discussing this in another email, sadly I have misplaced the
> email. I got the module IPy, and I am taking a variable from the
> user(An IP) and doing something like this:
>
> startip = raw_input("Enter start IP: ")
> ip = IPy.IP(startip\255)
> for x in ip():
>
>
>
Hi all!
I could not find out whether this has been proposed before (there are
too many discussion on join as a sequence method with different
semantics). So, i propose a generalized .join method on all sequences
with these semantics:
def join(self, seq):
T = type(self)
result = T()
David Murmann wrote:
> replace the line
> result = result + self + T(item)
> with
> result = result + self + item
and of course the line
result = T(seq[0])
with
result = seq[0]
--
http://mail.python.org/mailman/listinfo/python-list
Steven Bethard wrote:
> David Murmann wrote:
>> Hi all!
>>
>> I could not find out whether this has been proposed before (there are
>> too many discussion on join as a sequence method with different
>> semantics). So, i propose a generalized .join method on all s
> def join(sep, seq):
> return reduce(lambda x, y: x + sep + y, seq, type(sep)())
damn, i wanted too much. Proper implementation:
def join(sep, seq):
if len(seq):
return reduce(lambda x, y: x + sep + y, seq)
return type(sep)()
but still short enough
see you,
David.
--
ht
Michael Spencer wrote:
> Terry Reedy wrote:
>> "David Murmann" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>>
>>>> def join(sep, seq):
>>>>return reduce(lambda x, y: x + sep + y, seq, type(sep)())
>>>
&g
Hi again,
i wrote a small patch that changes itertools.chain to take a "link"
keyword argument. If given, it is iterated between the normal arguments,
otherwise the behavior is unchanged.
I'd like to hear your opinion on both, the functionality and the actual
implementation (as this is one of th
Hi all!
i just found some colored glass and experimented a bit with
these red/green 3d images, so i thought i'd share this simple
script i wrote to generate such images with anyone whos
interested. i also wouldn't mind some comments on the code.
see ya, David.
*** anaglyph.py ***
# uses PIL
[EMAIL PROTECTED] schrieb:
> How can I shutdown Windows box from my Main (Linux) ?
Have you seen this?
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/360649
it probably won't work on linux (maybe with wine or similar?), but you
can try to invoke this script on a windows machine somehow.
Hi all!
i just had this crazy idea:
instead of
while cond():
pass
write
while cond().
or
try:
import xyz
except ImportError:
pass
compared to
try:
import xyz
except ImportError.
i don't know whether this is syntactically unambiguous or replaces all
uses of pass, but i find
36 matches
Mail list logo