Re: How to keep cookies when making http requests (Python 2.7)

2013-08-21 Thread dieter
Luca Cerone luca.cer...@gmail.com writes: ... Python has a module for cookie handling: cookielib (cookiejar in Python 3). urllib2 has a standard way to integrate with this module. However, I do not know the details (check the documentation for the modules). I have used cookielib externally to

Any Django users in Reims (France) ?

2013-08-21 Thread fabrice . romand
Bonjour, Je cherche des dev Django dans la région de Reims (France) pour organiser des rencontres sympas et échanger sur notre plateforme préférée voire développer ensemble nos excellentes idées. A votre écoute, Fabrice -- http://mail.python.org/mailman/listinfo/python-list

Basic Python Query

2013-08-21 Thread chandan kumar
Hi all, Please see the below code. class Test(threading.Thread):           def StartThread(self):        Lock = threading.Lock()         self.start()    class Test1(threading.Thread):     def __init__(self):         threading.Thread.__init__ ( self )         self.Lock = threading.Lock()

Re: Replace blanks with letter

2013-08-21 Thread eschneider92
Thanks. I am running into a bunch of problems with the following code, all of which are clear when running the program import random letters='abcdefg' blanks='_'*len(letters) print('type letters from a to g') print(blanks) for i in range(len(letters)): if letters[i] in input():

Re: How to keep cookies when making http requests (Python 2.7)

2013-08-21 Thread Luca Cerone
I have used cookielib externally to urllib2. It looks like this: from urllib2 import urlopen, Request from cookielib import CookieJar cookies = CookieJar() r = Request(...) cookies.add_cookie_header(r) # set the cookies R = urlopen(r, ...) # make the request

Re: Basic Python Query

2013-08-21 Thread Steven D'Aprano
On Wed, 21 Aug 2013 14:50:20 +0800, chandan kumar wrote: [...] 1.Difference between  def StartThread(self) and def __init__(self): __init__ is a special method called automatically by Python when you create an instance. StartThread is a method that the author of the code (perhaps you?) wrote

Re: refresing the edited python function

2013-08-21 Thread Sudheer Joseph
Thank you,     But I wish if there was a foolproof reload with best regards, Sudheer - Original Message - From: Jean-Michel Pichavant jeanmic...@sequans.com To: Sudheer Joseph sudheer.jos...@yahoo.com Cc: python-list@python.org Sent: Tuesday, 20 August 2013 10:07 PM

Re: How to keep cookies when making http requests (Python 2.7)

2013-08-21 Thread Fábio Santos
On 21 Aug 2013 09:22, Luca Cerone luca.cer...@gmail.com wrote: I have used cookielib externally to urllib2. It looks like this: from urllib2 import urlopen, Request from cookielib import CookieJar cookies = CookieJar() r = Request(...)

Re: Basic Python Query

2013-08-21 Thread Ulrich Eckhardt
Am 21.08.2013 08:50, schrieb chandan kumar: class Test(threading.Thread): def StartThread(self): Lock = threading.Lock() self.start() Inconsistently indented code, this is a killer for Python. Please read PEP8 and use four spaces! That said, there is never a need for

Re: Replace blanks with letter

2013-08-21 Thread Chris Angelico
On Wed, Aug 21, 2013 at 5:49 PM, eschneide...@comcast.net wrote: Thanks. I am running into a bunch of problems with the following code, all of which are clear when running the program Some of us don't have time to just execute arbitrary code in some safe environment, so we'd REALLY rather

Matrix sort

2013-08-21 Thread vijayendramunikoti
Hi I have a matrix of numbers representing the nodal points as follows: Element No.Nodes 1 1 2 3 4 2 5 6 7 8 3 2 3 9 10 ... ... x 9 10 11 12 ... so this is

How to change scrollbar color in pygtk ?

2013-08-21 Thread Norah Jones
Hi, I Tried the below code, the color is not reflected, Am i missing something? #add description box beside test cases testCaseDescWindow = gtk.ScrolledWindow() testCaseDescWindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)

Re: default python os x

2013-08-21 Thread Cameron Simpson
On 20Aug2013 09:01, Uwe Rangs uwe.ra...@fernuni-hagen.de wrote: | Ah, I see. Thank you! Please don't top post. Thanks. | On 2013-08-20 05:39:56 +, Steven D'Aprano said: | alias python1.5='env -u PYTHONSTARTUP python1.5' I should point out that -u is a GNU env feature. It is not portable,

Re: Matrix sort

2013-08-21 Thread Oscar Benjamin
On 21 August 2013 10:24, vijayendramunik...@gmail.com wrote: Hi I have a matrix of numbers representing the nodal points as follows: Element No.Nodes 1 1 2 3 4 2 5 6 7 8 3 2 3 9 10 ...

Re: Replace blanks with letter

2013-08-21 Thread Dave Angel
eschneide...@comcast.net wrote: Thanks. I am running into a bunch of problems with the following code, all of which are clear when running the program import random letters='abcdefg' blanks='_'*len(letters) print('type letters from a to g') print(blanks) for i in range(len(letters)):

Create an App with Python Win $5000

2013-08-21 Thread yigit
Hi all, JotForm just announced its developer contest with their newly released API with a grand prize of $5000 to the best app and $500 for other categories. The API library can be used with Python so you can create endless apps with it. The deadline for the contest is September 24, 2013.

Re: Replace blanks with letter

2013-08-21 Thread John Gordon
In 89146bb1-fb60-4746-93e2-6cb59cfbc...@googlegroups.com eschneide...@comcast.net writes: Thanks. I am running into a bunch of problems with the following code, all of which are clear when running the program No, they're not clear. We can see what the code does, obviously, but we don't know

I wonder if I would be able to collect data from such page using Python

2013-08-21 Thread Comment Holder
Hi, I am totally new to Python. I noticed that there are many videos showing how to collect data from Python, but I am not sure if I would be able to accomplish my goal using Python so I can start learning. Here is the example of the target page: http://and.medianewsonline.com/hello.html In

Re: I wonder if I would be able to collect data from such page using Python

2013-08-21 Thread Joel Goldstick
On Wed, Aug 21, 2013 at 10:55 AM, Comment Holder commenthol...@gmail.com wrote: Hi, I am totally new to Python. I noticed that there are many videos showing how to collect data from Python, but I am not sure if I would be able to accomplish my goal using Python so I can start learning.

Re: I wonder if I would be able to collect data from such page using Python

2013-08-21 Thread Comment Holder
Many thanks Joel, You are right to some extent. I come from Finance background, but I am very familiar with what could be referred to as non-native languages such as Matlab, VBA,.. actually, I have developed couple of complete programs. I have asked this question, because I am a little worried

Re: I wonder if I would be able to collect data from such page using Python

2013-08-21 Thread Joel Goldstick
On Wed, Aug 21, 2013 at 11:44 AM, Comment Holder commenthol...@gmail.com wrote: Many thanks Joel, You are right to some extent. I come from Finance background, but I am very familiar with what could be referred to as non-native languages such as Matlab, VBA,.. actually, I have developed

Unpickling data with classes from dynamic modules

2013-08-21 Thread Fredrik Tolf
Dear list, I have a system in which I load modules dynamically every now and then (that is, creating a module with types.ModuleType, compiling the code for the module and then executing it in the module with exec()), and where I would wish to be able to have classes in those modules

A data transformation framework. A presentation inviting commentary.

2013-08-21 Thread F.R.
Hi all, In an effort to do some serious cleaning up of a hopelessly cluttered working environment, I developed a modular data transformation system that pretty much stands. I am very pleased with it. I expect huge time savings. I would share it, if had a sense that there is an interest out

Re: refresing the edited python function

2013-08-21 Thread Piet van Oostrum
Dave Angel da...@davea.name writes: Seems to me your problem is with ipython's IDE, not with Python. Python requires you to rerun your application when making most changes to code. But it doesn't say anything about restarting a console, whatever that is in this context. I use Komodo IDE

Re: Encapsulation unpythonic?

2013-08-21 Thread random832
On Mon, Aug 19, 2013, at 3:05, Steven D'Aprano wrote: In this toy example, both parties are at fault: the author of Parrot for unnecessary data-hiding of something which is so obviously a useful piece of information and should be part of the public interface, It may wish to be notified when

Re: PEPs should be included with the documentation download

2013-08-21 Thread Chris Angelico
On Wed, Aug 21, 2013 at 3:14 PM, Aseem Bansal asmbans...@gmail.com wrote: Currently the documentation download includes a lot of things but PEPs are not its part. I wanted to suggest that PEPs should be included in the download. They are very much relevant to Python. The PEPs are kinda like

Re: I wonder if I would be able to collect data from such page using Python

2013-08-21 Thread Comment Holder
Dear Joel, Many thanks for your help - I think I shall start with this way and see how it goes. My concerns were if the task can be accomplished with Python, and from your posts, I guess it can - so I shall give it a try :). Again, thanks a lot all best// --

Re: I wonder if I would be able to collect data from such page using Python

2013-08-21 Thread Joel Goldstick
On Wed, Aug 21, 2013 at 1:41 PM, Comment Holder commenthol...@gmail.com wrote: Dear Joel, Many thanks for your help - I think I shall start with this way and see how it goes. My concerns were if the task can be accomplished with Python, and from your posts, I guess it can - so I shall give

Re: PEPs should be included with the documentation download

2013-08-21 Thread random832
On Wed, Aug 21, 2013, at 13:32, Chris Angelico wrote: On Wed, Aug 21, 2013 at 3:14 PM, Aseem Bansal asmbans...@gmail.com wrote: Currently the documentation download includes a lot of things but PEPs are not its part. I wanted to suggest that PEPs should be included in the download. They

utcoffset v. _utcoffset

2013-08-21 Thread Skip Montanaro
Consider this little Python script: import dateutil.parser import pytz x = dateutil.parser.parse(2013-08-16 23:00:00+01:00) localtz = pytz.timezone(America/Chicago) y = localtz.normalize(x) When I execute it (Python 2.7.2, dateutil 1.5, pytz 2011h), I get this traceback: Traceback (most recent

Re: PEPs should be included with the documentation download

2013-08-21 Thread Jerry Hill
On Wed, Aug 21, 2013 at 1:55 PM, random...@fastmail.us wrote: I think, though, that if there's any useful information that can be obtained by reading accepted PEPs but not the documentation, or if things are explained less clearly than in the PEPs, that's a bug in the documentation, and

Re: refresing the edited python function

2013-08-21 Thread Chris Angelico
On Wed, Aug 21, 2013 at 4:26 PM, Sudheer Joseph sudheer.jos...@yahoo.com wrote: Thank you, But I wish if there was a foolproof reload with best regards, Sudheer There isn't, any more than there's a foolproof way to prevent top-posting. Some languages are designed to handle

Re: PEPs should be included with the documentation download

2013-08-21 Thread random832
On Wed, Aug 21, 2013, at 14:15, Jerry Hill wrote: Personally, the only PEPs I've used as reference material as PEP 8 (the Python Style Guide), and PEP 249 (the Python Database API Specification v2.0). If I recall correctly, one of the database adapters I used basically said that they were PEP

Re: PEPs should be included with the documentation download

2013-08-21 Thread Chris Angelico
On Thu, Aug 22, 2013 at 4:15 AM, Jerry Hill malaclyp...@gmail.com wrote: On Wed, Aug 21, 2013 at 1:55 PM, random...@fastmail.us wrote: I think, though, that if there's any useful information that can be obtained by reading accepted PEPs but not the documentation, or if things are explained

Re: Basic Python Query

2013-08-21 Thread Johannes Bauer
On 21.08.2013 11:11, Ulrich Eckhardt wrote: That said, there is never a need for deriving from the Thread class, you can also use it to run a function without that. That way is IMHO clearer because the threading.Thread instance is not the thread, just like a File instance is not a file. Both

Re: A data transformation framework. A presentation inviting commentary.

2013-08-21 Thread Chris Angelico
On Thu, Aug 22, 2013 at 2:29 AM, F.R. anthra.nor...@bluewin.ch wrote: The nucleus of the TX system is a Transformer class, a wrapper for any kind of transformation functionality. The Transformer takes input as calling argument and returns it transformed. Not to put too much of a damper on your

Re: I wonder if I would be able to collect data from such page using Python

2013-08-21 Thread Terry Reedy
On 8/21/2013 1:52 PM, Joel Goldstick wrote: On Wed, Aug 21, 2013 at 1:41 PM, Comment Holder commenthol...@gmail.com wrote: Many thanks for your help - I think I shall start with this way and see how it goes. My concerns were if the task can be accomplished with Python, and from your posts,

Re: A data transformation framework. A presentation inviting commentary.

2013-08-21 Thread Terry Reedy
On 8/21/2013 12:29 PM, F.R. wrote: Hi all, In an effort to do some serious cleaning up of a hopelessly cluttered working environment, I developed a modular data transformation system that pretty much stands. I am very pleased with it. I expect huge time savings. I would share it, if had a sense

Re: make elements of a list twice or more.

2013-08-21 Thread Tobiah
On 08/07/2013 01:50 AM, liuerfire Wang wrote: Sorry for the title which didn't make clear. Here is a list x = [b, a, c] (a, b, c are elements of x. Each of them are different type). Now I wanna generate a new list as [b, b, a, a, c, c]. If you don't care about the order, you can do:

Arpex Capital seleciona: Desenvolvedor Python (MongoDB) / SP

2013-08-21 Thread zughumancapital
Arpex Capital seleciona para uma de suas empresas: Desenvolvedor Python (MongoDB) Objetivo geral da Posição: Desenvolver software estável e de primeira linha, que será incorporado à plataforma de WiFi mais moderna atualmente. Responsabilidades: escrever software que rodará tanto no backend

Re: PEPs should be included with the documentation download

2013-08-21 Thread Terry Reedy
On 8/21/2013 1:32 PM, Chris Angelico wrote: On Wed, Aug 21, 2013 at 3:14 PM, Aseem Bansal asmbans...@gmail.com wrote: Currently the documentation download includes a lot of things but PEPs are not its part. I wanted to suggest that PEPs should be included in the download. They are very much

RE: Unpickling data with classes from dynamic modules

2013-08-21 Thread Prasad, Ramit
Fredrik Tolf wrote: Dear list, I have a system in which I load modules dynamically every now and then (that is, creating a module with types.ModuleType, compiling the code for the module and then executing it in the module with exec()), and where I would wish to be able to have classes in

Re: utcoffset v. _utcoffset

2013-08-21 Thread Terry Reedy
On 8/21/2013 2:05 PM, Skip Montanaro wrote: Consider this little Python script: import dateutil.parser import pytz Neither of these are stdlib modules, so I cannot run this. x = dateutil.parser.parse(2013-08-16 23:00:00+01:00) localtz = pytz.timezone(America/Chicago) y =

Re: utcoffset v. _utcoffset

2013-08-21 Thread Ned Deily
In article CANc-5UwRWF343mmOeCJhKj6KaU1m4=qgxhrb3pxv1x5_od-...@mail.gmail.com, Skip Montanaro s...@python.org wrote: Consider this little Python script: import dateutil.parser import pytz x = dateutil.parser.parse(2013-08-16 23:00:00+01:00) localtz = pytz.timezone(America/Chicago) y =

Re: Raw_input with readline in a daemon thread makes terminal text disappear

2013-08-21 Thread David M. Welch
Hi all, This is an old thread, but I'm having the same behavior in my terminal when I run some code but kill the process in the terminal (Ctrl-C). The code has two prime suspects (from a simple google search): 1. Creates ssh port forward via the subprocess module

python3-sqlalchemy and debian repo

2013-08-21 Thread Mohsen Pahlevanzadeh
Dear all, I want to use sqlalchemy library, When i use apt-cashe search sqlalchemy , get the following result(part of result): /// python-sqlalchemy - SQL toolkit and Object Relational Mapper for Python python-sqlalchemy-doc - documentation for the SQLAlchemy Python library

Re: NodeTransformer: how to remove nodes?

2013-08-21 Thread Tobias Müller
Thanks Chris and Peter. I already went further along. No more issues so far. 2013/8/19 Peter Otten __pete...@web.de Tobias Müller wrote: I'm facing an issue with NodeTransformer, a tool used for Python AST manipulations. Last week I posted on stackoverflow.com, but there are no

RE: utcoffset v. _utcoffset

2013-08-21 Thread Prasad, Ramit
Skip Montanaro wrote: Consider this little Python script: import dateutil.parser import pytz x = dateutil.parser.parse(2013-08-16 23:00:00+01:00) localtz = pytz.timezone(America/Chicago) y = localtz.normalize(x) When I execute it (Python 2.7.2, dateutil 1.5, pytz 2011h), I get this

Re: Raw_input with readline in a daemon thread makes terminal text disappear

2013-08-21 Thread random832
On Wed, Aug 21, 2013, at 12:42, David M. Welch wrote: Hi all, This is an old thread, but I'm having the same behavior in my terminal when I run some code but kill the process in the terminal (Ctrl-C). The code has two prime suspects (from a simple google search): 1. Creates ssh port

Re: Encapsulation unpythonic?

2013-08-21 Thread Ian Kelly
On Aug 21, 2013 10:53 AM, random...@fastmail.us wrote: On Mon, Aug 19, 2013, at 3:05, Steven D'Aprano wrote: In this toy example, both parties are at fault: the author of Parrot for unnecessary data-hiding of something which is so obviously a useful piece of information and should be part

Re: Basic Python Query

2013-08-21 Thread Fábio Santos
On 21 Aug 2013 20:07, Johannes Bauer dfnsonfsdu...@gmx.de wrote: On 21.08.2013 11:11, Ulrich Eckhardt wrote: That said, there is never a need for deriving from the Thread class, you can also use it to run a function without that. That way is IMHO clearer because the threading.Thread

Re: Basic Python Query

2013-08-21 Thread Ned Batchelder
On 8/21/13 6:50 PM, Fábio Santos wrote: On 21 Aug 2013 20:07, Johannes Bauer dfnsonfsdu...@gmx.de mailto:dfnsonfsdu...@gmx.de wrote: On 21.08.2013 11:11, Ulrich Eckhardt wrote: That said, there is never a need for deriving from the Thread class, you can also use it to run a function

Re: Encapsulation unpythonic?

2013-08-21 Thread Steven D'Aprano
On Wed, 21 Aug 2013 12:52:06 -0400, random832 wrote: On Mon, Aug 19, 2013, at 3:05, Steven D'Aprano wrote: In this toy example, both parties are at fault: the author of Parrot for unnecessary data-hiding of something which is so obviously a useful piece of information and should be part of

Using PyQT with QT Designer

2013-08-21 Thread Michael Staggs
I'm learning Python and I have a problem. I've asked the question everywhere and no one helps me, so I'm hoping someone here will. I am making a program that shows album covers and you click on the album cover in the top window. In the bottom window, the list of songs appear and you can click

Python and mysql 3 tier programming

2013-08-21 Thread Gary Roach
Hi all, I'm now to the list so apologies if I don't always follow the local protocol. My problem is the interface between python and mysql using a three tier model. First, some background: System Debian Wheezy Linux Python 2.7 Mysql 5.5.31 Apache Server I am somewhat conversant with html,

Re: Encoding problem in python

2013-08-21 Thread electron
If you use Arabic frequently on your system, I suggest to change your windows system locale from Region and Language in control panel (Administrative tab) and set to Arabic. -- http://mail.python.org/mailman/listinfo/python-list

RE: Unpickling data with classes from dynamic modules

2013-08-21 Thread Fredrik Tolf
On Wed, 21 Aug 2013, Prasad, Ramit wrote: Fredrik Tolf wrote: [...] I considered trying to create subclasses of the pickler and unpickler that pickle a reference to a module loader and data for the particular module along with a class that comes from such a module, by overriding

Re: PEPs should be included with the documentation download

2013-08-21 Thread Cameron Simpson
On 22Aug2013 03:32, Chris Angelico ros...@gmail.com wrote: | Also, how many people actually depend on the downloadable | documentation, rather than simply reading things online? I do. It is outstandingly faster, and works when one is offline; I always have a local copy of a 2.x and 3.x

Re: I wonder if I would be able to collect data from such page using Python

2013-08-21 Thread Piet van Oostrum
Comment Holder commenthol...@gmail.com writes: Hi, I am totally new to Python. I noticed that there are many videos showing how to collect data from Python, but I am not sure if I would be able to accomplish my goal using Python so I can start learning. Here is the example of the target

pydoc vs. non-def'd methods

2013-08-21 Thread Dan Sommers
Greetings, I'm hava a class in which there are two equally useful names for one method. Consider this design (there are other approaches, but that's not what my question is about): class Spam1: def eggs(self): '''Return the Meaning of Life.''' return 42 ham = eggs

Re: Basic Python Query

2013-08-21 Thread Bob Martin
in 704175 20130822 010625 Ned Batchelder n...@nedbatchelder.com wrote: This is a multi-part message in MIME format. Please post in plain text, not HTML. -- http://mail.python.org/mailman/listinfo/python-list

Running a command line program and reading the result as it runs

2013-08-21 Thread Ian Simcock
Greetings all. I'm using Python 2.7 under Windows and am trying to run a command line program and process the programs output as it is running. A number of web searches have indicated that the following code would work. import subprocess p =

[issue812369] module shutdown procedure based on GC

2013-08-21 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- superseder: module shutdown procedure based on GC - Stop purging modules which are garbage collected before shutdown ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue812369

[issue18790] incorrect text in argparse add_help example

2013-08-21 Thread Michael Bikovitsky
Changes by Michael Bikovitsky moshe.b...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file31393/doc_fix.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18790 ___

[issue18790] incorrect text in argparse add_help example

2013-08-21 Thread Michael Bikovitsky
Changes by Michael Bikovitsky moshe.b...@gmail.com: -- nosy: +Michael.Bikovitsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18790 ___ ___

[issue18794] select.devpoll objects have no close() method

2013-08-21 Thread Charles-François Natali
Charles-François Natali added the comment: Just to be explicit (there are typos in Victor's original messages): it's about select.devpoll, for Solaris-derivatives with /dev/poll, and not for select.poll, based on poll() syscall. -- ___ Python

[issue16853] add a Selector to the select module

2013-08-21 Thread Charles-François Natali
Charles-François Natali added the comment: I've lost track -- who is waiting for whom? I reviewed the patch selector-12.diff and received zero response AFAICT. (Maybe the email from Rietveld didn't make it?) I was on vacation, and then had to cope with many emails :-) I'll update the

[issue18792] test_ftplib timeouts

2013-08-21 Thread Charles-François Natali
Charles-François Natali added the comment: Some ftplib tests sometimes time out. Seem they seem to try to connect to localhost (rather than 127.0.0.1), I was wondering if this could be a DNS issue and if we should resolve localhost in advance like Charles-François did for some other tests

[issue18797] Don't needlessly change refcounts of dummy objects for sets

2013-08-21 Thread Raymond Hettinger
New submission from Raymond Hettinger: AFAICT, there is no reason for sets to incref and decref dummy objects. The dummy object address is used as placeholders in the hash table but it is never accessed by set the logic. As long the one reference is held at the time the dummy object is

[issue18792] test_ftplib timeouts

2013-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hard-cording 127.0.0.1 for this test should be OK, because the server setup explicitly binds an AF_INET socket. We'll probably have to check the rest of the test suite for similar issues. Ok, let's do it! -- keywords: +easy

[issue18797] Don't needlessly change refcounts of dummy objects for sets

2013-08-21 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18797 ___ ___

[issue18797] Don't needlessly change refcounts of dummy objects for sets

2013-08-21 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +Mark.Shannon, tim.peters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18797 ___ ___

[issue18797] Don't needlessly change refcounts of dummy objects for sets

2013-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: I can't think of any counter-indication but I think we shouldn't distinguish between debug and non-debug mode. That way the debug hooks can check that the refcounting optimization is right. -- ___ Python tracker

[issue18792] test_ftplib timeouts

2013-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch for default. -- keywords: +patch Added file: http://bugs.python.org/file31395/support_host.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18792

[issue18712] Pure Python operator.index doesn't match the C version.

2013-08-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18712

[issue18793] occasional test_multiprocessing_forkserver failure on FreeBSD 10.0

2013-08-21 Thread koobs
koobs added the comment: Antoine, did you see: #18762 ? It references the samee failures on 9.x as well. Do you want to close this as a dupe, or maintain separate issues for each OS? -- ___ Python tracker rep...@bugs.python.org

[issue18793] occasional test_multiprocessing_forkserver failure on FreeBSD 10.0

2013-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ha, you're right, we can close this one as a duplicate. -- superseder: - error in test_multiprocessing_forkserver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18793

[issue18794] select.devpoll objects have no close() method

2013-08-21 Thread STINNER Victor
STINNER Victor added the comment: Just to be explicit (there are typos in Victor's original messages): it's about select.devpoll, for Solaris-derivatives with /dev/poll, and not for select.poll, based on poll() syscall. Oops sorry, yes, I'm talking about select.devpoll, its structure has a

[issue14971] (unittest) loadTestsFromName does not work on method with a decorator

2013-08-21 Thread Michael Foord
Michael Foord added the comment: Cool, thanks! -- assignee: - michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14971 ___ ___

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2013-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yet some nitpicks. Currently the code of _PyLong_FromNbInt() is inlined and the do_decref flag is used to prevent needless change refcounts of int objects (see also issue18797). In proposed patch common code is extracted into the _PyLong_FromNbInt()

[issue16853] add a Selector to the select module

2013-08-21 Thread STINNER Victor
STINNER Victor added the comment: I like the idea of renaming select to _select, and add Lib/select.py for the high-level wrapper (Selector). In my opinion, adding a module just for 5 classes is overkill. Selector classes are a very thin abstraction over the low-level objects. A new module can

[issue18794] select.devpoll objects have no close() method

2013-08-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18794 ___

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-21 Thread R. David Murray
R. David Murray added the comment: I think the essential use case is using a python program in a unix pipeline. I'm very sympathetic to that use case, despite my unease. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18713

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2013-08-21 Thread R. David Murray
R. David Murray added the comment: I believe the module already supports sorting by time and cumulative time (determining the top consumers of cpu is a major part of the point of the profile module, after all). What exactly is the change that you are proposing? If you post a diff instead

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2013-08-21 Thread Alexandre Dias
Alexandre Dias added the comment: It does support sorting by total time and cumulative time spent on a function, but not by the time per each call of that function. I've uploaded a diff of the patch. -Alexandre -- versions: +Python 3.4 -Python 2.7 Added file:

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2013-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: On PyPy 1.8.0 operator.index(True) returns 1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17576 ___ ___

[issue18792] test_ftplib timeouts

2013-08-21 Thread Charles-François Natali
Charles-François Natali added the comment: Changing support.HOST from 'localhost' to '127.0.0.1' means that on dual-stack hosts (I don't think the test suite would run on IPv6-only hosts anyway), the tests will now always use IPv4, whereas they are currently using either IPv6 or IPv4 addresses

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2013-08-21 Thread R. David Murray
R. David Murray added the comment: It would be clearer, I think, to call it average time. I must admit to not being sure why that is useful. I'm also worried there might be backward compatibility issues with changing the ordering of the data structure. If new fields are going to be added

[issue18794] select.devpoll objects have no close() method

2013-08-21 Thread STINNER Victor
STINNER Victor added the comment: This all sounds fine to fix without waiting for anything else -- can you attach a patch here? I opened the issue as a reminder for me. Here is a patch. * Add close() and fileno() methods and a closed attribute (property) to devpoll object * Document closed

[issue18798] Typo and unused variables in test fcntl

2013-08-21 Thread Vajrasky Kok
New submission from Vajrasky Kok: Typo in line 11: # Skip test if no fnctl module. Unused variables rv in test_fcntl_file_descriptor method. Attached the patch to clean up the test. -- components: Tests files: fix_typo_unused_variables_in_test_fcntl.patch keywords: patch messages:

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-21 Thread STINNER Victor
STINNER Victor added the comment: Currently, Python 3 fails miserabily when it gets a non-ASCII character from stdin or when it tries to write a byte encoded as a Unicode surrogate to stdout. It works fine when OS data can be decoded from and encoded to the locale encoding. Example on Linux

[issue18792] test_ftplib timeouts

2013-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Changing support.HOST from 'localhost' to '127.0.0.1' means that on dual-stack hosts (I don't think the test suite would run on IPv6-only hosts anyway), the tests will now always use IPv4, whereas they are currently using either IPv6 or IPv4 addresses

[issue18794] select.devpoll objects have no close() method

2013-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: poll, devpoll, epoll and kqueue are tested in test_poll.py, test_devpoll.py, test_epoll.py and test_kqueue.py test files. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18794

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2013-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And yet one nitpick. For int subclasses which doesn't overload the __int__ method the patch calls default int.__int__ which creates a copy of int object. This is redundant in PyLong_As* functions because they only extract C int value and drop Python int

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: print(member) %s % member {}.format(member) Would you seriously use either of those last two in either the debugger or the command line? Yes, of course. When you need debug output from function or loop inners. for ...: ...

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8e1194c39bed by Christian Heimes in branch '3.3': Issue #18747: Re-seed OpenSSL's pseudo-random number generator after fork. http://hg.python.org/cpython/rev/8e1194c39bed New changeset 49e23a3adf26 by Christian Heimes in branch 'default': Issue

[issue18743] References to non-existant StringIO module

2013-08-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: commit review - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18743 ___

[issue18738] String formatting (% and str.format) issues with Enum

2013-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm proposing to split this issue on two issues. One for C-style formatting (I guess everyone agree that '%i' % int-like object should return decimal representation of its numerical value) and other for format() which is more questionable. --

[issue17916] Provide dis.Bytecode based equivalent of dis.distb

2013-08-21 Thread Claudiu.Popa
Claudiu.Popa added the comment: Here's a basic patch, using a classmethod. It doesn't support the full distb API (if the traceback is not given, try to retrieve the last one), because Bytecode.from_tb() looks pretty weird. -- keywords: +patch nosy: +Claudiu.Popa Added file:

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-21 Thread Christian Heimes
Christian Heimes added the comment: I have taken care of Antoine's and Victor's reviews. The fix has landed in Python 2.7, 3.3 and 3.4. What about 2.6, 3.1 and 3.2? After all it's a security fix (although I don't consider its severity as high). -- nosy: +barry, benjamin.peterson,

  1   2   3   >