Hi all,
I am pleased to announce the release of Distribute 0.6.
Distribute is a friendly fork of the Setuptools project.
You can get more info, download it and install it using the
instructions from its PyPI page :
http://pypi.python.org/pypi/distribute
---
CHANGES (compared to setuptools
On Aug 8, 9:08 pm, Brian Allen Vanderburg II
brianvanderbu...@aim.com wrote:
I've coded my own 'relpath' implementation for 2.5 (shown below) and I
want to make sure it follows as closely as it should to 2.6 and later.
I've got a question regarding that. When attempting to convert to a
-On [20090808 20:07], Thorsten Kampe (thors...@thorstenkampe.de) wrote:
In real life people won't even notice whether an application takes one or
two minutes to complete.
I think you are quite wrong here.
I have worked with optical engineers who needed to calculate grating numbers
for their
On Sat, 08 Aug 2009 12:11:19 +, kj wrote:
In mailman.4446.1249683227.8015.python-l...@python.org Chris Rebert
c...@rebertia.com writes:
The double-underscores indicate that the Python interpreter itself
usually is the caller of the method, and as such some level of magic
may be associated
On Sat, 08 Aug 2009 20:27:49 +0100, Mark Lawrence wrote:
Further, I have seen many requests here which are nothing really to do
with Python, say a query about which algorithm to use. Response Not
really a Python question, but try Put the same question on (say)
the C ng and you'd be
How can I watch the messages being sent back and for on urllib shttp
requests? If it were simple http I would just watch the socket traffic
but of course that won't work for https. Is there a debug flag I can
set that will do this?
context: I am dealing with a web service bug and I want to
On Sat, 08 Aug 2009 19:00:11 +0200, Thorsten Kampe wrote:
I was running it one million times to mitigate influences on the timing
by other background processes which is a common technique when
benchmarking.
Err, no. That is what repeat is for and it defaults to 3 (This means
that other
m...@pixar.com wrote:
How can I watch the messages being sent back and for on urllib shttp
requests? If it were simple http I would just watch the socket traffic
but of course that won't work for https. Is there a debug flag I can
set that will do this?
context: I am dealing with a web
I will be receiving data serially from another pc,.i can use any sort of
marker between two packets,i will be the person sending data as well after
reading it from some devices.But packet length is not constant.
each packet has this format:
201.535a56.65b4.56c89.565d
another packet could be :
Hi,
Need help in configure the TimedRotatingFileHandler from configuration
file
I have tried with the below code and ended up with the error, code is
pasted below
Error - IOError: [Errno 2] No such file or directory: 'G:\\lok_sib\
\logs\rotate_test'
[loggers]
keys=root,simpleExample
[handlers]
I working on a resume upload script and encountered the following
problems
sql: Could not decode to UTF-8 column 'SUBSTR(picture,?)' with text
'\ufffd\ufff
d\ufffd\ufffd↑!ExifEf1gL6KM7Ij5ae0gL6KM7cH2cH2GI3
Content-Disposition: form-data; name=Filename
DSC00013.JPG
Ef1
Greetings everybody,
I don't quite understand why if I do this:
d = {}
exec(dir(), d)
1) d is no longer empty
2) the content of d now looks like __builtins__.__dict__ but isn't
quite it d == __builtins__.__dict__ returns false.
Can anybody shed some light?
Manu
--
Emanuele D'Arrigo wrote:
Greetings everybody,
I don't quite understand why if I do this:
d = {}
exec(dir(), d)
1) d is no longer empty
2) the content of d now looks like __builtins__.__dict__ but isn't
quite it d == __builtins__.__dict__ returns false.
Can anybody shed some light?
Emanuele D'Arrigo schrieb:
Greetings everybody,
I don't quite understand why if I do this:
d = {}
exec(dir(), d)
1) d is no longer empty
2) the content of d now looks like __builtins__.__dict__ but isn't
quite it d == __builtins__.__dict__ returns false.
Can anybody shed some light?
RTFM
On Sunday 09 August 2009 03:20:12 nipun batra wrote:
On Sun, Aug 9, 2009 at 2:11 AM, Chris Rebert c...@rebertia.com wrote:
On Sat, Aug 8, 2009 at 12:34 PM, nipun batranipunredde...@gmail.com
wrote:
Hi,
How can we access serial port using usb-serial converters,using python
in linux.
Here's what I have so far:
import urllib
class AppURLopener(urllib.FancyURLopener):
version = App/1.7
referrer = None
def __init__(self, *args):
urllib.FancyURLopener.__init__(self, *args)
if self.referrer:
addheader('Referer', self.referrer)
gert schrieb:
I working on a resume upload script and encountered the following
problems
sql: Could not decode to UTF-8 column 'SUBSTR(picture,?)' with text
'\ufffd\ufff
d\ufffd\ufffd↑!ExifEf1gL6KM7Ij5ae0gL6KM7cH2cH2GI3
Content-Disposition: form-data; name=Filename
You are
On Aug 9, 3:17 pm, Diez B. Roggisch de...@nospam.web.de wrote:
gert schrieb:
I working on a resume upload script and encountered the following
problems
sql: Could not decode to UTF-8 column 'SUBSTR(picture,?)' with text
'\ufffd\ufff
On Sun, 09 Aug 2009 06:13:38 -0700, samwyse wrote:
Here's what I have so far:
import urllib
class AppURLopener(urllib.FancyURLopener):
version = App/1.7
referrer = None
def __init__(self, *args):
urllib.FancyURLopener.__init__(self, *args)
if self.referrer:
gert schrieb:
On Aug 9, 3:17 pm, Diez B. Roggisch de...@nospam.web.de wrote:
gert schrieb:
I working on a resume upload script and encountered the following
problems
sql: Could not decode to UTF-8 column 'SUBSTR(picture,?)' with text
'\ufffd\ufff
On Sun, Aug 9, 2009 at 5:13 PM, Lokeshlokeshmarema...@gmail.com wrote:
Hi,
Need help in configure the TimedRotatingFileHandler from configuration
file
I have tried with the below code and ended up with the error, code is
pasted below
Error - IOError: [Errno 2] No such file or directory:
09-08-2009 Lokesh lokeshmarema...@gmail.com wrote:
I have tried with the below code and ended up with the error, code is
pasted below
Error - IOError: [Errno 2] No such file or directory: 'G:\\lok_sib\
\logs\rotate_test'
Note that: '\r' is listed (interpreted by Python as 'carriage return'
Hi,
I am writing a HTTP client in Twisted. The client contacts the
server, and any errors in the sent messages will be returned back to
the client in 400 message. The reason for failure at the server is
sent as the text in the 400 message. I tried the same using the
browser, and I can see the
On Aug 8, 12:43 pm, Jan Kaliszewski z...@chopin.edu.pl wrote:
08-08-2009 Steven D'Aprano st...@remove-this-cybersource.com.au wrote:
...(snip)
I use it very often, e.g.:
afunction('quite long string %s quite long string '
'quite long string quite long string %s '
On 03:35 pm, koranth...@gmail.com wrote:
Hi,
I am writing a HTTP client in Twisted. The client contacts the
server, and any errors in the sent messages will be returned back to
the client in 400 message. The reason for failure at the server is
sent as the text in the 400 message. I tried the
Hello list,
I've written a small Client/server system.
Basically, i'm expecting something like : The client sends every once
and a while a small data chunk (not more than 50 bytes) the server
receive it and print it.
Here is the server request handler :
class
nipun batra wrote:
I will be receiving data serially from another pc,.i can use any sort of
marker between two packets,i will be the person sending data as well after
reading it from some devices.But packet length is not constant.
each packet has this format:
201.535a56.65b4.56c89.565d
another
r wrote:
On Aug 8, 12:43 pm, Jan Kaliszewski z...@chopin.edu.pl wrote:
(Note that multiline-'''-strings are usless in such cases).
uhh? A much better way to handle such a problem is like this...
prompt1 = '''
Some people like to use %s
ways of doing things just
so they can support
09-08-2009 r rt8...@gmail.com wrote:
On Aug 8, 12:43 pm, Jan Kaliszewski z...@chopin.edu.pl wrote:
08-08-2009 Steven D'Aprano st...@remove-this-cybersource.com.au wrote:
...(snip)
I use it very often, e.g.:
afunction('quite long string %s quite long string '
Hello, I've written two classes. One class describes experts: experts
has a unique ID and a name. An expert knows topics and other experts. A
topic is described by my other class and includes a unique ID and a
name. Now I have a problem with the __str__ method in my Expert class:
def
def __str__(self):
output = '%s:%s' % (self.expert_id, self.name)
output += '\nKnown topics: %s' % (', '.join(str(self.topics)))
You're turning your list into a string -- try this:
', '.join([str(x) for x in self.topics])
--
http://mail.python.org/mailman/listinfo/python-list
output += '\nKnown topics: %s' % (', '.join(str(self.topics)))
Your problem is here.
self.topics is a list of topic instances: but you're calling str() on the
list itself to turn the LIST itself into a string. Compare:
x = [1,2,3]
x
[1, 2, 3]
str(x)
'[1, 2, 3]'
Now, after
jon rascal wrote:
You're turning your list into a string -- try this:
', '.join([str(x) for x in self.topics])
Thanks for your quick reply, unfortunately it didn't quite work for me.
Say topics contain two topics: polemics, and the parthenon I get this
output:
e2:Carla
Known topics:
On Aug 9, 4:42 pm, Diez B. Roggisch de...@nospam.web.de wrote:
gert schrieb:
On Aug 9, 3:17 pm, Diez B. Roggisch de...@nospam.web.de wrote:
gert schrieb:
I working on a resume upload script and encountered the following
problems
sql: Could not decode to UTF-8 column
only the first topic is printed. If topics only contain a single topic I
get this error:
Traceback (most recent call last):
File C:\Users\fencer\workspace\Find Expert\src\find_expert.py, line 57,
in module
print experts[1]
File C:\Users\fencer\workspace\Find Expert\src\find_expert.py,
Fencer wrote:
jon rascal wrote:
You're turning your list into a string -- try this:
', '.join([str(x) for x in self.topics])
Thanks for your quick reply, unfortunately it didn't quite work for me.
Say topics contain two topics: polemics, and the parthenon I get this
output:
e2:Carla
Known
gert schrieb:
On Aug 9, 4:42 pm, Diez B. Roggisch de...@nospam.web.de wrote:
gert schrieb:
On Aug 9, 3:17 pm, Diez B. Roggisch de...@nospam.web.de wrote:
gert schrieb:
I working on a resume upload script and encountered the following
problems
sql: Could not decode to UTF-8 column
MRAB wrote:
Try printing self.topics. It should always be a list of topics.
Ah, yes, that made me find a bug when I was creating the Expert objects:
the lists of known topics were not created properly. I should have
posted more code I suppose! Thanks for the help, this problem has now
been
Hi,
I want to monkeypatch an object so that it becomes callable, although
originally it is not meant to be. (Yes, I think I do have a good reason
to do so).
But simply adding a __call__ attribute to the object apparently isn't
enough, and I do not want to touch the class object (since it would
A friend of mine is just learning Python, and he's a bit tweaked about
how unrecognized escape sequences are treated in Python. This is from
the Python 3.0 reference manual:
Unlike Standard C, all unrecognized escape sequences are left in
the string unchanged, i.e.,
the backslash is
Fencer no.i.d...@want.mail.from.spammers.com (F) wrote:
F Also, notice the code I've commented out. If I can get the join above to
F work (with your help) my next question is how to present the known experts
F in a comma separated list with only expert_id and name? I can't use the
F normal
Hi:
I get a ton of warnings like this from a program I run:
Warning (from warnings module):
File C:\Python25\read.py, line 67
cursor.execute(sqlKWDrop)
Warning: Unknown table 'judaism_128'
How do I surpress them?
TIA,
Victor
--
http://mail.python.org/mailman/listinfo/python-list
pybotwar is a fun and educational game where players
create computer programs to control simulated robots
to compete in a battle arena.
http://pybotwar.googlecode.com/
pybotwar uses pybox2d for the physical simulation,
and uses pygame and pygsear for the visualization.
pybotwar is released
Nikolaus Rath schrieb:
Hi,
I want to monkeypatch an object so that it becomes callable, although
originally it is not meant to be. (Yes, I think I do have a good reason
to do so).
But simply adding a __call__ attribute to the object apparently isn't
enough, and I do not want to touch the class
On Aug 9, 12:10 pm, Jan Kaliszewski z...@chopin.edu.pl wrote:
..(snip)
Sorry, you are wrong, '''-way would be usefull only if:
* you want to have '\n' in each place where you wrap the
literal in your code,
and
* you use '''-literal at a module (non-indented) level
On Aug 7, 4:53 pm, kj no.em...@please.post wrote:
Suppose that x is some list. To produce a version of the list with
duplicate elements removed one could, I suppose, do this:
x = list(set(x))
but I expect that this will not preserve the original order of
elements.
I suppose that I
Lokesh wrote:
Hi,
Need help in configure the TimedRotatingFileHandler from configuration
file
I have tried with the below code and ended up with the error, code is
pasted below
Error - IOError: [Errno 2] No such file or directory: 'G:\\lok_sib\
\logs\rotate_test'
[loggers]
#-- el bueno --#
hello i am a very long string that\
does not like newlines so please \
escape me, Thank you!
#-- el malo --#
hello i am a very long string that+
does not like newlines but i have no+
idea what to do with myself
#-- el feo --#
hello i am a very long string that
does not like
On Aug 9, 8:25 pm, Diez B. Roggisch de...@nospam.web.de wrote:
gert schrieb:
On Aug 9, 4:42 pm, Diez B. Roggisch de...@nospam.web.de wrote:
gert schrieb:
On Aug 9, 3:17 pm, Diez B. Roggisch de...@nospam.web.de wrote:
gert schrieb:
I working on a resume upload script and encountered
On Aug 9, 12:02 pm, Nikolaus Rath nikol...@rath.org wrote:
Hi,
I want to monkeypatch an object so that it becomes callable, although
originally it is not meant to be. (Yes, I think I do have a good reason
to do so).
But simply adding a __call__ attribute to the object apparently isn't
On Sun, 09 Aug 2009 12:26:54 -0700, Douglas Alan wrote:
A friend of mine is just learning Python, and he's a bit tweaked about
how unrecognized escape sequences are treated in Python.
...
In any case, I think my friend should mellow out a bit, but we both
consider this something of a wart.
On Aug 9, 1:02 pm, Nikolaus Rath nikol...@rath.org wrote:
Hi,
I want to monkeypatch an object so that it becomes callable, although
originally it is not meant to be. (Yes, I think I do have a good reason
to do so).
But simply adding a __call__ attribute to the object apparently isn't
Steven D'Aprano wrote:
Why should a backslash in a string literal be an error?
Because in Python, if my friend sees the string foo\xbar\n, he has
no idea whether the \x is an escape sequence, or if it is just the
characters \x, unless he looks it up in the manual, or tries it out
in the REPL,
On Aug 9, 5:06 pm, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Sun, 09 Aug 2009 12:26:54 -0700, Douglas Alan wrote:
A friend of mine is just learning Python, and he's a bit tweaked about
how unrecognized escape sequences are treated in Python.
...
In any case, I think
On Aug 9, 3:26 pm, Lee Harr miss...@hotmail.com wrote:
pybotwar is a fun and educational game where players
create computer programs to control simulated robots
to compete in a battle arena.
http://pybotwar.googlecode.com/
Why is the doc folder empty?
Shouldn't you supply some hint on how
On Aug 9, 8:06 pm, Steven D'Aprano wrote:
while the behaviour your
friend wants is treat a backslash as an error, except for these
exceptions.
Besides, can't all error situations be described as, treat the error
situation as an error, except for the exception of when the situation
isn't an
The prob with python docs is with the python priests.
there are frequent posts about python doc's poor quality, and some
efforts to improve the doc (such as wiki or seggestions), about few
times a year (in so much as i've seen), the typical response is
pissing fight, with python priests to tell
Hi,
what is the best way to reload the module imported using 'from ...
import ...'
Is following a way to do so?
from email.charset import Charset
reload(email.charset)
Traceback (most recent call last):
File stdin, line 1, in module
NameError: name 'email' is not defined
import
Since you're talking about documentation, which is a part of python,
don't you think you should be discussing it on python-dev ?
That's where discussions about the documentation should be held.
haha - I'm just curious to see how long it will for them to
shut the discussion down.
Before you do
Hi Dave,
I have modified the code as mentioned in reply and is working fine. But
still i am facing an issue and the issue is described below.
In configuration file i have coded the TimedRotatingFileHandler like
args=(G:\\lok_sib\\logs\\rotate_test, 'D', 1)
step1: Executed the code and got the
Hi Dave,
I forgot to provide the information about the code how I am using logger
Here is the complete scenario
I have modified the code as mentioned in reply and is working fine. But
still I am facing an issue and the issue is described below.
In configuration file i have coded the
Kosta kosta.koe...@gmail.com wrote:
What I would like to do, is to open a cmd window, and start a Python
script. This script would then (based upon input arguments), build
different flavors of the driver (fre, chk, x86, x64) and do some post
processing (create cat files, sign, etc.).
I was
On Sun, 09 Aug 2009 20:43:41 -0700, AlF wrote:
Hi,
what is the best way to reload the module imported using 'from ...
import ...'
Have you tried from ... import ... again?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Algirdas Brazas li...@digital.ktu.lt wrote:
Did anyone manage to get windows extensions installet on windows 7 64 bit? As
far as I try I get only Setup program invalid or damaged.
I've been running 32-bit Python 2.5 and the 32-bit versions of PyWin32 and
wxPython on Windows 7 64-bit for many
Dave WB3DWE wrote:
Anybody tried it ?
Is anything broken, ie is the whole shootin' match good to go ?
I'm esp interested in WConio for 3.0/3.1 which I use heavily.
I've been running the 32-bit builds of Python 2.5, PyWin32, and wxPython on
Windows 7 64-bit for many months. No problems at all.
Steven D'Aprano wrote:
On Sun, 09 Aug 2009 20:43:41 -0700, AlF wrote:
Hi,
what is the best way to reload the module imported using 'from ...
import ...'
Have you tried from ... import ... again?
I have not because of an assumption that import imports the module
just once. In fact this
New submission from Aliaksandr Stelmachonak mail.ava...@gmail.com:
Currently webbrowser.py only trying to use GNOME and KDE default browser
setting. This patch adds launching Xfce default browser if xfce environment
detected.
--
components: Library (Lib)
files: webbrowser.py.patch
Changes by Antoine Pitrou pit...@free.fr:
--
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6663
___
New submission from Jan Schlüter python-b...@jan-schlueter.de:
This addresses missing statements for recognizing the Mingw compiler in
pyport.h, needed to build several extension modules on Windows using
Mingw. I will first explain the background, then indicate what needs to
be changed and
New submission from Stefan Behnel sco...@users.sourceforge.net:
Here's a simple coroutine that works perfectly in Python 2.6 but seems
to let Py3.1 enter an infinite loop that ends up eating all memory.
-
def printing_sink():
A simple sink that prints the received values.
Nir Soffer nir...@gmail.com added the comment:
Senthil said:
The way to handle this issue would be add these characters
'%/:=?~#+!$,;'@()*[]' to always_safe list.
This is wrong - for example, '=?' are NOT safe when quoting parameters
for query string. This will break exiting code that assume
Nir Soffer nir...@gmail.com added the comment:
Here is one example of code that would break if the safe parameter is
changed in a careless way mentioned here (look for url_encode):
http://dev.pocoo.org/projects/werkzeug/browser/werkzeug/urls.py#L112
I'm sure we can find similar code in every
Senthil orsent...@gmail.com added the comment:
On Sun, Aug 09, 2009 at 03:40:47PM +, Nir Soffer wrote:
for query string. This will break exiting code that assume the default
safe parameters.
Other characters may be unsafe in other parts of the url - I did not
I agree with your comments
Georg Brandl ge...@python.org added the comment:
Try list(genexp) instead of [listcomp] in 2.x and see what happens...
--
nosy: +georg.brandl
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6673
Alex Grönholm alex.gronholm+pyt...@nextday.fi added the comment:
Why has this not been resolved yet? Not having a working debugger is a
severe hindrance to the acceptance of Py3k.
--
nosy: +agronholm
___
Python tracker rep...@bugs.python.org
Georg Brandl ge...@python.org added the comment:
Attached patch confirmedly fixes this. Will commit as soon as svn is
back up.
--
assignee: - georg.brandl
keywords: +patch
nosy: +georg.brandl
Added file: http://bugs.python.org/file14679/pdb-fix.diff
Stefan Behnel sco...@users.sourceforge.net added the comment:
Hmm, ok, so this is actually an anticipated bug? And I assume this has
been discussed before and was decided to get solved by doing... what?
Is it documented somewhere why this happens and what one must avoid to
not run into this
Georg Brandl ge...@python.org added the comment:
No idea, actually. I just wanted to point out that it is nothing
specific to Python 3.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6673
78 matches
Mail list logo