testfixtures 3.0.2 Released!

2014-04-07 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 3.0.2. This is a bug fix release featuring the following changes: - Document ShouldRaise.raised and make it part of the official API. - Fix rare failures when cleaning up TempDirectory instances on Windows. If you haven't bumped int

xlrd 0.9.3 released!

2014-04-10 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlrd 0.9.3: http://pypi.python.org/pypi/xlrd/0.9.3 This release includes the following changes: - Github issue #49 - Github issue #64 - skip meaningless chunk of 4 zero bytes between two otherwise-valid BIFF records - Github issue #61 - fix up

Re: xlutils 1.7.1 released!

2014-04-25 Thread Chris Withers
*sigh* subject line fail... On 25/04/2014 19:48, Chris Withers wrote: Hi All, I'm pleased to announce the release of xlutils 1.7.1: http://pypi.python.org/pypi/xlutils/1.7.1 This release has a couple of small changes: - Add support for time cells in when using View classes. - Add su

xlutils 1.7.0 released!

2014-04-25 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlutils 1.7.1: http://pypi.python.org/pypi/xlutils/1.7.1 This release has a couple of small changes: - Add support for time cells in when using View classes. - Add support for ``.xlsx`` files when using View classes, at the expense of formattin

testfixtures 3.1.0 Released!

2014-05-25 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 3.1.0. This is a new feature and bug fix release featuring the following changes: - New RoundComparison object for comparing numbers to a given precision - New 'unless' parameter to ShouldRaise, for situations where an exception is

xlutils 1.7.0 released!

2013-10-29 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlutils 1.7.0: http://pypi.python.org/pypi/xlutils/1.7.0 This release features a handy new view module that lets you do things like: >>> def print_data(rows): ... for row in rows: ... for value in row: ... print value, ...

mush 1.0 released! - Type-based dependency injection for scripts

2013-10-29 Thread Chris Withers
Hi All, I'm very happy to announce the first public release of Mush, a light weight dependency injection framework aimed at enabling the easy testing and re-use of chunks of code that make up scripts. For a worked example of how to use Mush to reduce the copy'n'paste in your scripts, please

xlwt 1.0.0 released!

2015-04-15 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlwt 1.0.0. This release contains the following: - Python 3 support. - An initial set of unit tests. - An initial set of Sphinx documentation. - Move to setuptools for packaging. - Wire up Travis, Coveralls and ReadTheDocs. - Allow longs as ro

xlrd 0.9.4 released!

2015-07-14 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlrd 0.9.4: http://pypi.python.org/pypi/xlrd/0.9.4 This release includes the following changes: - Automated tests are now run on Python 3.4 - Use ElementTree.iter() if available, not deprecated getiterator() when parsing xlsx files. - Fix #106

testfixtures 4.2.0 Released!

2015-08-11 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.2.0. This is a feature release that fixes the following: - A new MockPopen mock for use when testing code that uses subprocess.Popen. - ShouldRaiss now subclasses object, so that subclasses of it may use super(). - Support for

testfixtures 4.3.0 Released!

2015-09-15 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.3.0. This is a feature release that adds the following: - Add TempDirectory.compare with a cleaner, more explicit API that allows comparison of only the files in a temporary directory. - Deprecate TempDirectory.check, TempDirecto

testfixtures 4.3.3 Released!

2015-09-15 Thread Chris Withers
Sorry, the move to using Travis CI was not without bumps, and we're now on 4.3.3, which should be correctly built, including docs up on http://testfixtures.readthedocs.org/. Apologies for the noise... Chris On 15/09/2015 14:54, Chris Withers wrote: Hi All, I'm pleased to an

testfixtures 4.4.0 Released!

2015-11-01 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.4.0. This is a feature release that adds the following: - Add support for labelling the arguments passed to compare(). - Allow expected and actual keyword parameters to be passed to compare(). - Fix "TypeError: unorderable types

testfixtures 4.5.1 Released!

2015-11-22 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.5.1. This release that contains: - LogCapture, OutputCapture and TempDirectory explicitly show what is expected versus actual when reporting differences as of 4.5.0. - The 4.5.1 release contains a bugfix where OutputCapture cou

testfixtures 4.0.0 Released!

2014-07-22 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.0.0. This is a new feature release with the following major changes: - Moved from buildout to virtualenv for development. - compare() will now work recursively on data structures for which it has registered comparers, giving more

testfixtures 4.0.1 Released!

2014-08-04 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.0.1. This is a bugfix release that fixes the following two edge cases: - Fix bugs when string compared equal and options to compare() were used. - Fix bug when strictly comparing two nested structures containing identical objec

testfixtures 4.0.2 Released!

2014-09-10 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.0.2. This is a bugfix release that fixes the following: - Fix "maximum recursion depth exceeded" when comparing a string with bytes that did not contain the same character. The package is on PyPI and a full list of all the links

python install on locked down windows box?

2011-09-22 Thread Chris Withers
Hi All, Is there a way to install python on a locked down Windows desktop? (ie: no compilers, no admin rights, etc) cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk -- http://mail.python.org/mailman/listinfo/python

TestFixtures 2.0.0 Released!

2011-09-23 Thread Chris Withers
Hi All, I'm happy to announce a new release major release of TestFixtures. This release is 99% backwards compatible, but a lot has changed under the hood and there's some major new functionality, so thought it was time for a bump. The big changes are: - compare now uses a registry of compare

Re: [TIP] TestFixtures 2.0.0 Released!

2011-09-23 Thread Chris Withers
On 23/09/2011 08:46, Chris Withers wrote: I'm happy to announce a new release major release of TestFixtures. This release is 99% backwards compatible, but a lot has changed under the hood and there's some major new functionality, so thought it was time for a bump. Of course, a 2.0

Re: python install on locked down windows box?

2011-09-23 Thread Chris Withers
Hi Steve On 22/09/2011 13:58, Steven D'Aprano wrote: (7) If all else fails, as an absolute last resort, simply run the Windows installer as a regular, unprivileged user, after selecting the option for a Non-Admin Install under Advanced Options first. Thanks for this, will send on to my friend

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 features

TestFixtures 2.1.0 Released!

2011-09-29 Thread Chris Withers
Hi All, Another release of TestFixtures, getting things closer to where I want them to be. The only change was: - Add a "strict mode" to `compare`. When used, it ensures that the values compared are not only equal but also of the same type. This mode is not used by default, and the defaul

packages, modules and double imports - oh my!

2011-10-03 Thread Chris Withers
Hi All, The attached package gives that smallest possible example of problems I'm hitting with some SQLAlchemy declarative classes. In short, I want to be able to do: python -m pack.module and have if the __name__=='__main__' block spit out the SQL to create the tables necessary for the modu

Re: packages, modules and double imports - oh my!

2011-10-03 Thread Chris Withers
On 03/10/2011 11:22, Chris Rebert wrote: http://docs.python.org/library/runpy.html : "The runpy module['s] main use is to implement the -m command line switch" "If the supplied module name refers to a package rather than a normal module, then that package is imported and the __main__ submodule wi

TestFixtures 2.2.0 Released!

2011-10-04 Thread Chris Withers
Hi All, The TestFixtures releases keep coming, I hope someone other than me is finding these useful ;-) This release features a change to test_datetime and test_date so that they return instances of the real datetime.datetime and datetime.date classes by default. I'm hoping this will makin

Re: Need A script to open a excel file and extract the data using autofilter

2011-10-04 Thread Chris Withers
On 01/10/2011 23:00, David Monaghan wrote: after opening the text.xls file i need to filter all the rows in which the status column is passed and copy the whole sheet to another sheet I don't do this often enough to have it to mind, so what I normally do is record a Macro, convert it to VBS and

TestFixtures 2.3.0 Released!

2011-10-11 Thread Chris Withers
Hi All, Another TestFixtures release. This release adds warning backstops when you forget to clean up LogCapture, Replacer, TempDirectory and TestComponents instances. A replacer which didn't get its .restore() method called when it should have been caused me a lot of pain recently, so this

Re: Want to make the transition to games?

2011-10-15 Thread Chris Withers
Please don't spam this list with jobs, especially if they have nothing to do with Python. If they do, use the job board instead: http://www.python.org/community/jobs/howto/ cheers, Chris On 12/10/2011 05:49, Marta wrote: Hi, I'm working as an onsite recruiting consultant and we are looking

Re: Seven Python Developers Needed $125K

2011-10-15 Thread Chris Withers
I'd suggest you post to the job board rather than spamming the list: http://www.python.org/community/jobs/howto/ cheers, Chris On 11/10/2011 19:16, WR wrote: Top Global Consulting Firm in NYC needs 7 Python Developers Up to $125K depending on experience Solid knowledge of fundamental Python

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 features

Re: What replaces log4py under Python 3.2?

2011-11-25 Thread Chris Withers
On 22/11/2011 18:32, Rob Richardson wrote: My company has been using the log4py library for a long time. A co-worker recently installed Python 3.2, and log4py will no longer compile. (OK, I know that's the wrong word, but you know what I mean.) What logging package should be used now? How

Re: Proper way to delete/kill a logger?

2011-11-28 Thread Chris Withers
On 28/11/2011 04:16, cassiope wrote: I've been trying to migrate some code to using the standard python logging classes/objects. And they seem quite capable of doing what I need them to do. Unfortunately there's a problem in my unit tests. It's fairly common to have to create quite a few entiti

Anyone still using Python 2.5?

2011-12-21 Thread Chris Withers
Hi All, What's the general consensus on supporting Python 2.5 nowadays? Do people still have to use this in commercial environments or is everyone on 2.6+ nowadays? I'm finally getting some continuous integration set up for my packages and it's highlighting some 2.5 compatibility issues. I'm

Re: Spamming PyPI with stupid packages

2012-01-02 Thread Chris Withers
On 02/01/2012 11:03, Felinx Lee wrote: The girlfriend module just depends on workhard module now. I will remove girlfriend module forever if you still think it is a spam or illegal. What is the point of these packages? Why do they exist? Chris -- Simplistix - Content Management, Batch Process

Re: SMTPHandler and Unicode

2012-01-14 Thread Chris Withers
Hi Norbert, On 05/07/2010 13:22, norbert wrote: On 5 juil, 13:17, Chris Withers wrote: try MailingLogger: If you have unicode problems with that, I'd be interested in fixing them! Your package has the same unicode problem : import logging,logging.handlers from mailinglogger.MailingL

Re: SMTPHandler and Unicode

2012-01-14 Thread Chris Withers
On 13/01/2012 20:17, Chris Withers wrote: Your package has the same unicode problem : import logging,logging.handlers from mailinglogger.MailingLogger import MailingLogger mailingLogger = MailingLogger(mailhost=('smtp.example.com', 25),fromaddr='t...@example.com',toaddr

python loggingL filter limitation, looks intentional?

2012-01-16 Thread Chris Withers
Hi Vinay, It looks like this was intentional, so why was it decided that filters would only be passed messages logged to the logger they're attached to rather than the all messages that end up getting passed to logger? For example, an app and the libraries it uses log to 'some.db.driver', 's

Re: python loggingL filter limitation, looks intentional?

2012-01-16 Thread Chris Withers
Hi Vinay, On 16/01/2012 15:08, Vinay Sajip wrote: Filtering is intended to be for cases where integer level-based filtering is insufficient; ...or where you want to manipulate log messages, which is the use case I have. You are right that you would need to add a filter to all of the logge

Re: python logging filter limitation, looks intentional?

2012-01-17 Thread Chris Withers
On 16/01/2012 23:21, Vinay Sajip wrote: Why is this? There must be some rationale for this rather than what, for me and others I've talked to, would seem more natural, ie: a filter on the root logger would get messages both logged to it and any messages propagated to it from child loggers to

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 features

Re: python logging filter limitation, looks intentional?

2012-01-18 Thread Chris Withers
On 17/01/2012 10:48, Vinay Sajip wrote: From: Chris Withers How breaking code? Configuration, maybe, but I can't see anyone being upset that filtering would begin working "the same as everything else". This just feels like a bug... Well, it means that filters that don't

testfixtures 3.0.0 Released!

2013-03-05 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 3.0.0. The big change for this release is that testfixtures now supports Python 2.6, 2.7, 3.2 and 3.3! As a result, some changes have been made to TempDirectory to support encoding and decoding. There's also a nice little addition o

xlutils 1.6.0 released!

2013-04-05 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlutils 1.6.0: http://pypi.python.org/pypi/xlutils/1.6.0 This release features shiny new Sphinx-based documentation: http://pythonhosted.org/xlutils/ It also has some changes that make xlutils compatible with the upcoming xlrd 0.9.1 release. D

xlrd 0.9.1 released!

2013-04-05 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlrd 0.9.1: http://pypi.python.org/pypi/xlrd/0.9.1 This release includes the following changes: - A tonne of bugs when used with Python 3 were fixed thanks to John Machin. - Extra byte data in hyperlink records now records a warning rather than

xlwt 0.7.5 released!

2013-04-05 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlwt 0.7.5. This release contains the following: - Fixes a bug that could cause a corrupt SST in .xls files written by a wide-unicode Python build. - A ValueError is now raised immediately if an attempt is made to set column width to other than

xlrd 0.9.2 released!

2013-04-09 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlrd 0.9.2: http://pypi.python.org/pypi/xlrd/0.9.2 This release includes the following changes: - Fix some packaging issues that meant docs and examples were missing from the tarball. - Fixed a small but serious regression that caused problems

Re: [pyxl] Re: xlrd 0.9.2 released!

2013-04-26 Thread Chris Withers
s. cheers, Chris On 23/04/2013 12:24, Ondrej Ján wrote: Hello. Can you please tell me, how compatible is this version with older versions? In Fedora/CentOS we have versions 0.7 and 0.6. Can I release and Fedora/EPEL update to 0.9.2? Thank you. SAL Dňa utorok, 9. apríla 2013 21:38:30 UTC+2 Chr

Re: [pyxl] Re: xlrd 0.9.2 released!

2013-04-29 Thread Chris Withers
On 26/04/2013 20:37, Ondrej Ján wrote: If users have python-xlrd installed, package maintainer should release only updates, which are API compatible with older versions. Right, the only API change between 0.6 and 0.9 is the removal of the 'pickleable' parameter to open_workbook. However, th

Problems with email.Generator.Generator

2006-09-10 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', ) msg.set_charset(chars

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 "", line 3, in -toplevel- > _charset='utf-8', > File "C:\Py

Re: Problems with email.Generator.Generator

2006-09-11 Thread Chris Withers
Peter Otten wrote: > http://sourceforge.net/tracker/?func=detail&aid=1409455&group_id=5470&atid=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

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

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 - Con

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 "", line 1, in ? > UnicodeEncodeError: 'ascii' codec can't encode character u'\x80' in position > 0: ordinal not in ra

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(

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 p

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 =

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

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 objec

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

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 configura

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 followi

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 e

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 h

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 having

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 gro

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 importin

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 us

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 pu

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 xlrd-r

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 st

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 id

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 - http://www.simplist

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 c

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 to

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

Re: [Python-Dev] .pth files are evil

2009-05-01 Thread Chris Withers
M.-A. Lemburg wrote: """ If the package really requires adding one or more directories on sys.path (e.g. because it has not yet been structured to support dotted-name import), a "path configuration file" named package.pth can be placed in either the site-python or site-packages directory. ... A t

Re: [Python-Dev] PEP 382: little help for stupid people?

2009-05-01 Thread Chris Withers
M.-A. Lemburg wrote: The much more common use case is that of wanting to have a base package installation which optional add-ons that live in the same logical package namespace. The PEP provides a way to solve this use case by giving both developers and users a standard at hand which they can fo

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

2009-05-01 Thread Chris Withers
P.J. Eby wrote: At 06:15 PM 4/15/2009 +0200, M.-A. Lemburg wrote: The much more common use case is that of wanting to have a base package installation which optional add-ons that live in the same logical package namespace. Please see the large number of Zope and PEAK distributions on PyPI as

Re: [Python-Dev] PEP 382: little help for stupid people?

2009-05-01 Thread Chris Withers
Martin v. Löwis wrote: In either of the proposals on the table, what code would I write and where to have a base package with a set of add-on packages? I don't quite understand the question. Why would you want to write code (except for the code that actually is in the packages)? PEP 382 is com

Re: [Python-Dev] PEP 382: little help for stupid people?

2009-05-09 Thread Chris Withers
Martin v. Löwis wrote: Ok, so create three tar files: 1. base.tar, containing simplistix/ simplistix/__init__.py So this __init__.py can have code in it? And base.tar can have other modules and subpackages in it? What happens if the base and an addon both define a package called simpl

Re: [Python-Dev] PEP 382: little help for stupid people?

2009-05-09 Thread Chris Withers
Martin v. Löwis wrote: So this __init__.py can have code in it? That's the point, yes. And base.tar can have other modules and subpackages in it? Certainly, yes. Great, when is the PEP due to land in 2.x? ;-) What happens if the base and an addon both define a package called simplistix.

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: os.system

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). Interesting, but do these assertions still hold true wh

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: http://www.simplistix

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 loca

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 ...w

Re: Append to an Excel file

2010-01-12 Thread Chris Withers
Niels L. Ellegaard wrote: pp writes: On Jan 9, 1:47 am, Jason Scheirer wrote: On Jan 9, 12:30 am, pp wrote: Hi All, How do I add a line to an existing file. This should append to the existing data in the excel file, which was saved previously. Thanks, PP http://pypi.python.org/pypi/xlwt

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 will

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, prove

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) - sho

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: http://www.simplistix.co.uk/software/python/m

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 the

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 - http://

Re: problems trying to build python 2.6 as a shared library

2009-09-30 Thread Chris Withers
Marco Nawijn wrote: 2. Add path to dynamic linker configuration file. This typically is in '/etc/ld.so.conf'. See man page for ld for more information. Yes, this was it. Don't forget to run ldconfig after you've changed /etc/ld.so.conf It's frustrating how the contents of this file vary fr

<    1   2   3   4   >