Re: Case insensitive version of string.Template?

2009-05-16 Thread python
-1212' ) output = string.Template( 'My name is $NAME and my phone is $Phone.' ).safe_substitute( values ) Brilliant!! Using a custom dictionary solves my problem and gives me some ideas on similar challenges. Thank you! Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Advanced Python books?

2009-05-18 Thread python
Take a look at "Text Processing In Python" by David Mertz. This book doesn't cover all your requirements, but its a well-written book that is more comprehensive than its title might indicate. There's also a free version of this book online. Malcolm -- http://mail.python.

Re: A fast way to read last line of gzip archive ?

2009-05-27 Thread python
Dave, Not the OP, but really enjoyed your analysis and solution. Excellent job!! Thank you! Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: do replacement evenly

2009-06-02 Thread python
# ignore multiple blank lines if not line and not lastLine: pass else: output.append( line ) lastLine = line return '\n'.join( output ) Regards, Malcolm -- http:/

Re: using PIL for good screenshots

2008-05-12 Thread python
Tim, Sounds like an interesting project. Have you considered using SnagIt to produce your screenshots? www.TechSmith.com/SnagIt Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] PPyGui emulator

2008-05-14 Thread python
Stef, Looks great!! Malcolm -- http://mail.python.org/mailman/listinfo/python-list

enumerate() values starting at 1 vs. 0

2008-05-14 Thread python
> > from itertools import izip, count > > def enumerate(iterable, start=0): > return izip(count(start), iterable) > > >>> list(enumerate('spam', 1)) > [(1, 's'), (2, 'p'), (3, 'a'), (4, 'm')] Brilliant!! Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: multiple databases, what's the best interface ?

2008-05-17 Thread python
Stef, Take a look at what the dabo team has put together. http://dabodev.com Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Fwd: Re: [EMAIL PROTECTED]: Re: Compress a string]

2008-05-18 Thread python
> I'm trying to compress a string. > E.g: > > "BBBC" -> "ABC" Doesn't preserve order, but insures uniqueness: line = "BBBC" print ''.join( set( line ) ) Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Removing Space and "-" from a string

2008-05-20 Thread python
Shakir, > I have thousands of records in MS Access database table, which records I > am fetching using python script. One of the columns having string like > '8 58-2155-58' > > Desired output: '858215558' > > I want to remove any spaces between string and

Re: List of disk drives on Windows?

2008-05-20 Thread python
Mensanator, >>> import os.path >>> dl = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' >>> drives = ['%s:' % d for d in dl if os.path.exists('%s:' % d)] >>> drives Very clever! Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Publish a program

2008-05-22 Thread python
> appreciate somebody to join and put new views on this project Send us a link to one of the sites with your code, eg. http://python.pastebin.com Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Coverage checker: Coverage.py or pycover or ?

2008-05-25 Thread python
d Pycover http://www.geocities.com/drew_csillag/pycover.html Thanks, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

RE: [Business apps for Windows] Good grid + calendar, etc.?

2008-06-01 Thread python
Ryan, If you don't mind being Windows-only, there's another approach that I've been working on. I use a WTL application to host the web browser, then pass the browser instance to a COM server written in Python, along with a COM wrapper of the application window. This gives me the

Questions on 64 bit versions of Python

2008-07-24 Thread python
could use a database in place of dictionaries, but I'm looking for maximum performance. The following page lists two 64 bit versions of Python for Windows: http://www.python.org/download/releases/2.5.2/ For Win64-Itanium users: python-2.5.2.ia64.msi For Win64-AMD64 users: python-2.5.2.amd64.

Re: Questions on 64 bit versions of Python (Thank-you!)

2008-07-28 Thread python
Dear List, Thanks for everyone's feedback - excellent detail - all my questions have been answered. BTW: Roel was correct that I got confused over the AMD and Intel naming conventions regarding the 64 bit versions of Python for Windows. (I missed that nuance that the Intel build refered t

Optimizing size of very large dictionaries

2008-07-30 Thread python
are too big for my workstation's 2G of RAM. Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Python for Blackberry mobile phones

2008-08-10 Thread python
I'm looking for a version of Python for Blackberry mobile phones - has anyone heard of such a thing? I've been googling this topic without success. Thanks, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

What parts of string module will disappear in Python 3.0?

2008-04-14 Thread python
I understand that many portions of the string module are redundant with the native methods of strings and will removed in Python 3.0. Makes sense to me. But what will happen to the portions of the string module that are not covered by native string methods - like the following: - string

Does Python 2.5.2's embedded SQLite support full text searching?

2008-04-21 Thread python
Does Python 2.5.2's embedded SQLite support full text searching? Any recommendations on a source where one can find out which SQLite features are enabled/disabled in each release of Python? I'm trying to figure out what's available in 2.5.2 as well as what to expect in 2.6 and

List of all Python's ____ ?

2008-04-21 Thread python
Is there an official list of all Python's ? I'm learning Python and trying to get an idea of what are available and specifically, what are used by each native Python data type? Thanks! Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: List of all Python's ____ ?

2008-04-21 Thread python
Hrvoje, >> Is there an official list of all Python's ? > http://docs.python.org/ref/specialnames.html Wonderful!! Thank you very much. Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Does Python 2.5 include or not include SQLite engine?

2008-04-21 Thread python
While reading feedback to my post "Does Python 2.5.2's embedded SQLite support full text searching?" I noticed that there appears to be some confusion regarding whether Python 2.5 includes the SQLite engine. My Windows 2.5.2 binary download includes SQLite. But other posters clai

Parsing text file with #include and #define directives

2008-04-24 Thread python
d be an iterator(?) type object that tracked file names and line numbers as it returns individual lines. Is there a Python parsing library to handle this type of task or am I better off writing my own? The effort to write one from scratch doesn't seem too difficult (minus recursive file and c

Re: Parsing text file with #include and #define directives

2008-04-25 Thread python
name] = value else: yield define_regexp.sub(define_repl, line) It would be easy to modify it to keep track of line numbers and file names. -- http://mail.python.org/mailman/listinfo/python-list

Re: multiple pattern regular expression

2008-04-25 Thread python
lue Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Given a string - execute a function by the same name

2008-04-28 Thread python
ace all my functions in dictionary and lookup the function to be called Any suggestions on the "best" way to do this? Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

How to unget a line when reading from a file/stream iterator/generator?

2008-04-28 Thread python
(vs. a for-loop) that manually calls my file/stream iterator/generator's .next() method while manually handling the StopIteration exception. Doesn't sound too elegant. Is there a Pythonic design pattern/best practice that I can apply here? Thank you, Malcolm -- http://mail.python.org/mai

Re: How to unget a line when reading from a file/stream iterator/generator?

2008-04-28 Thread python
George, > Is there an elegant way to unget a line when reading from a file/stream > iterator/generator? http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/502304 That's exactly what I was looking for! For those following this thread, the above recipe creates a generic object

Re: Given a string - execute a function by the same name

2008-04-29 Thread python
Bruno, Thank you for your detailed analysis. I learned a lot about Python reading everyone's responses. For development I'm using #5: "globals().get("func")" because its seamless to add additional functionality. But when I release into production I'm

Re: How to unget a line when reading from a file/stream iterator/generator?

2008-04-29 Thread python
Duncan, > If speed is an issue then it may be better to avoid the test altogether ... > Thanks for your suggestion. Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Given a string - execute a function by the same name

2008-04-29 Thread python
Hi Max, Thank you for pointing out the pattern of my request. Using your google query (http://www.google.dk/search?hl=en&q=python+factory+pattern) I found the following description of what I'm doing. Command Dispatch Pattern http://www.suttoncourtenay.org.uk/duncan/accu/pythonpatterns.

Re: Given a string - execute a function by the same name

2008-04-29 Thread python
func return func @register def foo(): print "Foo!" @register def bar(): print "Bar!" >>> functions {'foo': , 'bar': } >>> functions['bar']() Bar! -- http://mail.python.org/mailman/listinfo/python-list

Re: Given a string - execute a function by the same name

2008-04-29 Thread python
Erik, > Perhaps I missed something earlier in the thread, but I really don't see the > need for that registry dict or the register decorator. Python already maintains a dictionary for each scope: The advantage of the decorator technique is that you explicitly declare which fu

Re: [ANN] Vellum 0.16: Lots Of Documentation and Watching

2008-05-01 Thread python
o you plan on posting your next update? Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Preventing 'bad' filenames from raising errors in os.path

2008-05-02 Thread python
Bad file names, i.e. filenames the OS considers illegal, will cause functions in the os.path module to raise an error. Example: import os.path print os.path.getsize( 'c:/pytest/*.py' ) On Windows XP using Python 2.5.2 I get the following traceback: Traceback (most recent call las

Browser + local Python-based web server vs. wxPython

2008-05-05 Thread python
omfortable with a browser based interface as well. I'm looking for feedback from anyone that has pondered the same question as well as any pros/cons or tips from anyone that has chosen the browser/lcoal web server route. Thanks, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to store config or preferences in a multi-platform way.

2008-05-05 Thread python
d. I'm looking forward to hearing what others say on this topic. Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to store config or preferences in a multi-platform way

2008-05-05 Thread python
d. I'm looking forward to hearing what others say on this topic. Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Preventing 'bad' filenames from raising errors in os.path

2008-05-05 Thread python
Matimus and John, Thank you both for your feedback. Matimus: I agree with your analysis. I blame lack of caffeine for my original post :) Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Module to read input from commandline

2008-05-06 Thread python
James, Check out the optparse module as well. The optparse module supercedes(?) the cmd module and offers a lot more functionality. Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Module to read input from commandline

2008-05-06 Thread python
on.org/mailman/listinfo/python-list

Generate labels for a multi-level outline

2008-05-06 Thread python
rsing rules for each level's label type, separators, and error checking. If there's an existing, road tested class (with unit tests) that does this, I would rather avoid re-inventing/re-testing the wheel. Thanks, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: PHP + TinyButStrong Python replacement

2008-05-07 Thread python
Pistacchio, Templite http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496702 A light-weight (~40 lines), fully functional, general purpose templating engine, allowing you to embed python code directly into your text. This engine is suitable for any templating (not only HTML/XML), and is

Re: Generate labels for a multi-level outline (THANK-YOU!)

2008-05-07 Thread python
very elegant approaches. Its interesting to compare your two very different approaches. I will to spend some more time studying your techniques before I choose a final approach. Thank you both again. I'm learning a lot of Python by studying your examples! :) Malcolm -- http://mail.python.o

Re: Generate labels for a multi-level outline

2008-05-08 Thread python
y the above lines ... ... are you referencing formatter.py? http://www.koders.com/python/fid4B7C6E1C20384FC7521414F46DF9DAA33DF2CA11.aspx Thanks for your help on this - I'm learning a lot! Malcolm PS: "throw( up )" ... very funny! :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Generate labels for a multi-level outline (THANK-YOU!)

2008-05-08 Thread python
Dennis, > I was a touch bored in the last hour at work today so... Thank you!! Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Given a string - execute a function by the same name

2008-05-08 Thread python
functions = {} def register(func): functions[func.__name__] = func return func @register def foo(): print "Foo!" @register def bar(): print "Bar!" >>> functions {'foo': , 'bar': } >>> functions['bar']() Bar! Thanks for your feedback, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Benchmark differences between 32 and 64 bit Python?

2008-09-01 Thread python
Anyone have any benchmarks on the difference in performance between 32 and 64 bit versions of Python for specific categories of operation, eg. math, file, string, etc. operations? My question is OS neutral so feel free to share your experience with either Windows or Linux OS's. Than

modules path

2008-09-06 Thread Python
uot; in a shell... thanks in advance, Arno -- http://mail.python.org/mailman/listinfo/python-list

Re: modules path

2008-09-06 Thread Python
On 7 sep 2008, at 00:25, John Machin wrote: On Sep 7, 8:03 am, Python <[EMAIL PROTECTED]> wrote: Hi there, I moved a few modules into the modules folder (on OSX: /opt/local/ lib/ python2.5/site-packages/). They don't show up though when I start IDLE... Is there a way to reload

Re: modules path

2008-09-07 Thread Python
On 7 sep 2008, at 13:50, Gabriel Genellina wrote: En Sat, 06 Sep 2008 20:26:24 -0300, Python <[EMAIL PROTECTED]> escribió: now one question came up, how do I make those path permanent? i mean, sys.path.append( adds it for the current session, yet when i logout of IDLE and start it agai

md5 differences

2008-09-10 Thread Python
Hi there! I'm trying to match the results of an md5 checksum done in a tcsh shell. I keep getting different results and can't find anything on google... here's an example: [EMAIL PROTECTED]:~% echo "hello" | md5 b1946ac92492d2347c6235b4d2611184 [EMAIL PROTECTED]:~%

Re: md5 differences

2008-09-10 Thread Python
On 10 sep 2008, at 18:34, Fredrik Lundh wrote: Python wrote: I'm trying to match the results of an md5 checksum done in a tcsh shell. I keep getting different results and can't find anything on google... here's an example: [EMAIL PROTECTED]:~% ech

Re: md5 differences

2008-09-10 Thread Python
On 10 sep 2008, at 18:30, Richard Brodie wrote: "Python" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] here's an example: [EMAIL PROTECTED]:~% echo "hello" | md5 b1946ac92492d2347c6235b4d2611184 How do I get the same results? Checksum the

Re: md5 differences

2008-09-10 Thread Python
On 10 sep 2008, at 19:39, Grant Edwards wrote: On 2008-09-10, Wojtek Walczak <[EMAIL PROTECTED]> wrote: On Wed, 10 Sep 2008 19:12:28 +0200, Python wrote: [EMAIL PROTECTED]:~% echo "test" > test.txt [EMAIL PROTECTED]:~% md5 test.txt MD5 (test.txt) = d8e8fca2dc0f896fd7cb4cb

Re: md5 differences

2008-09-10 Thread Python
inal window into his posting." I did! I did! my bad... i cut some crap from the path to make it a bit easier to read but that was before the time i knew it was checksumming the actual path in stead of the contents of the file. So I figured it didn't matter... ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I add permanently to Pythons sys.path?

2008-09-16 Thread Python
#x27;, 'C:\\Python25\\lib\\site-packages\\Numeric', 'C:\\Python25\ \lib\\site-packages\\PIL'] Now I have my personal programs in C:/Python25/Progs/ How do I add so that I can just do "import somefile" from anywhere in that directory in the interpreter and it can l

DC panel and subpanel

2006-04-13 Thread python
script, but some reason, that is a mystery to me, when you scale the window up. the item2(“sub”) is getting blocked by a white box. I’m not sure where this box is coming from and not really sure how to get rid of it. I’m fairly new to python and even newer to wxPython, if I’m going around my head to

wx.DC problem

2006-04-13 Thread python
something with me hiding the second panel. Please help me out here… thanks… Attached is my two python scripts that im using… use the test.py to test the PaintPanel script..import wx class PaintPanel(wx.Panel): def __init__(self, parent, id, sub = 0, *args, **kwds): wx.Panel.__init__(self

Recommendation for small, fast, Python based web server

2009-12-09 Thread python
I'm looking for a small, simple, fast, Python based web server for a simple, client side application we're building. We don't want to distrubute and support a "real" web server like Apache or Tomcat or depend on the presence of local web server such as IIS. The application

Re: Recommendation for small, fast, Python based web server

2009-12-09 Thread python
sure what caused the slowness you've experienced (... with running > local versions of Python web servers) Thanks to a past post by "Christoph Zwerschke" , I was able to identify the problem. Windows (XP, Vista, Windows 7) tries to do a IPV6 connection which times out after

Re: Recommendation for small, fast, Python based web server

2009-12-09 Thread python
'm going to re-examine this assumption and take another look at cherrypy. Thanks for your help! Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

CherryPy work with 64-bit version of Python 2.6?

2009-12-10 Thread python
Anyone know if CherryPy works with the 64-bit version of Python 2.6? Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

OS independent way to check if a python app is running?

2009-12-14 Thread python
Is there an os independent way to check if a python app is running? Goal: I have a server program based on cherrypy that I only want to have running once. If a system administrator accidentally attempts to run this program more than once, I would like the 2nd instance of the program to detect

Re: OS independent way to check if a python app is running?

2009-12-14 Thread python
Simon, > if True: >print "I'm running." > > ;-) LOL! Yes, I should of worded my original post better (meant to say "... if a python app is already running". Enjoyed your post anyway - I'm still laughing :) Cheers, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

What type of info do you capture about a user's environment for debugging?

2009-12-14 Thread python
We're preparing to release a commercial software product based on Python. When a customer reports problems with our software, we would like to capture as much information about their environment as possible while being respectful of privacy concerns. The info we capture will be displayed t

Re: OS independent way to check if a python app is running?

2009-12-14 Thread python
Diez, Thank you for your sample code. That was just what we were looking for. Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: OS independent way to check if a python app is (already) running?

2009-12-15 Thread python
Alex, > one way is you can create a lock file, then when the program start you check to see if this lock file exists. Makes sense - thanks! Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: OS independent way to check if a python app is running?

2009-12-15 Thread python
ate - won't work in our specific case. MRAB and Diez posted some excellent, cross platform approaches to locking a resource. Thanks for your feedback. Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Which version of MSVC?90.DLL's to distribute with Python 2.6 based Py2exe executables?

2009-12-17 Thread python
Does anyone have any recommendations on which version of the MSVC?90.DLL's need to be distributed with a Python 2.6.4 PY2EXE (0.6.9) based executable? (I assume I need just a matching pair of MSVCR90.DLL and MSVCP90.DLL?) My understanding is that I need to match the version of the DLL'

Re: Which version of MSVC?90.DLL's to distribute with Python 2.6 based Py2exe executables?

2009-12-27 Thread python
g/mailman/listinfo/python-list

Re: Recommendation for small, fast, Python based web server

2009-12-27 Thread python
> This is a new wsgi web server implemented in a single file. > http://code.google.com/p/web2py/source/browse/gluon/sneaky.py Thank you Massimo. Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: OS independent way to check if a python app is running?

2009-12-27 Thread python
hat succeeds, then a server program is > already running at that port, so he should exit. Thank you for your tip - spot on! Best regards, Malcolm (OP for this thread) -- http://mail.python.org/mailman/listinfo/python-list

Re: OS independent way to check if a python app is running?

2009-12-27 Thread python
th start at the same time, and each tries to > connect, then both will fail, but you don't want both to start, either. Thank you for pointing out that nuance. Best regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Which version of MSVC?90.DLL's to distribute with Python 2.6 based Py2exe executables?

2009-12-29 Thread python
n' % (retcode,)) This seems to work. My py2exe program will now run out of the box on a bare-bones Windows XP install. (note: running 'vcredist_x86.exe /qu' will uninstall the DLLs again) I'm surprised that this technique works because the Python interpreter itself needs to fin

Re: Which version of MSVC?90.DLL's to distribute with Python 2.6 based Py2exe executables?

2010-01-01 Thread python
Waldemar, Thank your for sharing your technique - works great with 32-bit Python 2.6.4. Has anyone tried this with a 64-bit version of Python? Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Safe file I/O to shared file (or SQLite) from multi-threaded web server

2010-01-01 Thread python
I'm looking for the best practice way for a multi-threaded python web server application to read/write to a shared file or a SQLite database. What do I need to do (if anything) to make sure my writes to a regular file on disk or to a SQLite database are atomic in nature when multiple clients

Re: Windows 7 : any problems installing or running Python ?

2010-01-03 Thread python
David, Try disabling your firewall software momentarily to see if that makes a difference. IDLE uses a local port for inter-process communication - you may need to configure your firewall to allow IDLE's port usage. To test whether Python itself has been properly installed, open up a cmd p

Splitting text at whitespace but keeping the whitespace in the returned list

2010-01-24 Thread python
tp://mail.python.org/mailman/listinfo/python-list

Re: Splitting text at whitespace but keeping the whitespace in the returned list

2010-01-24 Thread python
MRAB, "MRAB" wrote: > >>> import re > >>> re.split(r'(\s+)', "Hello world!") > ['Hello', ' ', 'world!'] That was exactly (EXACTLY!) the solution I was looking for. Thank you! Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Python interface to Google translate?

2010-01-27 Thread python
Looking for any recommendations on a Python module/package that would allow me to submit small HTML Unicode documents to Google and retrieve the translated results. Or is this the type of task that one should use a urllib-like module and do manually? Note: By small HTML Unicode documents I mean

Thread safe locale techniques?

2010-01-29 Thread python
We're currently writing a web application based on a threaded python web server framework (cherrypy) and would like to simultaneously support users from multiple locales. The locale module doesn't appear to be thread safe. Are there 3rd party libraries or modules that provide locale p

Creating formatted output using picture strings

2010-02-09 Thread python
Does Python provide a way to format a string according to a 'picture' format? For example, if I have a string '123456789' and want it formatted like '(123)-45-(678)[9]', is there a module or function that will allow me to do this or do I need to code this type of tra

Re: Creating formatted output using picture strings

2010-02-10 Thread python
''.join( output ) # test cases print picture("123456789", "(@@@)-@@-(@@@)[...@]") print picture("123456789ABC", "(@@@)-@@-(@@@)[...@]") print picture("1234", "(@@@)-@@-(@@@)[...@]") print picture("123456789", "(@@@)-@@-(@@@)") print picture("123456789", "(@@@)-@@-(@@@)[...@][@]") Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating formatted output using picture strings

2010-02-10 Thread python
56789ABC", "(@@@)-@@-(@@@)[...@]", pad_left=False) print picture("1234", "(@@@)-@@-(@@@)[...@]", pad_left=False) print picture("123456789", "(@@@)-@@-(@@@)", pad_left=False) print picture("123456789", "(@@@)-@@-(@@@)[...@][@]", pad_left=False) That way you can specify your placeholder, your padding character, and whether you want it to pad to the left or right. -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating formatted output using picture strings

2010-02-10 Thread python
needed to learn :) Thanks again! Malcolm - Original message - From: "Arnaud Delobelle" To: python-list@python.org Date: Wed, 10 Feb 2010 18:21:35 + Subject: Re: Creating formatted output using picture strings pyt...@bdurham.com writes: > Original poster here. > &g

Time out a regular expression in Python 2.6.4?

2010-02-15 Thread python
Is there any way to time out a regular expression in Python 2.6.4? Motiviation: Our application allows users to enter regular expressions as validation criteria. If a user enters a pathological regular expression, we would like to timeout the evaluation of this expression after a short period of

How to build a list of all modules in standard library?

2010-02-17 Thread python
We're building a py2exe executable that may need to do some dynamic module imports. I'm looking for suggestions on how we can mechanically generate a list of standard library modules/packages to make sure our build has the full set of Python 2.6.4 libraries. We're planning on cr

Recommendations for cloud based file storage service with Python API?

2010-02-17 Thread python
I'm looking for recommendations on a cloud based file storage service with a Python API. Would appreciate hearing feedback from anyone using Python to interface to Amazon S3, RackSpace Cloud Files, Microsoft Azure, Rsync.net, or other hosted file storage service. What services do you recomme

How secure are temp files created via tempfile.TemporaryFile()?

2010-02-18 Thread python
about regarding use of this function on Windows (XP or higher) or Linux? Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: How secure are temp files created via tempfile.TemporaryFile()?

2010-02-18 Thread python
created these files. 2. As soon as my process terminates (voluntarily or involuntarily), the temp file gets deleted. But I want to make sure. Thanks, Mal -- http://mail.python.org/mailman/listinfo/python-list

Why do full path names to module show up multiple times in .PYC files?

2010-02-18 Thread python
I just happened to look at a compiled Python 2.6.4 .PYC file in an editor and noticed that the full path and file name of the compiled module showed up in my .PYC file at least 10 different times. Is there a reason for full vs. relative path names and why does the module name need to be duplicated

Re: How secure are temp files created via tempfile.TemporaryFile()?

2010-02-18 Thread python
d your list of OS specific behaviors were EXACTLY the type of information I was looking for. Thanks again! Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Using compileall to create -OO type .pyo files

2010-02-18 Thread python
I've read the documentation on compileall and tried using this module directly. Nowhere can I find how to specify to compileall that it should create .pyo vs. .pyc files. Goal: I would like to use the compileall.compile_dir() method to generate -OO type .pyo files as part of a larger P

Possible to import from a cStringIO file object vs. file on disk?

2010-02-26 Thread python
hon.org/mailman/listinfo/python-list

Re: Possible to import from a cStringIO file object vs. file on disk?

2010-02-26 Thread python
http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list

How to determine if threads are active in an application?

2010-02-26 Thread python
Is there technique to determine if threads are active in a Python application? The only technique I can think of is to check sys.modules for thread and threading. But this will only show whether these modules were imported - not whether there are actually background threads running. Motivation

Re: My four-yorkshireprogrammers contribution

2010-03-04 Thread python
alled - my google-fu fails me. This was approx 1976 when Popular Science's ELF-1 with 256 bytes was quite a sensation. Cheers, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Looking for the mysterious zlib.py* files in Python 2.6.4 (32-bit) for Windows

2010-03-04 Thread python
e explain this mystery to me? Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

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