Maybe it is a good idea to use Disco (http://discoproject.org/) to
process your data.
Yours faithfully,
Alexander Abushkevich
On Sat, Jan 30, 2010 at 10:36 PM, marc magrans de abril
wrote:
> Dear colleagues,
>
> I was doing a small program to classify log files for a cluster of
> PCs, I just w
hi,
Here is:
http://code.google.com/p/pyjon/
Although the code is far from stable and completed, it's a good place
to start play with.
--
Evgen
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 30, 8:20 pm, uche wrote:
> Another issue:
> x[a], x[b] = x[(a)] + W[(n % N)] * x[(b)], x[(a)] - W[(n % N)] * x
> [(b)]
> TypeError: can't multiply sequence by non-int of type 'complex'
With your original code, the elements of array2 are strings, and here
Python is refusing to multiply
On Jan 31, 10:02 am, Mark Dickinson wrote:
> Python is refusing to multiply the string x[a] by the complex number W
> [n % N].
Whoops, that should have been "x[b]", not "x[a]". Why is it that a
post-submission proofread turns up errors so much more often than a
pre-submission proofread?
--
Mark
> Naming files using magic numbers is really beyond me. The fact that the
> above needs comments to explain what's what already shows to me that
> there's a problem with this naming scheme. What if for one reason or
> another I want to delete all pyc files for Python 2.5? Where do I look
> up the m
> True. You might also want to note that "Python 2.6 -U" appears to have a
> different magic number from "Python 2.6" and "Python 2.6 -O".
>
> I don't know whether they always change for each new version.
Here is a recent list of magic numbers:
Python 2.6a0: 62151 (peephole optimizations a
Mark Dickinson, 31.01.2010 11:07:
> On Jan 31, 10:02 am, Mark Dickinson wrote:
>> Python is refusing to multiply the string x[a] by the complex number W
>> [n % N].
>
> Whoops, that should have been "x[b]", not "x[a]". Why is it that a
> post-submission proofread turns up errors so much more oft
On Jan 30, 10:43 am, Nobody wrote:
> That's also true for most functional languages, e.g. Haskell and ML, as
> well as e.g. Tcl and most shells. Why require "f(x)" or "(f x)" if "f x"
> will suffice?
yuck! wrapping the arg list with parenthesis (python way) makes the
most sense. Its to easy to m
On Sun, 31 Jan 2010 03:01:51 -0800, rantingrick wrote:
> On Jan 30, 10:43 am, Nobody wrote:
>
>> That's also true for most functional languages, e.g. Haskell and ML, as
>> well as e.g. Tcl and most shells. Why require "f(x)" or "(f x)" if "f
>> x" will suffice?
>
> yuck! wrapping the arg list w
2010/1/29 Gabriel Genellina :
>
> That's strange. If you're using Linux, make sure you have the readline
> package installed.
I'm using Linux. Ubuntu. I checked on synaptic and I have
readline-common. Do you mean something else?
Anyway I tried running the program in the iPython shell and it works
Hi all,
i want to print on linux console (terminal) a message like this one:
error message of variable lenght
to print the asterisks line i do this:
def StringOfAsterisks(myString):
asterisksString = "*"
for i in range(1,
--- On Sun, 1/31/10, Steven D'Aprano
wrote:
> From: Steven D'Aprano
> Subject: Re: Python and Ruby
> To: python-list@python.org
> Date: Sunday, January 31, 2010, 6:35 AM
> On Sun, 31 Jan 2010 03:01:51 -0800,
> rantingrick wrote:
>
> > On Jan 30, 10:43 am, Nobody
> wrote:
> >
> >> That's also
Tracubik wrote:
error message of variable lenght
to print the asterisks line i do this:
def StringOfAsterisks(myString):
asterisksString = "*"
for i in range(1,len(myString):
asterisksString += "*"
print aster
Tracubik wrote:
> Hi all,
>
> i want to print on linux console (terminal) a message like this one:
>
>
> error message of variable lenght
>
>
> to print the asterisks line i do this:
>
> def StringOfAsterisks(myString):
> as
Tracubik wrote:
>i want to print on linux console (terminal) a message like this one:
>
>
>error message of variable lenght
>
>
>to print the asterisks line i do this:
>
>def StringOfAsterisks(myString):
>asterisksString = "*"
>
On Jan 18, 9:08 pm, Robert Kern wrote:
> On 2010-01-18 14:02 PM, vsoler wrote:
>
> > Hi all,
>
> > I just download Numpy, and tried to install it using "numpy-1.4.0-
> > win32-superpack-python2.6.exe"
>
> > I get an error: "Python version 2.6 required, which was not found in
> > the Registry"
>
>
Leave magic to the witches of Perl. :)
--
http://mail.python.org/mailman/listinfo/python-list
>Find out which pattern is being used on the second iteration and then try it
>on the first iteration. Is it just as slow?
You were right, the second pattern was 1891 bytes but the first was
just 142 :P
I will need to put more thought than I expect in the "small script".
--
http://mail.python.or
Steven D'Aprano writes:
> On Sun, 31 Jan 2010 04:44:18 +0100, Alf P. Steinbach wrote:
>
>>> The relationship between byte code magic number and release version
>>> number is not one-to-one. We could have, for the sake of the argument,
>>> releases 3.2.3 through 3.5.0 (say) all having the same byt
I have the pytz package but it doesn't know about non-standard timezone
names like "CDT5" or "CST6". I can obviously infer that they are either
five or six hours behind UTC. Are they constructed in some standard way so
that I can assume that if a timezone name is not known to pytz I can assume
t
This may not answer your question directly, but have you thought about
ingoring the number at the end of these non-standard timezones? CDT is
Central Daylight-saving Timezone, while CST is Central Standard Timezone.
And you are correct they are -5 and -6 hours respectively. Does pytz know
about CDT
It gets tedious to have to append .encode('utf-8') to all my unicode
strings when I print them, as in:
print foobar.encode('utf-8')
I want to tell python to apply this encoding automatically to
anything argument passed to print.
How can I do this?
TIA!
K
PS: BTW, sys.setdefaultencoding
I want to pass Chinese characters as command-line arguments to a
Python script. My terminal has no problem displaying these
characters, and passing them to the script, but I can't get Python
to understand them properly.
E.g. if I pass one such character to the simple script
import sys
print sy
Am 31.01.10 16:38, schrieb kj:
It gets tedious to have to append .encode('utf-8') to all my unicode
strings when I print them, as in:
print foobar.encode('utf-8')
I want to tell python to apply this encoding automatically to
anything argument passed to print.
How can I do this?
TIA!
K
> Does pytz know about CDT and CST?
Nope...
Skip
--
http://mail.python.org/mailman/listinfo/python-list
I have a dir with a large # of files that I need to perform operations
on, but only needing to access a subset of the files, i.e. the first
100 files.
Using glob is very slow, so I ran across iglob, which returns an
iterator, which seemed just like what I wanted. I could iterate over
the files tha
In <7slndhfno...@mid.uni-berlin.de> "Diez B. Roggisch"
writes:
>Am 31.01.10 16:38, schrieb kj:
>> It gets tedious to have to append .encode('utf-8') to all my unicode
>> strings when I print them, as in:
>>
>> print foobar.encode('utf-8')
>>
>> I want to tell python to apply this encoding a
Would it hurt if you put in some extra information?
http://www.timeanddate.com/library/abbreviations/timezones/
HTH,
-Xav
P.S: You, sir, have an awesome first name.
On Mon, Feb 1, 2010 at 1:57 AM, Skip Montanaro wrote:
> > Does pytz know about CDT and CST?
>
> Nope...
>
> Skip
>
>
> --
> htt
Am 31.01.10 16:52, schrieb kj:
I want to pass Chinese characters as command-line arguments to a
Python script. My terminal has no problem displaying these
characters, and passing them to the script, but I can't get Python
to understand them properly.
E.g. if I pass one such character to the sim
> Would it hurt if you put in some extra information?
> http://www.timeanddate.com/library/abbreviations/timezones/
In theory, no. At work we still use the ancient Rogue Wave C++
libraries in a number of applications. It has hard-coded timezone
info so when the US changed the start and end of da
> So the iglob was faster, but accessing the first file took about the
> same time as glob.glob.
I'll wager most of the time required to access the first file is due
to filesystem overhead, not any inherent limitation in Python.
Skip Montanaro
--
http://mail.python.org/mailman/listinfo/python-
Kyp writes:
> Is there a way to get the first X # of files from a dir with lots of
> files, that does not take a long time to run?
Assuming Linux: what does time
ls thedir | head
give?
with thedir the name of the actual dir
Also how many is many files?
--
John Bokma
I'm sure that \\ is used in some way for paths in Win Python, but I have
not found anything after quite a search. I even have a six page pdf on a
file tutorial. Nothing. Two books. Nothing. When I try to open a file
along do I need, for example, "Events\\record\\year\\today"? Are paths
like, ".
I'm trying to read some data from standard input, what I'm actually
trying to do is process some date pasted in using the mouse cut and
paste on a Linux box (xubuntu 9.10) in a terminal window.
First attempts failed so I'm now trying the trivial:-
import sys
data = sys.stdin.readlines()
* W. eWatson:
I'm sure that \\ is used in some way for paths in Win Python, but I have
not found anything after quite a search. I even have a six page pdf on a
file tutorial. Nothing. Two books. Nothing. When I try to open a file
along do I need, for example, "Events\\record\\year\\today"? Are
W. eWatson wrote:
> I'm sure that \\ is used in some way for paths in Win Python, but I have
> not found anything after quite a search. I even have a six page pdf on a
> file tutorial. Nothing. Two books. Nothing. When I try to open a file
> along do I need, for example, "Events\\record\\year\\toda
On Jan 31, 6:15 pm, tinn...@isbd.co.uk wrote:
> I'm trying to read some data from standard input, what I'm actually
> trying to do is process some date pasted in using the mouse cut and
> paste on a Linux box (xubuntu 9.10) in a terminal window.
>
> First attempts failed so I'm now trying the trivi
tinn...@isbd.co.uk wrote:
> I'm trying to read some data from standard input, what I'm actually
> trying to do is process some date pasted in using the mouse cut and
> paste on a Linux box (xubuntu 9.10) in a terminal window.
>
> First attempts failed so I'm now trying the trivial:-
>
> impor
Alf P. Steinbach wrote:
* W. eWatson:
I'm sure that \\ is used in some way for paths in Win Python, but I
have not found anything after quite a search. I even have a six page
pdf on a file tutorial. Nothing. Two books. Nothing. When I try to
open a file along do I need, for example,
"Events\\
On 2010-01-31, Steve Holden wrote:
> tinn...@isbd.co.uk wrote:
>> I'm trying to read some data from standard input, what I'm actually
>> trying to do is process some date pasted in using the mouse cut and
>> paste on a Linux box (xubuntu 9.10) in a terminal window.
>>
>> First attempts failed so
In <7slr5ife6...@mid.uni-berlin.de> "Diez B. Roggisch"
writes:
>Am 31.01.10 16:52, schrieb kj:
>> I want to pass Chinese characters as command-line arguments to a
>> Python script. My terminal has no problem displaying these
>> characters, and passing them to the script, but I can't get Python
Alf P. Steinbach wrote:
that you cannot write e.g. "c:\windows\system32", but must
write something like "c:\\windows\\system32" (try to print
that string), or, since Windows handles forward slashes as
well, you can write "c:/windows/system32" :-).
Forward slashes work for some relative paths fo
Steve Holden wrote:
You need to read up on string literals is all. "\\" is simply the
literal representation of a string containing a single backslash. This
comes about because string literals are allowed to contain special
"escape sequences" which are introduced by a backslash; since this gives
Kyp wrote:
> I have a dir with a large # of files that I need to perform operations
> on, but only needing to access a subset of the files, i.e. the first
> 100 files.
>
> Using glob is very slow, so I ran across iglob, which returns an
> iterator, which seemed just like what I wanted. I could it
W. eWatson wrote:
> Steve Holden wrote:
>
>> You need to read up on string literals is all. "\\" is simply the
>> literal representation of a string containing a single backslash. This
>> comes about because string literals are allowed to contain special
>> "escape sequences" which are introduced
W. eWatson wrote:
What am I missing here? Looks OK to me.
>>> abc.replace(r'\',r'z')
SyntaxError: invalid syntax
A raw string can't end in a single backslash (something that
occasionally annoys me, but I've learned to deal with it).
>>> s=r'\'
File "", line 1
s=r'\'
I tried lxml, but after walking and making changes in the element
tree, I'm forced to do a full serialization of the whole document
(etree.tostring(tree)) - which destroys the "human edited" format
of the original HTML code.
makes it rather unreadable.
is there an existing HTML parser which su
W. eWatson wrote:
Steve Holden wrote:
You need to read up on string literals is all. "\\" is simply the
literal representation of a string containing a single backslash. This
comes about because string literals are allowed to contain special
"escape sequences" which are introduced by a backslas
> Here is a recent list of magic numbers:
>
> Python 2.6a0: 62151 (peephole optimizations and STORE_MAP opcode)
> Python 2.6a1: 62161 (WITH_CLEANUP optimization)
> Python 2.7a0: 62171 (optimize list comprehensions/change LIST_APPEND)
> Python 2.7a0: 62181 (optimize cond
Hi!
...I have found a good enough solution, although it only works if the
number of patterns (clusters) is not very big:
def classify(f):
THERESHOLD=0.1
patterns={}
for l in enumerate(f):
found = False
for p,c in patterns.items():
if dist(l,p) < THERESHOLD:
On Sat, 30 Jan 2010 16:58:34 +, tanix wrote:
>>I'm not familiar with Ruby, but most languages are cleaner than Python
>>once you get beyond the "10-minute introduction" stage.
>
> I'd have to agree. The only ones that beat Python in that department are
> Javascript and PHP. Plus CSS and HTML
Why am I getting the error that test is not defined. Thanks, Ray
class SpecialFile:
def __init__(self, fileName):
self.__file = open(fileName, 'W')
self.__file.write('* Start Special File *\n\n')
def write(self, str):
self.__file.write(str)
def writeline
* Tim Chase:
Alf P. Steinbach wrote:
that you cannot write e.g. "c:\windows\system32", but must
write something like "c:\\windows\\system32" (try to print
that string), or, since Windows handles forward slashes as
well, you can write "c:/windows/system32" :-).
Forward slashes work for some rel
blist 1.1.1 is now available:
http://pypi.python.org/pypi/blist/
What is blist?
--
The blist is a drop-in replacement for the Python list the provides
better performance when modifying large lists. Python's built-in list
is a dynamically-sized array; to insert or removal an
On Sun, 31 Jan 2010 03:01:51 -0800, rantingrick wrote:
>> That's also true for most functional languages, e.g. Haskell and ML, as
>> well as e.g. Tcl and most shells. Why require "f(x)" or "(f x)" if "f x"
>> will suffice?
>
> yuck! wrapping the arg list with parenthesis (python way) makes the mo
Nobody writes:
> Configurable tab stops in a text editor is one of those "features" that
> differentiates a "coder" from a software engineer. A coder implements it
> because it's easy to implement, without giving a moment's thought to the
> wider context (such as: how to communicate the non-stand
On Sun, 2010-01-31 at 15:25 -0500, Ray Holt wrote:
> Why am I getting the error that test is not defined. Thanks, Ray
> class SpecialFile:
> def __init__(self, fileName):
> self.__file = open(fileName, 'W')
> self.__file.write('* Start Special File *\n\n')
> def wri
On Sat, 30 Jan 2010 11:28:47 -0800, KB wrote:
>> > I have a service I subscribe to that uses javascript to stream news.
>
>> There's a Python interface to SpiderMonkey (Mozilla's JavaScript
>> interpreter):
>>
>> http://pypi.python.org/pypi/python-spidermonkey
>
> Thanks! I don't see a documenta
Hi;
I need to record my IM conversations. I'm using Gmal's IM client and I can't
figure out how to do it, nor do I find any help googling it. Is it possible
with Gmail? If so, how? If not, is there a good IM client that will allow me
to do this?
TIA,
beno
--
The Logos has come to bear
http://logo
dear pythoneers,
i would be very gladly accept any commentaries about what this
sentence, gleaned from
http://celabs.com/python-3.1/reference/executionmodel.html,
is meant to mean, or why gods have decided this is the way to go. i
anticipate this guy named Kay Schluehr will have a say on that, or
On Sun, 2010-01-31 at 13:15 -0800, Victor Subervi wrote:
> Hi;
> I need to record my IM conversations. I'm using Gmal's IM client and I
> can't figure out how to do it, nor do I find any help googling it. Is
> it possible with Gmail? If so, how? If not, is there a good IM client
> that will allow m
Kyp stsci.edu> writes:
> So the iglob was faster, but accessing the first file took about the
> same time as glob.glob.
That would be because glob is implemented in terms of iglob.
--
http://mail.python.org/mailman/listinfo/python-list
Sean DiZazzo gmail.com> writes:
> Does "magic" really need to be used? Why not just use the revision
> number?
Because magic is easier and otherwise CPython developers would have to rebuild
their pycs everytime their working copy was updated.
--
http://mail.python.org/mailman/listinfo/python-
On Sun, 31 Jan 2010 13:41:55 -0600, Tim Chase wrote:
> The previous absolute-path fails in cmd.exe for a variety of apps because
> the "/" is treated as a parameter/switch to the various programs.
> Fortunately, the Python path-handling sub-system is smart enough to do the
> right thing, even whe
Good day/night/etc.
I am rather a newb in Python (learning Python 3). I am trying to
create a small script for FTP file uploads on my home network. The
script looks like this:
from ftplib import FTP
ftp=FTP('10.0.0.1')
ftp.login('mike','*')
directory='/var/www/blabla/'
ftp.cwd(directory)
ftp.
Il Sun, 31 Jan 2010 13:46:16 +0100, Günther Dietrich ha
scritto:
> Maybe you might solve this if you decode your string to unicode.
> Example:
>
> |>>> euro = "€"
> |>>> len(euro)
> |3
> |>>> u_euro = euro.decode('utf_8')
> |>>> len(u_euro)
> |1
>
> Adapt the encoding ('utf_8' in my example) to
On Sun, Jan 31, 2010 at 2:07 PM, Mik0b0 wrote:
> Good day/night/etc.
> I am rather a newb in Python (learning Python 3). I am trying to
> create a small script for FTP file uploads on my home network. The
> script looks like this:
>
> from ftplib import FTP
> ftp=FTP('10.0.0.1')
> ftp.login('mike
In Python 2.6 I can't socket.recv_into(a byte array instance). I get a
TypeError which complains about a "pinned buffer". I have only an
inkling of what that means. Since an array.array("b") works there, and
since it works in Python 3.1.1, and since I thought the point of a
bytearray was to make th
Richard Thomas wrote:
> On Jan 31, 6:15 pm, tinn...@isbd.co.uk wrote:
> > I'm trying to read some data from standard input, what I'm actually
> > trying to do is process some date pasted in using the mouse cut and
> > paste on a Linux box (xubuntu 9.10) in a terminal window.
> >
> > First attempts
On Sun, 31 Jan 2010 04:28:41 -0800, Ed Keith wrote:
> In most functional languages you just name a function to access it and
> you do it ALL the time.
>
> for example, in if you have a function 'f' which takes two parameters to
> call the function and get the result you use:
>
> f 2 3
>
> If y
On Sun, 31 Jan 2010 09:06:18 -0600, John Bokma wrote:
> Based on the magic numbers I've seen so far it looks like that not an
> option. They increment with every minor change.
They increment with every *incompatible* change to the marshal format,
not every change to the compiler.
> So to me, a
On Sun, 31 Jan 2010 14:47:08 -0600, John Bokma wrote:
> An editor can correct the indenting of the braces example but can't with
> this one.
>
> if x:
> if y:
> foo()
> else:
> bar()
>
> While braces might be considered redundant they are not when for one
> reason or ano
marc magrans de abril wrote:
Hi!
...I have found a good enough solution, although it only works if the
number of patterns (clusters) is not very big:
def classify(f):
THERESHOLD=0.1
patterns={}
for l in enumerate(f):
found = False
for p,c in patterns.items():
On Sun, 31 Jan 2010 14:10:34 -0800, Dennis Lee Bieber wrote:
> Ugh... That would mean that for an application using, say 20
> files,
> one now has 20 subdirectories for what, in a lot of cases, will contain
> just one file each (and since I doubt older Python's will be modified to
> support
On Sun, 31 Jan 2010 14:10:34 -0800, Dennis Lee Bieber wrote:
> On Sun, 31 Jan 2010 11:51:46 +, "Mr.SpOOn"
> declaimed the following in gmane.comp.python.general:
>
>> 2010/1/29 Gabriel Genellina :
>> >
>> > That's strange. If you're using Linux, make sure you have the
>> > readline package i
Tracubik wrote:
Il Sun, 31 Jan 2010 13:46:16 +0100, Günther Dietrich ha
scritto:
Maybe you might solve this if you decode your string to unicode.
Example:
|>>> euro = "€"
|>>> len(euro)
|3
|>>> u_euro = euro.decode('utf_8')
|>>> len(u_euro)
|1
Adapt the encoding ('utf_8' in my example) to wha
On Feb 1, 12:19 am, Chris Rebert wrote:
> On Sun, Jan 31, 2010 at 2:07 PM, Mik0b0 wrote:
> > Good day/night/etc.
> > I am rather a newb in Python (learning Python 3). I am trying to
> > create a small script for FTP file uploads on my home network. The
> > script looks like this:
>
> > from ftpl
On Sun, Jan 31, 2010 at 2:36 PM, Steven D'Aprano
wrote:
> On Sun, 31 Jan 2010 04:28:41 -0800, Ed Keith wrote:
>> In most functional languages you just name a function to access it and
>> you do it ALL the time.
>>
>> for example, in if you have a function 'f' which takes two parameters to
>> call
On Jan 31, 3:27 pm, gazza wrote:
> Hi,
>
> I am trying to discover how to obtain the correct time of say CST/
> America and EST/America in python?
>
> Any help on this would be appreciated.
>
> Thanks,
> Garyc
I found some information. Someone suggested I use the pytz library?
Cheers,
Garyc
--
Hello Andrew,
> I don't even know what a "pinned buffer" means, and searching python.org
> isn't helpful.
>
> Using a bytearray in Python 3.1.1 *does* work:
> [...]
Agreed, the error message is cryptic.
The problem is that socket.recv_into() in 2.6 doesn't recognize the new
buffer API which is
Steven D'Aprano writes:
> On Sun, 31 Jan 2010 04:28:41 -0800, Ed Keith wrote:
>
>> In most functional languages you just name a function to access it and
>> you do it ALL the time.
>>
>> for example, in if you have a function 'f' which takes two parameters to
>> call the function and get the res
On Jan 31, 1:06 pm, John Bokma wrote:
> Kyp writes:
> > Is there a way to get the first X # of files from a dir with lots of
> > files, that does not take a long time to run?
>
> Assuming Linux: what does time
>
> ls thedir | head
>
> give?
>
> with thedir the name of the actual dir
about 3 seco
On Jan 31, 2:44 pm, Peter Otten <__pete...@web.de> wrote:
> Kyp wrote:
> > I have a dir with a large # of files that I need to perform operations
> > on, but only needing to access a subset of the files, i.e. the first
> > 100 files.
>
> > Using glob is very slow, so I ran across iglob, which retur
--- On Sun, 1/31/10, Steven D'Aprano
wrote:
> From: Steven D'Aprano
> Subject: Re: Python and Ruby
> To: python-list@python.org
> Date: Sunday, January 31, 2010, 5:36 PM
> On Sun, 31 Jan 2010 04:28:41 -0800,
> Ed Keith wrote:
>
> > In most functional languages you just name a function
> to acc
I'm on Python 2.5, but using the updated turtle.py Version 1.0.1 -
24. 9. 2009. The following script draws 5 circles, which it is
supposed to, but then doesn't draw the second turtle which is
supposed to simply move forward. Any ideas?
from turtle import *
from numpy.random import randint
On Sun, 31 Jan 2010 15:40:36 -0800, Chris Rebert wrote:
> On Sun, Jan 31, 2010 at 2:36 PM, Steven D'Aprano
> wrote:
>> On Sun, 31 Jan 2010 04:28:41 -0800, Ed Keith wrote:
>>> In most functional languages you just name a function to access it and
>>> you do it ALL the time.
>>>
>>> for example, in
Steven D'Aprano writes:
> On Sun, 31 Jan 2010 14:47:08 -0600, John Bokma wrote:
>
>> An editor can correct the indenting of the braces example but can't with
>> this one.
>>
>> if x:
>> if y:
>> foo()
>> else:
>> bar()
>>
>> While braces might be considered redundant th
On Sun, Jan 31, 2010 at 4:25 PM, Steven D'Aprano
wrote:
> On Sun, 31 Jan 2010 15:40:36 -0800, Chris Rebert wrote:
>> On Sun, Jan 31, 2010 at 2:36 PM, Steven D'Aprano
>> wrote:
>>> On Sun, 31 Jan 2010 04:28:41 -0800, Ed Keith wrote:
In most functional languages you just name a function to acc
On Sun, Jan 31, 2010 at 5:12 PM, Tracubik wrote:
> Il Sun, 31 Jan 2010 13:46:16 +0100, Günther Dietrich ha
> scritto:
>
>> Maybe you might solve this if you decode your string to unicode.
>> Example:
>>
>> |>>> euro = "€"
>> |>>> len(euro)
>> |3
>> |>>> u_euro = euro.decode('utf_8')
>> |>>> len(u_
Steven D'Aprano writes:
> On Sun, 31 Jan 2010 14:47:08 -0600, John Bokma wrote:
>
>> An editor can correct the indenting of the braces example but can't with
>> this one.
>>
>> if x:
>> if y:
>> foo()
>> else:
>> bar()
>>
>> While braces might be considered redundant th
On Jan 31, 4:01 pm, gazza wrote:
> On Jan 31, 3:27 pm, gazza wrote:
>
> > Hi,
>
> > I am trying to discover how to obtain the correct time of say CST/
> > America and EST/America in python?
>
> > Any help on this would be appreciated.
>
> > Thanks,
> > Garyc
>
> I found some information. Someone
On Sun, 31 Jan 2010 16:50:50 -0800, Chris Rebert wrote:
How do you call a function of no arguments?
>>>
>>> It's not really a function in that case, it's just a named constant.
>>> (Recall that functions don't/can't have side-effects.)
>>
>>
> time.time(), random.random()
>> (1264983502.7
--- On Sun, 1/31/10, Steven D'Aprano
wrote:
> From: Steven D'Aprano
> Subject: Re: Python and Ruby
> To: python-list@python.org
> Date: Sunday, January 31, 2010, 8:22 PM
> On Sun, 31 Jan 2010 16:50:50 -0800,
> Chris Rebert wrote:
>
> How do you call a function of no
> arguments?
> >>>
> >
On Sun, Jan 31, 2010 at 5:22 PM, Steven D'Aprano
wrote:
> On Sun, 31 Jan 2010 16:50:50 -0800, Chris Rebert wrote:
> How do you call a function of no arguments?
It's not really a function in that case, it's just a named constant.
(Recall that functions don't/can't have side-effec
On Sun, 31 Jan 2010 18:47:42 -0600, John Bokma wrote:
> Steven D'Aprano writes:
>
>> On Sun, 31 Jan 2010 14:47:08 -0600, John Bokma wrote:
>>
>>> An editor can correct the indenting of the braces example but can't
>>> with this one.
>>>
>>> if x:
>>> if y:
>>> foo()
>>> else:
On Feb 1, 1:04 am, Antoine Pitrou wrote:
> The problem is that socket.recv_into() in 2.6 doesn't recognize the new
> buffer API which is needed to accept bytearray objects.
> (it does in 3.1, because the old buffer API doesn't exist anymore there)
That's about what I thought it was, but I don't k
I don't see where you've defined a Turtle class to instantiate sir.
Perhaps rename Circle to Turtle and rewrite the circle-drawing expression as:
> c=Turtle(randint(-350,350),randint(-250,250),10,"red")
You are making progress with a wrapper class for the Standard Library turtle.
That's a w
Hi,
I've made a similar post on the Cython mailing list, however I think
this is more python-specific. I'm having trouble setting up distutils
to use MinGW instead of Visual Studio when building a module. Even tho
I've just uninstalled VS, and cleared out any leftover VS environment
variables, dis
> In Python 2.6 I can't socket.recv_into(a byte array instance). I get a
> TypeError which complains about a "pinned buffer". I have only an
> inkling of what that means.
A pinned buffer is one that cannot move in memory, even if another
thread tries to behind your back. Typically, resizable conta
On Feb 1, 2:59 am, Andrej Mitrovic wrote:
> Hi,
>
> I've made a similar post on the Cython mailing list, however I think
> this is more python-specific. I'm having trouble setting up distutils
> to use MinGW instead of Visual Studio when building a module. Even tho
> I've just uninstalled VS, and
1 - 100 of 122 matches
Mail list logo