itools is a Python library, it groups a number of packages into a single
meta-package for easier development and deployment:
itools.abnf itools.http itools.tmx
itools.catalog itools.i18n itools.uri
itools.csv itools.ical
Vilnius/Post EuroPython PyPy Sprint 10-12th of July
The PyPy team is sprinting at EuroPython again and we invite
you to participate in our 3 day long sprint at the conference hotel
-
Hi everyone,
Im glad to announce that pymunk 0.8 have been released, a library
wrapping the 2d physics engine Chipmunk.
You can find it here: http://code.google.com/p/pymunk/
What is pymunk?
===
pymunk is a wrapper around the 2d rigid body physics library Chipmunk,
Is anyone aware of any prior work done with searching or matching a
pattern over nested Python lists? I have this problem where I have a
list like:
[1, 2, [1, 2, [1, 7], 9, 9], 10]
and I'd like to search for the pattern [1, 2, ANY] so that is returns:
[1, 2, [1, 2, [6, 7], 9, 9], 10]
[1, 2, [6,
En Mon, 16 Jun 2008 07:34:06 -0300, Bart Kastermans [EMAIL PROTECTED]
escribió:
Summary: can't verify big O claim, how to properly time this?
This is interesting. I had never attempted to verify a big O
statement
before, and decided that it would be worth trying. So I wrote some
code to
On Jun 17, 12:36 pm, Lie [EMAIL PROTECTED] wrote:
On Jun 17, 10:50 am, [EMAIL PROTECTED] wrote:
I'm writing to see calcuration process.
And so, I can't catch StopIteration...
What is mistake?
(snip)
In a for-loop, StopIteration is caught by the for-loop for your
convenience (so you
I was trying to print a dot on console every second to indicates
running process, so I wrote, for example:
for i in xrange(10):
print .,
time.sleep(1)
Idealy, a dot will be printed out each second. But there is nothing
print out until after 10 seconds, all 10 dots come out together.
On Jun 17, 12:28 am, Martin v. Löwis [EMAIL PROTECTED] wrote:
My guess is that the two main memory allocate/deallocate cases are 1)
appending a new item to the end, and 2) GC'ing the entire data
structure. I would optimize these 2 at the expense of all others.
Does that include dictionary
En Mon, 16 Jun 2008 21:21:35 -0300, John Salerno [EMAIL PROTECTED] escribió:
I wrote some pretty basic socket programming again, but I'm still confused
about what's happening with the buffer_size variable. Here are the server and
client programs:
--
from socket import *
On Jun 17, 5:50 am, [EMAIL PROTECTED] wrote:
I'm writing to see calcuration process.
And so, I can't catch StopIteration...
What is mistake?
def collatz(n):
r=[]
while n1:
r.append(n)
n = 3*n+1 if n%2 else n/2
yield r
for i, x in enumerate(collatz(13)):
try:
On Jun 17, 8:43 am, Chris [EMAIL PROTECTED] wrote:
On Jun 17, 5:50 am, [EMAIL PROTECTED] wrote:
I'm writing to see calcuration process.
And so, I can't catch StopIteration...
What is mistake?
def collatz(n):
r=[]
while n1:
r.append(n)
n = 3*n+1 if n%2 else n/2
En Tue, 17 Jun 2008 03:15:11 -0300, pirata [EMAIL PROTECTED] escribió:
I was trying to print a dot on console every second to indicates
running process, so I wrote, for example:
for i in xrange(10):
print .,
time.sleep(1)
Idealy, a dot will be printed out each second. But there is
Yes, I need to make sure my requests are properly written so that the
generic XPath engine does not need all the structure in memory.
There are quite a few cases where you really don't need to load
everything at all. /a/b/*/c/d is an example. But even with an example
like /x/z[last()]/t, you
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Gabriel Genellina wrote:
En Tue, 17 Jun 2008 03:15:11 -0300, pirata [EMAIL PROTECTED] escribió:
I was trying to print a dot on console every second to indicates
running process, so I wrote, for example:
for i in xrange(10):
print .,
Ian Kelly [EMAIL PROTECTED] writes:
On Mon, Jun 16, 2008 at 11:09 AM, Jean-Paul Calderone
[EMAIL PROTECTED] wrote:
It will depend what version of Python you're using and the *exact* details
of the code in question. An optimization was introduced where, if the
string being concatenated to is
Gilles Ganault wrote:
It seems like I have Unicode data in a CSV file but Python is using
a different code page, so isn't happy when I'm trying to read and put
this data into an SQLite database with APSW:
My guess is that you have non-ascii characters in a bytestring.
What should I do so
En Tue, 17 Jun 2008 02:25:42 -0300, Lie [EMAIL PROTECTED] escribió:
On Jun 17, 11:07 am, Leo Jay [EMAIL PROTECTED] wrote:
On Tue, Jun 17, 2008 at 11:29 AM, pirata [EMAIL PROTECTED] wrote:
What's the difference between is not and != or they are the same thing?
The 'is' is used to test do
En Mon, 16 Jun 2008 22:51:30 -0300, John Salerno [EMAIL PROTECTED] escribió:
takayuki wrote:
I'm early on in my python adventure so I'm not there yet on the strip
command nuances.I'm reading How to think like a python
programmer first. It's great.
Then Learning python. I've read
Maric Michaud wrote:
Le Monday 16 June 2008 20:35:22 George Sakkis, vous avez écrit :
On Jun 16, 1:49 pm, Gerard flanagan [EMAIL PROTECTED] wrote:
[...]
variation of your toy code. I was thinking the Strategy pattern,
different classes have different initialisation strategies? But then you
Terry Reedy wrote:
Cédric Lucantis wrote:
I don't see any string method to do that
'abcde'.translate(str.maketrans('','','bcd'))
'ae'
I do not claim this to be better than all the other methods,
but this pair can also translate while deleting, which others cannot.
You should
En Tue, 17 Jun 2008 04:10:41 -0300, Rich Healey [EMAIL PROTECTED] escribió:
Gabriel Genellina wrote:
En Tue, 17 Jun 2008 03:15:11 -0300, pirata [EMAIL PROTECTED] escribió:
I was trying to print a dot on console every second to indicates
running process, so I wrote, for example:
for i in
On Jun 17, 8:15 am, pirata [EMAIL PROTECTED] wrote:
I was trying to print a dot on console every second to indicates
running process, so I wrote, for example:
for i in xrange(10):
print .,
time.sleep(1)
Idealy, a dot will be printed out each second. But there is nothing
print out
Leo Jay [EMAIL PROTECTED] wrote:
same objects are equal, but equal don't have to be the same object.
same objects are often equal, but not always:
inf = 2e200*2e200
ind = inf/inf
ind==ind
False
ind is ind
True
--
Duncan Booth http://kupuguy.blogspot.com
--
You could use my mseqdict implementation of a sorted dict.
http://home.arcor.de/wolfgang.grafen/Python/Modules/Modules.html
swap:
This method can only be applied when all values of the dictionary are
immutable. The Python dictionary cannot hold mutable keys! So swap
doesn't work if only one
On 2008-06-16, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hello. Could some1 tell me how i could display a specific point in
gnuplot.py. Supposingly if i have a point of intersection (2,3). How
can i show this on the graph? As in how can i write near the point of
intersection the value :(2,3).
Hi!
I'm developing a pygtk application where I need to show images zoomed in
so that the user can see individual pixels. gtk.gdk.Pixbuf.scale()
seemed ideal for this, but if I set offset_x and offset_y to anything
other than 0, the resulting image is heavily distorted and the offset is
In article [EMAIL PROTECTED],
Peter Otten [EMAIL PROTECTED] wrote:
Terry Reedy wrote:
'abcde'.translate(str.maketrans('','','bcd'))
'ae'
You should mention that you are using Python 3.0 ;)
The 2.5 equivalent would be
uabcde.translate(dict.fromkeys(map(ord, ubcd)))
u'ae'
Only if you're
Hello NG,
I am searching for a way to jump to a specific line in a text file, let's
say to line no. 9000.
Is there any method like file.seek() which leads me to a given line instead
of a given byte?
Hope for help
Patrick
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 13, 3:39 pm, AndreH [EMAIL PROTECTED] wrote:
Good day,
I just installed pyinotify on my gentoo box.
When I test the library through pyinotify.pv -v /tmp under root,
everything works great, but when I try the same thing under my local
user account, I receive the following error:
Hello, here's a new casual game that looks interesting. It's called
Smilies Invasion and you have to eat as much green smilies as you can:
http://www.dolmenent.com/smiliesinvasion/
Greetings from a newbie developer.
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 17, 8:10 pm, Patrick David [EMAIL PROTECTED]
wrote:
Hello NG,
I am searching for a way to jump to a specific line in a text file, let's
say to line no. 9000.
Is there any method like file.seek() which leads me to a given line instead
of a given byte?
If by jump you mean without
Sion Arrowsmith wrote:
In article [EMAIL PROTECTED],
Peter Otten [EMAIL PROTECTED] wrote:
Terry Reedy wrote:
'abcde'.translate(str.maketrans('','','bcd'))
'ae'
You should mention that you are using Python 3.0 ;)
The 2.5 equivalent would be
uabcde.translate(dict.fromkeys(map(ord, ubcd)))
Martin v. L.:
http://wiki.python.org/moin/TimeComplexity
Thank you, I think that's not a list of guarantees, while a list of
how things are now in CPython.
If so, what's the advantage of using that method over d.items[n]?
I think I have lost the thread here, sorry. So I explain again what I
I'm new to Python and can't readily find the appropriate function for
the following situation:
I'm reading in a byte stream from a serial port (which I've got
working OK with pyserial) and which contains numeric data in a packed
binary format. Much of the data content occurs as integers encoded
John Dann wrote:
I'm new to Python and can't readily find the appropriate function for
the following situation:
I'm reading in a byte stream from a serial port (which I've got
working OK with pyserial) and which contains numeric data in a packed
binary format. Much of the data content
try struct.pack
--
http://mail.python.org/mailman/listinfo/python-list
On 2008-06-17, John Dann [EMAIL PROTECTED] wrote:
I'm reading in a byte stream from a serial port (which I've got
working OK with pyserial) and which contains numeric data in a packed
binary format. Much of the data content occurs as integers encoded as
2 consecutive bytes, ie a 2-byte
John Dann wrote:
I'm new to Python and can't readily find the appropriate function for
the following situation:
I'm reading in a byte stream from a serial port (which I've got
working OK with pyserial) and which contains numeric data in a packed
binary format. Much of the data content occurs as
On Jun 17, 9:08 am, Diez B. Roggisch [EMAIL PROTECTED] wrote:
Yes, I need to make sure my requests are properly written so that the
generic XPath engine does not need all the structure in memory.
There are quite a few cases where you really don't need to load
everything at all. /a/b/*/c/d
On Tue, Jun 17, 2008 at 04:33:03AM -0300, Gabriel Genellina wrote:
Basically 'a is b' and 'not(a is b)' is similar to 'id(a) == id(b)'
and 'not(id(a) == id(b))'
No.
Sure it is... he said similar... not identical. They are not the
same, but they are similar.
Saying a flat no alone,
On Jun 17, 9:28 pm, John Dann [EMAIL PROTECTED] wrote:
I'm new to Python and can't readily find the appropriate function for
the following situation:
I'm reading in a byte stream from a serial port (which I've got
working OK with pyserial) and which contains numeric data in a packed
binary
[EMAIL PROTECTED] wrote:
On Jun 15, 7:43 pm, Peter Otten [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
On Jun 15, 6:58 pm, Christian Meesters [EMAIL PROTECTED] wrote:
I do need speed. Is there an option?
Mind telling us what you *actually* want to achieve? (What do you want to
Hello. Got a problem here.
Ive got a set of points tht id be plotting. Those points would contain
the date on which the work was done against its frequency. Supposedly
if i did something on the 28th of March one of the points would be
(28, respective freq). The next time i did my work on the 1st
Btw dnt forget the solution should also cater to this problem:
Supposedly there is a day on which i did not do anything. Than that
particular spot in my graph should be left empty. Meaning that if i
did something on the 1st March and after it i did something on the 7th
March. Then essentially 1st
On Jun 17, 2:15 pm, J-Burns [EMAIL PROTECTED] wrote:
Hello. Got a problem here.
Ive got a set of points tht id be plotting. Those points would contain
the date on which the work was done against its frequency. Supposedly
if i did something on the 28th of March one of the points would be
(28,
Patrick David [EMAIL PROTECTED] writes:
I am searching for a way to jump to a specific line in a text file,
let's say to line no. 9000. Is there any method like file.seek()
which leads me to a given line instead of a given byte?
You can simulate it fairly easily, but it will internally read
Hi,
I am new to Python, trying it as an alternative to Perl. I am having
problem with python HTTP handling library, urllib2. How do I avoid using
the HTTPRedirectHandler while making a HTTP request? For those familiar
to Perl-LWP, this is done by using simple_request() on the UserAgent
object.
Gabriel Genellina [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Both programs say recv(buffer_size) - buffer_size is the maximum number of
bytes to be RECEIVED, that is, READ. recv will return at most buffer_size
bytes. It may return less than that, even if the other side sent
John Salerno [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
from socket import *
host = 'localhost'
port = 51567
address = (host, port)
buffer_size = 1024
client_socket = socket(AF_INET, SOCK_STREAM)
client_socket.connect(address)
while True:
data = raw_input(' ')
if
On Jun 17, 3:13 pm, Phil Hobbs
[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
On Jun 15, 7:43 pm, Peter Otten [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
On Jun 15, 6:58 pm, Christian Meesters [EMAIL PROTECTED] wrote:
I do need speed. Is there an option?
Mind telling us what
On Jun 17, 10:46 pm, Hrvoje Niksic [EMAIL PROTECTED] wrote:
Patrick David [EMAIL PROTECTED] writes:
I am searching for a way to jump to a specific line in a text file,
let's say to line no. 9000. Is there any method like file.seek()
which leads me to a given line instead of a given byte?
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
That was suggested. Problem is, that sometimes the velocities are near
zero. So this solution, by itself, is not general enough.
Maybe working in p, and delta-p would be more stable.
--
Thanks everyone for details.
I'll try stealing some of the good bits of python-central of debian
for my purpose.
On Mon, Jun 16, 2008 at 10:43 AM, Ben Finney
[EMAIL PROTECTED] wrote:
Jean-Paul Calderone [EMAIL PROTECTED] writes:
What has changed is that the tools in common use for Debian
Authentic Designer Handbags at www. yoyobag.com
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
I find that I semi-frequently get the cryptic message
import site failed; use -v for traceback
printed on standard error when an arbitrary python script receives
SIGINT while the python interpreter
is still firing up. If I use -v for traceback I get something along
the lines of
'import
To clarify: this is more serious than an incorrect error message, as
the intended interrupt gets swallowed and
script execution proceeds. Sometimes I seem to get half-imported
modules as well,
the script failing later with something like
AttributeError: 'module' object has no attribute 'getenv'
At 2008-06-17T05:55:52Z, Chris [EMAIL PROTECTED] writes:
Is anyone aware of any prior work done with searching or matching a
pattern over nested Python lists? I have this problem where I have a
list like:
[1, 2, [1, 2, [1, 7], 9, 9], 10]
and I'd like to search for the pattern [1, 2, ANY]
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I'm writing to see calcuration process.
And so, I can't catch StopIteration...
What is mistake?
def collatz(n):
r=[]
while n1:
r.append(n)
n = 3*n+1 if n%2 else n/2
yield r
for i, x in enumerate(collatz(13)):
asdf [EMAIL PROTECTED] wrote:
(Presumably nothing to do with the Common Lisp system-definition utility.)
So for example if I know that var1=jsmith. Can I somehow do
var1=User().
Something like this might work.
class User (object):
def __init__(me, name):
me.name = name
class Users
On Jun 17, 12:28 pm, John Dann [EMAIL PROTECTED] wrote:
I'm new to Python and can't readily find the appropriate function for
the following situation:
I'm reading in a byte stream from a serial port (which I've got
working OK with pyserial) and which contains numeric data in a packed
binary
TheSaint [EMAIL PROTECTED] writes:
On 19:21, venerdì 13 giugno 2008 R. Bernstein wrote:
I'm not completely sure what you mean, but I gather that in
post-mortem debugging you'd like to inspect local variables defined at the
place of error.
Yes, exactly. This can be seen with pdb, but not
Hi every one. What is the similar python WX style property for CSS
text-align?
I need this item text to start from the right direction:
aaa= html.HtmlWindow(self, -1, style=wx.SIMPLE_BORDER, size=(250, 60))
aaa.LoadPage('../../aa.html')
Thanks!
--
Hello,
I'm fairly new to Python, and have run into dead ends in trying to
figure out what is going on. The basic thing I am trying to do is get
pylibpcap working on a Python installation. More precisely, I want to
get it working on an ActiveState Python installation.
I have it working on
On Jun 17, 6:43 pm, Gandalf [EMAIL PROTECTED] wrote:
Hi every one. What is the similar python WX style property for CSS
text-align?
I need this item text to start from the right direction:
aaa= html.HtmlWindow(self, -1, style=wx.SIMPLE_BORDER, size=(250, 60))
Kirk Strauser:
Hint: recursion. Your general algorithm will be something like:
Another solution is to use a better (different) language, that has
built-in pattern matching, or allows to create one.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Floris Bruynooghe [EMAIL PROTECTED]:
I was wondering when it was worthwil to use context managers for
file. Consider this example:
def foo():
t = False
for line in file('/tmp/foo'):
if line.startswith('bar'):
t = True
break
return t
Using
On Tue, 17 Jun 2008 08:58:11 -0700 (PDT), MRAB
[EMAIL PROTECTED] wrote:
[snip]
Please note that in slicing the start position is included and the end
position is excluded, so that should be ByteStream[12:14].
Yes, I just tripped over that, in fact, hence the error in my original
post. I suppose
Gabriel Genellina [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Note that most of the time you want to use the sendall() method, because
send() doesn't guarantee that all the data was actually sent.
http://docs.python.org/lib/socket-objects.html
If I use sendall(), am I still
pirata wrote:
I'm a bit confusing about whether is not equivelent to !=
0 is not 0.0
True
0 != 0.0
False
--
http://mail.python.org/mailman/listinfo/python-list
John Dann wrote:
On Tue, 17 Jun 2008 08:58:11 -0700 (PDT), MRAB
[EMAIL PROTECTED] wrote:
[snip]
Please note that in slicing the start position is included and the end
position is excluded, so that should be ByteStream[12:14].
Yes, I just tripped over that, in fact, hence the error in my
b = wx.Button(label=Click Me, action=myCallable)
Instead you used to have to create a button and then call
some utility function in some other object to bind that
button to a callable (IIRC this was one place where Window
IDs could be used). Now, the button actually has a
On Jun 17, 11:45 am, Gandalf [EMAIL PROTECTED] wrote:
On Jun 17, 6:43 pm, Gandalf [EMAIL PROTECTED] wrote:
Hi every one. What is the similar python WX style property for CSS
text-align?
I need this item text to start from the right direction:
aaa= html.HtmlWindow(self, -1,
Peter Otten wrote:
Terry Reedy wrote:
Cédric Lucantis wrote:
I don't see any string method to do that
'abcde'.translate(str.maketrans('','','bcd'))
'ae'
I do not claim this to be better than all the other methods,
but this pair can also translate while deleting, which others cannot.
On Jun 17, 7:49 pm, Mike Driscoll [EMAIL PROTECTED] wrote:
On Jun 17, 11:45 am, Gandalf [EMAIL PROTECTED] wrote:
On Jun 17, 6:43 pm, Gandalf [EMAIL PROTECTED] wrote:
Hi every one. What is the similar python WX style property for CSS
text-align?
I need this item text to start from the
since you brought up this issue, please tell me where can I fine
menual for this library?
can i generate dynamic GUI from it?
If not, Is there any way to generate dynamic GUI (one that can change
according to the user input) with HTML-CSS- javascript similar
environment?
--
Hi,
I am running a very simple python application and I noted that the memory
allocation is something like 4,5M.
This is a problem in my case, because I have to run 2 thousand process at
the same time.
The memory I need is 100k or less. Is there any way to set this for the
python process?
Ethan Furman wrote:
Greetings.
The strip() method of strings works from both ends towards the middle.
Is there a simple, built-in way to remove several characters from a
string no matter their location? (besides .replace() ;)
For example:
.strip -- 'www.example.com'.strip('cmowz.')
'example'
Peter Otten schreef:
Ethan Furman wrote:
The strip() method of strings works from both ends towards the middle.
Is there a simple, built-in way to remove several characters from a
string no matter their location? (besides .replace() ;)
identity = .join(map(chr, range(256)))
Or
identity =
On Jun 17, 12:59 pm, Gandalf [EMAIL PROTECTED] wrote:
On Jun 17, 7:49 pm, Mike Driscoll [EMAIL PROTECTED] wrote:
On Jun 17, 11:45 am, Gandalf [EMAIL PROTECTED] wrote:
On Jun 17, 6:43 pm, Gandalf [EMAIL PROTECTED] wrote:
Hi every one. What is the similar python WX style property for
On Jun 17, 1:20 pm, Gandalf [EMAIL PROTECTED] wrote:
since you brought up this issue, please tell me where can I fine
menual for this library?
You want the manual for wxPython? Go to the download page on the
Official wxPython page and get the Docs Demos package:
On Jun 16, 11:10 pm, Maric Michaud [EMAIL PROTECTED] wrote:
Le Monday 16 June 2008 20:35:22 George Sakkis, vous avez écrit :
On Jun 16, 1:49 pm, Gerard flanagan [EMAIL PROTECTED] wrote:
George Sakkis wrote:
I have a situation where one class can be customized with several
On Jun 17, 2008, at 2:34 PM, Eduardo Henrique Tessarioli wrote:
Hi,
I am running a very simple python application and I noted that the
memory allocation is something like 4,5M.
This is a problem in my case, because I have to run 2 thousand
process at the same time.
The memory I need is
Hello, I have written a program to draw a vescica piscis http://
en.wikipedia.org/wiki/Vesica_piscis
from turtle import *
def main():
setup(width=400, height=400)
r = 50
color(black)
circle(r)
color(white)
forward(r)
color(black)
circle(r)
x =
On Jun 17, 2:45 pm, Terrence Brannon [EMAIL PROTECTED] wrote:
Hello, I have written a program to draw a vescica piscis http://
en.wikipedia.org/wiki/Vesica_piscis
from turtle import *
def main():
setup(width=400, height=400)
r = 50
color(black)
circle(r)
I've got an ordered list of MyClasses that I want to be able to do
binary searches on, but against a tuple. MyClass has valid
__lt__(self, rhs) and __eq__(self, rhs) member functions that work
when rhs is a tuple.
This works:
l = [MyClass(..), MyClass(..), ...]
l.find((a,b))
But this doesn't:
On Jun 17, 12:45 pm, Terrence Brannon [EMAIL PROTECTED] wrote:
Hello, I have written a program to draw a vescica piscis http://
en.wikipedia.org/wiki/Vesica_piscis
from turtle import *
def main():
setup(width=400, height=400)
r = 50
color(black)
circle(r)
On Tue, 17 Jun 2008 09:23:28 +0200, Peter Otten [EMAIL PROTECTED]
wrote:
Assuming that encoding is UTF-8 and that apsw can cope
with unicode, try to convert your data to unicode before
feeding it to the database api:
sql = INSERT INTO mytable (col1,col2) VALUES (?,?)
rows =
How can i use the find() function on a string that is composed of tons
of symbols that cause errors...
THis is my string:
find(htmlheadmeta name=qrichtext content=1 /style
type=text/cssp, li { white-space: pre-wrap; }/style/headbody
style= font-family:'MS Shell Dlg 2'; font-size:8.25pt;
On Jun 18, 2:45 am, Terrence Brannon [EMAIL PROTECTED] wrote:
Hello, I have written a program to draw a vescica piscis http://
en.wikipedia.org/wiki/Vesica_piscis
from turtle import *
def main():
setup(width=400, height=400)
r = 50
color(black)
circle(r)
On Jun 17, 8:43 pm, Mike Driscoll [EMAIL PROTECTED] wrote:
On Jun 17, 1:20 pm, Gandalf [EMAIL PROTECTED] wrote:
since you brought up this issue, please tell me where can I fine
menual for this library?
You want the manual for wxPython? Go to the download page on the
Official wxPython page
Gabriel Genellina wrote:
En Mon, 16 Jun 2008 22:51:30 -0300, John Salerno [EMAIL PROTECTED] escribió:
takayuki wrote:
I'm early on in my python adventure so I'm not there yet on the strip
command nuances.I'm reading How to think like a python
programmer first. It's great.
Then Learning
On Jun 18, 7:12 am, korean_dave [EMAIL PROTECTED] wrote:
How can i use the find() function on a string that is composed of tons
of symbols that cause errors...
THis is my string:
find(htmlheadmeta name=qrichtext content=1 /style
type=text/cssp, li { white-space: pre-wrap; }/style/headbody
Do you know if there is such XPath engine that can be applied to a DOM-
like structure ?
No. But I toyed with the idea to write one :)
One way would be to take an XPath engine from an existing XML engine
(ElementTree, or any other), and see what APIs it calls... and see if
we cannot create
On Tue, 17 Jun 2008 23:10:48 +0200, Terry Jones [EMAIL PROTECTED] wrote:
For the record, here's a followup to my own posting, with working code.
The earlier untested code was a bit of a mess. The below runs fine.
In case it wasn't clear before, you're pulling results (e.g., from a
search
On Jun 18, 7:12 am, korean_dave [EMAIL PROTECTED] wrote:
How can i use the find() function on a string that is composed of tons
of symbols that cause errors...
THis is my string:
find(htmlheadmeta name=qrichtext content=1 /style
type=text/cssp, li { white-space: pre-wrap; }/style/headbody
Recently I discovered the re module doesn't support POSIX character
classes:
Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type help, copyright, credits or license for more information.
import re
r = re.compile('[:alnum:]+')
print r.match('123')
I'm having (what I assume is) a simple problem regarding the way import and
execfile interact. I apologize in advance for my naivete.
Lets say I have the function:
def Func1():
print dir()
execfile('testfile')
print dir()
X
and the file
#file: testfile
I think I have lost the thread here, sorry. So I explain again what I
mean. I think for this data structure it's important to keep all the
normal dict operations at the same speed. If you use a C
implementation vaguely similar to my pure python recipe you can
perform the del in O(1) too,
Well, this has become something of a rant,
Indeed - and I was only asking about .byindex(n) :-)
I don't know why that method is included in the PEP. Speculating
myself, I assume that the PEP author wants it to be O(1). As
bearophile explains, that's not possible/not a good idea.
As for
On Jun 18, 6:55 am, markscottwright [EMAIL PROTECTED] wrote:
I've got an ordered list of MyClasses that I want to be able to do
binary searches on, but against a tuple. MyClass has valid
__lt__(self, rhs) and __eq__(self, rhs) member functions that work
when rhs is a tuple.
This works:
l =
1 - 100 of 181 matches
Mail list logo