Karlsruhe Python User Group, May 18th 2012, 7pm

2012-05-14 Thread Jürgen A . Erhard
The Karlsruhe Python User Group (KaPy) meets again. Friday, 2012-05-18 (May 18th) at 19:00 (7pm) in the rooms of Entropia eV (the local affiliate of the CCC). See http://entropia.de/wiki/Anfahrt on how to get there. For your calendars: meetings are held monthly, on the 3rd Friday. There's also

Advanced Python Courses in Leipzig and Florence

2012-05-14 Thread Mike Müller
Advanced Python Courses in Leipzig and Florence === We offer our Advanced Python course [1] next month in Leipzig. In addition, there will a one-day version on Saturday, July 7 in Florence [2]. This is just one day after the EuroPython talks. The course

Re: How to call and execute C code in Python?

2012-05-14 Thread Stefan Behnel
Devin Jeanpierre, 14.05.2012 01:19: Now if only my editor would bold those cdefs... :) Cython syntax support in editors is definitely not ubiquitous, but it's getting more and more widespread, so you may be lucky at some point (or find a way to add it yourself). Pygments also does a pretty good

Re: Need to get Tags and Values from Dom

2012-05-14 Thread Stefan Behnel
TommyVee, 14.05.2012 02:50: I have a very simple XML document that I need to walk, and I'm using xml.dom.minidom. No attributes, just lots of nested tags and associated values. All I'm looking to do is iterate through each of the highest sibling nodes, check what the tag is, and process its

Remove root handler from logger

2012-05-14 Thread Florian Lindner
Hello, I configure my logging on application startup like that: logging.basicConfig(level = logging.DEBUG, format=FORMAT, filename = logfile) ch = logging.StreamHandler() ch.setFormatter(logging.Formatter(FORMAT)) logging.getLogger().addHandler(ch) In one module of my application I want a

RE: Dealing with the __str__ method in classes with lots of attributes

2012-05-14 Thread Andreas Tawn
p.s. Is Python seeing a lot of use at Ubisoft or is this just for personal interest (or perhaps both)? We do use Python a fair bit, mostly for build systems and data mining, but also because it's the built-in script language for Motionbuilder. --

Re: Remove root handler from logger

2012-05-14 Thread Jean-Michel Pichavant
Florian Lindner wrote: Hello, I configure my logging on application startup like that: logging.basicConfig(level = logging.DEBUG, format=FORMAT, filename = logfile) ch = logging.StreamHandler() ch.setFormatter(logging.Formatter(FORMAT)) logging.getLogger().addHandler(ch) In one module of my

Re: How to call and execute C code in Python?

2012-05-14 Thread Michael Torrie
On 05/13/2012 11:27 AM, Mark Lawrence wrote: Stefan, you appear to have a lot to do with Cython. It would be polite to mention this when replying. Why? Do you think this is some sort of weird conflict of interest? As anyone who follows this list for several years would know, Cython is a

Re: How to call and execute C code in Python?

2012-05-14 Thread Chris Angelico
On Tue, May 15, 2012 at 12:36 AM, Michael Torrie torr...@gmail.com wrote: On 05/13/2012 11:27 AM, Mark Lawrence wrote: Stefan, you appear to have a lot to do with Cython. It would be polite to mention this when replying. Why?  Do you think this is some sort of weird conflict of interest?  As

Extracting DB schema (newbie Q)

2012-05-14 Thread Steve Sawyer
Brand-new to Python (that's a warning, folks) Trying to write a routine to import a CSV file into a SQL Server table. To ensure that I convert the data from the CSV appropriately, Im executing a query that gives me the schema (data column names, data types and sizes) from the target table. What

Re: Extracting DB schema (newbie Q)

2012-05-14 Thread Chris Angelico
On Tue, May 15, 2012 at 2:01 AM, Steve Sawyer ssaw...@stephensawyer.com wrote: Brand-new to Python (that's a warning, folks) It's one we're familiar with :) Welcome! Trying to write a routine to import a CSV file into a SQL Server table. To ensure that I convert the data from the CSV

Re: Extracting DB schema (newbie Q)

2012-05-14 Thread Jean-Michel Pichavant
Steve Sawyer wrote: Brand-new to Python (that's a warning, folks) Trying to write a routine to import a CSV file into a SQL Server table. To ensure that I convert the data from the CSV appropriately, Im executing a query that gives me the schema (data column names, data types and sizes) from

Re: Extracting DB schema (newbie Q)

2012-05-14 Thread John Gordon
In bca2r7dt23l49ovp7m7id1ap3iaccvk...@4ax.com Steve Sawyer ssaw...@stephensawyer.com writes: What I think I want to do is to construct a dictionary using the column names as the index value, and a list containing the various attributes (data type, lenghth, precision). If you're using just

Re: Dealing with the __str__ method in classes with lots of attributes

2012-05-14 Thread Karl Knechtel
On Sat, May 12, 2012 at 9:10 AM, Ethan Furman et...@stoneleaf.us wrote: Firstly, __slots__ is a tuple. I object: conceptually, the slots of a class are set in stone, but the `__slots__` attribute of a class object is just an attribute, and any iterable (as long as it yields valid identifier

Re: Good data structure for finding date intervals including a given date

2012-05-14 Thread Karl Knechtel
On Sat, May 12, 2012 at 10:18 AM, Jean-Daniel jeandaniel.bro...@gmail.com wrote: Since you say intervals in plural here, I assume that they can overlap? Yes, For instance, there are the following intervals : [[1, 10], [4, 7], [6, 15], [11, 17]] asking for the intervals including  5, the

Re: Good data structure for finding date intervals including a given date

2012-05-14 Thread Christian Heimes
Am 12.05.2012 14:17, schrieb Jean-Daniel: Hello, I have a long list of n date intervals that gets added or suppressed intervals regularly. I am looking for a fast way to find the intervals containing a given date, without having to check all intervals (less than O(n)). Do you know the

Re: dynamically selecting a class to instantiate based on the object attributes.

2012-05-14 Thread Karl Knechtel
On Wed, May 9, 2012 at 7:02 AM, J. Mwebaze jmweb...@gmail.com wrote: During object instantiaton, i would like to use  the specific class, that corresponds to the version of the class that was used to create the object. I don't understand; the version of the class that was used to create

tkinter: is there a way to switch a widget's master?

2012-05-14 Thread Frederic Rentsch
Hi there, I would like to prepare a bunch of info text widgets to be displayed in Toplevel windows at the user's command (when ever he needs directions). I know how to remove and restore widgets without destroying them in between. The problem with a Toplevel is that it is a master that comes and

Re: dynamically selecting a class to instantiate based on the object attributes.

2012-05-14 Thread Ian Kelly
On Wed, May 9, 2012 at 5:02 AM, J. Mwebaze jmweb...@gmail.com wrote: I have a  bunch of objects of the same type. Each object has a version attribute and this refers to source code that was used to make the object. SouceCode is maintained in separate files. eg. myclass_01.py, myclass_02.py, 

Re: Extracting DB schema (newbie Q)

2012-05-14 Thread Steve Sawyer
Thanks, John. What are you trying that isn't working? Typical newbie trick - trying to make things more complicated than they are. I didn't realize that syntax would establish the key/value pairs of the dictionary - I thought that would only allow you to establish the value to correspond to a

Re: Extracting DB schema (newbie Q)

2012-05-14 Thread Chris Angelico
On Tue, May 15, 2012 at 5:09 AM, Steve Sawyer ssaw...@stephensawyer.com wrote: Thanks - now, given my query that returns the table structure, this works fine: table_dict = {} table_specs = cursor.execute(query_string) for row in table_specs:        row_dict = {}        row_dict['type'] =

Re-raised exceptions in 2.7.3 -- stack trace missing

2012-05-14 Thread Oliver Beattie
Hi there I'm tying to investigate a bit of a weird problem here. Basically, I've just upgraded Python (from 2.7.2 - 2.7.3) by way of an OS upgrade (Ubuntu), and now all the tracebacks I'm getting sent from my web app are looking like this: http://dpaste.org/EgKJp/ As you can see, Django is

Re: which book?

2012-05-14 Thread Miki Tebeka
I am going to learn python for some plot issues. which book or sources, do you recommend please? The tutorial is pretty good if you already know how to program. I also heard a lot of good things on Python Essential Reference. -- http://mail.python.org/mailman/listinfo/python-list

Re: PyTextile Question

2012-05-14 Thread Josh English
On Monday, May 7, 2012 6:13:28 AM UTC-7, dinkyp...@gmail.com wrote: Below is a test script that shows one way I've dealt with this issue in the past by reformatting paragraphs to remove embedded line breaks. YMMV. import re, textile ... Wow. Thank you. This works. I'm trying to figure

Instrumenting a class to see how it is used

2012-05-14 Thread Paul Moore
I'm trying to reverse-engineer some pretty complex code. One thing that would help me a lot is if I could instrument a key class, so that I'd get a report of when and how each method was called and any properties or attributes were accessed during a typical run. I could do this relatively

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-14 Thread james hedley
i have not banned anything, or even alluded to it, whatsoever. i asked that one specific mail not be commented upon OK, sorry if I misunderstood, but that's still suppression in my book. reading your accounts strewn about is interesting, what exactly are *your* motives? My motives are

Re: Python ABAQUS debugging problem.

2012-05-14 Thread Mahendra
On May 10, 9:31 am, Mahendra g2mahen...@gmail.com wrote: Dear all,             I am learning to use python script for running ABAQUS (commerical finite element program). I am having a bug in the following chunk of code and am not sure what it is. I have three loops in my code. The first two

Re: which book?

2012-05-14 Thread d . poreh
On Wednesday, May 9, 2012 7:13:54 AM UTC-7, Miki Tebeka wrote: I am going to learn python for some plot issues. which book or sources, do you recommend please? The tutorial is pretty good if you already know how to program. I also heard a lot of good things on Python Essential Reference.

Re: Alternative to subprocess in order to not wait for calling commands to complete

2012-05-14 Thread Adam Skutt
On May 10, 12:07 pm, ks gridsngat...@gmail.com wrote: Hi All, From within one Python program, I would like to invoke three other Python programs. Usually I would use the subprocess module to invoke these sequentially. I now have a use case in which I must invoke the first one (not wait for

Python ABAQUS debugging problem.

2012-05-14 Thread Mahendra
Dear all, I am learning to use python script for running ABAQUS (commerical finite element program). I am having a bug in the following chunk of code and am not sure what it is. I have three loops in my code. The first two loops work fine. The third loop is a combination of loop 1 and

Re: pakistani girls pakistani girls lahore pakistani girls phone numbers pakistani girls mobile number pakistani girls wallpapers pakistani girls cell numbers on www.epakistanigirls.blogsp

2012-05-14 Thread Maha Jabeen
fuck you dude http://numbersofgirlsinpakistan.blogspot.com/ http://numbersofgirlsinpakistan.blogspot.com/ http://numbersofgirlsinpakistan.blogspot.com/ http://numbersofgirlsinpakistan.blogspot.com/ http://numbersofgirlsinpakistan.blogspot.com/ http://numbersofgirlsinpakistan.blogspot.com/

Re: Instrumenting a class to see how it is used

2012-05-14 Thread Michele Simionato
This may get you started (warning: not really tested). $ echo instr.py from warnings import warn oget = object.__getattribute__ tget = type.__getattribute__ class Instr(object): class __metaclass__(type): def __getattribute__(cls, name): clsname = tget(cls,

Alternative to subprocess in order to not wait for calling commands to complete

2012-05-14 Thread ks
Hi All, From within one Python program, I would like to invoke three other Python programs. Usually I would use the subprocess module to invoke these sequentially. I now have a use case in which I must invoke the first one (not wait for it to complete), then invoke the second (similarly not wait

Clicking a sub menu item

2012-05-14 Thread googlewellwisher
Hello, Im a newbie to automation testing.Im using python scripting in selenium to automate a website. Now im facing a difficulty in clicking a submenu item.I have 5 buttons in the main menu.I am able to click each of the menu button using self.driver.find_element_by_id(MainMenuButton1).click()

Re: parallel subprocess.getoutput

2012-05-14 Thread Adam Skutt
On May 11, 8:04 am, Jaroslav Dobrek jaroslav.dob...@gmail.com wrote: Hello, I wrote the following code for using egrep on many large files: MY_DIR = '/my/path/to/dir' FILES = os.listdir(MY_DIR) def grep(regex):     i = 0     l = len(FILES)     output = []     while i l:        

parallel subprocess.getoutput

2012-05-14 Thread Jaroslav Dobrek
Hello, I wrote the following code for using egrep on many large files: MY_DIR = '/my/path/to/dir' FILES = os.listdir(MY_DIR) def grep(regex): i = 0 l = len(FILES) output = [] while i l: command = egrep + '' + regex + ' ' + MY_DIR + '/' + FILES[i] result =

Newby Python Programming Question

2012-05-14 Thread Coyote
Folks, I am migrating to Python after a 20+ year career writing IDL programs exclusively. I have a really simple question that I can't find the answer to in any of the books and tutorials I have been reading to get up to speed. I have two programs. The first is in a file I named file_utils.py:

Re: parallel subprocess.getoutput

2012-05-14 Thread Jaroslav Dobrek
Sorry, for code-historical reasons this was unnecessarily complicated. Should be: MY_DIR = '/my/path/to/dir' FILES = os.listdir(MY_DIR) def grep(regex): output = [] for f in FILES: command = egrep + '' + regex + ' ' + MY_DIR + '/' + f result =

specify end of line character for readline

2012-05-14 Thread Jason
Is there any way to specify the end of line character to use in file.readline() ? I would like to use '\r\n' as the end of line and allow either \r or \n by itself within the line. Thanks, Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: which book?

2012-05-14 Thread darnold
On May 10, 4:58 am, d.po...@gmail.com wrote: On Wednesday, May 9, 2012 7:13:54 AM UTC-7, Miki Tebeka wrote: I am going to learn python for some plot issues. which book or sources, do you recommend please? The tutorial is pretty good if you already know how to program. I also heard a

Sharing Data in Python

2012-05-14 Thread raunakgup90
I have some Pickled data, which is stored on disk, and it is about 100 MB in size. When my python program is executed, the picked data is loaded using the cPickle module, and all that works fine. If I execute the python multiple times using python main.py for example, each python process will

Re: Newby Python Programming Question

2012-05-14 Thread Maarten
On Friday, May 11, 2012 5:25:20 PM UTC+2, Coyote wrote: I am migrating to Python after a 20+ year career writing IDL programs exclusively. I have a really simple question that I can't find the answer to in any of the books and tutorials I have been reading to get up to speed. Welcome here.

Re: Scrapy - importing files from local, rather than www

2012-05-14 Thread leomcallister
You can try running Python's web server on the folder (python -m SimpleHTTPServer) and point Scrapy to it. On Monday, May 7, 2012 4:57:22 AM UTC-3, nbw wrote: Hi everyone, I'm new to Python (loving it!) and Scrapy. I have a question I just can't seem to get my head around. I can get a simple

Re: Newby Python Programming Question

2012-05-14 Thread Coyote
Maarten writes: I do recommend you read http://docs.python.org/howto/doanddont.html as a starting point to avoid learning some bad habits, especially on importing. You probably already found https://www.cfa.harvard.edu/~jbattat/computer/python/science/idl-numpy.html Yikes! I'm sure that

Re: Newby Python Programming Question

2012-05-14 Thread CM
On May 11, 11:25 am, Coyote sageande...@gmail.com wrote: Folks, I am migrating to Python after a 20+ year career writing IDL programs exclusively. I have a really simple question that I can't find the answer to in any of the books and tutorials I have been reading to get up to speed. I

%d not working in re at Python 2.7?

2012-05-14 Thread vacu
I am frustrated to see %d not working in my Python 2.7 re.search, like this example: (re.search('%d', asdfdsf78asdfdf)).group(0) Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'NoneType' object has no attribute 'group' \d works fine: (re.search('\d+',

Re: Newby Python Programming Question

2012-05-14 Thread Coyote
CM writes: I don't know Spyder IDE, but I don't think this should happen; could there just be a simple mistake? Because you first refer to the .py file as 'file_utils.py' but then you refer to the file as 'pwd.py'...which is also the name of your function. Room for confusion...so could you

tiny script has memory leak

2012-05-14 Thread gry
sys.version -- '2.6 (r26:66714, Feb 21 2009, 02:16:04) \n[GCC 4.3.2 [gcc-4_3-branch revision 141291]] I thought this script would be very lean and fast, but with a large value for n (like 15), it uses 26G of virtural memory, and things start to crumble. #!/usr/bin/env python '''write a file

Re: Sharing Data in Python

2012-05-14 Thread Miki Tebeka
How can I make it so, all new python process share this data, so it is only loaded a single time into memory? You can have one process as server and client ask for parts of data. You might be able to do something smart with mmap but I can't think of a way. I Linux systems, if you first load

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-14 Thread anthony
On Thursday, May 10, 2012 3:06:47 AM UTC-5, james hedley wrote: i have not banned anything, or even alluded to it, whatsoever. i asked that one specific mail not be commented upon OK, sorry if I misunderstood, but that's still suppression in my book. James, how can you realistically

Python web-framework+db with the widest scalability?

2012-05-14 Thread Alec Taylor
I am building a project requiring high performance and scalability, entailing: • Role-based authentication with API-key licensing to access data of specific users • API exposed with REST (XML, JSON), XMLRPC, JSONRPC and SOAP • Easily configurable getters and setters to create APIs accessing the

Re: Python web-framework+db with the widest scalability?

2012-05-14 Thread elektrrrus
Hi, From my experience while NoSQL databases are very fast and scalable, there is lack of _good_ support for popular frameworks. I've try with django and mongoengine, but results was poor. In my company we're building now large api-driven application with django and postgresql as a base.

Re: %d not working in re at Python 2.7?

2012-05-14 Thread Josh McGee
% On Friday, May 11, 2012 11:58:01 AM UTC-7, vacu wrote: I am frustrated to see %d not working in my Python 2.7 re.search, like this example: (re.search('%d', asdfdsf78asdfdf)).group(0) Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'NoneType' object

Hashability questions

2012-05-14 Thread Bob Grommes
Noob alert: writing my first Python class library. I have a straightforward class called Utility that lives in Utility.py. I'm trying to get a handle on best practices for fleshing out a library. As such, I've done the following for starters: def __str__(self): return str(type(self)) #

Are there any instrumentation widgets for wxpython or tkinter?

2012-05-14 Thread Sverre
I searched for widgets used for PLC automation or lab instrumentation like gauges, led's etc. in the net, but didn't found anything because of those massive link spam sites. In the case there isn't any solution, with which toolkit would it be easiest to build gauges? --

Re: Extracting DB schema (newbie Q)

2012-05-14 Thread james hedley
On Monday, 14 May 2012 17:01:49 UTC+1, Steve Sawyer wrote: Brand-new to Python (that's a warning, folks) Trying to write a routine to import a CSV file into a SQL Server table. To ensure that I convert the data from the CSV appropriately, Im executing a query that gives me the schema (data

Yet another split string by spaces preserving single quotes problem

2012-05-14 Thread Massi
Hi everyone, I know this question has been asked thousands of times, but in my case I have an additional requirement to be satisfied. I need to handle substrings in the form 'string with spaces':'another string with spaces' as a single token; I mean, if I have this string: s =This is a 'simple

Re: which book?

2012-05-14 Thread Mark Lawrence
On 10/05/2012 10:58, d.po...@gmail.com wrote: On Wednesday, May 9, 2012 7:13:54 AM UTC-7, Miki Tebeka wrote: I am going to learn python for some plot issues. which book or sources, do you recommend please? The tutorial is pretty good if you already know how to program. I also heard a lot of

Re: Need to get Tags and Values from Dom

2012-05-14 Thread james hedley
On Monday, 14 May 2012 01:50:23 UTC+1, TommyVee wrote: I have a very simple XML document that I need to walk, and I'm using xml.dom.minidom. No attributes, just lots of nested tags and associated values. All I'm looking to do is iterate through each of the highest sibling nodes, check

Re: %d not working in re at Python 2.7?

2012-05-14 Thread Tim Chase
On 05/11/12 13:58, vacu wrote: I am frustrated to see %d not working in my Python 2.7 re.search, like this example: (re.search('%d', asdfdsf78asdfdf)).group(0) Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'NoneType' object has no attribute 'group'

Re: %d not working in re at Python 2.7?

2012-05-14 Thread Benjamin Kaplan
On May 14, 2012 7:06 PM, vacu vacu...@gmail.com wrote: I am frustrated to see %d not working in my Python 2.7 re.search, like this example: (re.search('%d', asdfdsf78asdfdf)).group(0) Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'NoneType' object has

Re: Hashability questions

2012-05-14 Thread Chris Kaynor
On Sun, May 13, 2012 at 12:11 PM, Bob Grommes bob.grom...@gmail.com wrote: Noob alert: writing my first Python class library. I have a straightforward class called Utility that lives in Utility.py. I'm trying to get a handle on best practices for fleshing out a library.  As such, I've done

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-14 Thread Mark Lawrence
On 12/05/2012 08:10, anth...@xtfx.me wrote: On Thursday, May 10, 2012 3:06:47 AM UTC-5, james hedley wrote: My nose and my stomach give me a very strong feeling that something is very, very wrong with the pyjamas project. I've personally never used it, but given the adverse publicity I

Re: Hashability questions

2012-05-14 Thread Chris Rebert
On Sun, May 13, 2012 at 12:11 PM, Bob Grommes bob.grom...@gmail.com wrote: Noob alert: writing my first Python class library. I have a straightforward class called Utility that lives in Utility.py. I'm trying to get a handle on best practices for fleshing out a library.  As such, I've done

Re: %d not working in re at Python 2.7?

2012-05-14 Thread Vacu
Thanks Tim, it is my mis-understanding of usage of %d in Python. After reading it carefully, it should be used in re.scan. The reason I made this dump mistake is because I got a script from our expert and I am totally new on Python, before reading your email, I hadn't a doubt it is wrong usage and

Re: Need to get Tags and Values from Dom

2012-05-14 Thread TommyVee
james hedley wrote in message news:11852803.89.1337001575700.JavaMail.geo-discussion-forums@vbmd2... On Monday, 14 May 2012 01:50:23 UTC+1, TommyVee wrote: I have a very simple XML document that I need to walk, and I'm using xml.dom.minidom. No attributes, just lots of nested tags and

Re: tiny script has memory leak

2012-05-14 Thread Ian Kelly
On Fri, May 11, 2012 at 3:29 PM, gry georgeryo...@gmail.com wrote: sys.version -- '2.6 (r26:66714, Feb 21 2009, 02:16:04) \n[GCC 4.3.2 [gcc-4_3-branch revision 141291]] I thought this script would be very lean and fast, but with a large value for n (like 15), it uses 26G of virtural

Re: Yet another split string by spaces preserving single quotes problem

2012-05-14 Thread Tim Chase
On 05/13/12 16:14, Massi wrote: Hi everyone, I know this question has been asked thousands of times, but in my case I have an additional requirement to be satisfied. I need to handle substrings in the form 'string with spaces':'another string with spaces' as a single token; I mean, if I have

Re: tiny script has memory leak

2012-05-14 Thread Chris Angelico
On Sat, May 12, 2012 at 7:29 AM, gry georgeryo...@gmail.com wrote: f = open(sys.argv[1], 'w') What are you passing as the file name argument? Could that device be the cause of your memory usage spike? ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: Hashability questions

2012-05-14 Thread Dave Angel
On 05/14/2012 07:38 PM, Chris Kaynor wrote: On Sun, May 13, 2012 at 12:11 PM, Bob Grommes bob.grom...@gmail.com wrote: SNIP The rule is that, if two objects return different results from __hash__, they should never compare equal. The opposite rule also holds true: if two objects compare

Re: Hashability questions

2012-05-14 Thread alex23
On May 14, 5:11 am, Bob Grommes bob.grom...@gmail.com wrote: Obviously there is some sort of default implementation of __hash__() at work and my implementation of _eq_() has somehow broken it. Can anyone explain what's going on? It looks like this has changed between Python 2 and 3: If a

Re: Hashability questions

2012-05-14 Thread Christian Heimes
Am 13.05.2012 21:11, schrieb Bob Grommes: Noob alert: writing my first Python class library. I have a straightforward class called Utility that lives in Utility.py. I'm trying to get a handle on best practices for fleshing out a library. As such, I've done the following for starters:

Re: Newby Python Programming Question

2012-05-14 Thread Chris Angelico
On Sat, May 12, 2012 at 8:25 AM, Coyote da...@idlcoyote.com wrote: I've been playing around with a couple of IDEs because I liked the one I used with IDL and I wanted to use something similar for Python. The IDLDE was an Eclipse variant, but I've tried installing Eclipse before for something

Re: Newby Python Programming Question

2012-05-14 Thread Simon Cropper
On 15/05/12 12:18, Chris Angelico wrote: On Sat, May 12, 2012 at 8:25 AM, Coyoteda...@idlcoyote.com wrote: I've been playing around with a couple of IDEs because I liked the one I used with IDL and I wanted to use something similar for Python. The IDLDE was an Eclipse variant, but I've tried

Re: Hashability questions

2012-05-14 Thread Ian Kelly
On Mon, May 14, 2012 at 7:50 PM, Christian Heimes li...@cheimes.de wrote: Am 13.05.2012 21:11, schrieb Bob Grommes: Noob alert: writing my first Python class library. I have a straightforward class called Utility that lives in Utility.py. I'm trying to get a handle on best practices for

Re: Need to get Tags and Values from Dom

2012-05-14 Thread Stefan Behnel
TommyVee, 15.05.2012 01:51: Confused? That's an understatement. Part of the problem is that it's been a long time since I learned DOM and now I'm trying to cram to get this program done. Thus my recommendation to use ElementTree. Why go the complicated route when you can just get your code

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2012-05-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Bumping the target version to 3.4. This is still a good long term idea, but it's a substantial enough change that we really want to land it early in a development cycle so we have plenty of time to hammer out any issues. -- versions:

[issue14805] Support display of both __cause__ and __context__

2012-05-14 Thread Nick Coghlan
New submission from Nick Coghlan ncogh...@gmail.com: With PEP 415 accepted as the implementation of the raise exc from None syntax, it raises the prospect of exceptions with both __cause__ and __context__ set to non-None values, and __suppress_context__ set to False. The initial PEP 415 patch

[issue14744] Use _PyUnicodeWriter API in str.format() internals

2012-05-14 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: I created a new repository to optimize str.format and str%args. -- hgrepos: +125 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14744

[issue14805] Support display of both __cause__ and __context__

2012-05-14 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- dependencies: +improved PEP 409 implementation ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14805 ___

[issue14133] improved PEP 409 implementation

2012-05-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: I have accepted the PEP. Issue 14805 now covers the separate question of allowing both __cause__ and __context__ to be displayed in the same traceback. -- ___ Python tracker rep...@bugs.python.org

[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2012-05-14 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This whole issue doesn't affect 3.3. For 2.7/3.2 there are three possible options: 1) remove constant folding altogether on unicode (this is the solution adopted by PyPy); 2) scan the string up to the index looking for non-BMP chars and

[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2012-05-14 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Attached a patch that implements option 1). -- stage: needs patch - commit review Added file: http://bugs.python.org/file25575/issue5057-3.diff ___ Python tracker rep...@bugs.python.org

[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2012-05-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Option 2) would have my preference. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5057 ___ ___

[issue14806] re.match does not match word '{'

2012-05-14 Thread zk
New submission from zk bsn...@gmail.com: type(re.match('{', '{')) type 'NoneType' type(re.match('\{', '{')) type 'NoneType' type(re.search('\{', '{')) type '_sre.SRE_Match' type(re.search('{', '{')) type '_sre.SRE_Match' -- components: 2to3 (2.x to 3.x conversion

[issue14806] re.match does not match word '{'

2012-05-14 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: re.match matches only at the beginning of the string. -- assignee: - ezio.melotti components: +Regular Expressions -2to3 (2.x to 3.x conversion tool) nosy: +ezio.melotti, mrabarnett resolution: - invalid stage: -

[issue14801] ssize_t where size_t expected

2012-05-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 2bbf3ba30435 by Antoine Pitrou in branch '3.2': Use size_t, not ssize_t (issue #14801). http://hg.python.org/cpython/rev/2bbf3ba30435 New changeset 64b695a6cc3d by Antoine Pitrou in branch 'default': Use size_t, not

[issue14801] ssize_t where size_t expected

2012-05-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Should be ok now, thank you. -- nosy: +pitrou resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue14800] stat.py constant comments + docstrings

2012-05-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 2a695cbdf090 by Giampaolo Rodola' in branch 'default': Issue 14800: add comments explaining stat.py constants + docstring for S_* functions. http://hg.python.org/cpython/rev/2a695cbdf090 -- nosy:

[issue14804] Wrong defaults args notation in docs

2012-05-14 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: Here's against 2.7 which proved to be a can of worms. I tried to be as unobstructive as possible. Please have a look at it, I'm sure I forgot some parenthesis somewhere. -- Added file:

[issue14807] Move tarfile.filemode() into stat module

2012-05-14 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' g.rod...@gmail.com: As per: http://mail.python.org/pipermail/python-ideas/2012-May/015104.html Patch is in attachment. -- components: Library (Lib) files: filemode.patch keywords: easy, patch messages: 160621 nosy: giampaolo.rodola, terry.reedy

[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2012-05-14 Thread Armin Rigo
Armin Rigo ar...@users.sourceforge.net added the comment: Did anyone ever show that this particular detail, which looks like a completely obscure case to me, has any measurable effect on any code whatsoever? Just coming up with numbers, but I'm sure it gives you 5% on the most specially

[issue12098] Child process running as debug on Windows

2012-05-14 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: - the function generating the flags should be exported (with a private name), so that it can be reused by Lib/test/[test_]support.py. Duplicate code is error-prone, especially when enumerating command-line flags, attribute names...

[issue14806] re.match does not match word '{'

2012-05-14 Thread zk
zk bsn...@gmail.com added the comment: Oops. Sorry. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14806 ___ ___ Python-bugs-list mailing list

[issue14313] zipfile should raise an exception for unsupported compression methods

2012-05-14 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- keywords: +needs review stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14313 ___

[issue14187] add function annotation entry to Glossary

2012-05-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Will do. Chris, I don’t think another entry for “annotation” is needed, given Raymond’s previous rejection of the paragraph talking about other languages. -- ___ Python tracker rep...@bugs.python.org

[issue14804] Wrong defaults args notation in docs

2012-05-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I think there’s already one report for this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14804 ___

[issue14802] Python 3.2 fail to compile with VC11 ARM configuration

2012-05-14 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: Thanks for your report. Unfortunately Python 3.2 won't ever work in this way because changing compilers would be a new feature, and bug fix releases like 3.2 don't receive new features. Yesterday we completed the transition to VS2010 as a step

[issue14313] zipfile should raise an exception for unsupported compression methods

2012-05-14 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Modified patch adopted in 3.3 (changeset 596b0eaeece8), therefore the current patch only applies to 3.2 and 2.7. If this is a new feature, the issue can be closed. -- nosy: +loewis, storchaka versions: -Python 3.3

[issue14808] Pdb does not stop at a breakpoint set on the line of a function definition

2012-05-14 Thread Xavier de Gaye
New submission from Xavier de Gaye xdeg...@gmail.com: In the following test both breakpoints are set on the line of a function definition. However pdb does not stop when entering foo whose breakpoint has been set with 'break 1' while pdb stops when entering bar whose breakpoint has been set with

  1   2   >