On 5 Sie, 00:55, MRAB wrote:
> ryniek90 wrote:
> > Hi.
> > I started learning regexp, and some things goes well, but most of them
> > still not.
>
> > I've got problem with some regexp. Better post code here:
>
> > "
> > >>> import re
> > >>> mail = '\nn...@mail.com\nname1 [at] mail [dot] com\nn
On Aug 4, 10:49 pm, Mensanator wrote:
> I hadn't noticed this before, but the overhaul of Turtle Graphics
> dating
> back to 2.6 has been broken as far as gmpy is concerned.
> The reason is that code in turtle.py was chabged from
>
> v2.5
> if self._drawing:
> if self._tracing:
On Wed, 5 Aug 2009 03:49 pm Mensanator wrote:
> In 3.1, tracing is now a screen attribute, not a turtle atribute.
> I have no idea why
>
> tooter = turtle.Turtle()
> tooter.tracer(False)
>
> doesn't give me an error (I thought silent errors were a bad thing).
What makes it an error? Do you
On Wed, 5 Aug 2009 03:06 pm Nick Daly wrote:
> The problem actually lies in the contract. Generally, the PyContract
> shouldn't affect the return values or in any way modify the code, which
> it doesn't, as long as the function returns a list values (the way the
> code had in fact originally been
Mensanator schrieb:
I hadn't noticed this before, but the overhaul of Turtle Graphics
dating
back to 2.6 has been broken as far as gmpy is concerned.
I hadn't noticed because I usually have tracing turned off (tracing
off
takes 3-4 seconds, tracing on takes 6-7 minutes).
In 3.1, tracing is now
I'm looking for a Python example for the FX2 USB
chip (I'm using the SerMod-100 board
http://www.acquiredevices.com/sermod100.jsp).
Does anyone have a simple "hello" script to re-enumerate the
chip, and then do control or bulk reads with only Python and
libusb?
I've found C code and some Python m
Steven D'Aprano schrieb:
On Wed, 5 Aug 2009 03:49 pm Mensanator wrote:
In 3.1, tracing is now a screen attribute, not a turtle atribute.
I have no idea why
tooter = turtle.Turtle()
tooter.tracer(False)
doesn't give me an error (I thought silent errors were a bad thing).
What makes it an
You didn't really tell us why you need one big file, which contains more
pixel, than you can probably store in RAM
Is it for printing?
Not knwoing your goal makes it difficult to suggest solutions.
Can't you use other image formats like raw RGB or
What other image formats are supported?
tiff? Ra
On Tuesday 04 August 2009 21:13:10 Kosta wrote:
> I am a Python newbie, tasked with automating (researching) building
> Windows drivers using the WDK build environment. I've been looking
> into Python for this (instead of writing a bunch of batch files).
>
Why do you not use make and a makefile -
Hello,
I am parsing a web page with special chars such as é (which
stands for é).
I know I can have the unicode character é from unicode
("\xe9","iso-8859-1")
but with those extra characters I don' t know.
I tried to implement handle_charref within HTMLParser without success.
Furthermore, if I ha
> You might try posting to this thread:
> http://groups.google.com/group/comp.lang.python/browse_thread/thread/58df7b77394e4666/f4c13766a1e09380
> I don't know much about the question myself, though.
>
> Marcus
Thanks for your help !
aurelien
--
http://mail.python.org/mailman/listinfo/pyth
When I try to compute the phase of a complex number, I get an error message:
In [3]: from cmath import *
In [4]: x=1+1J
In [5]: phase(x)
NameError: name 'phase' is not defined
AttributeError: 'complex' object has no attribute 'phase'
Any advice will be appreciated.
--
View this message in con
On Tue, Aug 4, 2009 at 11:28 PM, Dr. Phillip M.
Feldman wrote:
>
> When I try to compute the phase of a complex number, I get an error message:
>
> In [3]: from cmath import *
> In [4]: x=1+1J
> In [5]: phase(x)
>
> NameError: name 'phase' is not defined
>
> AttributeError: 'complex' object has n
On Aug 5, 4:28 pm, "Dr. Phillip M. Feldman"
wrote:
> When I try to compute the phase of a complex number, I get an error message:
> [...]
> Any advice will be appreciated.
1. What version of Python are you using, and on what platform?
2. What you snipped is necessary to help debug your problem.
How to check whether my gui application is running or not.If its already
running i have to quit my program other wise i need to launch my program.
Can anybody suggest a solution to this
Regards
Sanju
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Aug 5, 2009 at 2:03 AM, sanju ps wrote:
> How to check whether my gui application is running or not.If its already
> running i have to quit my program other wise i need to launch my program.
> Can anybody suggest a solution to this
Use a lock file? http://en.wikipedia.org/wiki/Lock_file#Lo
Martin-298 wrote:
>
> Hi
>
> Are these functions (inet_ntop(), inet_pton()) from the socket library
> supported on Windows.
>
> If not is there an equivalent for them using Windows
>
> Ive seen mention of people creating their own in order to use them
>
> Appreciate the help
>
> ty
> --
Dr. Phillip M. Feldman wrote:
When I try to compute the phase of a complex number, I get an error message:
In [3]: from cmath import *
In [4]: x=1+1J
In [5]: phase(x)
NameError: name 'phase' is not defined
AttributeError: 'complex' object has no attribute 'phase'
Any advice will be appreciate
Hi everybody,
See the following example:
#
def tutu():
def toto():
print a
a = 4
print a
a=2
toto()
tutu()
##
I obtain the following error:
"UnboundLocalError: local variable 'a' referenced before assignment"
This is because Python looks i
In article ,
Jay Bird wrote:
>Hi everyone,
>
>I've been trying to figure out a simple algorithm on how to combine a
>list of parts that have 1D locations that overlap into a non-
>overlapping list. For example, here would be my input:
>
>part name location
>a 5-9
>b
TP wrote:
> Hi everybody,
>
> See the following example:
>
> #
> def tutu():
>
> def toto():
>
> print a
> a = 4
> print a
>
> a=2
> toto()
>
> tutu()
> ##
>
> I obtain the following error:
> "UnboundLocalError: local variable 'a' referenc
On Wed, Aug 5, 2009 at 3:13 AM, TP wrote:
> Hi everybody,
>
> See the following example:
>
> #
> def tutu():
>
> def toto():
>
nonlocal a #note: this requires a rather recent version of python
> print a
> a = 4
> print a
>
> a=2
> toto()
>
> tutu()
>
Albert van der Horst:
>That is an algorithmic question and has little to do with Python.<
Yes, but comp.lang.python isn't comp.lang.c, that kind of questions
are perfectly fine here. They help keep this place from becoming
boring.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python
TP wrote:
> Hi everybody,
>
> See the following example:
>
> #
> def tutu():
>
> def toto():
>
> print a
> a = 4
> print a
>
> a=2
> toto()
>
> tutu()
> ##
>
> I obtain the following error:
> "UnboundLocalError: local variable 'a' referenc
TP:
> def tutu():
>
> def toto():
>
> print a
> a = 4
> print a
>
> a=2
> toto()
>
> tutu()
> ##
>
> I obtain the following error:
> "UnboundLocalError: local variable 'a' referenced before assignment"
>
> This is because Python looks in the local context
On 8/4/2009 5:52 PM, Philip Semanchuk wrote:
On Aug 4, 2009, at 5:40 PM, Kosta wrote:
On Aug 4, 2:34 pm, Dave Angel wrote:
+ I have released pyKook 0.0.2.
+http://pypi.python.org/pypi/Kook/0.0.2
+http://www.kuwata-lab.com/kook/
+http://www.kuwata-lab.com/kook/pykook-users-guide.html
Other
On 8/4/2009 6:09 PM, MRAB wrote:
>>> parts = [(5, 9, "a"), (7, 10, "b"), (3, 6, "c"), (15, 20, "d"),
(18, 23, "e")]
>>> parts.sort()
>>> parts
[(3, 6, 'c'), (5, 9, 'a'), (7, 10, 'b'), (15, 20, 'd'), (18, 23, 'e')]
>>> # Merge overlapping intervals.
>>> pos = 1
>>> while pos < len(parts):
On 5 Aug, 07:53, ryniek wrote:
> On 5 Sie, 00:55, MRAB wrote:
>
>
>
> > ryniek90 wrote:
> > > Hi.
> > > I started learning regexp, and some things goes well, but most of them
> > > still not.
>
> > > I've got problem with some regexp. Better post code here:
>
> > > "
> > > >>> import re
> > > >
MRAB wrote:
ryniek90 wrote:
Hi.
I started learning regexp, and some things goes well, but most of
them still not.
I've got problem with some regexp. Better post code here:
"
>>> import re
>>> mail = '\nn...@mail.com\nname1 [at] mail [dot] com\nname2 [$at$]
mail [$dot$] com\n'
>>> mail
'
On Wed, Aug 5, 2009 at 4:56 PM, Hendrik van
Rooyen wrote:
> On Tuesday 04 August 2009 21:13:10 Kosta wrote:
>> I am a Python newbie, tasked with automating (researching) building
>> Windows drivers using the WDK build environment. I've been looking
>> into Python for this (instead of writing a bun
Hi
I'm writing a talk that compares embed and extend, and wondered if
anyone here ever used the Python *embedded* in a database server.
http://twistedmatrix.com/users/glyph/rant/extendit.html
Web frameworks (such as Django) use extend, to import an extension
module that makes a connection
On 5 Sie, 13:28, Anthra Norell wrote:
> MRAB wrote:
> > ryniek90 wrote:
> >> Hi.
> >> I started learning regexp, and some things goes well, but most of
> >> them still not.
>
> >> I've got problem with some regexp. Better post code here:
>
> >> "
> >> >>> import re
> >> >>> mail = '\nn...@mail.c
On 5 Sie, 13:28, Anthra Norell wrote:
> MRAB wrote:
> > ryniek90 wrote:
> >> Hi.
> >> I started learning regexp, and some things goes well, but most of
> >> them still not.
>
> >> I've got problem with some regexp. Better post code here:
>
> >> "
> >> >>> import re
> >> >>> mail = '\nn...@mail.c
> Fafounet (F) wrote:
>F> Hello,
>F> I am parsing a web page with special chars such as é (which
>F> stands for é).
>F> I know I can have the unicode character é from unicode
>F> ("\xe9","iso-8859-1")
>F> but with those extra characters I don' t know.
>F> I tried to implement handle_charref
> Christian Heimes (CH) wrote:
>CH> You can write your own phase() function. This function is mostly correct
>CH> unless either the real and/or the imag part is NaN or INF.
>CH> from math import atan2
>CH> def phase(z):
>CH> z += 1j # convert int, long, float to complex
That should be
Bearophile wrote:
> So probably a better solution is to just use the normal function
> semantics: you pass them an argument and you take an argument as
> return value. Such return value will be the new version of the value
> you talk about.
Thanks for your answer.
Yes, it is better like this. My
Hello Everybody,
The standard datetime has 1 microsecond granularity. My application
needs finer time resolution, preferably float seconds. Is there an
alternative to the out-of-the-box datetime? Timezone support is not
essential.
Thanks,
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 5 Aug 2009 03:06 pm Nick Daly wrote:
> The problem actually lies in the contract. Generally, the PyContract
> shouldn't affect the return values or in any way modify the code, which
> it doesn't, as long as the function returns a list values (the way the
> code had in fact originally been
Thank you, now I can get the correct character.
Now when I have the string abécd I can get ab then é thanks to
your function and then cd. But how is it possible to know that cd is
still the same word ?
Fabien
> The character references indicate Unicode ordinals, not iso-8859-1
> characters. In
On Wed, Aug 5, 2009 at 10:50 PM, kpal wrote:
> Hello Everybody,
>
> The standard datetime has 1 microsecond granularity. My application
> needs finer time resolution, preferably float seconds. Is there an
> alternative to the out-of-the-box datetime? Timezone support is not
> essential.
This is
TP wrote:
> Then, as advised Diez, perhaps the best solution is to have "true" global
> variables by using a class and defining the variable a as a member self.a
> of the class. By doing like this, a will be known everywhere.
Or, as Bearophile suggested, you could use the standard way of passing
On Aug 5, 1:21 am, sturlamolden wrote:
> On Aug 5, 4:37 am, erikcw wrote:
>
> > It's not always the same traceback, but they are always short like
> > this. I'm running Python 2.6.2 on Ubuntu 9.04.
>
> > Any idea how I can debug this?
>
> In my experience,multiprocessingis fragile. Scripts tend
Piet van Oostrum wrote:
> That should be z += 0j
Pardon my ignorance, but could anyone explain the rationale behind
using 'j' to indicate the imaginary number (as opposed to the more
intuitive 'i')?
(Not that I've had much call to use complex numbers but I'm
curious)
--
http://mail.python.o
OK, then why the statements "from turtle import *" in the modules
turtleprocess.py and turtlewidget.py?
Yes, I see that now (he said meekly, too sheepish to complain about
being misled by an unfortunate naming choice).
Tx,
John
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 5, 12:19 am, Steven D'Aprano wrote:
> On Wed, 5 Aug 2009 03:49 pm Mensanator wrote:
>
> > In 3.1, tracing is now a screen attribute, not a turtle atribute.
> > I have no idea why
>
> > tooter = turtle.Turtle()
> > tooter.tracer(False)
>
> > doesn't give me an error (I thought silent err
Hi,
I subclass builtin 'dict' in my application and experience some problems
with it.
The whole issue is that I should redefine 'setdefault' and 'update'
methods after redefining '__setitem__' or/and '__delitem__',
otherwise 'update' and 'setdefault' ignore redefined '__setitem__' and use
On Wednesday 05 August 2009 14:08:18 David Cournapeau wrote:
> On Wed, Aug 5, 2009 at 4:56 PM, Hendrik van
>
> Rooyen wrote:
> > On Tuesday 04 August 2009 21:13:10 Kosta wrote:
> >> I am a Python newbie, tasked with automating (researching) building
> >> Windows drivers using the WDK build environm
On Thu, Aug 6, 2009 at 11:51 AM, Sergey Simonenko wrote:
> I subclass builtin 'dict' in my application and experience some problems
> with it.
>
You should subclass collections.UserDict, and not the default dict class.
Refer to the collections module.
Also, the ABC MutableMapping might be of you
On 5 Aug, 13:17, Jonathan Fine wrote:
> Hi
>
> I'm writing a talk that compares embed and extend, and wondered if
> anyone here ever used the Python *embedded* in a database server.
> http://twistedmatrix.com/users/glyph/rant/extendit.html
>
> Web frameworks (such as Django) use extend, to im
Sergey Simonenko a écrit :
Hi,
I subclass builtin 'dict' in my application and experience some problems
with it.
The whole issue is that I should redefine 'setdefault' and 'update'
methods after redefining '__setitem__' or/and '__delitem__',
otherwise 'update' and 'setdefault' ignore redefin
I am porting a simple code from Perl, the website asks for usr/pwd and
the server's side Perl script makes atemp ftp dir for file upload.
The original Perl script connects okay, does its job. The same URL
stuffed into FF3 performs the same way.
My Python script I am sweating out for past four days
HI!
These both expressions are equivalent but which is faster or should be used
for any reason?
u = unicode(s,'utf-8')
u = s.decode('utf-8') # looks nicer
Ciao, Michael.
--
http://mail.python.org/mailman/listinfo/python-list
Hi List,
On several occasions I have needed (and build) a parser that reads a
binary piece of data with custom structure. For example (bogus one):
BE
+-+-+-+-+--++
| Version | Command | Instruction | Data Length | Data | Filler |
+-+-
I want to be able to use Python to produce Spider plots (perhaps you
know them as radar plots or star plots). Does anyone know how to
achieve this? Are there existing libraries?
Direction to any examples, especially those with tutorials, would be
greatly appreciated.
Cheers,
Dan
http://www.answe
On Aug 5, 7:13 am, Marcus Wanner wrote:
> On 8/4/2009 6:09 PM, MRAB wrote:
>
> > >>> parts = [(5, 9, "a"), (7, 10, "b"), (3, 6, "c"), (15, 20, "d"),
> > (18, 23, "e")]
> > >>> parts.sort()
> > >>> parts
> > [(3, 6, 'c'), (5, 9, 'a'), (7, 10, 'b'), (15, 20, 'd'), (18, 23, 'e')]
> > >>> # Merge
Jay Bird wrote:
Hi everyone,
I've been trying to figure out a simple algorithm on how to combine a
list of parts that have 1D locations that overlap into a non-
overlapping list. For example, here would be my input:
part name location
a 5-9
b 7-10
c
Hi, I am porting a simple code from Perl, the website asks for
usr/pwd and the server's side Perl script makes a temp ftp dir
for a file upload.
The original Perl script connects okay, does its job. The same URL
stuffed into FF3 performs the same way.
My Python script I am sweating over for past
alex23 wrote:
Piet van Oostrum wrote:
That should be z += 0j
Pardon my ignorance, but could anyone explain the rationale behind
using 'j' to indicate the imaginary number (as opposed to the more
intuitive 'i')?
(Not that I've had much call to use complex numbers but I'm
curious)
I think
When I direct urlopen to a non-existent server process I get
IOError: [Errno socket error] (10061, 'Connection refused')
The connection refused is as expected but whats the 10061?
strerror(10061) says 'unknown error'
So its like an errno but not quite an errno?
Can I find out more about this numb
dp_pearce wrote:
I want to be able to use Python to produce Spider plots (perhaps you
know them as radar plots or star plots). Does anyone know how to
achieve this? Are there existing libraries?
Direction to any examples, especially those with tutorials, would be
greatly appreciated.
Cheers,
.
On Aug 6, 1:18 am, Scott David Daniels wrote:
> I think it explained in the complex math area, but basically EE types
> use j, math types use i for exactly the same thing. Since i is so
> frequently and index in CS, and there is another strong convention,
> why not let the EE types win?
That 'i'
On Wed, 2009-08-05 at 20:48 +0530, Rustom Mody wrote:
> When I direct urlopen to a non-existent server process I get
>
> IOError: [Errno socket error] (10061, 'Connection refused')
> The connection refused is as expected but whats the 10061?
> strerror(10061) says 'unknown error'
>
> So its like
On Aug 5, 3:51 pm, dp_pearce wrote:
> I want to be able to use Python to produce Spider plots (perhaps you
> know them as radar plots or star plots). Does anyone know how to
> achieve this? Are there existing libraries?
>
The 'wxPython in Action' book has some simple example code which
produces t
On Wed, 2009-08-05 at 12:39 +0200, Diez B. Roggisch wrote:
> Another often used trick is to have a mutable container-object, like this:
>
> def tutu():
>a = [2]
>
>def toto():
>a[0] = 4
>
>toto()
When you need a writable bound variable inside a closure, I prefer this
idi
On 5 Aug, 15:46, "Martin P. Hellwig"
wrote:
> Hi List,
>
> On several occasions I have needed (and build) a parser that reads a
> binary piece of data with custom structure. For example (bogus one):
>
> BE
> +-+-+-+-+--++
> | Version | Command |
On Aug 5, 7:29 am, Hendrik van Rooyen wrote:
> On Wednesday 05 August 2009 14:08:18 David Cournapeau wrote:
>
> > On Wed, Aug 5, 2009 at 4:56 PM, Hendrik van
>
> > Rooyen wrote:
> > > On Tuesday 04 August 2009 21:13:10 Kosta wrote:
> > >> I am a Python newbie, tasked with automating (researching)
Jay Bird wrote:
Hi everyone,
I wanted to thank you all for your help and *excellent* discussion. I
was able to utilize and embed the script by Grigor Lingl in the 6th
post of this discussion to get my program to work very quickly (I had
to do about 20 comparisons per data bin, with over 40K bin
On Wed, 2009-08-05 at 16:43 +0200, Michael Ströder wrote:
> These both expressions are equivalent but which is faster or should be used
> for any reason?
>
> u = unicode(s,'utf-8')
>
> u = s.decode('utf-8') # looks nicer
It is sometimes non-obvious which constructs are faster than others in
Pytho
Jon Clements wrote:
On 5 Aug, 13:17, Jonathan Fine wrote:
Hi
I'm writing a talk that compares embed and extend, and wondered if
anyone here ever used the Python *embedded* in a database server.
http://twistedmatrix.com/users/glyph/rant/extendit.html
Web frameworks (such as Django) use ex
Reply to self: code attached.
As Marco wrote: "To run the single C file USB bulk read program
properly, you must provide a source of data to the CY7C68013 FIFO bus,
like the Simple dual channel A/D system,
otherwise the reading call will time out in one second, you will get a
bunch of zeros, and
dp_pearce wrote:
I want to be able to use Python to produce Spider plots (perhaps you
know them as radar plots or star plots). Does anyone know how to
achieve this? Are there existing libraries?
Direction to any examples, especially those with tutorials, would be
greatly appreciated.
Cheers,
Da
Jon Clements wrote:
IIRC (and I have my doubts) the BitVector module may be of use, but
it's been about 3 years since I had to look at it. I think it used the
C equiv. of short ints to do its work. Otherwise, maybe the array
module, the struct module or even possibly ctypes.
Not much use, but m
Hi,
I'm trying to wrap a C-API which has a call that takes a void* and a size_t
as arguments.
void foo(void *data, size_t length)
The wrapper is supposed to be called with a python (byte)string instance,
which might contain more than one '\0'-character.
So how do I access the raw data of a str
Martin P. Hellwig:
> On several occasions I have needed (and build) a parser that reads a
> binary piece of data with custom structure. For example (bogus one):
>
> BE
> +-+-+-+-+--++
> | Version | Command | Instruction | Data Length | Data | Fill
On 5 Aug 2009, at 16:46 , Martin P. Hellwig wrote:
Hi List,
On several occasions I have needed (and build) a parser that reads a
binary piece of data with custom structure. For example (bogus one):
BE
+-+-+-+-+--++
| Version | Command | Ins
On 5 Aug 2009, at 19:17 , Bearophile wrote:
Have you tried Hachoir? (I think its name may be changed to Fusil, I
don't know).
Name hasn't been changed (I think fusil is a subproject, something
like that) on the other hand the hachoir.org site is dead.
But apparently Hachoir was moved to bitbu
> It didn't form 2.5 to 2.6 (at least not intentionally). But with the
> indroduction of the TurtleScreen class and the Screen class/object
> (singleton) a few of the turtle methods were also implemented as screen
> methods and as turtle methods declared deprecated (see docs of Python
> 2.6). These
Mensanator schrieb:
It didn't form 2.5 to 2.6 (at least not intentionally). But with the
indroduction of the TurtleScreen class and the Screen class/object
(singleton) a few of the turtle methods were also implemented as screen
methods and as turtle methods declared deprecated (see docs of Python
"Martin P. Hellwig" writes:
> what I usually do is read the packet in binary mode, convert the
> output to a concatenated 'binary string'(i.e. '0101011000110') and
Something wrong with reading the data words as an integer and using
old fashioned shifts and masks to get at the bit fields?
--
http
unicode() has LOAD_GLOBAL which s.decode() does not. Is it generally
the case that LOAD_ATTR is slower than LOAD_GLOBAL that lead to your
intuition that the former would probably be slower? Or some other
intuition?
Of course, the results from timeit are a different thing - I ask about
the intuiti
> Fafounet (F) wrote:
>F> Thank you, now I can get the correct character.
>F> Now when I have the string abécd I can get ab then é thanks to
>F> your function and then cd. But how is it possible to know that cd is
>F> still the same word ?
That depends on your definition of `word'. And that
> reportlab has a spider chart in reportlab/graphics/charts/spider.py
> How about
> http://matplotlib.sourceforge.net/examples/api/radar_chart.html?highl...
Both exactly what I was after. Thanks very much.
> The 'wxPython in Action' book has some simple example code which
> produces this sort o
On Aug 5, 2009, at 1:16 PM, Diez B. Roggisch wrote:
Hi,
I'm trying to wrap a C-API which has a call that takes a void* and a
size_t
as arguments.
void foo(void *data, size_t length)
The wrapper is supposed to be called with a python (byte)string
instance,
which might contain more than
Ok, I feel like this is a really stupid question, but how do you install
setup tools for Python 2.6 under windows?
The only format is .egg which requires setup tools to install, doesn't it?
Thanks,
Jeremy
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
"Martin P. Hellwig" writes:
what I usually do is read the packet in binary mode, convert the
output to a concatenated 'binary string'(i.e. '0101011000110') and
Something wrong with reading the data words as an integer and using
old fashioned shifts and masks to get at the bi
"Steven D'Aprano" wrote in message
news:pan.2009.08.04.09.28...@remove.this.cybersource.com.au...
> On Tue, 04 Aug 2009 10:03:53 +0200, Bruno Desthuilliers wrote:
>
>>> Disadvantages: your code is filled with line noise. It's an arbitrary
>>> choice between @@ meaning instance attribute and @@ m
On Wed, 05 Aug 2009 08:18:55 -0700, Scott David Daniels
wrote:
>I think it explained in the complex math area, but basically EE types
>use j, math types use i for exactly the same thing. Since i is so
>frequently and index in CS, and there is another strong convention,
>why not let the EE types
Xavier Ho wrote:
> On Thu, Aug 6, 2009 at 11:51 AM, Sergey Simonenko
> wrote:
>
>> I subclass builtin 'dict' in my application and experience some problems
>> with it.
>>
>
> You should subclass collections.UserDict, and not the default dict class.
> Refer to the collections module.
Are you ref
On 5 Aug, 19:16, "Diez B. Roggisch" wrote:
> void foo(void *data, size_t length)
>
> The wrapper is supposed to be called with a python (byte)string instance,
> which might contain more than one '\0'-character.
>
> So how do I access the raw data of a string?
cdef extern void foo(void *data, int
On 5 Aug, 21:23, sturlamolden wrote:
> foo(data, length)
Oops, that would be
foo( data, length)
--
http://mail.python.org/mailman/listinfo/python-list
Jonathan Fine wrote:
> Hi
>
> I'm writing a talk that compares embed and extend, and wondered if
> anyone here ever used the Python *embedded* in a database server.
> http://twistedmatrix.com/users/glyph/rant/extendit.html
>
> Web frameworks (such as Django) use extend, to import an extensi
On Aug 5, 2:19 am, Steven D'Aprano wrote:
> On Wed, 5 Aug 2009 03:49 pm Mensanator wrote:
>
> > In 3.1, tracing is now a screen attribute, not a turtle atribute.
> > I have no idea why
>
> > tooter = turtle.Turtle()
> > tooter.tracer(False)
>
> > doesn't give me an error (I thought silent erro
On 5 Aug, 15:40, Jesse Noller wrote:
> Sturla;
>
> That bug was fixed unless I'm missing something.
It is still in SVN. Change every call to os._exit to sys.exit
please. :)
http://svn.python.org/view/python/branches/release26-maint/Lib/multiprocessing/forking.py?revision=66717&view=markup
http
On 5 Aug, 21:36, sturlamolden wrote:
> http://svn.python.org/view/python/branches/release26-maint/Lib/multip...
>
> http://svn.python.org/view/python/branches/release31-maint/Lib/multip...
http://svn.python.org/view/python/trunk/Lib/multiprocessing/forking.py?revision=65864&view=markup
--
http
Paul Rubin wrote:
"Martin P. Hellwig" writes:
Is there an advantage using shifts and masks over my kitchen type solution?
Weren't you complaining about the 8-to-1 expansion from turning each bit
to an ascii char?
Yes you are (of course) right, my 'dream' solution would be something
that ac
On Aug 4, 10:37 pm, erikcw wrote:
> Traceback (most recent call last):
> File "scraper.py", line 144, in
> print pool.map(scrape, range(10))
> File "/usr/lib/python2.6/multiprocessing/pool.py", line 148, in map
> return self.map_async(func, iterable, chunksize).get()
> File "/usr/li
In <00027aa9$0$2969$c3e8...@news.astraweb.com> Steven D'Aprano
writes:
>No problem. Here you go:
>http://www.cybersource.com.au/users/steve/python/constants.py
Extremely helpful. Thanks!
kynn
--
http://mail.python.org/mailman/listinfo/python-list
On 5 Aug., 21:31, Mensanator wrote:
>
> >>> import turtle
> >>> tooter = turtle.Turtle()
> >>> tooter.tracer
>
> Traceback (most recent call last):
> File "", line 1, in
> tooter.tracer
> AttributeError: 'Turtle' object has no attribute 'tracer'>>>
> tooter.hideturtle()
> >>> tooter.speed(
> sturlamolden (s) wrote:
>s> On 5 Aug, 15:40, Jesse Noller wrote:
>>> Sturla;
>>>
>>> That bug was fixed unless I'm missing something.
>s> It is still in SVN. Change every call to os._exit to sys.exit
>s> please. :)
Calling os.exit in a child process may be dangerous. It can cause
unflus
One of the nice things one can do with Perl's regexp's is illustrated
in the following example:
my $gly = qr/gg[ucag]/i
my $ala = qr/gc[ucag]/i;
my $val = qr/gu[ucag]/i;
my $leu = qr/uu[ag]|cu[ucag]/i;
my $ile = qr/au[uca]/i;
my $aliphatic = qr/$gly|$ala|$val|$leu|$ile/;
In other words, one c
1 - 100 of 168 matches
Mail list logo