files,folders,paths

2011-02-13 Thread ecu_jon
i have a samba server at home (acting as my test environment) with one of the 'shares' mounted as v: on my windows box. inside of that are 4 folders week[1-4]. i have created c:\users\name\backup , and put a few files/folders in there to test with. please ignore the wxpython parts of the script,

Re: files,folders,paths

2011-02-13 Thread aspineux
Without trying to understand your code, I see one difference if not os.path.isfile(destination+leftover+fname): become if not os.path.isfile(destination+leftover): Regards On Feb 13, 11:06 am, ecu_jon hayesjd...@yahoo.com wrote: i have a samba server at home (acting as my test

Re: files,folders,paths

2011-02-13 Thread ecu_jon
i just tried changing that in ver12a, still get IOError: [Errno 2] No such file or directory: 'V:\\week2\\configs\ \apache2.conf' good catch tho as that is needed. thanks. weekchoice is used to pick week 1-4. really jsut returns 1-4. i plan to do full weekly backups with another script.

Re: Class or Dictionary?

2011-02-13 Thread Steven D'Aprano
On Sat, 12 Feb 2011 19:45:55 -0800, Dan Stromberg wrote: On Fri, Feb 11, 2011 at 10:20 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Fri, 11 Feb 2011 21:47:32 -0800, Dan Stromberg wrote: Did you have some sort of bad experience with pylint?  Do you resent the 20 minutes

Re: files,folders,paths

2011-02-13 Thread Steven D'Aprano
On Sun, 13 Feb 2011 02:06:15 -0800, ecu_jon wrote: i have a samba server at home (acting as my test environment) with one of the 'shares' mounted as v: on my windows box. inside of that are 4 folders week[1-4]. i have created c:\users\name\backup , and put a few files/folders in there to test

Question on using cx_freeze

2011-02-13 Thread joy99
Dear Room, I was trying to build an .exe file for my sample python scripting file hello1.py. I felt using cx_freeze as py2exe was giving some problems for Python2.6, which I am using. I gave the following commands: import sys from cx_Freeze import setup, Executable base = None if sys.platform

Question on running exe file in Python

2011-02-13 Thread joy99
Dear Room, I am using Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v. 1500 32 bit (Intel)] on win32 on Windows XP (SP2). Trying to create an .exe file of my scripting file I had saved it as .exe instead of .py file. It seems created. But how to run it? I tried command prompt, seems

Re: files,folders,paths

2011-02-13 Thread Dave Angel
On 01/-10/-28163 02:59 PM, ecu_jon wrote: i just tried changing that in ver12a, still get IOError: [Errno 2] No such file or directory: 'V:\\week2\\configs\ \apache2.conf' good catch tho as that is needed. thanks. weekchoice is used to pick week 1-4. really jsut returns 1-4. i plan to do full

Re: Question on running exe file in Python

2011-02-13 Thread Chris Rebert
On Sun, Feb 13, 2011 at 4:56 AM, joy99 subhakolkata1...@gmail.com wrote: Dear Room, Just a friendly FYI: that's a strange salutation; comp.lang.python AKA python-list isn't a chat room, at least in the normal sense of the term. I am using Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC

Re: Question on running exe file in Python

2011-02-13 Thread joy99
Thanks for your reply. On Feb 13, 6:58 pm, Chris Rebert c...@rebertia.com wrote: On Sun, Feb 13, 2011 at 4:56 AM, joy99 subhakolkata1...@gmail.com wrote: Dear Room, Just a friendly FYI: that's a strange salutation; comp.lang.python AKA python-list isn't a chat room, at least in the normal

Re: EPD 7.0 released

2011-02-13 Thread sturlamolden
EPD is great, at least for scientific users. There is just one installer, with everything we need, instead of struggling with dozens of libraries to download, configure and build. It is still Python 2.7 (not 3.1) due to libraries like SciPy. A subscription for EPD is also a contribution to the

multiprocessing more

2011-02-13 Thread Andrea Crotti
Hi everyone, I have a few questions about my implementation, which doesn't make me totally happy. Suppose I have a very long process, which during its executiong logs something, and the logs are is in n different files in the same directory. Now in the meanwhile I want to be able to do realtime

How can I print a traceback without raising an exception?

2011-02-13 Thread Gerald Britton
In the following example, I raise an exception in function h() which prints a traceback. I would like to know how I can get a similar display on my terminal without raising an exception. That is, can I replace raise Exception in function h() with some sequence of instructions (possibly using the

Re: How can I print a traceback without raising an exception?

2011-02-13 Thread Chris Rebert
On Sun, Feb 13, 2011 at 10:05 AM, Gerald Britton gerald.brit...@gmail.com wrote: In the following example, I raise an exception in function h() which prints a traceback.  I would like to know how I can get a similar display on my terminal without raising an exception.  That is, can I replace

Re: Which non SQL Database ?

2011-02-13 Thread Piet van Oostrum
For non-SQL you could look into Kyoto Cabinet, which is Berkeley DB-like. Or ZODB which is a Python Object databes. -- Piet van Oostrum p...@vanoostrum.org WWW: http://pietvanoostrum.com/ PGP key: [8DAE142BE17999C4] Nu Fair Trade woonartikelen op http://www.zylja.com --

Re: files,folders,paths

2011-02-13 Thread ecu_jon
On Feb 13, 8:17 am, Dave Angel da...@ieee.org wrote: On 01/-10/-28163 02:59 PM, ecu_jon wrote: i just tried changing that in ver12a, still get IOError: [Errno 2] No such file or directory: 'V:\\week2\\configs\ \apache2.conf' good catch tho as that is needed. thanks. weekchoice is

Re: files,folders,paths

2011-02-13 Thread ecu_jon
Please don't dump code on us and tell us to ignore parts of it. We're offering our time and experience without charging you, the least you can do is take the time to eliminate the irrelevant parts of the code yourself, and show us the smallest piece of code which demonstrates the problem. i

Call to Update All Tutorials to Python3.x Standards.

2011-02-13 Thread rantingrick
We need to start demanding that folks move towards 3.0 compliance with their tutorials. Most of the functionality in Python3000 is available from the __future__ module, especially in Python2.6 and up. There is no reason to continue supporting deprecated tutorials. If someone is still using an

Re: Call to Update All Tutorials to Python3.x Standards.

2011-02-13 Thread rantingrick
PS: -- Open Invitation: -- I am more than willing to help out those who need to bring Python2.x tutorials into 3.x compliance (and i invite others to get involved!). I would prefer to convert all to 3.x tutorials and not engage in monkey patching by annotating

Re: Call to Update All Tutorials to Python3.x Standards.

2011-02-13 Thread Littlefield, Tyler
Hahaha. You've got a new one every week, don't you. What happened to the demand to evolve idol into the future or whatever the BS you were parroting was? So we're on TKInter being fixed/replaced, (which you haven't worked with the steps people gave you), Idol being forked and redone, (again

Re: Call to Update All Tutorials to Python3.x Standards.

2011-02-13 Thread Thomas L. Shinnick
At 01:18 PM 2/13/2011, rantingrick wrote: If any tutorial owners refuse to cooperate we need to remove their tutorials (and/or links to their tutorials) from the official Python website forever. How many tutorials have you written? In a city I used to live in, a long while ago, ... You

Extending classes __init__behavior for newbies

2011-02-13 Thread Benjamin J. Racine
I don't quite understand the interplay of the two different __init__ methods when trying to extend a class. Below is my hack attempt at doing so... class ship(object): def __init__(self,l=0,b=0,t=0,name=''): self.l = l self.b = b self.t = t

Re: Call to Update All Tutorials to Python3.x Standards.

2011-02-13 Thread rantingrick
On Feb 13, 3:03 pm, Thomas L. Shinnick tshin...@io.com wrote: In a city I used to live in, a long while ago, ... You would stop at a red light at a downtown corner and some unkempt fellow would lurch out of nowhere, stagger onto your hood, smear his dirty rag over a part of your windshield

Re: Extending classes __init__behavior for newbies

2011-02-13 Thread James Mills
On Mon, Feb 14, 2011 at 7:17 AM, Benjamin J. Racine bjrac...@glosten.com wrote: I don't quite understand the interplay of the two different __init__ methods when trying to extend a class.  Below is my hack attempt at doing so... class ship(object):     def __init__(self,l=0,b=0,t=0,name=''):  

Re: Call to Update All Tutorials to Python3.x Standards.

2011-02-13 Thread Littlefield, Tyler
However *we* are going to move forward with or without you. In other words: We in RR's book means RR and this silent majority that has pitched in so much work to back his last call to move forward, that we're now boggling in awe at a new Idol. And moving forward means posting lots of trash,

Re: files,folders,paths

2011-02-13 Thread Tim Roberts
ecu_jon hayesjd...@yahoo.com wrote: i know backslashes are special. there a special pain in my #$%. without a windows environment, you would have to change destination2 significantly to try it out. but like i said above you can try version 11 in a linux environment. If they are a pain in your

Re: Extending classes __init__behavior for newbies

2011-02-13 Thread MRAB
On 13/02/2011 22:00, James Mills wrote: On Mon, Feb 14, 2011 at 7:17 AM, Benjamin J. Racine bjrac...@glosten.com wrote: I don't quite understand the interplay of the two different __init__ methods when trying to extend a class. Below is my hack attempt at doing so... class ship(object):

Re: files,folders,paths

2011-02-13 Thread Tim Roberts
ecu_jon hayesjd...@yahoo.com wrote: i have a samba server at home (acting as my test environment) with one of the 'shares' mounted as v: on my windows box. inside of that are 4 folders week[1-4]. i have created c:\users\name\backup , and put a few files/folders in there to test with. please

Re: Extending classes __init__behavior for newbies

2011-02-13 Thread James Mills
On Mon, Feb 14, 2011 at 8:21 AM, MRAB pyt...@mrabarnett.plus.com wrote: I would've done it this way: class FasterShip(Ship):    def __init__(self, speed=0, **kwargs):        Ship.__init__(self, **kwargs)        self.speed = speed What's the difference between calling the base class's

Re: Extending classes __init__behavior for newbies

2011-02-13 Thread rantingrick
On Feb 13, 4:00 pm, James Mills prolo...@shortcircuit.net.au wrote: [snip] When you subclass a base class (ship in your example) you need to call it's parent (or super) methods. This includes the constructor (__init__). The standard way of doing this in Python is: class FasterShip(Ship):

Re: Call to Update All Tutorials to Python3.x Standards.

2011-02-13 Thread Steven D'Aprano
On Sun, 13 Feb 2011 15:03:18 -0600, Thomas L. Shinnick wrote: At 01:18 PM 2/13/2011, rantingrick wrote: If any tutorial owners refuse to cooperate we need to remove their tutorials (and/or links to their tutorials) from the official Python website forever. How many tutorials have you written?

Re: Extending classes __init__behavior for newbies

2011-02-13 Thread rantingrick
On Feb 13, 4:21 pm, MRAB pyt...@mrabarnett.plus.com wrote: I would've done it this way: class FasterShip(Ship):      def __init__(self, speed=0, **kwargs):          Ship.__init__(self, **kwargs)          self.speed = speed Well it seem MRAB and i actually agree on *one* thing. Well, when

Re: Extending classes __init__behavior for newbies

2011-02-13 Thread rantingrick
On Feb 13, 4:27 pm, James Mills prolo...@shortcircuit.net.au wrote: class FasterShip(Ship):    def __init__(self, speed=0, **kwargs):        Ship.__init__(self, **kwargs)        self.speed = speed What's the difference between calling the base class's constructor directly and using the

Re: files,folders,paths

2011-02-13 Thread Steven D'Aprano
On Sun, 13 Feb 2011 10:58:23 -0800, ecu_jon wrote: i know config does not exist, for some reason the isfolder check is passing it off saying it exists, when it does not. [steve@sylar ~]$ grep isfolder facbac-011.py [steve@sylar ~]$ grep isfolder facbac-012a.py [steve@sylar ~]$ There is no

Re: Extending classes __init__behavior for newbies

2011-02-13 Thread rantingrick
On Feb 13, 4:00 pm, James Mills prolo...@shortcircuit.net.au wrote: class FasterShip(Ship):     def __init__(self, l=0,b=0,t=0,name='', speed=0):         super(FasterShip, self).__init__(l, b, t, name)         self.speed = speed Did everyone miss the fact that this inheritance is

Re: Extending classes __init__behavior for newbies

2011-02-13 Thread Benjamin Kaplan
On Feb 13, 2011 5:37 PM, James Mills prolo...@shortcircuit.net.au wrote: On Mon, Feb 14, 2011 at 8:21 AM, MRAB pyt...@mrabarnett.plus.com wrote: I would've done it this way: class FasterShip(Ship): def __init__(self, speed=0, **kwargs): Ship.__init__(self, **kwargs)

Re: Call to Update All Tutorials to Python3.x Standards.

2011-02-13 Thread rantingrick
On Feb 13, 4:30 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: The official stance of the Python development team is that 2.7 and 3.x will co-exist for a long, long time. Removing 2.x tutorials would be cutting off our nose to spite our face. That is BS Steven and you know

Re: Extending classes __init__behavior for newbies

2011-02-13 Thread Steven D'Aprano
On Mon, 14 Feb 2011 08:27:10 +1000, James Mills wrote: On Mon, Feb 14, 2011 at 8:21 AM, MRAB pyt...@mrabarnett.plus.com wrote: I would've done it this way: class FasterShip(Ship):    def __init__(self, speed=0, **kwargs):        Ship.__init__(self, **kwargs)        self.speed = speed

Re: files,folders,paths

2011-02-13 Thread ecu_jon
On Feb 13, 5:11 pm, Tim Roberts t...@probo.com wrote: ecu_jon hayesjd...@yahoo.com wrote: i know backslashes are special. there a special pain in my #$%. without a windows environment, you would have to change destination2 significantly to try it out. but like i said above you can try version

Re: Extending classes __init__behavior for newbies

2011-02-13 Thread James Mills
On Mon, Feb 14, 2011 at 8:39 AM, rantingrick rantingr...@gmail.com wrote: Did everyone miss the fact that this inheritance is unnecessary? Considering the Ship class has an attribute speed that will be affected (either directly or indirectly) by simply modifying it? The attribute speed was not

Re: Extending classes __init__behavior for newbies

2011-02-13 Thread rantingrick
On Feb 13, 5:01 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Mon, 14 Feb 2011 08:27:10 +1000, James Mills wrote: What's the difference between calling the base class's constructor directly and using the super type ? If you have *only* single inheritance, then there

Re: multiprocessing more

2011-02-13 Thread Adam Skutt
On Feb 13, 12:34 pm, Andrea Crotti andrea.crott...@gmail.com wrote: First of all, does it make sense to use multiprocessing and a short value as boolean to check if the simulation is over or not? Maybe, but without knowing exactly what you're doing it's difficult to say if any other approach

Re: files,folders,paths

2011-02-13 Thread Ben Finney
Tim Roberts t...@probo.com writes: ecu_jon hayesjd...@yahoo.com wrote: i know backslashes are special. there a special pain in my #$%. without a windows environment, you would have to change destination2 significantly to try it out. but like i said above you can try version 11 in a linux

Re: Class or Dictionary?

2011-02-13 Thread Martin De Kauwe
On Feb 13, 6:35 pm, Terry Reedy tjre...@udel.edu wrote: On 2/12/2011 9:20 PM, Martin De Kauwe wrote: On Feb 13, 5:12 am, Terry Reedytjre...@udel.edu  wrote: On 2/12/2011 1:24 AM, Martin De Kauwe wrote: The point of this posting was just to ask those that know, whether it was a bad idea

Re: Extending classes __init__behavior for newbies

2011-02-13 Thread Ben Finney
James Mills prolo...@shortcircuit.net.au writes: On Mon, Feb 14, 2011 at 8:21 AM, MRAB pyt...@mrabarnett.plus.com wrote: I would've done it this way: class FasterShip(Ship):    def __init__(self, speed=0, **kwargs):        Ship.__init__(self, **kwargs)        self.speed = speed

Re: Extending classes __init__behavior for newbies

2011-02-13 Thread rantingrick
On Feb 13, 5:11 pm, James Mills prolo...@shortcircuit.net.au wrote: On Mon, Feb 14, 2011 at 8:39 AM, rantingrick rantingr...@gmail.com wrote: Did everyone miss the fact that this inheritance is unnecessary? Considering the Ship class has an attribute speed that will be affected (either

Re: Extending classes __init__behavior for newbies

2011-02-13 Thread Ben Finney
Ben Finney ben+pyt...@benfinney.id.au writes: However, using ‘__super__’ properly is very problematic. By which I meant the ‘super’ built-in. Sorry for any resulting confusion. -- \ “Pinky, are you pondering what I'm pondering?” “Uh, I think so, | `\ Brain, but balancing a family

Re: files,folders,paths

2011-02-13 Thread Ben Finney
ecu_jon hayesjd...@yahoo.com writes: can you give an example of how to build a folder name, maybe as a string, with parts of it as variables, that have to be strung together. like x = //servername/+variable+/+variable+/ import os.path infile_path = os.path.join([//servername,

Re: Problem with giant font sizes in tkinter

2011-02-13 Thread Rhodri James
On Fri, 11 Feb 2011 02:08:01 -, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Thu, 10 Feb 2011 15:48:47 +, Cousin Stanley wrote: Steven D'Aprano wrote: I have a tkinter application under Python 2.6 which is shows text in a giant font, about twenty(?) times larger

Re: files,folders,paths

2011-02-13 Thread Dave Angel
On 01/-10/-28163 02:59 PM, ecu_jon wrote: snip first let me say, you guys are helping me and i thank you for that. i do not want to sound confrontational. i have don my best to make this os agnostic. yes i know, right now in 21a, destination2 is windows specific. that's mostly because

Re: Class or Dictionary?

2011-02-13 Thread Martin De Kauwe
On Feb 14, 10:16 am, Martin De Kauwe mdeka...@gmail.com wrote: On Feb 13, 6:35 pm, Terry Reedy tjre...@udel.edu wrote: On 2/12/2011 9:20 PM, Martin De Kauwe wrote: On Feb 13, 5:12 am, Terry Reedytjre...@udel.edu  wrote: On 2/12/2011 1:24 AM, Martin De Kauwe wrote: The point of

Re: files,folders,paths

2011-02-13 Thread ecu_jon
On Feb 13, 6:39 pm, Ben Finney ben+pyt...@benfinney.id.au wrote: ecu_jon hayesjd...@yahoo.com writes: can you give an example of how to build a folder name, maybe as a string, with parts of it as variables, that have to be strung together. like x = //servername/+variable+/+variable+/    

Re: Call to Update All Tutorials to Python3.x Standards.

2011-02-13 Thread Cameron Simpson
On 13Feb2011 14:47, rantingrick rantingr...@gmail.com wrote: | On Feb 13, 4:30 pm, Steven D'Aprano steve | +comp.lang.pyt...@pearwood.info wrote: | The official stance of the Python development team is that 2.7 and 3.x | will co-exist for a long, long time. Removing 2.x tutorials would be |

Re: EPD 7.0 released

2011-02-13 Thread Robert Kern
On 2011-02-13 10:40 , sturlamolden wrote: EPD is great, at least for scientific users. There is just one installer, with everything we need, instead of struggling with dozens of libraries to download, configure and build. It is still Python 2.7 (not 3.1) due to libraries like SciPy. A

Re: Class or Dictionary?

2011-02-13 Thread Terry Reedy
On 2/13/2011 6:16 PM, Martin De Kauwe wrote: I think I got it, did you mean something like this? class Constants: radius_of_earth = 6.37122E+6 days_as_yrs = 1.0 / 365.25 m2_as_ha = 1E-4 # metres squared as hectares g_as_tonnes = 1E-6 # grammes as tonnes

Re: files,folders,paths

2011-02-13 Thread Ben Finney
ecu_jon hayesjd...@yahoo.com writes: here take a look. http://thanksforallthefish.endofinternet.net/testing.py I think you're confusing yourself by shoving lots of experimental lines into a large program and not isolating the problem. I see that you are trying lots of different ways of doing

Re: Class or Dictionary?

2011-02-13 Thread Martin De Kauwe
On Feb 14, 12:02 pm, Terry Reedy tjre...@udel.edu wrote: On 2/13/2011 6:16 PM, Martin De Kauwe wrote: I think I got it, did you mean something like this? class Constants:      radius_of_earth = 6.37122E+6      days_as_yrs = 1.0 / 365.25      m2_as_ha = 1E-4  # metres squared as

Re: files,folders,paths

2011-02-13 Thread Dave Angel
(You forgot to include the list in your response, and you neglected to properly quote the message you were replying to. That makes it quite hard to separate your remarks from mine) On 02/13/2011 07:19 PM, jon hayes wrote: c:\users\name\backup\ #win7 c:\docs and settings\name\app

Re: files,folders,paths

2011-02-13 Thread ecu_jon
On Feb 13, 8:29 pm, Ben Finney ben+pyt...@benfinney.id.au wrote: ecu_jon hayesjd...@yahoo.com writes: here take a look. http://thanksforallthefish.endofinternet.net/testing.py I think you're confusing yourself by shoving lots of experimental lines into a large program and not isolating the

Re: files,folders,paths

2011-02-13 Thread ecu_jon
On Feb 13, 8:48 pm, Dave Angel da...@ieee.org wrote: (You forgot to include the list in your response, and you neglected to properly quote the message you were replying to.  That makes it quite hard to separate your remarks from mine) On 02/13/2011 07:19 PM, jon hayes wrote:

Re: files,folders,paths

2011-02-13 Thread ecu_jon
this is a reply to both Dave Angel and Ben Finney. this version of testing i think incorperates what you guys are saying. a href=http://thanksforallthefish.endofinternet.net/ testing1.pytestin1.py/a except maybe the os.join.path in the last function. here is the traceback Traceback (most recent

Re: Extending classes __init__behavior for newbies

2011-02-13 Thread Christian Heimes
Am 14.02.2011 00:12, schrieb rantingrick: False! There IS harm in using super when super not needed. The difference is readability! And don't downplay that aspect. You yourself have said this in the past. It seems *some* of us have very short memories. Of course you are entitled to have your

Re: files,folders,paths

2011-02-13 Thread Ben Finney
ecu_jon hayesjd...@yahoo.com writes: On Feb 13, 8:29 pm, Ben Finney ben+pyt...@benfinney.id.au wrote: Instead, focus on the issue that's causing you confusion: constructing a filesystem path and testing whether it exists. Make a *minimal* program that shows the problem you're having.

Sending email via proxy

2011-02-13 Thread Jason Sergeant
Hello, Is chilkat the best option for doing this?(Sending email via proxy) Kind Regards, Jason Sergeant This email has been processed by SmoothZap - www.smoothwall.net -- http://mail.python.org/mailman/listinfo/python-list

How to create a dict based on such a file?

2011-02-13 Thread Wang Coeus
Hi all, I am new to python. Currently I encountered a problem, please help me to solve this. Thanks in advance! I have a file like below: ++ block1 { key1=value1 key2=value2 key3=value3 } block2 { key1=value4 key2=value5 key4=value6 } ... blockn {

Re: files,folders,paths

2011-02-13 Thread ecu_jon
On Feb 14, 12:12 am, Ben Finney ben+pyt...@benfinney.id.au wrote: ecu_jon hayesjd...@yahoo.com writes: On Feb 13, 8:29 pm, Ben Finney ben+pyt...@benfinney.id.au wrote: Instead, focus on the issue that's causing you confusion: constructing a filesystem path and testing whether it exists.

[RELEASED] Python 3.2 rc 3

2011-02-13 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm happy to announce the third release candidate of Python 3.2. Python 3.2 is a continuation of the efforts to improve and stabilize the Python 3.x line. Since the final release of Python 2.7, the 2.x line

Re: How to create a dict based on such a file?

2011-02-13 Thread aspineux
On 14 fév, 06:47, Wang Coeus wangco...@gmail.com wrote: Hi all, I am new to python. Currently I encountered a problem, please help me to solve this. Thanks in advance! I have a file like below: ConfigParser Library does exacly what you want but with .ini file format [block1] key1=value1

Re: Python subprocesses experience mysterious delay in receiving stdin EOF

2011-02-13 Thread Yang Zhang
Anybody else see this issue? On Thu, Feb 10, 2011 at 10:37 AM, Yang Zhang yanghates...@gmail.com wrote: On Thu, Feb 10, 2011 at 12:28 AM, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Yang Zhang wrote: On Wed, Feb 9, 2011 at 11:01 AM, MRAB pyt...@mrabarnett.plus.com wrote: On

[issue11205] Evaluation order of dictionary display is different from reference manual.

2011-02-13 Thread takayuki
New submission from takayuki takayuki...@star.odn.ne.jp: Running the following code shows 2 1 4 3, but in reference manual http://docs.python.org/reference/expressions.html#expression-lists the evaluation order described as {expr1: expr2, expr3: expr4} def f(i): print i return i

[issue11197] information leakage with SimpleHTTPServer

2011-02-13 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Lowering priority. -- priority: deferred blocker - critical ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11197 ___

[issue11160] ZipFile.comment expects bytes

2011-02-13 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: can we use str.encode() function to convert string into bytes ? Can you try different ZIP archivers to check which encoding is expected? WinZip, WinRAR, 7-zip, zip command line program on Linux, etc. And do you have any reference

[issue11206] test_readline unconditionally calls clear_history()

2011-02-13 Thread Georg Brandl
New submission from Georg Brandl ge...@python.org: This function apparently is not available in all readline versions; e.g. the GNU readline 5.2 currently installed on dinsdale. This can be fixed (together with the unconditional reliance of test_distutils and test_zipfile on zlib) after 3.2

[issue5231] Change format of a memoryview

2011-02-13 Thread Xuanji Li
Changes by Xuanji Li xua...@gmail.com: -- nosy: +xuanji ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5231 ___ ___ Python-bugs-list mailing list

[issue5231] Change format of a memoryview

2011-02-13 Thread Xuanji Li
Xuanji Li xua...@gmail.com added the comment: Is this issue from 2 years ago still open? I checked the docs and it seems to be. If it is, I would like to work on a patch and submit it soon. -- ___ Python tracker rep...@bugs.python.org

[issue11205] Evaluation order of dictionary display is different from reference manual.

2011-02-13 Thread yeswanth
Changes by yeswanth swamiyeswa...@yahoo.com: -- nosy: +swamiyeswanth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11205 ___ ___ Python-bugs-list

[issue11205] Evaluation order of dictionary display is different from reference manual.

2011-02-13 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: Here's a patch. -- keywords: +patch nosy: +skip.montanaro versions: +Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file20753/compile.diff ___ Python tracker

[issue5231] Change format of a memoryview

2011-02-13 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: It is, but keep issue 10181 in mind (since that may lead to some restructuring of the memoryview code, potentially leading to a need to update your patch). -- ___ Python tracker

[issue11205] Evaluation order of dictionary display is different from reference manual.

2011-02-13 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: Working on a test case too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11205 ___ ___

[issue11205] Evaluation order of dictionary display is different from reference manual.

2011-02-13 Thread Skip Montanaro
Changes by Skip Montanaro s...@pobox.com: Removed file: http://bugs.python.org/file20753/compile.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11205 ___

[issue11205] Evaluation order of dictionary display is different from reference manual.

2011-02-13 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: It's not so easy as first appeared. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11205 ___

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-02-13 Thread Pauli Virtanen
Pauli Virtanen p...@iki.fi added the comment: Hi, Please focus on the constraints of the consumer not mucking with the content of `Py_buffer`, and calling `bf_releasebuffer` only with data obtained from `bf_getbuffer` and only one. If we agree on this, then how to exactly to do the

[issue11205] Evaluation order of dictionary display is different from reference manual.

2011-02-13 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: Okay, this looks better. I was confusing myself with leftover .pyc files I think. Test included. -- Added file: http://bugs.python.org/file20754/compile.diff ___ Python tracker rep...@bugs.python.org

[issue11205] Evaluation order of dictionary display is different from reference manual.

2011-02-13 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: Georg, I think this might need to sneak into 3.2. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11205 ___

[issue11205] Evaluation order of dictionary display is different from reference manual.

2011-02-13 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I don't think so -- it's a very minor deviation from the spec and not a critical bug. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11205

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-02-13 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The problem in the current way is that the structure sent to `bf_releasebuffer` does not contain the same data as what was filled in by `bf_getbuffer`, and since the contents are dup-ed, `bf_releasebuffer` is called multiple times with the

[issue5302] Allow package_data globs match directories

2011-02-13 Thread Alexis Metaireau
Alexis Metaireau ametair...@gmail.com added the comment: The MANIFEST.in is definitely gone in distutils2. Can we close that? (don't have the rights to do so ‑ it can be handy on distutils2 bugs) -- nosy: +alexis ___ Python tracker

[issue5243] Missing dependency in distutils build

2011-02-13 Thread Alexis Metaireau
Alexis Metaireau ametair...@gmail.com added the comment: Has the patch been applied on distutils(1/2) ? -- nosy: +alexis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5243 ___

[issue11205] Evaluation order of dictionary display is different from reference manual.

2011-02-13 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: 3.2 and earlier versions are all frozen, but for 3.3 it might make sense to bump the version number of the bytecode and change STORE_MAP to take the key and value in the opposite order, thus allowing to remove the ROT_TWO I had to add to make

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-02-13 Thread Pauli Virtanen
Pauli Virtanen p...@iki.fi added the comment: Hmm, there's a misunderstanding. bf_releasebuffer is called exactly once for each call to bf_getbuffer. Wrong: http://bugs.python.org/issue7433 static int memory_getbuf(PyMemoryViewObject *self, Py_buffer *view, int flags) { int res = 0;

[issue11205] Evaluation order of dictionary display is different from reference manual.

2011-02-13 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Interesting. I would actually have expected the observed behavior. I think of the : in a dictionary literal as an assignment. -- nosy: +r.david.murray ___ Python tracker

[issue901727] extra_path kwarg to setup() undocumented

2011-02-13 Thread Alexis Metaireau
Alexis Metaireau ametair...@gmail.com added the comment: I've applied the patch on distutils2. This can now be closed. -- nosy: +alexis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue901727

[issue6087] distutils.sysconfig.get_python_lib gives surprising result when used with a Python build

2011-02-13 Thread Alexis Metaireau
Changes by Alexis Metaireau ametair...@gmail.com: -- nosy: +alexis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6087 ___ ___ Python-bugs-list

[issue11205] Evaluation order of dictionary display is different from reference manual.

2011-02-13 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: BTW, it would be nice to know if this behavior was consistent with the docs at any time (the merge of the AST branch in 2.5 might be an obvious candidate where it was broken). Also interesting would be what other implementations of Python do.

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-02-13 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Hmm, there's a misunderstanding. bf_releasebuffer is called exactly once for each call to bf_getbuffer. Wrong: http://bugs.python.org/issue7433 This is a different issue. static int memory_getbuf(PyMemoryViewObject *self, Py_buffer

[issue2200] find_executable fails to find .bat files on win32

2011-02-13 Thread Alexis Metaireau
Alexis Metaireau ale...@notmyidea.org added the comment: Have the patch been applied ? (the state is still open since last message) -- nosy: +alexis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2200

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-02-13 Thread Pauli Virtanen
Pauli Virtanen p...@iki.fi added the comment: [clip] This is a different issue. It is the issue relevant for this discussion. As written in my comment: So, `bf_releasebuffer` cannot rely on (i) the data in Py_buffer being what `bf_getbuffer` put there, and (ii) getting the same Py_buffer

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-02-13 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: dup_buffer does *dst = *src, which overwrites the view.internal pointer obtained from one GetBuffer call with a pointer obtained from a previous one. Ah, ok, then it deserves fixing. -- ___ Python

[issue11205] Evaluation order of dictionary display is different from reference manual.

2011-02-13 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: As Georg suggested, it is correct in 2.4, wrong in 2.5. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11205 ___

[issue11205] Evaluation order of dictionary display is different from reference manual.

2011-02-13 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11205 ___ ___ Python-bugs-list

  1   2   >