I'm using the dateutil module from http://labix.org/python-dateutil.
Am I right in thinking that the rrules module doesn't acknowledge days
before today?
An example of the issue:
>>> rule_temp = rrule(YEARLY,bymonth=1,bymonthday=1)
>>> print rule_temp.between(datetime(2006,12,1),datetime(2007,1,
I'll answer my own post.
If you don't specify dtstart, it defaults to datetime.today().
Therefore, there are no instances before today. Specify dtstart as a
historic date, and it works on any dates after dtstart.
Wish I'd engaged brain before posting.
Matt
--
http://mail.python.org/mailman/li
Em Sáb, 2006-02-25 às 17:56 -0800, [EMAIL PROTECTED] escreveu:
> Steve Holden wrote:
> > > Some other functions rely on the AssertionError exception to indicate to
> > > the user that something went wrong instead of using a user defined
> > > exception.
> > >
> >
> > The real problem here is that y
Crutcher wrote:
> You are a very silly person.
Claudio
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED]:
>I have a python script that pickles and unpickles a give object. It
>works without any problems on windows (the data was pickled on windows
>first). But when I try to run the script on Linux, I get the following
>error:
[...]
>ImportError: No module named __main__
There are som
Rene Pijlman:
>[EMAIL PROTECTED]:
>>ImportError: No module named __main__
>
>There are some posts in the Usenet archive
Also:
http://mail.python.org/pipermail/python-list/1999-April/000916.html
--
René Pijlman
--
http://mail.python.org/mailman/listinfo/python-list
Ross Ridge wrote:
> Xavier Morel wrote:
>> Not if you're still within Unicode / Universal Character Set code space.
>
> Akihiro Kayama in his original post made it clear that he wanted to use
> a character set larger than entire Unicode code space.
>
> Ross R
Crutcher wrote:
> Skipping ahead, let me try to rephrase this.
>
> First, this isn't really a python question, it is SQL, XSLT, and
> program design, but I'll try to answer.
Well, first of all, it's about mapping XPath onto a relational data
model. This is clear from the original posting:
Crutcher wrote:
> You are a very silly person. You have tripped so many of my internet
> bullshit triggers that I think perhaps you are trolling. All languages
> alter the way you think. They structure the nature of questions you can
> ask, and problems you can solve.
>
> Do you understand 'Zen',
John Coleman wrote:
> Crutcher wrote:
> > You are a very silly person. You have tripped so many of my internet
> > bullshit triggers that I think perhaps you are trolling. All languages
> > alter the way you think. They structure the nature of questions you can
> > ask, and problems you can solve.
André wrote:
> Some "purist", like the Academie Francaise (or, apparently "Crutcher")
> seem to believe that "one" can restrict the meaning of words, or the
> evolution of language. The rest of us are happy to let language
> evolution take place to facilitate communication.
So instead of Zen of
Hello,
I have two lists, one with strings (filenames, actually), and one with a
real-number
rank, like:
A=['hello','there','this','that']
B=[3,4,2,5]
I'd like to sort list A using the values from B, so the result would be in this
example,
A=['this','hello','there','that']
The sort method on
Brian Blais wrote:
> Hello,
>
> I have two lists, one with strings (filenames, actually), and one with a
> real-number
> rank, like:
>
> A=['hello','there','this','that']
> B=[3,4,2,5]
>
> I'd like to sort list A using the values from B, so the result would be
> in this example,
>
> A=['this'
Brian Blais wrote:
> Hello,
>
> I have two lists, one with strings (filenames, actually), and one with a
> real-number
> rank, like:
>
> A=['hello','there','this','that']
> B=[3,4,2,5]
>
> I'd like to sort list A using the values from B, so the result would be
> in this example,
>
> A=['this'
Brian Blais <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have two lists, one with strings (filenames, actually), and one with a
> real-number rank, like:
>
> A=['hello','there','this','that']
> B=[3,4,2,5]
>
> I'd like to sort list A using the values from B, so the result would be in
> this exampl
Brian Blais wrote:
> Hello,
>
> I have two lists, one with strings (filenames, actually), and one with a
> real-number
> rank, like:
>
> A=['hello','there','this','that']
> B=[3,4,2,5]
>
> I'd like to sort list A using the values from B, so the result would be
> in this example,
>
> A=['this'
"me" wrote:
> I see.
> --
> me
Wonderfull.
--
http://mail.python.org/mailman/listinfo/python-list
André wrote:
> > If appearing silly is the price of satisfying your curiousity then so
> > be it. I would, however, like to point out that there is a well
> > established usage of the word "Zen" in computer science.
> [snip; excellent answer from John deleted.]
> > -John Coleman
>
> If I may add:
Steven Bethard wrote:
> Here's a solution that makes use of the key= argument to sorted():
>
> >>> A = ['hello','there','this','that']
> >>> B = [3,4,2,5]
> >>> indices = range(len(A))
> >>> indices.sort(key=B.__getitem__)
> >>> [A[i] for i in indices]
> ['this', 'hello', 'there', 'that']
>
> Ba
Hi,
Here is a code example to visualize my problem.
--
import thread
import threading
from time import sleep
def a():
print "exec a"
sleep(1)
def b():
print "exec b"
sleep(4)
def c()
Ross Ridge wrote:
> Akihiro Kayama in his original post made it clear that he wanted to use
> a character set larger than entire Unicode code space.
Xavier Morel wrote:
> He implies that ...
He explictly said that character set he wanted to use wouldn't fit in
UTF-16.
>... but in later messages
peleme wrote:
> The threads which arrives to the s function should wait for each other
> until the last one. So A, B, and C executes the last function
> 'together', while D executes it seperate.
> I only know that three threads have to be in synch.
Take a look at the Barrier patter in The Little B
Hi,
I am new to python. I would like to know how to use python regular
expression to substitute string value?
I have an input string like this:
x:11 y:0 w:760 h:19 area:14440 areaPerCent:0
totalAreaPerCent:-3.08011e+16 type:3 path:///-/1/1
and I would like to convert it to:
rect x="11" y="0" width
Hi All
how do i include directories into my project when using py2exe? I have
a module that has it's images directory and when it's searches it (into
../dist/library.zip/.../mymodule/) it generates an error because the
directory wasn't imported...
tnx
Fabio
--
http://mail.python.org/mailman/list
In article <[EMAIL PROTECTED]>,
Claudio Grondi <[EMAIL PROTECTED]> wrote:
> Claudio Grondi wrote:
> > Claudio Grondi wrote:
> >
> >> Paul Probert wrote:
> >>
> >>> Peter Hansen wrote:
> >>>
> Are you saying that you believe the time.sleep(1) call is actually
> blocking for 200 seconds
> I don't know what it is with comp.lang.python/python-list these days
> and the cheap put-downs. Unless you know the person you're responding
> to personally, and thus the above counts as some kind of banter, you
> would do better to keep the insults to yourself.
You are completely right, I was o
The string method isalpha() returns True when all characters in the
string are alphabetic. Unfortunately the underscore is not alphabetic.
A function that does what I need is:
def alfa_(w):
return "".join(w.split("_")).isalpha()
but for the kind of strings that I have this is about ten times
[EMAIL PROTECTED] writes:
> Hi,
> I am new to python. I would like to know how to use python regular
> expression to substitute string value?
> I have an input string like this:
> x:11 y:0 w:760 h:19 area:14440 areaPerCent:0
> totalAreaPerCent:-3.08011e+16 type:3 path:///-/1/1
>
> and I would like
Hello python people,
Can you help me out please.
I get the folllowing Error while trying to build a installer with the
Distutils module:
--
building 'win32com.cl
Hello python people,
Can you help me out please.
I get the folllowing Error while trying to build a installer with the
Distutils module:
--
building 'win32com.cli
Thanks. But i don't understand why I need to do this:
x. . area = map (lambda x: int(x), re.findall (pattern, line)[0]
if i have the value already by doing this:
x, y, width, height, area = re.findall(pattern, line)[0]
print "rect x=\"%(x)s\" y=\"%(y)s\" width=\"%(width)s\"
height=\"%(height)s\"
You don't really need regexes for this.
Assuming there is no whitespace in any of your values, it should be
really easy to parse the string.
s = 'x:11 y:0 w:760 h:19 area:14440 areaPerCent:0
totalAreaPerCent:-3.08011e+16 type:3 path:///-/1/1'
s.split() # break the string on whitespace
> ['x:11',
Your solution Steven Bethard looks very intelligent, here is a small
speed test, because sorting a list according another one is a quite
common operation.
(Not all solutions are really the same, as Alex has shown).
from itertools import izip, imap
from operator import itemgetter
from random impor
This is probably faster:
def alfa_(w):
return w.replace("_", "a").isalpha()
This is another solution, but it's probably slower, you can time it:
from string import letters
_setalpha = set(letters + "_")
def alfa_2(w):
return not (set(w) - _setalpha)
Bye,
bearophile
--
http://mail.py
This is fun :)
{Note: I take no responsibilty for anyone who uses this in production
code}
#!/usr/bin/env python2.4
# This program shows off a python decorator
# which implements tail call optimization. It
# does this by throwing an exception if it is
# it's own grandparent, and catching such
# ex
egbert <[EMAIL PROTECTED]> writes:
> The string method isalpha() returns True when all characters in the
> string are alphabetic. Unfortunately the underscore is not alphabetic.
> A function that does what I need is:
>
> def alfa_(w):
> return "".join(w.split("_")).isalpha()
>
> but for the ki
Zajcev Evgeny wrote:
> egbert <[EMAIL PROTECTED]> writes:
>
> > The string method isalpha() returns True when all characters in the
> > string are alphabetic. Unfortunately the underscore is not alphabetic.
> > A function that does what I need is:
> >
> > def alfa_(w):
> > return "".join(w.spl
okay, but I have a simpler question, how can I split using only "\n"?
I try this:
strings = node.data.split("\n");
print node.data
for str in strings:
print str
where node.data has multiple lines, but in the for loop, I don't see
str gets pr
Hi Kent,
that's exactly the solution for my problem. Thanks a lot!
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Are you sure node.data contains newlines?
You could try just:
print node.data
print node.data.split('\n')
This should give you an idea. From the interpreter:
>>> s = """
... abc
... def
... xyz"""
>>> s.split('\n')
['', 'abc', 'def', 'xyz']
--
http://mail.python.org/mailman/listinfo/python-list
When I try your idea, I have this error
x, y, width, height = re.findall(pattern, str)[0]
IndexError: list index out of range
How can I use findall to handle error case? i.e. what if there is no
match? how can I handle it gracefully?
--
http://mail.python.org/mailman/listinfo/python-list
"Fuzzyman" <[EMAIL PROTECTED]> writes:
> Zajcev Evgeny wrote:
>> egbert <[EMAIL PROTECTED]> writes:
>>
>> > The string method isalpha() returns True when all characters in the
>> > string are alphabetic. Unfortunately the underscore is not alphabetic.
>> > A function that does what I need is:
>> >
I am using the print function in my python script.
Can you please tell me what can I do to redirect the output to an file?
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
Tony Nelson wrote:
> In article <[EMAIL PROTECTED]>,
> Claudio Grondi <[EMAIL PROTECTED]> wrote:
>
>
>>Claudio Grondi wrote:
>>
>>>Claudio Grondi wrote:
>>>
>>>
Paul Probert wrote:
>Peter Hansen wrote:
>
>
>>Are you saying that you believe the time.sleep(1) call is
Do I need to convert string to integer in python? or it will do it for
me (since dynamic type)?
In my python script, I have this line:
x /= 10;
when i run it, I get this error:
TypeError: unsupported operand type(s) for /=: 'unicode' and 'int'
I want to divide x by 10 and assign that value b
http://diveintopython.org/scripts_and_streams/stdin_stdout_stderr.html
example 10.9 , redurectung output
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Do I need to convert string to integer in python? or it will do it for
> me (since dynamic type)?
Yes. Dynamic typing doesn't say anything about a string and a number being
"equal," as they are (e.g.) in Perl, it just says that you don't have to
care what type of object
I have a string array:
colors = ["#ff", "#00FF00", "#FF"]
colorIndex = 0;
and I want to loop thru each element of colors
for str in strings:
print colors[colorIndex++ % colors.length]
But i get an invalid syntax error when I execute the script:
print colors[colorIndex++ % colors.l
<[EMAIL PROTECTED]> wrote:
> I am using the print function in my python script.
> Can you please tell me what can I do to redirect the output to an file?
f = open('aaargh', 'w')
print>>f, 'killew wabbit'
Alex
--
http://mail.python.org/mailman/listinfo/python-list
<[EMAIL PROTECTED]> wrote:
> Do I need to convert string to integer in python? or it will do it for
> me (since dynamic type)?
Nope, no such implicit conversion (thanks be!). Strings are strings and
ints and ints and never the twain shall meet, except by explicit
request;-).
> In my python scri
[EMAIL PROTECTED] schrieb:
> Do I need to convert string to integer in python? or it will do it for
> me (since dynamic type)?
>
> In my python script, I have this line:
> x /= 10;
>
> when i run it, I get this error:
> TypeError: unsupported operand type(s) for /=: 'unicode' and 'int'
>
> I
Zajcev Evgeny <[EMAIL PROTECTED]> wrote:
...
> > The following will work, and probably only be twice as slow as
> > 'isalpha' :-) :
> >
> > def alfa(w):
> >return w.replace('_', '').isalpha()
>
> Yeah, great performance indeed, thanks!
Except it rejects a w that's JUST an underscore, whil
[EMAIL PROTECTED] schrieb:
> I have a string array:
> colors = ["#ff", "#00FF00", "#FF"]
> colorIndex = 0;
>
> and I want to loop thru each element of colors
>
> for str in strings:
> print colors[colorIndex++ % colors.length]
>
>
> But i get an invalid syntax error when I execute the
[EMAIL PROTECTED] wrote:
> I have a string array:
> colors = ["#ff", "#00FF00", "#FF"]
> colorIndex = 0;
>
> and I want to loop thru each element of colors
>
> for str in strings:
> print colors[colorIndex++ % colors.length]
>
>
> But i get an invalid syntax error when I execute the s
okay, I try you suggestion, and re-write my code like this:
colors = ["#ff", "#00FF00", "#FF"]
colorIndex = 0
def getText(nodelist):
for str in strings:
print colors[colorIndex % colors.length]
colorIndex += 1
but i get this error
[EMAIL PROTECTED] schrieb:
> Do I need to convert string to integer in python? or it will do it for
> me (since dynamic type)?
>
> In my python script, I have this line:
> x /= 10;
>
> when i run it, I get this error:
> TypeError: unsupported operand type(s) for /=: 'unicode' and 'int'
>
> I
[EMAIL PROTECTED] schrieb:
> okay, I try you suggestion, and re-write my code like this:
> colors = ["#ff", "#00FF00", "#FF"]
> colorIndex = 0
>
> def getText(nodelist):
>
>
> for str in strings:
>
> print colors[colorIndex % colors.length]
>
Crutcher wrote:
> This is fun :)
> {Note: I take no responsibilty for anyone who uses this in production
> code}
>
> #!/usr/bin/env python2.4
> # This program shows off a python decorator
> # which implements tail call optimization. It
> # does this by throwing an exception if it is
> # it's own g
> My point is simply that, for some languages L,
> "Zen and the art of L" or "The Tao of L" are plausible
> titles ("Zen and the Art of Lisp Programming" would be plausible) but
> for some languages they wouldn't ("The Tao of Fortran" ?)
> Do you disagree?
No, I don't disagree that people do this.
I've tossed it to python-dev, but how do I submit it to the cookbook?
--
http://mail.python.org/mailman/listinfo/python-list
Can you please tell me what is the meaning of
UnboundLocalError: local variable 'colorIndex' referenced before
assignment
in general?
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] schrieb:
> Can you please tell me what is the meaning of
> UnboundLocalError: local variable 'colorIndex' referenced before
> assignment
>
> in general?
Well, pretty much of what it says: You tried to access a variable without prior
assignment to it. Like this:
a = b**2 + c
Can you please tell me what is the meaning this error in general?
UnboundLocalError: local variable 'colorIndex' referenced before
assignment
In my python script,
I have a variable define and init to 0, like this
colorIndex = 0
and in one of my functions, I increment it by 1
def myFunc
co
Diez B. Roggisch wrote:
> [EMAIL PROTECTED] schrieb:
>
>> okay, I try you suggestion, and re-write my code like this:
>> colors = ["#ff", "#00FF00", "#FF"]
>> colorIndex = 0
>>
>> def getText(nodelist):
>>
>>
>> for str in strings:
>>
>> print colors[color
[EMAIL PROTECTED] wrote in news:1140987642.195734.187540
@t39g2000cwt.googlegroups.com:
> Can you please tell me what is the meaning this error in general?
>
> UnboundLocalError: local variable 'colorIndex' referenced before
> assignment
>
> In my python script,
> I have a variable define and i
Crutcher wrote:
> I've tossed it to python-dev, but how do I submit it to the cookbook?
http://aspn.activestate.com/ASPN/Python/Cookbook/
I think it is a good place to stay accessible even if python-dev
overlooks it.
Kay
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] writes:
> When I try your idea, I have this error
>
> x, y, width, height = re.findall(pattern, str)[0]
> IndexError: list index out of range
>
> How can I use findall to handle error case? i.e. what if there is no
> match? how can I handle it gracefully?
This is explained i
[EMAIL PROTECTED] schrieb:
> Can you please tell me what is the meaning this error in general?
>
> UnboundLocalError: local variable 'colorIndex' referenced before
> assignment
>
> In my python script,
> I have a variable define and init to 0, like this
> colorIndex = 0
>
> and in one of my fu
Crutcher <[EMAIL PROTECTED]> wrote:
...
> No, I don't disagree that people do this. The history of "Zen and the
> Art of X" dates from "Zen and the Art of Motorcycle Repair", which is
That's Maintenance, not Repair. Subtle but important distinction.
Alex
--
http://mail.python.org/mailman/li
[EMAIL PROTECTED] wrote:
> Your solution Steven Bethard looks very intelligent, here is a small
> speed test, because sorting a list according another one is a quite
> common operation.
> (Not all solutions are really the same, as Alex has shown).
Try this one.
def psort10(s1, s2):
d = dict
On Sun, 26 Feb 2006 11:55:54 -0800, Allerdyce.John wrote:
> Do I need to convert string to integer in python? or it will do it for
> me (since dynamic type)?
>
> In my python script, I have this line:
> x /= 10;
>
> when i run it, I get this error:
> TypeError: unsupported operand type(s) fo
Ron Adam <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Your solution Steven Bethard looks very intelligent, here is a small
> > speed test, because sorting a list according another one is a quite
> > common operation.
> > (Not all solutions are really the same, as Alex has shown).
>
>
I am new to python, can you please tell me how can I convert my python
script into an executable on linux?
i.e. instead of typing 'python myscript.py abc', I just need to do
'myscript.py abc'?
and how can I get the input argument from my script , in my example,
how can I read 'abc'?
Thank you.
--
Alex Martelli wrote:
> Crutcher <[EMAIL PROTECTED]> wrote:
>...
>
>>No, I don't disagree that people do this. The history of "Zen and the
>>Art of X" dates from "Zen and the Art of Motorcycle Repair", which is
>
>
> That's Maintenance, not Repair. Subtle but important distinction.
>
Since
Hi,
I have a program A that forks off two other programs, B and C. I need B
and C to both terminate if A is closed, but by using the
subprocess.call() method this seems to not be the case; I can shut down
the "black box" that is program A and B/C will still stay up.
How can I achieve the desired
>It's faster on my system because d.keys() is already sorted. But that may not
>be the case on other versions of python.<
In my version it's a little slower. But what system are you using where
keys is already sorted? IronPython maybe?
Bye,
bearophile
--
http://mail.python.org/mailman/listinf
[EMAIL PROTECTED] schrieb:
> I am new to python, can you please tell me how can I convert my python
> script into an executable on linux?
> i.e. instead of typing 'python myscript.py abc', I just need to do
> 'myscript.py abc'?
> and how can I get the input argument from my script , in my example,
On Sunday 26 February 2006 22:44, [EMAIL PROTECTED] wrote:
> I am new to python, can you please tell me how can I convert my python
> script into an executable on linux?
> i.e. instead of typing 'python myscript.py abc', I just need to do
> 'myscript.py abc'?
Use the shebang syntax. Use this as a
* Bob ([EMAIL PROTECTED]) wrote:
> I'd like to setup command line switches that are dependent on other
> switches, similar to what rpm does listed below. From the grammar below
> we see that the "query-options" are dependent on the query switch,
> {-q|--query}. Can "optparse" do this or do I have t
Hi:
I am puzzled about the following piece of code which attempts to create
a class that can be used as record or struct with a limited set of
allowed attributes that can be set into an instance of the class.
class RecordClass(object):
__slots__ = ["foo"]
def __init__(self, args):
Which one is better w.r.t. memory allocation but also w.r.t. speed:
## 1.1 ##
def forloop(a,b):
for idx in range(a,b):
## ..
## do something
## ..
## 1.2 ##
def whileloop(a,b):
idx = a
while idx < b:
## ..
On Sun, 26 Feb 2006 12:48:47 -0800, Crutcher wrote:
> My central thesis: you are using a poor understanding of language to
> classify languages into things you understand (tool languages) and
> things which _you_ find 'deep' (and difficult to learn), which you call
> 'Zen languages'. This is ridic
On Sun, 26 Feb 2006 21:58:30 +0100, Diez B. Roggisch wrote:
> [EMAIL PROTECTED] schrieb:
>> Can you please tell me what is the meaning of
>> UnboundLocalError: local variable 'colorIndex' referenced before
>> assignment
>>
>> in general?
>
> Well, pretty much of what it says: You tried to acce
Hello all
Could anyone shed any light on the following Exception? The code which
caused it is below. Uncommenting the 'super' call in 'XmlNode' gives
the same error. If I make XmlNode a subclass of 'object' rather than
'list' then the code will run.
Thanks in advance.
Exception:
Traceback (mos
kmkz wrote:
> I have a program A that forks off two other programs, B and C. I need B
> and C to both terminate if A is closed, but by using the
> subprocess.call() method this seems to not be the case; I can shut down
> the "black box" that is program A and B/C will still stay up.
>
> How can I
On Sun, 26 Feb 2006 17:01:45 -0500, Don Taylor wrote:
> Hi:
>
> I am puzzled about the following piece of code which attempts to create
> a class that can be used as record or struct with a limited set of
> allowed attributes that can be set into an instance of the class.
>
> class RecordClass
Trying to get my feet wet with wxPython (moving from just
command-line apps), I tried the obvious (or, at least to me
was obvious):
Start python, "import wx" and then do a "help(wx)" to see
what it can tell me.
Unfortunately, it spewed back a handful of errors, gasped,
wheezed and died semi-h
Steven is right, however, there is a way:
def new_record(slotlist):
class R(object):
__slots__ = slotlist
return R()
record1 = new_record(["age", "name", "job"])
record1.age = 27
record1.name = 'Fred'
record1.job = 'Plumber'
record1.salary = 5
--
http://mail.python.org/mailman/listi
Writing a while loop with ++x to increment the index was the first
mistake i made with python.
"++x" unfortunately is valid, it's not a single operator but a double
"unary plus"
Andrea
--
http://mail.python.org/mailman/listinfo/python-list
Gerard Flanagan wrote:
> Hello all
>
> Could anyone shed any light on the following Exception? The code which
> caused it is below. Uncommenting the 'super' call in 'XmlNode' gives
> the same error. If I make XmlNode a subclass of 'object' rather than
> 'list' then the code will run.
...
> Code:
Don Taylor wrote:
> I am puzzled about the following piece of code which attempts to create
> a class that can be used as record or struct with a limited set of
> allowed attributes that can be set into an instance of the class.
>
> I don't understand why I cannot set an attribute 'age' into reco
Steve Juranich wrote:
> Gerard Flanagan wrote:
>
> > Hello all
> >
> > Could anyone shed any light on the following Exception? The code which
> > caused it is below. Uncommenting the 'super' call in 'XmlNode' gives
> > the same error. If I make XmlNode a subclass of 'object' rather than
> > 'list
I've been combing google for the past week trying to find an
appropriate set of tools for a project I'm working on. Simply put,
what I need is a GUI, powered by python, (I really don't want to touch
any C++ code at all), that has an openGL canvas/scene(?), with a python
interpreter sitting beside
Hi Ross.
Thanks a lot for your clarifying. I didn't think my post could be an
Unicode frame.
I don't know this mailing list is the right place talking about
Unicode issue, but as for me, a million codespace which UTF-16 brings
is not enough. It presume that same characters has a same codepoint
I think that the classification has some meaning, even if of course any
language has different shades of both sides. I'd say that with python
is difficult to choose one of the two categories because it's good both
as a pratical language and as a mind-opener language.
IMO another language that woul
> I mean what I really would like is to have something C++ - like "for
> (int idx = a; idx < b; i++) { .. }" where no internal vector or
> something like that is allocated but only a few op's on registers are
> performed; in the whileloop in python the picture is roughly the same
Use xrange i
Steve Juranich wrote:
> IMHO, __slots__ is unpythonic. Many others have stated so on the
> list. That's why it's great that you're free to ignore that variable.
> I suggest that you do so (as I have chosen to do). I'm sure that
> there are situations where you *MUST* have this kind of capability
PyOpenGL comes with a Tkinter widget for OpenGL, and searching google
"wxwidgets opengl" yields http://www.wxwidgets.org/opengl.htm
Kind regards,
Karsten.
--
http://mail.python.org/mailman/listinfo/python-list
What gives ?
>>> a = []
>>> def f():
return a
>>> f()
[]
>>> a.append(3)
>>> f()
[3]
>>> a += [3]
>>> a
[3, 3]
>>> f()
[3, 3]
>>> f() += [4]
SyntaxError: can't assign to function call
>>>
Fuzzyman
http://www.voidspace.org.uk/python/index.shtml
--
http://mail.python.org/mailman/listinf
Fuzzyman <[EMAIL PROTECTED]> wrote:
> What gives ?
...
> >>> a = []
> >>> def f():
> return a
...
> >>> f() += [4]
> SyntaxError: can't assign to function call
Exactly what the error message says: it's syntactically forbidden to
perform any assignment on a function-call.
If you're ke
1 - 100 of 148 matches
Mail list logo