On Tue, Oct 13, 2009 at 11:55 PM, Andre Engels andreeng...@gmail.com wrote:
for i in range(sys.maxint):
if i % 100 == 0:
print i
Grmbl cut-and-paste error... I meant of course:
for i in xrange(sys.maxint):
if i % 100 == 0:
print i
--
André Engels,
Christopher Lloyd wrote:
Hello all,
I'm new to Python and new to this list, although I've done some digging in the
archives and already read up on the problem I'm about to describe.
I'm a relatively inexperienced programmer, and have been learning some basic C++ and
working through the demos
On Oct 13, 11:27�am, Ethan Furman et...@stoneleaf.us wrote:
Mensanator wrote:
On Oct 13, 3:44 am, John Reid j.r...@mail.cryst.bbk.ac.uk wrote:
while not done:
seems very dangerous to me as you'd have to
del done
before writing the same construct again. That's the sort of thing that
On Oct 12, 4:59�pm, David C Ullrich ullr...@math.okstate.edu wrote:
kj wrote:
I'm coaching a group of biologists on basic Python scripting. �One
of my charges mentioned that he had come across the advice never
to use loops beginning with while True. �Of course, that's one
way to start an
On Tue, 13 Oct 2009 12:59:47 -0700, Paul Rubin wrote:
sturlamolden sturlamol...@yahoo.no writes:
The obvious way to compute a running median involves a tree structure
so you can quickly insert and delete elements, and find the median.
That would be asymtotically O(n log n) but messy to
On Tue, 13 Oct 2009 22:17:58 +0100, Peng Yu pengyu...@gmail.com wrote:
The following code does not run because range() does not accept a big
number. Is there a way to make the code work. I'm wondering if there
is a way to write a for-loop in python similar to that of C style.
xrange()
Have
On Oct 13, 11:57 am, sturlamolden sturlamol...@yahoo.no wrote:
On 13 Okt, 18:33, Paul Rubin http://phr...@nospam.invalid wrote:
The obvious way to compute a running median involves a tree structure
so you can quickly insert and delete elements, and find the median.
That would be
Has anyone looked at/installed NeatX?
http://code.google.com/p/neatx/
It's an X protocol compressor mostly written in Python. I thought some here
might have experimented with it. If you have tried it, I'd like to hear
your experiences.
--
Skip Montanaro - s...@pobox.com -
In article 7c2aedb4-9341-4b02-98a5-9d4332c5e...@f10g2000vbl.googlegroups.com,
Mensanator mensana...@aol.com wrote:
On Oct 13, 2:01=EF=BF=BDpm, a...@pythoncraft.com (Aahz) wrote:
In article 39b1ba4d-be69-477d-8baa-e65465bea...@a7g2000yqo.googlegroups.=
com,
Mensanator =EF=BF=BDmensana...@aol.com
Steven D'Aprano wrote:
The best I
have seen is that loops should have a single entry point and a single
exit point, to make it easier to reason about pre- and post-conditions.
But frankly I'm not convinced that's true -- or at least, multiple exists
shouldn't *necessarily* leader to
Chris Rebert wrote:
On Mon, Oct 12, 2009 at 7:04 PM, Steven D'Aprano
ste...@remove.this.cybersource.com.au wrote:
This can be simplified to:
return cmp((self._a, self._b), (other._a, other._b))
Assuming you're not using Python 3.x that is.
If you're using Python 3, you won't be writing a
Rustom Mody wrote:
Context: I am trying to generate some python code and its
indentation=structure is giving me a headache!
When I generate Python code (or anything else with an
indented structure) I usually define myself a class with
a method for writing out a line, and a pair of methods
for
Terry Reedy wrote:
Every function with default arguments can be called two or more ways.
Every function that returns None can be written two or more ways.
And in general, anything of any sort with any kind of
default can be written in two ways. Somehow I doubt that
the ZoP was intended to
On Oct 13, 6:12 pm, Peter Otten __pete...@web.de wrote:
Janto Dreijer wrote:
I'm looking for code that will calculate the running median of a
sequence, efficiently. (I'm trying to subtract the running median from
a signal to correct for gradual drift).
My naive attempt (taking the median
On Tue, Oct 13, 2009 at 20:05, Aahz a...@pythoncraft.com wrote:
There's no point in trying to reason with a Muslim.
That's not funny, and if you were being serious, that was incredibly
rude.
Not as much as posting in comp.lang.python.
What exactly are you claiming is rude?
This entire
On Oct 13, 5:38�pm, Rhodri James rho...@wildebst.demon.co.uk
wrote:
On Tue, 13 Oct 2009 22:59:04 +0100, Mensanator mensana...@aol.com wrote:
And I'm not saying John nor the OP should stop
using what works for them. But there are certainly
valid reasons for don't use while True to be
on
On Oct 13, 2009, at 17:51 , J wrote:
On Tue, Oct 13, 2009 at 20:05, Aahz a...@pythoncraft.com wrote:
There's no point in trying to reason with a Muslim.
That's not funny, and if you were being serious, that was
incredibly
rude.
Not as much as posting in comp.lang.python.
What exactly
Bash is easy to use on manipulating files and directories (like change
name or create links, etc) and on calling external programs. For
simple functions, bash along is enough. However, bash does not support
the complex functions. Python has a richer library that could provide
support for complex
On Oct 13, 8:47�pm, Rami Chowdhury rami.chowdh...@gmail.com wrote:
On Oct 13, 2009, at 17:51 , J wrote:
On Tue, Oct 13, 2009 at 20:05, Aahz a...@pythoncraft.com wrote:
There's no point in trying to reason with a Muslim.
That's not funny, and if you were being serious, that was �
On Mon, 12 Oct 2009, Rhodri James wrote:
On Sun, 11 Oct 2009 14:18:25 +0100, John O'Hagan resea...@johnohagan.com
wrote:
Now I can change the output of the work function while it's running via
raw_input(). However it's very crude, not least because the terminal
echo of
the new options
Hi all,
Thanks in advance for any suggestions. I'm getting the following:
Exception in thread Thread-1:
Traceback (most recent call last):
File /work/tjl/apps/lib/python2.6/threading.py, line 525, in
__bootstrap_inner
self.run()
File /work/tjl/apps/lib/python2.6/threading.py, line 477,
On Oct 13, 9:13 pm, Peng Yu pengyu...@gmail.com wrote:
Bash is easy to use on manipulating files and directories (like change
name or create links, etc) and on calling external programs. For
simple functions, bash along is enough. However, bash does not support
the complex functions. Python
You need to load mod_python and read the docs (or you can use CGI and make
sure apache owns the file)
On Tue, Oct 13, 2009 at 3:55 PM, Bhanu Mangipudi mbhanu...@gmail.comwrote:
Hi,
I am new to python I have few questions regarding configuring apache with
python.
I have a
You can use valgrind and attach it to python (in which you recompile python
for it...)
On Mon, Oct 12, 2009 at 9:51 PM, nitroamos nitroa...@gmail.com wrote:
Hello --
I'm a python noob, so I'm trying to figure out how to get access to
the same data I'm used to from gprof, if possible. I was
Andre Engels wrote:
[snip]
However, I think that the better Python way would be to use a generator:
def infinite_numbergenerator():
n = 0
while True:
yield n
n += 1
for i in infinite_numbergenerator():
...
That's what itertools.count() is for.
On Oct 13, 2009, at 19:15 , Mensanator wrote:
On Oct 13, 8:47�pm, Rami Chowdhury rami.chowdh...@gmail.com wrote:
On Oct 13, 2009, at 17:51 , J wrote:
On Tue, Oct 13, 2009 at 20:05, Aahz a...@pythoncraft.com wrote:
There's no point in trying to reason with a Muslim.
That's not funny, and
Matt Nordhoff wrote:
Andre Engels wrote:
[snip]
However, I think that the better Python way would be to use a generator:
def infinite_numbergenerator():
n = 0
while True:
yield n
n += 1
for i in infinite_numbergenerator():
...
That's what
En Thu, 08 Oct 2009 14:18:48 -0300, Gabriel Genellina
gagsl-...@yahoo.com.ar escribió:
En Thu, 08 Oct 2009 00:33:04 -0300, §äŽmŠÛ€vªº...@€ù€Ñ
command@alexbbs.twbbs.org escribió:
I try to call thread.interrupt_main() function in my child thread's run
method
which is inherit
En Mon, 12 Oct 2009 18:58:45 -0300, Mahi Haile
begin.middle@gmail.com escribió:
Hello all,I have an xml-rpc server running on a machine in the same LAN
as
the client. Both the server and the client are in Python.
When I have a series of xmlrepc calls from the client to the server, the
On Oct 14, 2:13 am, Peng Yu pengyu...@gmail.com wrote:
Bash is easy to use on manipulating files and directories (like change
name or create links, etc) and on calling external programs. For
simple functions, bash along is enough. However, bash does not support
the complex functions. Python
En Tue, 13 Oct 2009 23:13:24 -0300, Peng Yu pengyu...@gmail.com escribió:
Bash is easy to use on manipulating files and directories (like change
name or create links, etc) and on calling external programs. For
simple functions, bash along is enough. However, bash does not support
the complex
I have found a way around my problem.
-Tennessee
--
http://mail.python.org/mailman/listinfo/python-list
New submission from Mark Dickinson dicki...@gmail.com:
See the thread starting at:
http://mail.python.org/pipermail/python-dev/2009-October/092958.html
Eric suggested that we don't need a separate branch for this; sounds
fine to me. It should still be possible to do the backport in stages,
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
After some searching around with Google, 2- means close file
descriptor 2 (i.e., standard error).
--
nosy: +stutzbach
___
Python tracker rep...@bugs.python.org
Jesse Noller jnol...@gmail.com added the comment:
I plan on reviewing the patch once my work with PyCon is completed, which
should be within the next few weeks. The next release this would show up
in (2.7/3.2) is not for some time.
--
___
Python
Charles Cazabon charlesc-pyt...@pyropus.ca added the comment:
Okay, thanks, Jesse. Didn't realize the Con was on.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6963
___
New submission from Gerald Thaler ger...@netestate.de:
When a HTTP request done with urllib2.urlopen() gets redirected, the
second request will ignore the given timeout value and may hang
indefinitely.
--
messages: 93922
nosy: gthaler
severity: normal
status: open
title:
Jesse Noller jnol...@gmail.com added the comment:
Well, it's in feb, but I'm involved in some intense planning right now.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6963
___
Changes by Lars Gustäbel l...@gustaebel.de:
--
assignee: - lars.gustaebel
nosy: +lars.gustaebel
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7101
___
Martin v. Löwis mar...@v.loewis.de added the comment:
I'm skeptical that a backport is a useful thing. First, the handler is
primarily meant for use with PEP 383, which means that it's all
internal; few applications will ever need to use it explicitly.
Furthermore, applications/libraries that
Tarek Ziadé ziade.ta...@gmail.com added the comment:
The new issue is : #7115
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7064
___
___
Changes by Tarek Ziadé ziade.ta...@gmail.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7064
___
___
Python-bugs-list
Senthil Kumaran orsent...@gmail.com added the comment:
Can you mention the python --version in which you encountered this issue?
And piece of code which loops indefinitely?
The propagation of timeout to redirects has been fixed with Issue5102.
--
assignee: - orsenthil
nosy:
Martin v. Löwis mar...@v.loewis.de added the comment:
I'm skeptical that the patch is right (or, rather, that it is not a
compiler bug). According to
http://gcc.gnu.org/viewcvs/trunk/gcc/config/i386/i386.h?view=markup
in macro REG_CLASS_CONTENTS, the class AD_REGS includes indeed EDX and
Mark Dickinson dicki...@gmail.com added the comment:
Here's a relevant gcc bug report:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21249
As I understand it, the rules are that in 32-bit mode A means edx/eax
for a 64-bit quantity, and in 64-bit mode A means rdx/rax for a 128-bit
quantity and
Mark Dickinson dicki...@gmail.com added the comment:
I just found a more recent one:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41133
Whether this is a gcc misfeature or not, it sounds as though it's not
going to change.
Maybe there should be two separate READ_TIMESTAMP cases? One for x86
Martin v. Löwis mar...@v.loewis.de added the comment:
Looking at this further, it seems that the rdtsc code got miscompiled on
x64 for some time already. Consider this code
typedef unsigned long long uint64;
uint64 f(uint64 b)
{
uint64 a;
__asm__ __volatile__(rdtsc : =A (a));
return
Mark Dickinson dicki...@gmail.com added the comment:
As for the specific code: I'm not sure whether it's guaranteed that
you can truncate output registers in an asm. If you can't, you
should make the output registers 64-bit integers on AMD64.
Specifying eax and edx directly, rather than
Senthil Kumaran orsent...@gmail.com added the comment:
Windows buildbots pass for this test. Closing the issue.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7043
Mark Dickinson dicki...@gmail.com added the comment:
FWIW, the Linux source splits things up into 32-bit and 64-bit, and uses
A for 32-bit and a and d for 64-bit; their 64-bit code (after
unwinding the macros) is essentially identical to the code in the patch.
See
Antoine Pitrou pit...@free.fr added the comment:
It occurs weaksets have the same problem, here is a new patch fixing
them as well.
--
Added file: http://bugs.python.org/file15114/weakiter3.patch
___
Python tracker rep...@bugs.python.org
New submission from Jon Nelson jnel...@users.sourceforge.net:
import os
try:
from email.mime.multipart import MIMEMultipart
except ImportError:
from email.MIMEMultipart import MIMEMultipart
m = MIMEMultipart('form-data')
print m.items()
m.as_string()
print m.items()
print out:
Jeff Senn s...@users.sourceforge.net added the comment:
Has there been any action on this? a PEP?
I disagree that using ICU is good way to simply get proper
unicode casing. (A heavy hammer for a small task...)
I agree locales are a different issue (and would prefer
optional arguments to the
Mark Dickinson dicki...@gmail.com added the comment:
simplify the code by directly outputting to (int*)v and
((int*)v)[1];
This does indeed seem to produce better compiler output, at least under
Apple gcc-4.0.1, Apple gcc-4.2.1, and non-Apple gcc-4.4.1.
Here's a revised patch, which also
Mark Dickinson dicki...@gmail.com added the comment:
Whoops. Wrong patch. Here's the right one.
--
Added file: http://bugs.python.org/file15116/tsc2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6603
Changes by Mark Dickinson dicki...@gmail.com:
Removed file: http://bugs.python.org/file15115/tsc2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6603
___
Mark Dickinson dicki...@gmail.com added the comment:
Aargh. I somehow deleted a backslash between testing and submitting that
patch. Sorry.
Third time lucky.
--
Added file: http://bugs.python.org/file15117/tsc3.patch
___
Python tracker
adgprogramming knd_a...@yahoo.com added the comment:
Here is what happened to me. See the attachment.
P.S.: I launched the installer and hit repair. Everything went fine in
the installer, but the problem still occured.
Should I upgrade to 3.11?
If I have to make a change in the source code
adgprogramming knd_a...@yahoo.com added the comment:
Oh! And my OS is Windows XP SP3 Media Center Edition Version.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6941
___
Tarek Ziadé ziade.ta...@gmail.com added the comment:
Added complementary fix in r75395
--
nosy: +pje
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7115
___
Koen van de Sande k...@tibed.net added the comment:
It may actually be enough to just place the
Microsoft.VC90.CRT.manifest file into the Python folder (the one with
python.exe and the CRT DLLs).
I concur with what Christoph says, that is how the embedded
installation works. However, the
Martin v. Löwis mar...@v.loewis.de added the comment:
I have a half finished implementation of this, in case anyone
is interested.
Feel free to upload it here. I'm fairly skeptical that it is
possible to implement casing correctly in a locale-independent
way.
--
Martin v. Löwis mar...@v.loewis.de added the comment:
The patch is fine, please apply (notice that the 2.6 branch is closed for
anything but 2.6.3 regressions right now, so you may want to defer this
after 2.6.4).
--
assignee: loewis - mark.dickinson
resolution: - accepted
Antoine Pitrou pit...@free.fr added the comment:
Please note that normally an error message is output, but of course it
doesn't display since stderr is invalid :-)
It's clearer if you close stdout instead:
$ ./python -c 'pass' -
Fatal Python error: Py_Initialize: can't initialize sys standard
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Fixed with r75396 (trunk) and r75397 (py3k)
I'll check with the buildbots before I close this issue.
--
resolution: - fixed
status: open - pending
___
Python tracker rep...@bugs.python.org
Terrence Cole terre...@zettabytestorage.com added the comment:
I get the same results on:
Python 2.6.2 (r262:71600, Sep 14 2009, 18:47:57)
[GCC 4.3.2] on linux2
I think this is the same issue I was seeing yesterday. You can exercise
the issue and cause an exception with just 6 lines:
#
Marc-Andre Lemburg m...@egenix.com added the comment:
Amaury Forgeot d'Arc wrote:
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Fixed with r75396 (trunk) and r75397 (py3k)
Thanks, Amaury.
I'll check with the buildbots before I close this issue.
--
status: pending -
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
Is it even possible to portably test the validity of a file descriptor
without trying to write/read it?
When I first saw this bug, my gut feeling was well, don't do that
then! However, I then recalled that Windows GUI
Terrence Cole terre...@zettabytestorage.com added the comment:
When a manager receives a message, it unpickles the arguments; this
calls BaseProxy.__reduce__, which calls RebuildProxy. If we are in the
manager, this returns the actual object, otherwise it returns a new
proxy. If we naively
New submission from Guido van Rossum gu...@python.org:
Following my own (Twitter) advice I downloaded the 2.6.4rc1 release
candidate and installed it on my x86 iMac running OS X 10.5.8, and tried
to run a Google App Engine app with it. Google App Engine prefers Python
2.5, but so far it has
Bonnie Douglas bonnie.doug...@biarri.com added the comment:
The only other thing that I've done is change my firewall software.
I use Bullguard. I had to use the Custom Security settings for the
Firewall, but set it to always allow pythonw.exe and python.exe access
to all ports.
A colleague of
Guido van Rossum gu...@python.org added the comment:
FWIW, I've ruled out App Engine SDK 1.2.6 as the source of the regression;
on a MacBook Pro with the same OS 10.5.8 I get a similar traceback with
SDK 1.2.6.
--
___
Python tracker
Guido van Rossum gu...@python.org added the comment:
The full traceback had probably 1000 lines (or whatever the limit is); the
piece between two calls to logging.warn() is repeated over and over.
--
___
Python tracker rep...@bugs.python.org
Philip Jenvey pjen...@underboss.org added the comment:
App engine shows up after every import statement, so it must have some
kind of import hook -- which can do evil things
--
nosy: +pjenvey
___
Python tracker rep...@bugs.python.org
Changes by Philip Jenvey pjen...@underboss.org:
--
nosy: +vinay.sajip
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7120
___
___
Python-bugs-list
Guido van Rossum gu...@python.org added the comment:
Yes, App Engine uses a PEP 302 style import hook to implement the sandbox.
Could it be that there's a new module dependency introduced by 2.6.3-4?
--
___
Python tracker rep...@bugs.python.org
Benjamin Peterson benja...@python.org added the comment:
While I am not able to reproduce this by running 1.2.6 on Gentoo Linux
with Rietveld, I will make an educated guess that it is the from
multiprocessing import current_process line in r75130. I doubt this
module is available on app engine,
Changes by Sridhar Ratnakumar sridh...@activestate.com:
--
nosy: +srid
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6403
___
___
Python-bugs-list
Terrence Cole terre...@zettabytestorage.com added the comment:
The tests for the SyncManager are being automagically generated at
import time -- I was not quite able to follow that well enough to know
exactly what is getting tested, or if they are even enabled. It did not
appear to contain any
Jesse Noller jnol...@gmail.com added the comment:
Yeah, the auto-generation is too clever and needs to be pulled out
entirely.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6766
___
Guido van Rossum gu...@python.org added the comment:
The dependency of logging on multiprocessing feels backwards. But it's
not actually a new regression, it seems that was there in 2.6.2.
--
___
Python tracker rep...@bugs.python.org
Changes by Brett Cannon br...@python.org:
--
nosy: -brett.cannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6941
___
___
Python-bugs-list
Guido van Rossum gu...@python.org added the comment:
The addition of multiprocessing support to logging seems to have happened
in 2.6.2; bad timing for a feature. :-(
--
title: 2.6.4rc1 regression - logging depends on multiprocessing
___
Python
New submission from mike mikez...@gmail.com:
There's a python program in the attached file http.py, I import
urllib.request in http.py, and urllib.request imports http.client.
When I try to run http.py by command python http.py, the error is as
below:
Traceback (most recent call last):
Ezio Melotti ezio.melo...@gmail.com added the comment:
Your file is named 'http.py'. When urllib.request tries to import
http.client your file (D:\program\python\http.py) is picked up first
instead of the right one ('C:\Program Files\Python311\lib\http\client.py').
Your file is then executed
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:
I propose to fix it by just setting logRecord.processName to None for
now, which is what should happen if multiprocessing isn't available.
In environments where multiprocessing is not available,
logging.logMultiprocessing should be False,
101 - 186 of 186 matches
Mail list logo