X2Y 1.1.7 Document Processor Released!

2005-05-15 Thread Chris Withers
X2Y is a flexible, configurable and extendable server-based document processing framework written in python. It has the following feaures: - Cross platform - Fully documented - Run as either a cron job, scheduled task or by hand - Fully configurable logging and notification - Fully

MailingLogger 3.1.0 Released!

2007-05-18 Thread Chris Withers
Hot on the heals of the 3.0.0 release, this 3.1.0 release offers support for SMTP hosts that require authentication in order to send mail... Mailinglogger enables log entries to be emailed either as the entries are logged or as a summary at the end of the running process. This pair of enhanced

MailingLogger 3.2.0 Released!

2007-07-31 Thread Chris Withers
With help from Jens Vagelpohl, I'm pleased to announce a new release of Mailinglogger that now supports filtering of log entries... Mailinglogger enables log entries to be emailed either as the entries are logged or as a summary at the end of the running process. This pair of enhanced emailing

MailingLogger 3.2.2 Released!

2008-11-10 Thread Chris Withers
I'm pleased to announce a new release of Mailinglogger that finally correctly supports easy_install and so works fine with zc.buildout-based projects. In fact, MailingLogger has *become* a zc.buildout-based project for its development... Anyway, Mailinglogger provides two handlers for the

Tutorial on working with Excel files in Python (without COM and cross platform!) at PyConUS 2009

2009-01-27 Thread Chris Withers
Hi All, Too many people in the Python community think the only way to work with Excel files in Python is using COM on Windows. To try and correct this, I'm giving a tutorial at this year's PyCon in Chicago on Wednesday, 25th March that will cover working with Excel files in Python using the

Announcing www.python-excel.org

2009-06-19 Thread Chris Withers
Hi All, Google unfortunately has a knack of presenting prospective Python users who need to work with Excel files with information that is now really rather out of date. To try and help with this, I've setup a small website at: http://www.python-excel.org ...to try and list the latest

Tutorial on working with Excel files in Python (without COM and cross platform!) at EuroPython 2009

2009-06-19 Thread Chris Withers
Hi All, Too many people in the Python community *still* think the only way to work with Excel files in Python is using COM on Windows. To try and correct this, I'm giving a tutorial at this year's EuroPython conference in Birmingham, UK on Monday, 29th June that will cover working with

xlutils 1.3.2 released!

2009-06-19 Thread Chris Withers
Hi All, I'm pleased to announce a new release of xlutils. This is a small collection of utilities that make use of both xlrd and xlwt to process Microsoft Excel files. The list of utilities included in this release are: xlutils.copy Tools for copying xlrd.Book objects to xlwt.Workbook

TestFixtures 1.6.0 released!

2009-06-19 Thread Chris Withers
Hi All, I'm pleased to announce the first advertised release of TestFixtures. This is a collection of helpers and mock objects that are useful when writing unit tests or doc tests. The modules currently included are: *Comparison* This class lets you instantiate placeholders that can be

MailingLogger 3.3.0 Released!

2009-06-19 Thread Chris Withers
I'm pleased to announce a new release of Mailinglogger. Mailinglogger provides two handlers for the standard python logging framework that enable log entries to be emailed either as the entries are logged or as a summary at the end of the running process. The handlers have the following

ErrorHandler 1.0.0 Released!

2009-06-19 Thread Chris Withers
I'm pleased to finally get around to announcing the release of ErrorHandler. This is a handler for the python standard logging framework that can be used to tell whether messages have been logged at or above a certain level. This can be useful when wanting to ensure that no errors have been

xlutils 1.4.0 released!

2009-08-19 Thread Chris Withers
Hi All, I'm pleased to announce a new release of xlutils. This is a small collection of utilities that make use of both xlrd and xlwt to process Microsoft Excel files. The changes for this release are as follows: - Add sheet density information and onesheet option to xlutils.margins. -

TestFixtures 1.6.1 released!

2009-09-06 Thread Chris Withers
Hi All, I'm pleased to announce a new release of TestFixtures. This package is a collection of helpers and mock objects that are useful when writing unit tests or doc tests. This release sees the following changes: - @replace and Replacer.replace can now replace attributes that may not be

xlutils 1.4.1 released!

2009-09-06 Thread Chris Withers
Hi All, I'm pleased to announce a new release of xlutils. This package is a small collection of utilities that make use of both xlrd and xlwt to process Microsoft Excel files. This release includes memory and speed enhancements for xlutils.filter and xlutils.copy. To find out more, please

ErrorHandler 1.1.0 Released!

2009-11-07 Thread Chris Withers
I'm pleased to announce a new release of ErrorHandler. This is a handler for the python standard logging framework that can be used to tell whether messages have been logged at or above a certain level. The only change for this release is that there is now a full set of documentation available

Checker 1.0 Released!

2009-12-19 Thread Chris Withers
I'm pleased to announce the first release of Checker. This is a cross-platform, pluggable tool for comparing the configuration of a machine with a known configuration stored in text files in a source control system all written in Python. For more information, please see:

Checker 1.3 Released!

2010-08-10 Thread Chris Withers
I'm pleased to announce a new release of Checker. This is a cross-platform, pluggable tool for comparing the configuration of a machine with a known configuration stored in text files in a source control system all written in Python. This release and the previous release fix ordering issues in

Execute 1.2 Released!

2010-08-10 Thread Chris Withers
I'm pleased to announce the first public release of Execute. This is a collection of common patterns for executing commands as sub processes. It supports executing a simple command that requires no input in a sub process and can return: - text sent to the standard error and output streams

Checker 1.4 Released!

2010-09-26 Thread Chris Withers
I'm pleased to announce a new release of Checker. This is a cross-platform, pluggable tool for comparing the configuration of a machine with a known configuration stored in text files in a source control system all written in Python. This release adds a 'command' checker that lets you record

Re: MailingLogger 3.4.0 Released!

2011-08-23 Thread Chris Withers
Heh, of course, I forgot the setuptools-git extension to make include_package_data=True work, so this release was pretty useless, other than the docs on packages.python.org/testfixtures ;-) Anyway, 3.4.1 has now been released which fixes this! cheers, Chris On 17/08/2011 23:37, Chris

MailingLogger 3.5.0 Released!

2011-09-24 Thread Chris Withers
I'm pleased to announce a new release of Mailinglogger. Mailinglogger provides two handlers for the standard python logging framework that enable log entries to be emailed either as the entries are logged or as a summary at the end of the running process. The handlers have the following

MailingLogger 3.6.0 Released!

2011-11-25 Thread Chris Withers
I'm pleased to announce a new release of Mailinglogger. Mailinglogger provides two handlers for the standard python logging framework that enable log entries to be emailed either as the entries are logged or as a summary at the end of the running process. The handlers have the following

MailingLogger 3.7.0 Released!

2012-01-18 Thread Chris Withers
I'm pleased to announce a new release of Mailinglogger. Mailinglogger provides two handlers for the standard python logging framework that enable log entries to be emailed either as the entries are logged or as a summary at the end of the running process. The handlers have the following

X2Y 1.1.7 Document Processor Released!

2005-05-15 Thread Chris Withers
X2Y is a flexible, configurable and extendable server-based document processing framework written in python. It has the following feaures: - Cross platform - Fully documented - Run as either a cron job, scheduled task or by hand - Fully configurable logging and notification - Fully

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-02 Thread Chris Withers
Martin v. Löwis wrote: I propose the following PEP for inclusion to Python 3.1. Please comment. Would this support the following case: I have a package called mortar, which defines useful stuff: from mortar import content, ... I now want to distribute large optional chunks separately, but

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-02 Thread Chris Withers
P.J. Eby wrote: Apart from that, this mechanism sounds great! I only wish there was a way to backport it all the way to 2.3 so I could drop the messy bits from setuptools. Maybe we could? :-) Chris -- Simplistix - Content Management, Zope Python Consulting -

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-02 Thread Chris Withers
andrew cooke wrote: I now want to distribute large optional chunks separately, but ideally so that the following will will work: from mortar.rbd import ... from mortar.zodb import ... from mortar.wsgi import ... i may be misunderstanding, but i think you can already do this. in lepl i have

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-06 Thread Chris Withers
Martin v. Löwis wrote: Chris Withers wrote: Martin v. Löwis wrote: I propose the following PEP for inclusion to Python 3.1. Please comment. Would this support the following case: I have a package called mortar, which defines useful stuff: from mortar import content, ... I now want

Re: [Python-Dev] PEP 382: Namespace Packages

2009-04-06 Thread Chris Withers
P.J. Eby wrote: See the third paragraph of http://www.python.org/dev/peps/pep-0382/#discussion Indeed, I guess the PEP could be made more explanatory then 'cos, as a packager, I don't see what I'd put in the various setup.py and __init__.py to make this work... That said, I'm delighted to

MailingLogger 3.2.0 Released!

2007-07-31 Thread Chris Withers
With help from Jens Vagelpohl, I'm pleased to announce a new release of Mailinglogger that now supports filtering of log entries... Mailinglogger enables log entries to be emailed either as the entries are logged or as a summary at the end of the running process. This pair of enhanced emailing

securing a python execution environment...

2007-11-19 Thread Chris Withers
Hi All, I'm trying to build a secure execution environment for bits of python for two reasons: - to allow users of the system to write scripts in python without circumventing the application's security model - to allow the system to have an environment where security is handled without

Re: What is python?????

2007-11-19 Thread Chris Withers
Diez B. Roggisch wrote: It's amazing that recently so many spam is written by some guys actually _reading_ this group. I presume they somehow want to create credibility in their postings by provoking real threads that then at some point contain the actual information. I wonder why this

Re: securing a python execution environment...

2007-11-19 Thread Chris Withers
Laszlo Nagy wrote: Once upon a time, there has been a module called bastillon (am I right?) and rexec (restricted execution environment) but they were not really secure. It was a long time ago. Python is very flexible, and interpreted and it is hard to prevent the users from importing

Re: securing a python execution environment...

2007-11-19 Thread Chris Withers
Alberto Berti wrote: maybe using import hooks? http://www.python.org/dev/peps/pep-0302/ Well, as Lazlo reminded me, there are also plenty of builtins that are problematic... although hopefully providing a limited set of contents for the global and local namespaces could solve that? But,

Re: securing a python execution environment...

2007-11-19 Thread Chris Withers
Paul Boddie wrote: http://wiki.python.org/moin/SandboxedPython http://wiki.python.org/moin/How_can_I_run_an_untrusted_Python_script_safely_%28i%2ee%2e_Sandbox%29 Yeah, from this I'm pretty much set on: http://pypi.python.org/pypi/RestrictedPython/ I know it's pretty bulletproof (I've been

MailingLogger 3.0.0 Released!

2007-05-09 Thread Chris Withers
Mailinglogger enables log entries to be emailed either as the entries are logged or as a summary at the end of the running process. This pair of enhanced emailing handlers for the python logging framework is now available as a standard python package and as an egg. The handlers have the

MailingLogger 3.1.0 Released!

2007-05-17 Thread Chris Withers
Hot on the heals of the 3.0.0 release, this 3.1.0 release offers support for SMTP hosts that require authentication in order to send mail... Mailinglogger enables log entries to be emailed either as the entries are logged or as a summary at the end of the running process. This pair of enhanced

Problems with email.Generator.Generator

2006-09-11 Thread Chris Withers
Hi All, The following piece of code is giving me issues: from email.Charset import Charset,QP from email.MIMEText import MIMEText charset = Charset('utf-8') charset.body_encoding = QP msg = MIMEText( u'Some text with chars that need encoding: \xa3', 'plain', )

Re: Problems with email.Generator.Generator

2006-09-11 Thread Chris Withers
Manlio Perillo wrote: Try with: msg = MIMEText( u'Some text with chars that need encoding: \xa3', _charset='utf-8', ) and you will obtain the error: Traceback (most recent call last): File pyshell#4, line 3, in -toplevel- _charset='utf-8', File

Re: Problems with email.Generator.Generator

2006-09-11 Thread Chris Withers
Peter Otten wrote: http://sourceforge.net/tracker/?func=detailaid=1409455group_id=5470atid=105470 Now, is this change to Generator.py in error or am I doing something wrong? I'm not familiar enough with the email package to answer that. I'm hoping someone around here is ;-) If the latter,

Re: Problems with email.Generator.Generator

2006-09-11 Thread Chris Withers
Steve Holden wrote: Is there a how-to for this anywhere? The email package's docs are short on examples involving charsets, unicode and the like :-( Well, it would seem like the easiest approach is to monkey-patch the use of cStringIO to StringIO as recommended and see if that fixes your

Re: Problems with email.Generator.Generator

2006-09-11 Thread Chris Withers
Manlio Perillo wrote: The problem is simple: email package does not support well Unicode strings. Really? All the character set support seems to indicate a fair bit of thought went into this aspect, although it does appear that no-one bothered to document it :-( Chris -- Simplistix -

Re: Problems with email.Generator.Generator

2006-09-11 Thread Chris Withers
Peter Otten wrote: What past experience? StringIO.StringIO().write(unichr(128)) cStringIO.StringIO().write(unichr(128)) Traceback (most recent call last): File stdin, line 1, in ? UnicodeEncodeError: 'ascii' codec can't encode character u'\x80' in position 0: ordinal not in range(128)

Re: Problems with email.Generator.Generator

2006-09-11 Thread Chris Withers
Peter Otten wrote: Chris Withers wrote: At worst, and most likely based on my past experience of (c)StringIO being used to accumulate output, it won't make a jot of difference... What past experience? StringIO.StringIO().write(unichr(128)) cStringIO.StringIO().write(unichr(128

Re: Problems with email.Generator.Generator

2006-09-11 Thread Chris Withers
Chris Withers wrote: ...except it gets the transfer encoding wrong, which means Thunderbird shows =A3 instead of the pound sign that it should :-( ...this is down to a pretty lame bit of code in Encoders.py which basically checks for a unicode error *sigh* OK, slight progress... here

Re: Problems with email.Generator.Generator

2006-09-11 Thread Chris Withers
Chris Withers wrote: print msg.as_string() MIME-Version: 1.0 Content-Type: text/plain; charset; charset=utf-8 ^^^ Actually, even this isn't correct as you can see above... charset = Charset('utf-8') msg = MIMEText('','plain',None) msg.set_payload(u'Some

Problems with email.Generator.Generator - Solved?

2006-09-11 Thread Chris Withers
Chris Withers wrote: Has no-one ever successfully generated a correctly formatted email with email.MIMEText where the message includes non-ascii characters?! I'm guessing not ;-) Well, I think I have a winner, but it required me to subclass MIMEText: from email.Charset import Charset,QP from

Re: Problems with email.Generator.Generator

2006-09-12 Thread Chris Withers
Max M wrote: From the docs: The payload is either a string in the case of simple message objects or a list of Message objects for MIME container documents (e.g. multipart/* and message/rfc822) Where'd you find that? I must have missed it in my digging :-S Message objects are always

A new text templating system for python!

2006-12-16 Thread Chris Withers
Hi All, I'm proud to announce that after almost a year's development, the first public release of Twiddler is available! Twiddler is a simple but flexible templating system for dynamically generating textual output. The key features are: - No need to learn a templating language. - As simple

xlutils 1.0.0 released!

2008-11-09 Thread Chris Withers
Hi All, I'm pleased to announce the first release of xlutils. This is a small collection of utilities that make use of both xlrd and xlwt to process Microsoft Excel files. The current utilities included are: xlutils.margins Tools for finding how much of an Excel file contains useful data.

xlutils 1.1.0 released!

2008-11-14 Thread Chris Withers
Hi All, I'm pleased to announce a new release of xlutils. This is a small collection of utilities that make use of both xlrd and xlwt to process Microsoft Excel files. The list of utilities included in this release are: xlutils.display Utility functions for displaying information about

MailingLogger 3.2.2 Released!

2008-11-16 Thread Chris Withers
I'm pleased to announce a new release of Mailinglogger that finally correctly supports easy_install and so works fine with zc.buildout-based projects. In fact, MailingLogger has *become* a zc.buildout-based project for its development... Anyway, Mailinglogger provides two handlers for the

Tutorial on working with Excel files in Python (without COM and cross platform!) at PyConUS 2009

2009-01-22 Thread Chris Withers
Hi All, Too many people in the Python community think the only way to work with Excel files in Python is using COM on Windows. To try and correct this, I'm giving a tutorial at this year's PyCon in Chicago on Wednesday, 25th March that will cover working with Excel files in Python using the

ErrorHandler 1.1.0 Released!

2009-11-07 Thread Chris Withers
I'm pleased to announce a new release of ErrorHandler. This is a handler for the python standard logging framework that can be used to tell whether messages have been logged at or above a certain level. The only change for this release is that there is now a full set of documentation available

Vote on PyPI comments

2009-11-13 Thread Chris Withers
Hi All, Apologies for the cross post, but I'm not sure this has received the publicity it deserves... PyPI grew a commenting and rating system a while back, apparently in response to requests from users. However, since it's been rolled out, there's been a backlash from package maintainers

Re: feedback on function introspection in argparse

2009-11-14 Thread Chris Withers
Yuv wrote: On Nov 8, 1:33 am, Carl Banks pavlovevide...@gmail.com wrote: Is the docstring expected to be formatted according to some convention? We tried to comply to PEP 257 and we're open to suggestions on this. I'd suggest at the very least supporting Sphinx docstrings that have the

Re: Anything better than shutil?

2009-11-14 Thread Chris Withers
Roy Smith wrote: The idea interface I see would be one like: shutil.copy([source_dir, '*.conf'], conf_dir) the idea is that if the first argument is a list (or maybe any iterable other than a string?), it would automatically get run through os.path.join(). And, the result would always get

Re: Calling Python functions from Excel

2009-11-17 Thread Chris Withers
Cannonbiker wrote: Hi, unfortunately is my question about server COM (win32com) http://groups.google.com/group/comp.lang.python/browse_thread/thread/ee804cec7f58c6a7# without answer. Please I need Calling Python functions from Excel and receive result back in Excel. Can me somebody advise

Re: Calling Python functions from Excel

2009-11-17 Thread Chris Withers
Mark Tolonen wrote: Please I need Calling Python functions from Excel and receive result back in Excel. Can me somebody advise simplest solution please? I am more VBA programmer than Python. Try http://code.google.com/p/pyinex/ The book Python: Programming on Win32 has a whole chapter on

Re: Python OpenOffice Spreadsheets

2009-11-23 Thread Chris Withers
Gerhard Häring wrote: Is there a *simple* way to read OpenOffice spreadsheets? Ironically, if you don't mind working in .xls, which OpenOffice handles just fine, you have xlrd and xlwt to do exactly what you're after: http://www.python-excel.org/ cheers, Chris -- Simplistix - Content

subprocess.Popen and ordering writes to stdout and stderr

2009-12-17 Thread Chris Withers
Hi All, I have this simple function: def execute(command): process = Popen(command.split(),stderr=STDOUT,stdout=PIPE) return process.communicate()[0] ..but my unit test for it fails: from testfixtures import tempdir,compare from unittest import TestCase class TestExecute(TestCase):

Re: subprocess.Popen and ordering writes to stdout and stderr

2009-12-17 Thread Chris Withers
exar...@twistedmatrix.com wrote: How can I get this to be the case? You probably just need to flush stdout and stderr after each write. You set them up to go to the same underlying file descriptor, but they still each have independent buffering on top of that. Okay, but if I do:

Re: subprocess.Popen and ordering writes to stdout and stderr

2009-12-17 Thread Chris Withers
exar...@twistedmatrix.com wrote: libc is probably giving you line buffering when you use os.system (because the child process inherits the parent's stdio, and the parent's stdio is probably a pty, and that's the policy libc implements). snip Interesting, but do these assertions still hold

Checker 1.0 Released!

2009-12-19 Thread Chris Withers
I'm pleased to announce the first release of Checker. This is a cross-platform, pluggable tool for comparing the configuration of a machine with a known configuration stored in text files in a source control system all written in Python. For more information, please see:

Re: zope server on ubuntu 9.10

2009-12-28 Thread Chris Withers
S.Selvam wrote: I am using Ubuntu 9.10 and when i tried to install Zope application server with the following , sudo easy_install -i http://download.zope.org/Zope2/index/2.12.1 Zope2 i got an error as shown below, --- . . Reading http://download.zope.org/Zope2/index/2.12.1/ No

Re: parsing an Excel formula with the re module

2010-01-12 Thread Chris Withers
John Machin wrote: The xlwt package (of which I am the maintainer) has a lexer and parser for a largish subset of the syntax ... see http://pypi.python.org/pypi/xlwt xlrd, no? Also worth pointing out that the topic of Python and Excel has its own web site: http://www.python-excel.org

Re: Append to an Excel file

2010-01-12 Thread Chris Withers
Niels L. Ellegaard wrote: pp parul.pande...@gmail.com writes: On Jan 9, 1:47 am, Jason Scheirer jason.schei...@gmail.com wrote: On Jan 9, 12:30 am, pp parul.pande...@gmail.com wrote: Hi All, How do I add a line to an existing file. This should append to the existing data in the excel file,

Re: unittest inconsistent

2010-01-12 Thread Chris Withers
Phlip wrote: The reason the 'Tester' object has no attribute 'arg1' is because self still refers to the object made for testA. I hope someone else can spot the low-level reason... ...but why aren't you using http://pypi.python.org/pypi/mock/ ? Look up its patch_object facility... Indeed, I

Re: Bugs in CPython 3.1.1 [wave.py]

2010-01-12 Thread Chris Withers
Alf P. Steinbach wrote: PS: It would be nice if someone(TM) could describe here in detail how to properly report errors like this. http://tinyurl.com/yemcdy7 Of course I'm not going to do it if it involves establishing Yet Another Account somewhere. Of course that means no-one else

Re: parsing an Excel formula with the re module

2010-01-13 Thread Chris Withers
John Machin wrote: The OP was planning to dig the formula text out using COM then parse the formula text looking for cell references and appeared to have a rather simplistic view of the ease of parsing Excel formula text -- that's why I pointed him at those facilities (existing, released,

what test runner should I use?

2010-01-19 Thread Chris Withers
Hi All, I'm wondering what test runner I should use. Here's my list of requirements: - cross platform (I develop for and on Windows, Linux and Mac) - should not prevent tests from running with other test runners (so no plugins/layers/etc that only work with one specific test runner) -

Re: How to use python to register a service (an existing .exe file)

2010-03-01 Thread Chris Withers
Aahz wrote: In article 4b79e28c$0$4610$426a7...@news.free.fr, News123 news...@free.fr wrote: Is there a python way to register new windows services. I am aware of the instsrv.exe program, which can be used to install services. I could use subprocess.Popen to call instsrv.exe service_name

Re: Anything like Effective Java for Python?

2010-03-10 Thread Chris Withers
kj wrote: Subject line pretty much says it all: is there a book like Effective Java oxymoronic, no? Sorry, couldn't resist ;-) Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk --

Re: Python 2.6 still not giving memory back to the OS...

2009-08-24 Thread Chris Withers
Martin v. Löwis wrote: Today, there are two cases when malloc returns memory on a typical Unix system (in particular, in Linux malloc): a) if the malloc block block is small (below page size), it is allocated from the brk heap, where it can only be returned if the last page of that heap is

Re: Barcodes

2009-08-24 Thread Chris Withers
Ronn Ross wrote: I found this library, but no documentation(https://cybernetics.hudora.biz/projects/wiki/huBarcode). Has anyone used this or know of a similar library with better documentation? Yup, reportlab has really good barcode generation stuff. I use it to generate labels with

inconsistent sitecustomize.py importing...

2009-08-25 Thread Chris Withers
Hi All, Give this sitecustomize.py: print ping ...and this script: #!/usr/local/bin/python2.5 print pong! ...both in ~/folder, I would expect the output from: ~$./folder/script ...to be: ping pong ...but sitecustomize.py is not imported :-( If I do: ~$/usr/local/bin/python2.5

Even more inconsistent sitecustomize.py importing with PYTHONPATH rolled in...

2009-08-25 Thread Chris Withers
Chris Withers wrote: However, if I do: ~/folder$/usr/local/bin/python2.5 script ...sitecustomize.py IS imported! However, the following doesn't import sitecustomize.py: ~/folder$ ./script While the following DOES import sitecustomize.py: ~/folder$ export PYTHONPATH= ~/folder$ ./script

Re: Even more inconsistent sitecustomize.py importing with PYTHONPATH rolled in...

2009-08-25 Thread Chris Withers
Chris Withers wrote: Bizarrely, none of the following import sitecustomize.py: ~$ export PYTHONPATH=~/folder ~$ ./script ~$ export PYTHONPATH=~/folder/ ~$ ./script ~$ export PYTHONPATH=~/folder ~/folder$ ./script ~$ export PYTHONPATH=~/folder/ ~/folder$ ./script Okay, brain fail on my part

Re: why python got less developers ?

2009-08-28 Thread Chris Withers
Esam Qanadeely wrote: .NET= i meant all .NET languages What? You mean like Python? ;-) Google IronPython ya troll... Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: An iteration idiom (Was: Re: [Guppy-pe-list] loading files containing multiple dumps)

2009-09-03 Thread Chris Withers
Raymond Hettinger wrote: In the first case, you would write: sets.extend(h.load(f)) yes, what I had was: for s in iter(h.load(f)): sets.append(s) ...which I mistakenly thought was working, but in in fact boils down to Raymond's code. The problem is that each item that h.load(f) returns

TestFixtures 1.6.1 released!

2009-09-06 Thread Chris Withers
Hi All, I'm pleased to announce a new release of TestFixtures. This package is a collection of helpers and mock objects that are useful when writing unit tests or doc tests. This release sees the following changes: - @replace and Replacer.replace can now replace attributes that may not be

xlutils 1.4.1 released!

2009-09-06 Thread Chris Withers
Hi All, I'm pleased to announce a new release of xlutils. This package is a small collection of utilities that make use of both xlrd and xlwt to process Microsoft Excel files. This release includes memory and speed enhancements for xlutils.filter and xlutils.copy. To find out more, please

Re: zip a huge file into multiple small ones

2009-09-07 Thread Chris Withers
krishna chaitanya wrote: I am new to dealing with zip files in python. I have a huge file which i need to zip and send as an attachment through email. My email restrictions are not allowing me to send it in one go. Is there a way to split this file into multiple zip files, so that i can mail

Re: httplib incredibly slow :-(

2009-09-07 Thread Chris Withers
Dieter Maurer wrote: Chris Withers ch...@simplistix.co.uk writes on Thu, 13 Aug 2009 08:20:37 +0100: ... I've already established that the file downloads in seconds with [something else], so I'd like to understand why python isn't doing the same and fix the problem... A profile might help

Re: [Guppy-pe-list] An iteration idiom (Was: Re: loading files containing multiple dumps)

2009-09-07 Thread Chris Withers
Sverker Nilsson wrote: I hope the new loadall method as I wrote about before will resolve this. def loadall(self,f): ''' Generates all objects from an open file f or a file named f''' if isinstance(f,basestring): f=open(f) while True: yield self.load(f) It would be

uses for setup.cfg and extracting data from it

2009-09-09 Thread Chris Withers
Hi All, Do people generally source control their package's setup.cfg? http://docs.python.org/distutils/configfile.html sort of implies it should be editable by the person installing the package, but I've never personally used a package where that's the case... Assuming the distutils docs

Re: [Guppy-pe-list] An iteration idiom (Was: Re: loading files containing multiple dumps)

2009-09-09 Thread Chris Withers
Sverker Nilsson wrote: But I don't think I would want to risk breaking someone's code just for this when we could just add a new method. I don't think anyone will be relying on StopIteration being raised. If you're worried, do the next release as a 0.10.0 release and explain the backwards

Re: Some issue with easy_install and PIL/Imaging

2009-09-11 Thread Chris Withers
Klein Stéphane wrote: Resume : 1. first question : why PIL package in pypi don't work ? Because Fred Lundh have his package distributions unfortunate names that setuptools doesn't like... 2. second question : when I add PIL dependence in my setup.py and I do python setup.py develop,

Re: urlopen error (11001, 'getaddrinfo failed')

2009-09-11 Thread Chris Withers
open...@hushmail.com wrote: fs = cgi.FieldStorage() url = fs.getvalue('url', http://www.openlayers.org;) try: insert a print url here... y = urllib2.urlopen(url) print y.read() This script produces the urlopen error (11001, 'getaddrinfo failed'). This is a name lookup failing,

Re: [Guppy-pe-list] An iteration idiom (Was: Re: loading files containing multiple dumps)

2009-09-11 Thread Chris Withers
Sverker Nilsson wrote: If you just use heap(), and only want total memory not relative to a reference point, you can just use hpy() directly. So rather than: CASE 1: h=hpy() h.heap().dump(...) #other code, the data internal to h is still around h.heap().dump(...) you'd do: CASE 2:

Re: Looking for a pure Python chart drawing module

2009-09-18 Thread Chris Withers
John Nagle wrote: That's a wrapper for Antigrain (http://www.antigrain.com/;), which is a C++ library. I'm trying hard to avoid dependencies on binary libraries with limited support. Builds exist only for Python 2.4 and 2.5. Huh? Matplotlib is a pretty phenomenal charting library, I use

Re: Looking for a pure Python chart drawing module

2009-09-18 Thread Chris Withers
Grant Edwards wrote: On 2009-09-16, Alan G Isaac alan.is...@gmail.com wrote: Tkinter is part of the Python standard library: That doesn't mean you can depend on it being available. It doesn't get installed by default on some Linux distros. That's 'cos some linux distros feel the need to

Re: recommendation for webapp testing?

2009-09-18 Thread Chris Withers
Simon Brunning wrote: Mechanize is a superb library for its intended purpose - I use it all the time. It's lack of support for pages with JavaScript functionality, though, means it's not very useful at a testing tool for modern web sites. There's also zope.testbrowser, which is a handy wrapper

Re: How do I begin debugging a python memory leak?

2009-09-18 Thread Chris Withers
Matthew Wilson wrote: I have a web app based on TurboGears 1.0. In the last few days, as traffic and usage has picked up, I noticed that the app went from using 4% of my total memory all the way up to 50%. I suspect I'm loading data from the database and somehow preventing garbage collection.

TestFixtures 1.6.2 released!

2009-09-23 Thread Chris Withers
Hi All, I'm pleased to announce a new release of TestFixtures. This package is a collection of helpers and mock objects that are useful when writing unit tests or doc tests. This release fixes problems when using Comparison objects with instances of Django models, so tests like the following

problems trying to build python 2.6 as a shared library

2009-09-25 Thread Chris Withers
Hi All, I'm trying to build Python 2.6 as a shared library, so I did: ./configure --enable-shared make make altinstall No obvious signs of failure, but when I try and use the resulting python, I get: python2.6: error while loading shared libraries: libpython2.6.so.1.0: cannot open

problems compiling pyscopg2 on RHEL4

2009-09-25 Thread Chris Withers
Hi All, I installed the following rpms: postgresql-libs-7.4.19-1.el4_6.1 postgresql-devel-7.4.19-1.el4_6.1 postgresql-7.4.19-1.el4_6.1 And then installed psycopg2 as follows: wget http://initd.org/pub/software/psycopg/psycopg2-2.0.12.tar.gz tar xzf psycopg2-2.0.12.tar.gz cd psycopg2-2.0.12

Re: logging.handlers.SMTPHandler question

2009-09-30 Thread Chris Withers
akonsu wrote: hello, SMTPHAndler seems to email every single record separately. is there a way to collect all log output and then send it in a single email message? or do i have to do it manually? You want the SummarisingHandler from this package:

Re: Repeated output when logging exceptions

2009-09-30 Thread Chris Withers
Vinay Sajip wrote: I'm not sure why you need all the code you've posted. The logging package allows you to add tracebacks to your logs by using the exception() method, which logs an ERROR with a traceback and is specifically intended for use from within exception handlers. You can also use

Re: Repeated output when logging exceptions

2009-09-30 Thread Chris Withers
John Gordon wrote: If I didn't do all that in a class, where would I do it? I find the configureLoggers method of ZConfig most convenient for this: http://pypi.python.org/pypi/ZConfig cheers, Chris -- Simplistix - Content Management, Batch Processing Python Consulting -

  1   2   3   4   5   6   >