Aaron Brady wrote:
f.func_defaults[0]
> [2, 3]
f.func_defaults[0]+=[4]
> Traceback (most recent call last):
>File "", line 1, in
> TypeError: 'tuple' object does not support item assignment
f.func_defaults[0]
> [2, 3, 4]
>
> V. interesting. Operation succeeds but with a throw
What is Python's version for the trinary if..then..else operator?
I want a one-liner such as
a?b:c
for the if..then..else control structure
if a
then b
else c
Does Python 2.4 support it?
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina wrote:
> You can get the 2 as the errno exception attribute. BTW, 2 == errno.ENOENT
>
> try:
> export = open(self.exportFileName , 'w')
> except IOError, e:
> if e.errno==errno.ENOENT:
> # handle the "No such file or directory" error
>
Alchemist wrote:
> What is Python's version for the trinary if..then..else operator?
true_value if condition else false_value
> Does Python 2.4 support it?
No, it requires 2.5 or later.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
Thanks guys for this, glad it was so simple.
I used mikes solution in the end, and it worked a charm.
Thanks again,
Rob
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
On Behalf Of Michael Bentley
Sent: 24 April 2007 18:37
To: [email protected]
Subject: Re: If Dict Contains a
On 2007-04-24, Michael Hoffman <[EMAIL PROTECTED]> wrote:
> Really only one person has argued that the docs do not need to be
> changed. The other two people seemed to think you were asking for help
> rather than discussing how to revise the docs. Understandable, since
> that's why most people
"Jorgen Grahn" <[EMAIL PROTECTED]> wrote:
> On Thu, 19 Apr 2007 20:39:57 -0700, Alex Martelli <[EMAIL PROTECTED]> wrote:
> > Steve Holden <[EMAIL PROTECTED]> wrote:
> >
> >> A long time ago Greg Stein produced a patch that removed the need for
> >> the GIL, but nobody seemed to want to pay the pen
On 2007-04-24, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Antoon Pardon wrote:
>> On 2007-04-24, Michael Bentley <[EMAIL PROTECTED]> wrote:
>> >
>> > On Apr 24, 2007, at 6:35 AM, Antoon Pardon wrote:
>> >
>> >> People don't read tutorials in a strictly linear fashion. They can
>> >> continue
"Steve Holden" <[EMAIL PROTECTED]> wrote:
> Jeff Rush wrote:
> > There is discussion by the Python Software Foundation of offering cash
> > bounties or perhaps periodic awards to the "best of" for magazine articles,
> > video/screencast clips and such.
> >
> > If YOU would be swayed to get invol
Hello Guys,
Looking to build a quick if/else statement that checks a dictionary for a
key like follows.
If myDict contains ThisKey:
Do this...
Else
Do that...
Thats the best way of doing this?
Thanks,
Rob
--
http://mail.python.org/mailman/lis
Attending my first meetup tomorrow for the Agile Charlotte group from
meetup.com. My old area, surrounded by cows and corn, had no chance of
getting any meetups, so I'm excited to be back at the city and able to
partake in some community. If anyone by chance is attending, or near
enough to make it,
Jon Slaughter wrote:
>
> <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> http://www.911blogger.com/node/8053
>>
>> Senator John Kerry was questioned concerning 9/11 during an appearance
>> at Book People in Austin, Texas. Members of Austin 9/11 Truth Now
>> asked Kerry about the
Jack wrote:
> Hi all, in my next project, my Python code needs to talk to an MS SQL
> 2000 Server. Internet search gives me http://pymssql.sourceforge.net/
> I wonder what module(s) people are using. My code runs on a Linux
> box so the module has to build on Linux. Any hints/pointers are welcome.
Hi Antoon,
> The best way to remember how slices work is to think of the indices as
...
> +---+---+---+---+---+
> | H | e | l | p | A |
> +---+---+---+---+---+
> 0 1 2 3 4 5
> -5 -4 -3 -2 -1
>
> This is all very well with a simple slice like:
>
> "HelpA"[2:4]=> "lp
Hello guys,
I've recently ported my application from bash to python, however there are
still a few bash line utilities I -have- to use in the application as there
isn't any alternative available to me. In the old days of bash I would have
grep'd the output from these commands to determine the o
Antoon Pardon wrote:
> On 2007-04-24, Michael Hoffman <[EMAIL PROTECTED]> wrote:
>
>> Really only one person has argued that the docs do not need to be
>> changed. The other two people seemed to think you were asking for help
>> rather than discussing how to revise the docs. Understandable, sinc
set, int, float, list, object,...
Don't see any of the basic types following the capitalized word
convention for classes covered by PEP 08. This does not hold only for
__builtins__ in the strict sense but also for types defined in builtin
modules like datetime.
My question is: does anyone actuall
> Looking to build a quick if/else statement that checks a dictionary for a
> key like follows.
>
> If myDict contains ThisKey:
>
> Do this...
>
> Else
>
> Do that...
>
>
>
> Thats the best way of doing this?
if key in myDict:
Do this.
else:
Do that
I use PIL to write some text to a picture.The text must be seen wery clearly.
I write the text to different pictures but to the same position. As pictures maybe different,
colour, in the position where I write the text, is also different.
Is there a way how to set the font colour so that it
On Apr 23, 1:38 pm, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> The following is part of the explanation on slices in the
> tutorial:
>
> The best way to remember how slices work is to think of the indices as
...
> +---+---+---+---+---+
> | H | e | l | p | A |
> +---+---+---+---+---+
> 0 1
In <[EMAIL PROTECTED]>, Kay Schluehr
wrote:
> set, int, float, list, object,...
>
> Don't see any of the basic types following the capitalized word
> convention for classes covered by PEP 08. This does not hold only for
> __builtins__ in the strict sense but also for types defined in builtin
> mo
On 2007-04-24, Anton Vredegoor <[EMAIL PROTECTED]> wrote:
> Steve Holden wrote:
>>> When cash is involved, it's important to avoid even the slightest
>>> hint of a suggestion of a suspicion of a conflict of interest;
>>> that, I guess, is why firms that run contests with cash prizes
>>> always dec
Kay Schluehr wrote:
> My question is: does anyone actually follow guidelines here
Yes.
> and if yes
> which ones and are they resonable ( e.g. stable with regard to
> refactoring etc. )?
All of them that I know of. What does it mean to be "stable with regard
to refactoring etc."?
--
Michael H
Diez B. Roggisch wrote:
> Frank Stajano wrote:
>
>> A simple unicode question. How do I print?
>>
>> Sample code:
>>
>> # -*- coding: utf-8 -*-
>> s1 = u"héllô wórld"
>> print s1
>> # Gives UnicodeEncodeError: 'ascii' codec can't encode character
>> # u'\xe9' in position 1: ordinal not in range(12
> So why is it that in the first case I got UnicodeEncodeError: 'ascii'
> codec can't encode? Seems as if, within Idle, a utf-8 codec is being
> selected automagically... why should that be so there and not in the
> first case?
I'm a bit confused on what you did when the error appears if you t
On 2007-04-25, Ant <[EMAIL PROTECTED]> wrote:
> On Apr 23, 1:38 pm, Antoon Pardon <[EMAIL PROTECTED]> wrote:
>> The following is part of the explanation on slices in the
>> tutorial:
>>
>> The best way to remember how slices work is to think of the indices as
> ...
>> +---+---+---+---+---+
>> |
Hello Guys,
I'm using the following function 'str (now)' to place a date time stamp into
a log file, which works fine, however it writes the stamp like this.
2007-04-25 11:06:53.873029
But I need to expel those extra decimal places as they're causing problems
with the application that p
On Apr 25, 2007, at 1:58 AM, Alchemist wrote:
> What is Python's version for the trinary if..then..else operator?
>
> I want a one-liner such as
> a?b:c
> for the if..then..else control structure
> if a
> then b
> else c
>
> Does Python 2.4 support it?
Not precisely, but you can *usually*
Antoon Pardon wrote:
>>> That's a good point, and also a valid reason for restricting the
>>> voting community to PSF members. Thanks, Alex.
>> So in order to avoid a suspicion of a conflict of interest you want to
>> turn the whole thing into private property of the PSF?
>>
>> That is the most
Anton Vredegoor wrote:
> It's about as ridiculous as proving that a stiff parrot is dead by
> grabbing it by the legs and repeatedly hitting it's head on the counter.
Or to write "it's" where its is more appropriate.
A.
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
I wrote a web visitor counter with modpy and pil.
It is must working on half-static page, so I must write this counter with
jpeg image output.
Everything is working good, but I need to change this counter a little, it's
style isn't same as it's webpage's style.
I want to make bold and itali
Marc 'BlackJack' Rintsch wrote:
> In <[EMAIL PROTECTED]>, Kay Schluehr
> wrote:
>
>> set, int, float, list, object,...
>>
>> Don't see any of the basic types following the capitalized word
>> convention for classes covered by PEP 08. This does not hold only for
>> __builtins__ in the strict sense
On 2007-04-25, Anton Vredegoor <[EMAIL PROTECTED]> wrote:
> Antoon Pardon wrote:
>
That's a good point, and also a valid reason for restricting the
voting community to PSF members. Thanks, Alex.
>>> So in order to avoid a suspicion of a conflict of interest you want to
>>> turn the whole
Michael >>
>> Does Python 2.4 support it?
>
> Not precisely, but you can *usually* get away with:
>
> a and b or c
This is really bad advice, as long as you don't explain why it "usually"
works (and often enough not). This for example won't work:
>>> False or '' and 0
''
The reason is that the
Dear all,
I hope my question is here in the right place...
What I want to achieve is a communication between Java and Python. We
have a pretty strong framework of existing python scripts and modules.
Now I want to use jython in order to faciliate the communication
between another Java framework.
> I'm using the following function 'str (now)' to place a date time stamp into
> a log file, which works fine, however it writes the stamp like this.
>
> 2007-04-25 11:06:53.873029
>
> But I need to expel those extra decimal places as they're causing problems
> with the application that parses the
Antoon Pardon wrote:
> On 2007-04-25, Anton Vredegoor <[EMAIL PROTECTED]> wrote:
>> Antoon Pardon wrote:
>>
> That's a good point, and also a valid reason for restricting the
> voting community to PSF members. Thanks, Alex.
So in order to avoid a suspicion of a conflict of interest you
Robert Rawlins - Think Blue wrote:
> I'm using the following function 'str (now)' to place a date time stamp into
> a log file, which works fine, however it writes the stamp like this.
> 2007-04-25 11:06:53.873029
> But I need to expel those extra decimal places as they're causing problems
> wit
> -Original Message-
> From: [EMAIL PROTECTED]
[mailto:python-
> [EMAIL PROTECTED] On Behalf Of Antoon
Pardon
> Sent: Tuesday, April 24, 2007 7:40 AM
> To: [email protected]
> Subject: Re: Tutorial creates confusion about slices
>
> On 2007-04-24, Michael Bentley <[EMAIL PROTECTED]> w
Gregor Stich wrote:
> Dear all,
>
> I hope my question is here in the right place...
> What I want to achieve is a communication between Java and Python. We
> have a pretty strong framework of existing python scripts and modules.
> Now I want to use jython in order to faciliate the communication
2007/4/25, Hendrik van Rooyen <[EMAIL PROTECTED]>:
> Most bugs fixed in the month for the developers?
> (Watch them scrabbling for the easy ones - )
>
> Most Patches reviewed and incorporated?
These numbers are easy to acquire. Note, though, that the name of the
developer in a top ten of these
On 2007-04-24, Thomas Nelson <[EMAIL PROTECTED]> wrote:
> On Apr 23, 10:38 pm, Mel Wilson <[EMAIL PROTECTED]> wrote:
>> Even with a balanced tree, if a key in a node changes value,
>> you may have to re-balance the tree. Nothing in a Python list
>> says that a dictionary tree would have to be re-b
Neil Cerutti wrote:
> On 2007-04-24, Thomas Nelson <[EMAIL PROTECTED]> wrote:
>> On Apr 23, 10:38 pm, Mel Wilson <[EMAIL PROTECTED]> wrote:
>>> Even with a balanced tree, if a key in a node changes value,
>>> you may have to re-balance the tree. Nothing in a Python list
>>> says that a dictionary
Antoon Pardon wrote:
> On 2007-04-25, Ant <[EMAIL PROTECTED]> wrote:
>> On Apr 23, 1:38 pm, Antoon Pardon <[EMAIL PROTECTED]> wrote:
>>> The following is part of the explanation on slices in the
>>> tutorial:
>>>
>>> The best way to remember how slices work is to think of the indices as
>> ...
>>>
John Nagle wrote:
> Steve Holden wrote:
>> John Nagle wrote:
>>
>>> Steve Holden wrote:
>>>
John Nagle wrote:
[socket.error bug report]
>
>> All these notes should be included in the bug report, as I suspect the
>> module would benefit from additional clarity.
>
> Done. See
>
>
So I read quite a few things about this phenomenon in Python 2.4.x but
I can hardly believe that there is really no solution to my problem.
We use a commercial tool that has a macro functionality. These macros
are written in python. So far nothing extraordinary.
Our (python-)macro uses massively
John Nagle wrote:
> Alex Martelli wrote:
>> Jorgen Grahn <[EMAIL PROTECTED]> wrote:
>>...
>>
Perhaps the current wave of dual-core and quad-core CPUs in cheap
consumer products would change people's perceptions -- I wonder...
>
>> IronPython would appear to be coming along nicely and
Steve Holden <[EMAIL PROTECTED]> wrote:
>> Wording to that effect makes it more clear that it is a crutch
>> that can be usefull now but that it should be discarded later.
>>
> Most people reading a tutorial are aware that they are being given the
> knowledge they need to put the subject matter
Johny wrote:
> I use PIL to write some text to a picture.The text must be seen wery
> clearly.
> I write the text to different pictures but to the same position. As
> pictures maybe different, colour, in the position where I write the
> text, is also different.
> Is there a way how to set the fo
On 2007-04-25, Hamilton, William <[EMAIL PROTECTED]> wrote:
> That's how everything I've ever learned has been taught. Start
> with a simple explanation that may not be completely accurate
> but is functional, then fill in the details later when there is
> a context to put them in. The tutorial c
Hi!
I got same problem with Lotus Domino + Python.
The lotus COM objects are not freed, so I get out from memory.
I solve this problem with a little trick:
I make two py applications. The first is call the second as like another
application.
The first is put some work to the seconds datadir.
Wh
Anton Vredegoor wrote:
> Steve Holden wrote:
>>> When cash is involved, it's important to avoid even the slightest
>>> hint of a suggestion of a suspicion of a conflict of interest;
>>> that, I guess, is why firms that run contests with cash prizes
>>> always declare employees and their families "
Anton Vredegoor wrote:
> Antoon Pardon wrote:
>
That's a good point, and also a valid reason for restricting the
voting community to PSF members. Thanks, Alex.
>>> So in order to avoid a suspicion of a conflict of interest you want to
>>> turn the whole thing into private property of th
Anton Vredegoor wrote:
> Antoon Pardon wrote:
>> On 2007-04-25, Anton Vredegoor <[EMAIL PROTECTED]> wrote:
>>> Antoon Pardon wrote:
>>>
>> That's a good point, and also a valid reason for restricting the
>> voting community to PSF members. Thanks, Alex.
> So in order to avoid a suspicio
[EMAIL PROTECTED] wrote:
> So I read quite a few things about this phenomenon in Python 2.4.x but
> I can hardly believe that there is really no solution to my problem.
>
> We use a commercial tool that has a macro functionality. These macros
> are written in python. So far nothing extraordinary.
Alex Martelli said:
> What do you mean? Just instantiate the random.Random class and you can
> call .seed on it as well as anything else, and no other module will
> infringe on "your" module's Random instance. The "global functions" of
> module random exist for those who *SPECIFICALLY* want globa
On 2007-04-25, Steve Holden <[EMAIL PROTECTED]> wrote:
> Neil Cerutti wrote:
>> That would be documented as undefined behavior, and users
>> exhorted not to do such things.
>>
>> Python's dictionaries are a proven winner--I'm definitely not an
>> advocate for changing them. But the general require
Larry Bates <[EMAIL PROTECTED]> wrote:
> Let's see for this I need to get out my crystal ball...
>
> If it is a commercial application, you should contact their tech
> support for a solution. The problem isn't specifically a Python
> problem but rather an implementation problem with their app.
>
Raja wrote:
> Hi,
> I want to override the sys.settrace() call, create a way to trace
> the execution of a python program. Keep track of all objects created
> and destroyed. Keep track of the call pattern throughout the execution
> of the program and output a simplified "call graph" to standard o
On Apr 24, 6:17 am, Michael Bentley <[EMAIL PROTECTED]> wrote:
> On Apr 24, 2007, at 11:50 AM, James Stroud wrote:
>
>
>
> > Hello,
>
> > Does anyone know of an example, however modest, of a screenscraper
> > authored in python? I am using Firefox.
>
> > Basically, I am answering problems via my br
On 25 Apr 2007 15:04:59 GMT, TimC <[EMAIL PROTECTED]> wrote:
> Larry Bates <[EMAIL PROTECTED]> wrote:
>
> > Let's see for this I need to get out my crystal ball...
> >
> > If it is a commercial application, you should contact their tech
> > support for a solution. The problem isn't specifically a
Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
> Michael >>
> >> Does Python 2.4 support it?
> >
> > Not precisely, but you can *usually* get away with:
> >
> > a and b or c
>
> This is really bad advice, as long as you don't explain why it "usually"
> works (and often enough not). This for exam
Hi everybody, does anyone know how to detect a key press from a
keyboard. Well I do know how to do that, but i need to detect just one
press and ignore the others. I mean, my program checks an input from the
outside (a sensor) and i emulate that signal as a keypress, but the
sensor doesn`t send the
The fourth Python Game Programming Challenge (PyWeek) has now concluded
with
judges (PyWeek being peer-judged) declaring the winners:
Individual: Which way is up? by Hectigo
http://www.pyweek.org/e/Hectic/
Team: Bubble Kong by The Olde Battleaxe
http://www.pyweek.org/e/toba4/
Congra
Hi everybody, does anyone know how to detect a key press from a
keyboard. Well I do know how to do that, but i need to detect just one
press and ignore the others. I mean, my program checks an input from the
outside (a sensor) and i emulate that signal as a keypress, but the
sensor doesn`t send the
Just in case something already exist for this. Is there some tool,
that can produce gcov-type coverage out of a python code ?
I have an already existing regex code that turn gcov output into XML,
which I'd like to reuse.
thanks !
-Mathieu
--
http://mail.python.org/mailman/listinfo/python-list
On 2007-04-25, Chris Mellon <[EMAIL PROTECTED]> wrote:
> "Returning memory to the OS" doesn't affect exhaustion of your virtual
> address space. More likely, your nested loops are just creating more
> objects than is possible to hold within a single process.
I'm a bit fuzzy on this, but I don't t
"Paddy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|I found this blog post on one users migration to Python. It states one
| users frustrations but the comments section is quite good too.
|
|
http://blog.cbcg.net/articles/2007/04/22/python-up-ruby-down-if-that-runtime-dont-work-
Robert Rawlins - Think Blue wrote:
Hello guys,
I've recently ported my application from bash to python, however there are
still a few bash line utilities I -have- to use in the application as there
isn't any alternative available to me. In the old days of bash I would have
grep'd the output
Grant Edwards wrote:
> On 2007-04-25, Chris Mellon <[EMAIL PROTECTED]> wrote:
>
>
>> "Returning memory to the OS" doesn't affect exhaustion of your virtual
>> address space. More likely, your nested loops are just creating more
>> objects than is possible to hold within a single process.
>>
"Steve Holden" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Since it's the PSF's money I don't see why the voting shouldn't be
| restricted to PSF members.
Legally, I believe it *is* that way. And even as a non-member, I think it
should be that way. Any expression of opinions
Diez B. Roggisch wrote:
>> So why is it that in the first case I got UnicodeEncodeError: 'ascii'
>> codec can't encode? Seems as if, within Idle, a utf-8 codec is being
>> selected automagically... why should that be so there and not in the
>> first case?
>
> I'm a bit confused on what you did whe
Hi,
I am running Gentoo Linux.
I have emerge'd Bibus and everything seemed to go well.
When I try to start it from a shell I get:
[EMAIL PROTECTED] ~ $ bibus
Traceback (most recent call last):
File "/usr/share/bibus/bibus.py", line 63, in ?
locale.setlocale(locale.LC_ALL,'en_US')
Hello,
In the file generated by pyuic4 from Designer's .ui file I noticed the use
of lower case class names (I'm assuming these are the names of classes,
not modules). For example:
It imports thusly:
from PyQt4 import QtGui
then uses things like:
self.gridlayout = qtgui.qgridlayout(dld
[EMAIL PROTECTED] wrote:
> So I read quite a few things about this phenomenon in Python 2.4.x but
> I can hardly believe that there is really no solution to my problem.
>
> We use a commercial tool that has a macro functionality. These macros
> are written in python. So far nothing extraordinary.
"Frank Stajano" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I find the encode/decode terminology somewhat confusing, because arguably
> both sides are
> "encoded". For example, a unicode-encoded string (I mean a sequence of
> unicode code
> points) should count as "decoded"
On 2007-04-25, Steven Howe <[EMAIL PROTECTED]> wrote:
>> I'm a bit fuzzy on this, but I don't think there _is_ a
>> practical way to "return memory to the OS" in many OSes. For
>> example in Unix the C library uses the sbrk() call to increase
>> the size of the data segment when additional memory
On Apr 24, 5:50 am, James Stroud <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Does anyone know of an example, however modest, of a screenscraper
> authored in python? I am using Firefox.
>
> Basically, I am answering problems via my browser and being scored for
> each problem. I have a tendency to go pa
I am trying to plot something in gnuplot 4.2 using co-ordinates a Python
2.5 program computes. Here's what I'm doing:
py> from subprocess import *
py> plot = Popen("c:/progs/gp/bin/wgnuplot.exe", stdin=PIPE)
py> plot.stdin.write("plot x*x")
The first command dutifully opens gnuplot, but the secon
Hi,
I'm trying to write a simple log parsing program. I noticed that it
isn't reading my log file to the end.
My log is around 200,000 lines but it is stopping at line 26,428. I
checked that line and there aren't any special characters.
This is the file reading code segment that I'm using:
s
[EMAIL PROTECTED] wrote:
> Hi,
>
> I'm trying to write a simple log parsing program. I noticed that it
> isn't reading my log file to the end.
>
> My log is around 200,000 lines but it is stopping at line 26,428. I
> checked that line and there aren't any special characters.
>
> This is the file
In article <[EMAIL PROTECTED]>,
Steven Howe <[EMAIL PROTECTED]> wrote:
> Interesting questions. What happens when an object is 'cleaned' up by
> using the 'del' command. Does the memory space stay in the python
> process, get handed back to the OS, or some combination of both?
> I remember 'C' on
[EMAIL PROTECTED] wrote:
> My log is around 200,000 lines but it is stopping at line 26,428. I
> checked that line and there aren't any special characters.
Are you in Windows? Just in case, put "rb" as the mode of the open.
Regards,
--
. Facundo
.
Blog: http://www.taniquetil.com.ar/plog/
PyA
Steve Holden wrote:
> I'm sorry, but while the PSF is a democratically-run organization its
> franchise doesn't extend beyond the membership.
I didn't realize this was about an PSF internal affair. Of course a
group of people can decide on its internal matters without asking anyone
else, as lo
"Global Warning,"
an *anonymous* article in an old issue of *National Review*,
the so-called conservative mag of the grotesque Establishment
creature,
William Buckley, was a sort of benignly-spun expose
of the Mont Pelerin Society, the vehicle of British imperialist "free
trade,"
free beer & free d
Donald 'Paddy' McCarthy <[EMAIL PROTECTED]> wrote
> Could you split the program into one handling the outer loop and
> calling another program, with data transfer, to handle the inner
> loops?
>
> - Paddy.
I'm afraid this isn't possible, because the python macro is called
and started from within
ed> I, unfortunately, failed to realize the actual platform the script
ed> is for is IronPython. When trying to import calendar in IronPython,
ed> I get:
ed> SyntaxError: future feature is not defined: with_statement
ed> (c:\Python25\Lib\calendar.py, line 8)
So try the 2.4 v
hello,
As part of a procedure I've a number sequences like this:
if Print_Info: print Datafile.readline()
else:Datafile.readline()
Is there a more compressed way to write such a statement,
especially I dislike the redundancy "Datafile.readline()".
thanks,
Stef Mient
Stef Mientki schrieb:
> hello,
>
>
> As part of a procedure I've a number sequences like this:
>
>
> if Print_Info: print Datafile.readline()
> else:Datafile.readline()
>
>
> Is there a more compressed way to write such a statement,
> especially I dislike the redundanc
I have found a code example with this loop.
for k in range(10, 25):
n = 1 << k;
I have never read Python before but is it correct that 1 get multiplied
with the numbers 10,11,12,12,...,25 assuming that 1 << k means "1 shift
left by k" which is the same as multiplying with k.
--
http://
Hi,
I'm trying to create a small GUI program where I can do plots using
Matplotlib. I've been trying to borrow code from the examples at the
matplotlib website, but I can't get it to work.
I want to be able to create a wx.Panel that contains an axis for
plotting. Around it i want other panels con
desktop wrote:
> I have found a code example with this loop.
>
> for k in range(10, 25):
> n = 1 << k;
>
>
> I have never read Python before but is it correct that 1 get multiplied
> with the numbers 10,11,12,12,...,25
No.
> assuming that 1 << k means "1 shift left by k"
Yes.
> which
On Apr 23, 8:39 pm, [EMAIL PROTECTED] wrote:
> Anyone knows if its possible to get scan codes ???
> I tried with getch () but with no success, just keycodes.
> May be using the something in the sys.stdin module ??
is this what you're looking for?
http://cheeseshop.python.org/pypi/sysio/1.0
and sy
On Wed, 25 Apr 2007 22:54:12 +0200, desktop <[EMAIL PROTECTED]> wrote:
>I have found a code example with this loop.
>
>for k in range(10, 25):
> n = 1 << k;
>
>
>I have never read Python before but is it correct that 1 get multiplied
>with the numbers 10,11,12,12,...,25 assuming that 1 << k m
desktop schrieb:
> I have found a code example with this loop.
>
> for k in range(10, 25):
> n = 1 << k;
>
>
> I have never read Python before but is it correct that 1 get multiplied
> with the numbers 10,11,12,12,...,25 assuming that 1 << k means "1 shift
> left by k" which is the same as
desktop <[EMAIL PROTECTED]> writes:
> for k in range(10, 25):
> n = 1 << k;
>
> I have never read Python before but is it correct that 1 get
> multiplied with the numbers 10,11,12,12,...,25 assuming that 1 << k
> means "1 shift left by k" which is the same as multiplying with k.
Shift left
On 2007-04-25, Peter Beattie <[EMAIL PROTECTED]> wrote:
> I am trying to plot something in gnuplot 4.2 using co-ordinates a Python
> 2.5 program computes. Here's what I'm doing:
>
> py> from subprocess import *
> py> plot = Popen("c:/progs/gp/bin/wgnuplot.exe", stdin=PIPE)
> py> plot.stdin.write("p
On Apr 23, 1:38 pm, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> The following is part of the explanation on slices in the
> tutorial:
>
> The best way to remember how slices work is
...
> +---+---+---+---+---+
> | H | e | l | p | A |
> +---+---+---+---+---+
> 0 1 2 3 4 5
> -5 -4
" ???" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| The fourth Python Game Programming Challenge (PyWeek) has now concluded
| with
| judges (PyWeek being peer-judged) declaring the winners:
|
| Individual: Which way is up? by Hectigo
|http://www.pyweek.org/e/Hectic/
|
|
"desktop" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|I have found a code example with this loop.
|
| for k in range(10, 25):
| n = 1 << k;
|
|
| I have never read Python before but is it correct ...
One of the super-nice feature of Python is the interactive mode, also
av
1 - 100 of 160 matches
Mail list logo