On 3 May 2007 04:30:37 -0700, [EMAIL PROTECTED] wrote:
>On 2 May, 17:29, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
>> On 2 May 2007 09:19:25 -0700, [EMAIL PROTECTED] wrote:
>>
>>
>>
>> >The code:
>>
>> >import codecs
>>
>>
far from the truth.
>
>The claimed figures were 50,000 Pystones for CPython 2.5, and 101,000 for
>the latest IronPython. (He didn't mention it, but I believe Psyco will
>outdo both of these.)
fwiw, my desktop happens to do 50,000 pystones with cpython 2.4 and 294,000
pystones with cpython 2.4 and psyco.full()
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
I do a
>telnet connection to port 1.
>
What were you expecting?
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 4 May 2007 15:05:46 +0300, Maxim Veksler <[EMAIL PROTECTED]> wrote:
>On 5/4/07, Maxim Veksler <[EMAIL PROTECTED]> wrote:
>>On 5/4/07, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
>> > On Fri, 4 May 2007 13:04:41 +0300, Maxim Veksler &l
On Sat, 5 May 2007 15:37:31 +0300, Maxim Veksler <[EMAIL PROTECTED]> wrote:
>On 5/4/07, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
>> >"""
>> >#!/usr/bin/env python
>> >import socket
>> >import select
>> >
>>
t import reactor
from twisted.internet.protocol import ServerFactory
from twisted.protocols.basic import LineOnlyReceiver
class CellProtocol(LineOnlyReceiver):
delimiter = '-ND-'
def lineReceived(self, line):
print 'got a line'
f = ServerFactory(
t be better to use threading.RLock, mutex, ... instead?
>
The builtin dict type is already thread safe.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
b.py and import the relevant
class(es) from c.py into it - 'from a.c import ClassA'.
You could also build a much more complex system in the hopes of being able to
do real "schema" upgrades of pickled data, but ultimately this is likely a
doomed endeavour (vis
<http://divmod.org:81/websvn/wsvn/Quotient/trunk/atop/versioning.py?op=file&rev=0&sc=0>).
Hope this helps,
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
in mydict if key in xrange(60, 69) or key == 3]
For the statement form of 'for', there is no syntactic way to combine it
with 'if' into a single statement.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
;>> 'Numeric' in modules
False
>>> getModule('Numeric')
PythonModule<'Numeric'>
>>> 'Numeric' in modules
False
>>>
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
27;s only inconsistent if you think it should behave based on the
name of a unicode code point. It doesn't use the name, though. It
uses the category. NO-BREAK SPACE is in the Zs category (Separator, Space).
ZERO WIDTH NO-BREAK SPACE is in the Cf category (Other, Format).
Maybe that makes unicode inconsistent (I won't try to argue either way),
but it's pretty clear that isspace is being consistent based on the data
it has to work with.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
is
>example, and many more.
>
>Making the switch between different parser-implementations on the fly isn't
>technically impossible - but really, really, really complicated. But then,
>if it's lameness sucks so much, you might wanna take a stab at it?
>
I think you misunderstood the behavior which was being called lame. The
earlier poster was suggesting that only the first Python code to run any
where in a process could perform future imports. This is, of course, not
true. It's only restricted to the first Python code to run in a particular
file.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 30 Jul 2007 07:36:00 -0700, [EMAIL PROTECTED] wrote:
>Hi,
>
> [snip]
>f=open(fileBeginning+".tmp", 'w')
>f.write("Hello")
>f.close
>
You forgot to call close. Try this final line, instead:
f.close()
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
aving to
>syntactically enclose the code in the 'with' scope, and I am hoping that
>the the yield does not exit the 'with' scope and release the resource.
It doesn't. Keep in mind that if the generator isn't resumed or garbage
collected, the cleanup with never run, though.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
strode along with that? Compared to python, that has been
>started in 1991 and now approaches it's third incarnation, I'd say
>python has a record of steadiness that surpasses that of MS-based tools
>by any means.
This is not a valid comparison. In fact, C# 3 is completely
On Thu, 02 Aug 2007 23:07:12 +0200, "Diez B. Roggisch" <[EMAIL PROTECTED]>
wrote:
>Jean-Paul Calderone schrieb:
>> On Thu, 02 Aug 2007 21:16:04 +0200, "Diez B. Roggisch"
>> <[EMAIL PROTECTED]> wrote:
>>> vml schrieb:
>>>> Hello,
fore they can find out what any particular name is bound
to, and potentially leading to bugs where names from one package accidentally
obscure names from another package.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
, causing the server
to never see the termination marker. UDP is difficult to use effectively.
Fortunately, TCP is suitable for many applications. You should consider
using it, instead.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
I'm looking for a module name tinter (not tkinter...)
from http://www.vex.net/parnassus/apyllo.py?i=97497223
status: Dead and Gone
Google return no location to download it, only a few
articles mentionned it, for example:
http://www.ibm.com/developerworks/linux/library/l-python6.html
Does someon
Peter Otten wrote:
> Jean-François Piéronne wrote:
>
>> I'm looking for a module name tinter (not tkinter...)
>>
>> from http://www.vex.net/parnassus/apyllo.py?i=97497223
>> status: Dead and Gone
>>
>> Google return no location to download it, on
oblems with the current C-extensions? It seems
>like if something is fully compatible and better, then it would be
>adopted. However, it hasn't been in what appears to be 7 years of
>existence, so I assume there's a reason.
It's not Pythonic.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 9 Aug 2007 05:05:31 -0700, Michael Bentley <[EMAIL PROTECTED]> wrote:
>
>On Aug 9, 2007, at 4:48 AM, Jean-Paul Calderone wrote:
>
>> On Thu, 09 Aug 2007 09:00:27 -, "Justin T."
>> <[EMAIL PROTECTED]> wrote:
>>> Hi,
>>>
>
me point, someone needs to write
some code. Stackless is great, but it's not the code that will solve this
problem.
In the mean time, you might consider some multi-process solutions. There
are a number of tools for getting concurrency like that.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 10 Aug 2007 16:37:19 -, "Justin T." <[EMAIL PROTECTED]> wrote:
>On Aug 10, 3:52 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
>> On Fri, 10 Aug 2007 10:01:51 -, "Justin T." <[EMAIL PROTECTED]> wrote:
>> >Hello,
>>
gt; widget.
>
>Forgot to say, i don't need it to work on windows :)
You might be interested in insults:
API docs:
http://twistedmatrix.com/documents/current/api/twisted.conch.insults.html
Examples:
http://twistedmatrix.com/projects/conch/documentation/examples/
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
in mind, maybe you can try to provide more details about the functionality
to narrow the field a bit.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
1, in ?
AttributeError: 'module' object has no attribute 'time'
>>> print time.__file__
time.py
>>> ^D
[EMAIL PROTECTED]:~$ rm time.py
[EMAIL PROTECTED]:~$ rm time.pyc
[EMAIL PROTECTED]:~$ python
Python 2.4.3 (#2, Oct 6 2006, 0
On Tue, 04 Sep 2007 00:32:23 -, Ben <[EMAIL PROTECTED]> wrote:
>Here are the statistics from Google Trends:
>
>http://benyang22a.blogspot.com/2007/09/perl-vs-python.html
>
>From the graph, it seems more accurate to say that Perl is undertaking Python.
Jean-Paul
--
h
python+sftp+server%22&btnG=Search
might be a place to start.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
On 5 Mar 2007 11:47:15 -0800, Johny <[EMAIL PROTECTED]> wrote:
>Can anyone suggest a way how to balance load on Apache server where I
>have Python scripts running?
>For example I have 3 webservers( Apache servers) and I would like to
>sent user's request to one of the three server depending on a lo
s is the error I am getting
>
Do you recognize that this has absolutely nothing to do with threading? If
this is the reason you want to switch away from SQLite3, reconsider, because
it's just a bug in your application code, and no matter what database or
adapter you use, bugs in your application code will prevent your application
from working properly.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
So do I !
2007/3/14, Josh Bloom <[EMAIL PROTECTED]>:
> I would suggest using cx_Oracle as I have had good experience with it.
> http://www.cxtools.net/default.aspx?nav=cxorlb
>
> -Josh
>
>
> On 3/14/07, Facundo Batista <[EMAIL PROTECTED]> wrote:
> > Hi! I need to connect to Oracle.
> >
> > I found
On Mon, 19 Mar 2007 13:17:11 +0100, Bruno Desthuilliers
>
> [snip]
>
>And what if it's a unicode string ?
>The correct idiom here is:
> if isinstance(year, basestring):
>
>> year,month,day=map(int,string.split(year,'-'))
> year, month,
On Mon, 19 Mar 2007 15:39:49 +0100, Bruno Desthuilliers <[EMAIL PROTECTED]>
wrote:
>Jean-Paul Calderone a écrit :
>> On Mon, 19 Mar 2007 13:17:11 +0100, Bruno Desthuilliers
>>>
>>> [snip]
>>>
>>> And what if it's a unicode string ?
>>&
quot;, "n"]
>
Only one list is created. It is used to define a C array where attributes
will be stored. Each instance still has that C array, but it has much less
overhead than a Python list or dictionary.
Whether this reduction in overhead actually results in a useful or measurable
perfor
On 24 Mar 2007 13:52:46 -0700, 7stud <[EMAIL PROTECTED]> wrote:
>On Mar 24, 2:19 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
>> Only one list is created. It is used to define a C array where attributes
>> will be stored. Each instance still has that C
>what ...?
They're _not_ the same function object, just like the `is' test told you.
They just happen to have been allocated at the same memory address.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
meric without losing the readability of Python.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
On 26 Mar 2007 06:47:18 -0700, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>On Mar 26, 2:42 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
>> On 26 Mar 2007 06:20:32 -0700, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>>
>> >
this in
>python..
You need a sendmsg wrapper (there are several, none in the stdlib), then
you need a privileged process which is willing to give you the privilege.
It's pretty inconvenient.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
ss is one which has a type of type instead of ClassType.
For example:
>>> class notnewstyle:
... pass
...
>>> type(notnewstyle)
>>> class newstyle(object):
... pass
...
>>> type(newstyle)
>>> class alsonewstyle(list
shnakant.
Here's an example Twisted-based XML-RPC server:
http://twistedmatrix.com/projects/web/documentation/examples/xmlrpc.py
When using MySQLdb with Twisted, twisted.enterprise.adbapi is useful.
This document explains it and gives some examples of its usage:
http://twistedmatrix.co
t; So set a long timeout when you want to write and short timeout when you want
>> to read.
>>
>
>Are sockets full duplex?
Uh, yes.
>
>I know Ethernet isn't.
Not that this is relevant, but unless you're using a hub, ethernet _is_
full duplex.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
that.
>
>I'm assuming that the timeout function is running in a thread...
What does it do when the timeout expires? How does it interrupt recv(2)
or write(2) or `for (int i = 0; i < (unsigned)-1; ++i);'?
This is what we're talking about, right?
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 30 Mar 2007 08:22:18 +0200, Hendrik van Rooyen <[EMAIL PROTECTED]>
wrote:
>"Jean-Paul Calderone" <[EMAIL PROTECTED]> wrote:
>
>> On Thu, 29 Mar 2007 07:29:35 +0200, Hendrik van Rooyen
><[EMAIL PROTECTED]> wrote:
>
>> >Are sockets full
atibility reasons
>(though it is being removed in Python 3000). If you have a specific
>suggestion for what doc should be updated and how, that would be
>helpful. Please post it to:
Why does this mean that the unicode type has to implement __getslice__?
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
>from PyQt4 import QtCore, QtGui
>ImportError: No module named PyQt4
>
>
>Any pointers regarding what packages should i install to get the
>system into working condition would be very helpful
>
>Thanks a lot
Qt4 Python bindings aren't available in 6.06, afaik. I
On Tue, 10 Apr 2007 09:51:45 -0600, Steven Bethard <[EMAIL PROTECTED]> wrote:
>Jean-Paul Calderone wrote:
>> On Tue, 10 Apr 2007 08:35:56 -0600, Steven Bethard
>> <[EMAIL PROTECTED]> wrote:
>>> Yes, you do still need to implement __getslice__ if you're subc
a callable. assertRaises
will call it (so that it can do exception handling), so you shouldn't:
self.assertRaises(ValueError, f.testException)
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
for
>each reader. I found my code cluttered with
>
>for i in xrange(number_of_worker_threads):
> q.put(sentinel)
>
>which certainly seems like a code smell to me.
Instead of putting multiple sentinels, just pre-construct the iterator
object.
work = iter(q.get, sentine
On 17 Apr 2007 14:32:01 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote:
>On 2007-04-17, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
>> On 17 Apr 2007 13:32:52 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote:
>>>On 2007-04-17, Hendrik van Rooyen <[EMAIL PROTECT
code in Twisted for this. It's based on
PyOpenSSL.
http://twistedmatrix.com/trac/browser/trunk/twisted/internet/_sslverify.py
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
read is the single reader, it will dead
>lock if the queue happens to be full at the moment the gui thread
>want to add another item.
>
This is pretty easily solved:
def sendToGUI(event):
if isInGUIThread():
gui.scheduleCall(event)
else:
guiQueue.put(event)
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
ething like :
>>
>> a = 16
>> "%ai" % 12
>>
>> But it is not correct.
>>
>> Any Idea ?
>
>("%i" % 12).rjust(a)
>
>Or, more ugly:
>
>"%%%di" % a % 12
>
>The first % (after quotes) builds this string: &quo
Higher Order Functions and would
>like to see exactly how you do it and to verify the contention.
>
Perhaps you could do a bit of independent research. Then your messages
to the group could contain more thoughtful questions and responses.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
I am reading a large amount of data from a COM port (or from a file) at a
rate of 20 records per second. It is about positioning of a vehicle on a
race track.
In each record we have time, position (lat and long) speed, course all from
GPS equipment. I would like to Produce a graph in real time wi
"Hendrik van Rooyen" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> Jean-Francois Canac wrote:
>
>>I am reading a large amount of data from a COM port (or from a file) at a
>>rate
> of 20 records per second. It is about >pos
dont know
which I should take for producing plot with data coming from a steam
Please could you help?
Many thanks
Jean-François
--
http://mail.python.org/mailman/listinfo/python-list
"Lawson Hanson" <[EMAIL PROTECTED]> a écrit dans le message de
news: [EMAIL PROTECTED]
> Nicholas Bastin wrote:
>> On 10/4/07, Jean-Francois Canac <[EMAIL PROTECTED]> wrote:
>>> [EMAIL PROTECTED]
>>>> I would draw dots on a suitably sized Tk
that
>>> I have to re-think a lot. But in the end I suppose it will pay off.
>>>
>>> Thanks for taking the time and reading my little essay Gabriel ;)
>>>
>>
>> Using Twisted won't help if the libshout calls are really blocking the
>> main
#x27;m really trying to do this without any dependencies on external
>libraries. The ctypes way looks interesting but I had really hoped for
>something more JNI-like :-/
>
JNI is awful. I can't imagine why you'd want something like it. However,
since you do, why don't you
rican.edu/econ/notes/hw/example2'))
>
>Why the difference?
You shouldn't unpickle things you get from the network, since pickle can
execute arbitrary code: http://jcalderone.livejournal.com/15864.html
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
If you get an incorrect padding error, try appending a "=" and decoding
again. If you get the error again, try appending one more "=". If it
still doesn't work, then you might be out of luck.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
t you can connect
>to the app and explore its current state. Take a look at the
>evalexception module in Paste to see what he does.
>
Or manhole in Twisted.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
dule name for every class/function that I use
>(quite unhandy)?
>
Pyflakes will tell you which imports aren't being used (among other
things). I don't know if an existing tool which will automatically
rewrite your source, though.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
>>> from twisted.python.reflect import objgrep, isSame
>>> for elem in aList:
... objgrep(__main__, elem, isSame)
...
['.aList[0]', '.elem', '.a1']
['.aList[1]', '.elem', '.a2']
>>>
Don't see how this could help,
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
_pp.py
It's just some throw-away code, but it at least manages to indent code
properly.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
t/, which is written in
>C. Unfortunately this is not solution for me, because my target "only"
>has a python interpreter
>
>I have "googled" for a while, but I don't have found anything useful.
What is your target, that it can only run programs written in Python,
not C?
really useful in any real-world sense, but I still wouldn't
characterize time.time as "relatively inexpensive."
Of course, for any real-world work, one would want to profile the
application to determine if removing calls to time.time() could
make a worthwhile difference.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
code does not check the
return value of socket.send(), which you must do.
Twisted is a third-party library which abstracts many of the low-level
details of the BSD socket API away from you. You might want to take a
look at it.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
exit 5",
>close() returns 1280. Here's the code:
>
> pipe = os.popen("exit 5")
> print pipe.close() # prints 1280
>
>Am I doing something wrong? Is there an easier way to get the exit
>code?
>>> import os
>>> os.WEXITSTATUS(1280)
5
>>>
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
7;m not sure that
>your testing examples were ultimately germane to the conversation (how
>would one handle timeouts in asyncore). Or maybe it's just late and
>I've had a long day :/ .
That's okay. I wasn't trying to be germane to the asyncore timeout handling
convers
many("INSERT INTO keywords (keyword) VALUES (%s)", datas)
Note that I also corrected your use of %, which was unnecessarily complex and
insecure.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
ole serialized
>inserts thing is strictly something popularized by MySQL and is by no
>means necessary or standard (as with a lot of MySQL).
PostgreSQL won't serialize inserts to the same table with a sequence
column? Wow. :)
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
ster = 42) and an assignment (s='I am a string')
>
But it's not a keyword:
>>> len(s=[])
Traceback (most recent call last):
File "", line 1, in ?
TypeError: len() takes no keyword arguments
>>>
I think that's the issue here.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
at it is good for, but I'd like to find out!)
>
If you have some time to experiment, PyPy has some support for logic
programming with Python.
http://codespeak.net/pypy/dist/pypy/doc/objspace-proxies.html#the-logic-object-space
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
-m timeit -s '
class X(object):
def __len__(self): return 100
seq = X()
' 'len(seq)'
100 loops, best of 3: 0.701 usec per loop
[EMAIL PROTECTED]:~$
I guess we've learned that sometimes something is faster than something
else, and other times the contrary.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
om/documents/current/api/twisted.news.nntp.NNTPClient.html
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
rceForge bug.
>
>Is this a dumb policy change or a dumb administrator action?
>
I don't know why they chose to make the sf tracker private. Maybe that
was the only way to remove write access. Python bugs are now tracked
at http://bugs.python.org/.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 31 Oct 2007 08:26:06 -0700, John Nagle <[EMAIL PROTECTED]> wrote:
>Jean-Paul Calderone wrote:
>> On Wed, 31 Oct 2007 07:53:01 -0700, John Nagle <[EMAIL PROTECTED]> wrote:
>>> I'm now getting messages like this from the Python bug tracker on
>>> S
e won't browse outdated information.
>
Though it also means all old links are broken and there's no obvious pointer to
the new information.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
nt to call a function (c.insert?).
>
>Is there some other interface/database that I might like better?
>
There are a lot of choices. Take a look, for example, at storm:
https://storm.canonical.com/
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
s I'm concerned marshal.load is not any
>more insecure than file.read.
You're mistaken.
$ python
Python 2.4.3 (#2, Oct 6 2006, 07:52:30)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license&quo
On Thu, 01 Nov 2007 21:15:06 -, Aaron Watters <[EMAIL PROTECTED]> wrote:
>On Nov 1, 4:59 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
>> On Thu, 01 Nov 2007 20:35:15 -, Aaron Watters <[EMAIL PROTECTED]> wrote:
>> >On Nov 1, 2:15 pm, Raymond
150
200
250
300
350
400
450
500
550
600
650
700
750
Exception raised: can't start new thread
Biggest number of threads: 764
[EMAIL PROTECTED]:~$
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
;,'j','k','l','m','n']:
> self.__dict__[name] = locals()[name]
>
>This saves a lot of code and makes it easier to see what is going on,
>but it seems like there should be a better idiom for this task. Any
>suggestions?
I use a helper, like
http://divmod.org/trac/browser/trunk/Epsilon/epsilon/structlike.py#L35
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
me way to transparently save
>and restore context over a yield, but I don't see an easy way to do
>this.
Wrap the generator in a function which co-operates with your context
managers to clean-up or re-instate whatever they are interacting with
whenever execution leaves or re-enters the generator.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
ddress.. and yeah, i've tried changing the address a
>number of times..
IRC bans can cover a wide range of addresses. Someone else on your ISP may
have abused the channel badly enough to get a large range of addresses, maybe
every address you could possibly get, banned from the channel.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
will.
Grab the gdbinit out of Python SVN Misc/ directory. Apply this patch:
http://jcalderone.livejournal.com/28224.html
Attach to the process using gdb. Make sure you have debugging symbols
in your build of Python. Run 'thread apply all pystack'.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
this, you may as well not even bother to do the
decoding in the first place, unless you have some code in between the input
and output steps which manipulates the unicode in some way.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
"copyright", "credits" or "license" for more information.
>>> import os
>>> import datetime
>>> datetime.date.fromtimestamp(os.path.getctime('.'))
datetime.date(2007, 1, 17)
>>>
[EMAIL PROTECTED]:~$ ls -ld .
drwxr-xr-x 93 exarkun exarkun 8192 2007-01-17 10:34 .
[EMAIL PROTECTED]:~$
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
recognizable and only rename or move them to their final location when they
have been completely written.
For example, name files ".new" as they are being written. When they are fully
written, drop the ".new" suffix. On the reader side, ignore any file with a
name ending in ".new".
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
ned before, if you use the Twisted wrapper and let
>> Twisted handle network stuff you should be fine.
>
> That would mean struggling with Twisted and dealing with its bugs.
>(For example, has the MySQLdb mess been resolved for Twisted's API?)
http://twistedmatrix
27;,
'[EMAIL PROTECTED]',
'[EMAIL PROTECTED]',
messageText,
contextFactory=contextFactory)
reactor.connectTCP('smtp.gmail.com', 25, factory)
result.addCallback(lambda ign: reactor.stop())
reactor.run()
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 23 Jan 2007 23:48:59 GMT, py <[EMAIL PROTECTED]> wrote:
>Hi, Jean Paul.
>
>I read your code with interest. I wonder, does twisted also raise the socket
>error or does it know
>about this apparently well-known and often ignored incompatibility between th
Sebastian Bassi a écrit :
> Hello,
>
> I found http://www2.sfk.nl/svg as a Python module for writing SVG.
> Last update was in 2004 and I am not sure if there is something
> better.
> Any recommendation for generating SVG graphics?
I have ported to Python the Ruby SVG graph generation library
htt
, x()].sort()
>>> [z(), z(), z()].sort()
>>> [y(), y(), y()].sort()
yes
yes
>>>
So, if you implement __gt__, max will work right. If you also implement
__le__, sorting will work right. Your best bet is probably to implement
all of the rich comparison methods.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
o the
stand-alone Spidermonkey runtime. However, it lacks the DOM APIs, so
it may not be able to run the JavaScript you are interested in running.
There are a couple other JavaScript runtimes available, at least. If
Spidermonkey is not suitable, you might look into one of them.
Jean-Paul
--
http:
ileobj(fsrc, fdst)
finally:
if fdst:
fdst.close()
if fsrc:
fsrc.close()
The problem you are experiencing must have a different cause.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
integer | floatnumber |
>imagnumber
>
>An integer is a primary so 2.__add(1) should be valid.
A float is, too. 2.__add is a float followed by an identifier.
Not legal. As pointed out elsewhere in the thread, (2). forces
it to be an integer followed by a ".".
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
901 - 1000 of 1970 matches
Mail list logo