Creating a dict-like class that counts successful and failed key matches

2014-06-30 Thread python
duck-like class offering Dict like methods, other? I'm also looking for some hints on what magic methods I should override to accomplish my goal, eg. beyond __getitem__. Thank you, Malcolm -- https://mail.python.org/mailman/listinfo/python-list

Re: Creating a dict-like class that counts successful and failed key matches

2014-06-30 Thread python
After some additional research, it looks like I may have even more options to consider including using a UserDict mixin. I think I've identified another magic method to subclass ... __missing__. - Original message - From: [1]pyt...@bdurham.com To: [2]python-list@pytho

Re: Creating a dict-like class that counts successful and failed key matches

2014-06-30 Thread python
Hi Chris, > Sounds like you want to subclass dict, then. Something like this: Nice!!! I need to study your solution, but at first blush it looks exactly like what I wanted to implement. Thank you! Malcolm -- https://mail.python.org/mailman/listinfo/python-list

Re: Creating a dict-like class that counts successful and failed key matches

2014-06-30 Thread python
titem__ will not be called by other dict methods that would normally call this magic method and instead call the parent's __getitem__ directly (via super() or something similar?)? Is this specific to the native Dict class (because its implemented in C vs. Python?) or is this behavior more genera

Re: Creating a dict-like class that counts successful and failed key matches

2014-06-30 Thread python
Ethan, >> Is this specific to the native Dict class (because its implemented in C vs. >> Python?) or is this behavior more general. > I /think/ it's only dict, but I haven't played with subclassing lists, > tuples, etc. It's not a C vs Python issue, but a &#

Naming conventions for functions and methods

2014-07-08 Thread python
object being acted on. PEP-8 doesn't appear to offer guidance in this area. Thoughts? Malcolm -- https://mail.python.org/mailman/listinfo/python-list

Cancel or timeout a long running regular expression

2011-09-14 Thread python
reads from outside a thread itself. Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Cancel or timeout a long running regular expression

2011-09-18 Thread python
Thanks for everyone's comments - much appreciated! Malcolm (the OP) -- http://mail.python.org/mailman/listinfo/python-list

Re: python install on locked down windows box?

2011-09-23 Thread python
Hi Matt, Enjoyed your list options :) I'm a consultant and have to do what your subject line asks at most clients I work at. Here's the technique I recommend: Install Python for the ***current user*** on another workstation with the appropriate priviledges. Then xcopy this Python f

pyWin build 216

2011-09-23 Thread python
I have used pyWin for several years now with out issue. I recently installed build 216 for python 2.7 on windows XP pro. The program crashes every time I exit a wxPython program and has crashed a few other times. I does not seem that pyWin has been updated since February of this year. Is

Re: Replacing spreadsheets by Python and the browser

2011-10-02 Thread python
Check out ResolverOne http://www.resolversystems.com Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Any tradeoffs or cautions in using virtualenv?

2011-10-10 Thread python
We're thinking about using virtualenv to isolate our development enivronments. Are there any tradeoffs or cautions we should consider before going this route? Are there other alternatives to virtualenv that we should consider? We are using Python 2.7 (32-bit) on Windows 7 Professiona

Experience with ActivateState Stackato or PiCloud SaaS/PaaS offerings?

2011-10-31 Thread python
Looking for feedback from anyone who has tried or is using ActiveState Stackato, PiCloud or other Python orientated SaaS/PaaS offerings? Pros, cons, advice, lessons learned? Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Efficient, built-in way to determine if string has non-ASCII chars outside ASCII 32-127, CRLF, Tab?

2011-10-31 Thread python
Wondering if there's a fast/efficient built-in way to determine if a string has non-ASCII chars outside the range ASCII 32-127, CR, LF, or Tab? I know I can look at the chars of a string individually and compare them against a set of legal chars using standard Python code (and this works

Choosing a Windows C compiler for use with Cython and 32-bit Python 2.7

2011-11-23 Thread python
Looking for some tips on getting started with Cython development under Windows. I am using Python 2.7.2. After reading the Cython documentation [1] it appears that one has a choice of using either the MinGW or MS Visual C compiler. 1. Are there any issues associated with using the MinGW compiler

Re: Py-dea: Streamline string literals now!

2011-12-28 Thread python
Lie, > And of course, I can't believe you forget Guido's favourite version, g"", > available in musical and sirloin cloth flavor. LMAO! That was brilliant! :) Cheers! Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Is python.org down?

2011-12-30 Thread python
A good tool for determining whether a site is down or just unavailable to you: http://downorisitjustme.com Malcolm -- http://mail.python.org/mailman/listinfo/python-list

how to right the regular expression ?

2013-02-14 Thread python
all last): File "tv.py", line 7, in print "1group is ",Match.group(1),"2group is ",Match.group(2),"3group is ",Match.group(3) AttributeError: 'NoneType' object has no attribute 'group' how to revise my code to get the output? -- http://mail.python.org/mailman/listinfo/python-list

Re:Re: how to right the regular expression ?

2013-02-14 Thread python
th 2group is 香港电台普通话台(可于Totem/VLC/MPlayer播放) 3group is None 1group is http://202.177.192.119/radio31 2group is 香港电台普通话台(DAB版,可于Totem/VLC/MPlayer播放) 3group is None 1group is octoshape:rthk.ch1 2group is 香港电台第一台(粤) 3group is None 1group is octoshape:rthk.ch2 2group is 香港电台第二台(粤) 3group

why can not parse the web in almost same xpath expression?

2013-02-21 Thread python
ss="down s-fc3 f-fl"]//a') that is to say , urllist=root.xpath('//div[@class="col f-cb"]//div[@class="down s-fc3 f-fl"]//a') why i can't get nothing? -- http://mail.python.org/mailman/listinfo/python-list

Issues a longer xpath expression

2013-02-21 Thread python
s the flaw in this code? it is so strange that the shorter one can work,the longer one can not,they have the same xpath structure!-- http://mail.python.org/mailman/listinfo/python-list

Re: iteration over non-sequence ,how can I resolve it?

2006-05-28 Thread python
To BJörn Lindqvist : thank you . how to write the code specifically ?Could you give a example? -- http://mail.python.org/mailman/listinfo/python-list

Re: iteration over non-sequence ,how can I resolve it?

2006-05-28 Thread python
To BJörn Lindqvist : thank you . how to write the code specifically ?Could you give an example? -- http://mail.python.org/mailman/listinfo/python-list

after del list , when I use it again, prompt 'not defined'.how could i delete its element, but not itself?

2006-06-02 Thread python
,'c','d'] def method2(): list2=list1 list2.remove['a'] main(): global list1 method1() method2() print list1[0] it prints 'b'. How could I keep the list1 not to change when remove list2's elements? -- http://mail.python.org/mailman/listinfo/python-list

in python , could I accomplish the purpose that "a=Console.read()" used in C?

2006-06-04 Thread python
in python , could I accomplish the purpose that "a=Console.read()" used in C? when program is running, I wanna add a statement like "a=Console.read()" in C language,it will wait for user's input, after user's typing a character , and click "enter" key, t

about py2exe, I installed it, but can't find py2exe.exe in my computer.

2006-05-19 Thread python
I installed it, but can't find py2exe.exe in my computer. why? And , when I execute "python setup.py py2exe" under command line, it prompt error:wrong command "py2exe" . -- http://mail.python.org/mailman/listinfo/python-list

Re: about py2exe, I installed it, but can't find py2exe.exe in my computer.

2006-05-22 Thread python
it prompt: invalid command 'py2exe'. I have import py2exe in setup.py file. -- http://mail.python.org/mailman/listinfo/python-list

how to clear up a List in python?

2006-05-25 Thread python
I have new a list , when it hava large number of values, I wonna to delete all the values in it,how to do? And, if a list have 801 values, I want to get its values index from 300 to 400, could use list1[300:400],are right me? -- http://mail.python.org/mailman/listinfo/python-list

iteration over non-sequence ,how can I resolve it?

2006-05-28 Thread python
rned=[] for i in threadList: linkReturned=i.start() for j in linkReturned: links.append(j) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and 3D

2008-03-16 Thread Python
On 15 mrt 2008, at 23:06, Mike Driscoll wrote: > On Mar 15, 3:09 pm, Eric von Horst <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I am looking for Python modules that allow you to manipulate 3D >> objects, more specifically Alias Wavefront .OBJ objects. >>

Possible to slice a string with unpacked tuple?

2009-01-24 Thread python
e tuple? >>> myTuple = ( 4, 7 ) Thanks! Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible to slice a string with unpacked tuple?

2009-01-24 Thread python
[ myTuple[ 0 ]: myTuple[ 1 ] ) millions of times in a loop. Thank you! Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible to slice a string with unpacked tuple?

2009-01-24 Thread python
g. I'm going to try Ben's slice() object suggestion. Thanks for your help, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible to slice a string with unpacked tuple?

2009-01-24 Thread python
(to echo another recent thread in this forum) Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Efficient multi-slicing technique?

2009-01-25 Thread python
signed for doing multiple field extractions at once. Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Monitor a FTP site for arrival of new/updated files

2009-01-25 Thread python
the process of being updated - I only want to download new/updated files after they've been closed on the remote site. Any ideas appreciated! Thanks, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Monitor a FTP site for arrival of new/updated files

2009-01-25 Thread python
> Well, the ftpmirror will cope with most of what you want to do as it is, but > I am unsure how you can determine whether a file is in the process of being written on the server. Looks like that may be a fit. Thank you Steve! Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Efficient multi-slicing technique?

2009-01-25 Thread python
difference and report back to the list. Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Iterating through a file significantly slower when file has big buffer

2009-01-26 Thread python
might improve performance by reducing the number of reads. Instead I observed just the opposite - performance was 7x slower! (~500 sec vs. 70 sec) and used 3x the memory (24M vs. 8M) due to the larger buffer. The following tests were run on a Windows XP system using Python 2.6.1 SOURCE: import

CORRECTION: Re: Iterating through a file significantly slower when file has big buffer

2009-01-26 Thread python
--- 7x slower Any comments regarding this massive slowdown? Thanks, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: writing large dictionaries to file using cPickle

2009-01-28 Thread python
://mail.python.org/mailman/listinfo/python-list

Re: Import without executing module

2009-02-02 Thread python
If the output is coming from a print command, couldn't the OP temporarily redirect STDIO to a file to prevent the output from being displayed? Malcolm - Original message - From: "Stephen Hansen" To: "Ray" Cc: python-list@python.org Date: Sun, 1 Feb 2009 2

Re: Functional schmunctional...

2009-02-10 Thread python
> This is a fantastically didactic newsgroup: you start off just musing about > , you end up learning python has , > brilliant :-) +1 !! Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Difference between vars() and locals() and use case for vars()

2009-02-10 Thread python
Can someone explain the difference between vars() and locals()? I'm also trying to figure out what the use case is for vars(), eg. when does it make sense to use vars() in a program? Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Difference between vars() and locals() and use case for vars()

2009-02-10 Thread python
Thank you Gabriel! Malcolm - Original message - From: "Gabriel Genellina" To: python-list@python.org Date: Wed, 11 Feb 2009 02:04:47 -0200 Subject: Re: Difference between vars() and locals() and use case for vars() En Wed, 11 Feb 2009 01:38:49 -0200, escribió: > Can so

Re: ANN: Python 2.6 Quick Reference available

2009-02-11 Thread python
Richard, An excellent tool. Great job!!! Thank you for sharing this with the Python community. Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Invoking CutePDF from within Python

2009-02-13 Thread python
Tim, > FWIW, I usually generate PDFs by printing to a Postscript printer (some > random Apple Laserthingy) and then using Ghostscript to do the conversion. > I'm happy to post if you're interested. If its not too much bother, I would be interested in learning how you'

Re: Invoking CutePDF from within Python

2009-02-13 Thread python
Tim, > http://pastebin.com/m461bf8f2 Wonderful! That's enough to get me started. Thank you very much. Cheers, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Pythonic way to determine if a string is a number

2009-02-15 Thread python
#x27; % \ ( test.strip(), isnumber( test ) ) -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic way to determine if a string is a number

2009-02-15 Thread python
27; ): print 'test (%0s), isnumber: %1s' % ( test.strip(), isnumber( test ) ) -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic way to determine if a string is a number

2009-02-15 Thread python
semantics, but I don't know why I would prefer the try/else technique over the simpler: try: float( input ) return True except ValueError: return False Thank you for your feedback, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Pythonic way to determine if one char of many in a string

2009-02-15 Thread python
rd or 'u' in word or ... : -OR- # flexible, but no short circuit on first match if [ char for char in word if char in 'aeiouAEIOU' ]: -OR- # flexible, but no short circuit on first match if set( word ).intersection( 'aeiouAEIOU' ): Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic way to determine if a string is a number

2009-02-15 Thread python
back, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic way to determine if a string is a number

2009-02-15 Thread python
s all numbers once they've been parsed, so I don't believe this will be a problem for me. However, I appreciate you pointing out this behavior because I was unaware of this subtle nuance. I'll make sure to add this to our code review checklist. Thanks for your feedback, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic way to determine if one char of many in a string

2009-02-15 Thread python
Cheers, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a phyton?

2009-02-16 Thread Python
On 16 feb 2009, at 14:45, www.livtotravel.blogspot.com wrote: is phyton a programming language? what can a python do? how is it different from others? -- If i were to replace 'python' with 'french' would you be willing to write the answer in one email? it's gonna be

Re: Pythonic way to determine if a string is a number

2009-02-17 Thread python
forum. Regards, Malcolm In article <01aaa1da$0$20629$c3e8...@news.astraweb.com>, Steven D'Aprano wrote: > Okay, but that surely falls under chapter 18 of the "Advanced Python > Programming for the Mars Rover" book rather than chapter 5 of "Newbies > Guide to Python&qu

List of locale values for locale.setlocale() under Windows

2009-02-17 Thread python
of locale codes for Windows XP (or better yet, all versions of Windows XP or later)? Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: List of locale values for locale.setlocale() under Windows

2009-02-17 Thread python
Gabriel, > Are you looking for this? > http://msdn.microsoft.com/en-us/library/hzz3tw78(VS.80).aspx Yes! Wonderful! Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Questions on Python 2.6.1 locale module

2009-02-17 Thread python
I've read the latest official locale documentation[1], googled for additional resources, and have the following questions: 1. Does the following warning still apply to recent releases of Python (and if so, is this a Python issue, a generic C runtime issue, or a platform specific C runtime

Best practice for upgrading the version of SQLite bundled with Python 2.6.1

2009-02-17 Thread python
Are there best practice recommendations for upgrading the version of SQLite that comes bundled with versions of Python 2.5 and later? We're running Python 2.6.1 on Windows and Linux and using the default version of SQLite that ship with this release. Today, a new version of SQLite 3.6.1

Re: Best practice for upgrading the version of SQLite bundled with Python 2.6.1

2009-02-18 Thread python
Gabriel, > At least on Windows, you only have to replace sqlite3.dll (in the DLLs > directory) with the new one, and that's all. That's easy! :) Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Estimating size of dictionary

2008-11-23 Thread python
Is there a formula for determining the approximate size of a dictionary (minus its data) under 32 and 64 bit Python with a specific average key size? For instance, if we were running a 64-bit version of Python and created a dictionary of 1 million items with an average key length of 48 bytes, is

Re: Estimating size of dictionary

2008-11-24 Thread python
Steven, Wonderful! You and your references answered all my questions. I had missed 2.6's new getsizeof() function. Yet another reason to do the 2.5-to-2.6 upgrade. Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Determining number of dict key collisions in a dictionary

2008-12-02 Thread python
Is there any way to determine the number of dictionary key collisions in a specific dictionary? Background: I'm working on a project using very large dictionaries (64 bit Python) and question from my client is how effective is Python's default hash technique for our data set? Their

Best way to run multiple Python processes without overloading CPU or disk i/o

2008-12-02 Thread python
Is there a cross-platform way to launch multiple Python processes and monitor CPU usage and disk i/o so that the maximum number of independent processes can be running at all times without overloading their environment? By process I mean independent application sessions vs. multiple threads of a

Re: Determining number of dict key collisions in a dictionary

2008-12-02 Thread python
Binns" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Date: Tue, 02 Dec 2008 19:29:05 -0800 Subject: Re: Determining number of dict key collisions in a dictionary -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: > Any ideas on why the Windows 64-bit version of Python

Strategy for determing difference between 2 very large dictionaries

2008-12-23 Thread python
eciated. Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Most efficient way to build very large dictionaries

2008-12-23 Thread python
I'm working with some very large dictionaries (about 25M items per dictionary) that get filled based on data parsed from text based log files. I'm using Python dictionaries to track the frequency of specific combinations of events, eg, I build a key and then add various timing inf

Re: Strategy for determing difference between 2 very large dictionaries

2008-12-24 Thread python
't a dict comprehension more adequate? > > [key: (dict1[key], dict2[key]) for key in common_keys if > dict1[key]!=dict2[key]} Cool!! I'm relatively new to Python and totally missed the ability to work with dictionary comprehensions. Yes, your dictionary comprehension technique i

Re: Most efficient way to build very large dictionaries

2008-12-24 Thread python
Hi Roger, > you may want to consider using SQLite Thank you for your suggestion about looking at SQLite. I haven't compared the performance of SQLite to Python dictionaries, but I'm skeptical that SQLite would be faster than in-memory Python dictionaries for the type of analysis I&#

Re: Strategy for determing difference between 2 very large dictionaries

2008-12-24 Thread python
explanation. Thank you! Malcolm - Original message - From: "Marc 'BlackJack' Rintsch" To: python-list@python.org Date: 24 Dec 2008 08:30:41 GMT Subject: Re: Strategy for determing difference between 2 very large dictionaries On Wed, 24 Dec 2008 03:23:00 -0

Re: Strategy for determing difference between 2 very large dictionaries

2008-12-24 Thread python
Hi James, > For the purpose of perpetuating the annoying pedantry that has made > usenet great: > > http://docs.python.org/dev/3.0/whatsnew/3.0.html#views-and-iterators-instead-of-lists Great tip! Thank you! Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Most efficient way to build very large dictionaries

2008-12-24 Thread python
Hi Roger, > The performance improvements you are seeing with Python over Oracle are > exactly the same range people see with SQLite over Oracle. One common usage > reported on the SQLite mailing list is people copying data out of Oracle and > running their analysis in SQLite be

Re: Strategy for determing difference between 2 very large dictionaries

2008-12-24 Thread python
x27;: 3, 'd': 4} That's very cool! Thanks for sharing that technique. Regards, Malcolm - Original message - From: "Peter Otten" <__pete...@web.de> To: python-list@python.org Date: Wed, 24 Dec 2008 09:46:51 +0100 Subject: Re: Strategy for determing differ

Re: os.system('cls')

2008-12-25 Thread Python
m(). I searched with google but I didn't find an answer. In the official python tutorial it says os.system('command') executes the command, but it doesn't say which commands exist (or I'm just blind). Does anyone have an answer for this question? Thanks, Devilly

Re: os.system('cls')

2008-12-25 Thread Python
On 25 dec 2008, at 12:56, Dennis van Oosterhout wrote: Hello Arno, thanks for the explanation! I have one more question: on the python site it says it's better to replace the system commands by subprocess and Popen. Now I searched for some good example for my specific case (as I have no

Re: os.system('cls')

2008-12-25 Thread Python
2008/12/25 Dennis van Oosterhout : Hello Arno, thanks for the explanation! I have one more question: on the python site it says it's better to replace the system commands by subprocess and Popen. Now I searched for some good example for my specific case (as I have no idea how it should

Re: Graphics Library with Standard Interaction Features, 2D and 3D

2008-12-31 Thread Python
On 31 dec 2008, at 13:37, Benjamin Blundell wrote: Hi all. I've had a look around the forums and the we and im looking for a library (or a set of libraries) for dealing with Visualisation and Interaction in Python. At the moment i've been using Flash with the Five3D library to do m

Re: socket programming (client-server) error

2008-10-22 Thread Python
, 'Operation timed out') I guess its a firewall problem... How do i go abt it? any help? -- does it work if you temporarily switch off the firewall? gr Arno -- http://mail.python.org/mailman/listinfo/python-list

Re: socket programming (client-server) error

2008-10-23 Thread Python
On 23 okt 2008, at 05:49, ryan wrote: On Oct 22, 6:18 pm, Python <[EMAIL PROTECTED]> wrote: On 22 okt 2008, at 13:50, ryan fox wrote: i have implemented a small client server model to do file transfer over a LAN network. It work with some machines on the network and on others it

Re: can error messages be improved or can they be overridden ?

2009-02-23 Thread python
#x27;m not part of this thread, but your post is a great help on another project. Thank you! Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: updates to Python-by-example

2009-02-27 Thread python
Rainy, Great stuff! Thanks for your examples with the community!! Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Proposed implementation for an Ordered Dictionary

2009-02-28 Thread python
>> A sort of premature pessimization, then. QOTW! +1 Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Perl-python regex-performance comparison

2009-03-03 Thread python
>> Python 2.7's regex will include possessive quantifiers, atomic groups, >> variable-length lookbehinds, and Unicode properties (at least the common >> ones), amongst other things. > Wow, that's excellent news! > Many thanks for all your efforts to enhance th

Re: Pycon Spam

2009-03-16 Thread python
Andrew, I'm on a lot of Python (and Python related) mailing lists and haven't received a message like you described. Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem: Terminal (OS X) window exits immediately on opening. & Solution.

2009-03-16 Thread Python
On 16 mrt 2009, at 18:21, Lou Pecora wrote: Since this happened with a Python script and some people here use OS X and Terminal to run scripts I thought this might be helpful. I recently ran into this problem using Terminal and found the solution. I thought those who use the Terminal in OS

Re: Problem: Terminal (OS X) window exits immediately on opening. & Solution.

2009-03-16 Thread Python
minal from /Applications/Utilities/Terminal it comes up with a window and you can execute any script from there without the window closing when the script exits, or not? -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem: Terminal (OS X) window exits immediately on opening. & Solution.

2009-03-17 Thread Python
On 16 mrt 2009, at 22:15, Lou Pecora wrote: In article , Python wrote: -- why don't you just execute the script directly form the terminal? then you will be able to read all error messages... and you can delete all the files you want just my 2c Arno Because the shell process i

Python benchmarks comparing 32-bit to 64-bit performance

2009-03-19 Thread python
Are there any benchmarks (pystones or other) that compare a 32-bit and 64-bit versions of Python? Ideally I'm looking for a benchmark comparing recent Python releases (2.6.x, 3.x) on an Intel platform. I'm specifically interested in areas of the Python language where a 64-bit impleme

Re: [ANN] lxml 2.2 released

2009-03-21 Thread python
Stefan, Is it possible to use the same install of lxml across multiple versions of Python, eg. I have 2.4, 2.5, 2.6, and 3.0 installed on my workstation - can I use a single copy of lmxl for 4 versions of Python? My understanding is that we can replace our use of elmentree and htmlparser with

Re: Introducing Python to others

2009-03-26 Thread python
itance (mixin) 7. Simple string manipulation example (also reinforce Unicode support) 8. Modules (including the ability to reference modules in a zip file) Unique Python features: 1. Lists, dictionaries and sets 2. Pickling 3. IDLE console 4. Working with command line args (and optionally o

Recommendations on Pythonic tree data structure design techniques

2009-04-09 Thread python
Any recommendations on Python based tree data structures that I can study? I'm working on an application that will model a basic outline structure (simple tree) and am looking for ideas on Pythonic implementation techniques. By outline I mean a traditional hierarchical document outline (se

Re: GUI Programming

2009-04-12 Thread Python
On 12 apr 2009, at 15:07, Gabriel wrote: Hello, I'm python newbie and i need to write gui for my school work in python. I need to write it really quick, because i haven't much time .) So question is, which of gui toolkits should i pick and learn? I heard PyGTK and Glade ar

Re: script question

2009-04-17 Thread python
; ] if getattr( eval(x), '_included', False ) ] However, I can't figure out a way to replace my list of hard-coded function names with the output from the dir() command. Thank you for your thoughts, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: script question

2009-04-17 Thread python
Scott, Thank you for your example - very clean. For completeness, here is the corrected version of my original code for the archives: [ eval(x)() for x in dir() if hasattr( eval(x), '_included') ] Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: script question

2009-04-17 Thread python
to do with my in-elegant use of eval(), eg. replacing eval() to expand dir() strings with a dictionary of local objects. Question: why vars() vs. globals()? My tests in IDLE (Python 2.6) show vars() and globals() returning the same items. Thanks, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Pythonic way to normalize vertical whitespace

2009-05-09 Thread python
\n\n' until no more '\n\n\n' matches exist 2. use regular expressions to match and replace whitespace pattern of 3 or more adjacent \n's with surrounding whitespace 3. a 3rd party text processing library designed for efficiently cleaning up text Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Your Favorite Python Book

2009-05-11 Thread python
Sam, In no specific order (I brought them all): Wesley Chun's "Core Python Programming" David Mertz's "Text Processing in Python" (older, but excellent) Mark Lutz's "Learning Python" All highly recommended. Best of luck on your Python journey!

Case insensitive version of string.Template?

2009-05-15 Thread python
Using Python 2.6 or higher: Is there a way to configure string.Template() to ignore the case of matched identifiers? In other words, given the following Template string and dictionary where all keys are lowercase, is there a way to have my identifiers expanded based on their lowercase values

<    1   2   3   4   5   6   7   8   9   10   >