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

Re: [Image-SIG] Some issue with easy_install and PIL/Imaging

2009-09-30 Thread Chris Withers
Fredrik Lundh wrote: On Fri, Sep 11, 2009 at 3:49 PM, Chris Withers ch...@simplistix.co.uk wrote: 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

Re: Haskell's new logo, and the idiocy of tech geekers

2009-10-03 Thread Chris Withers
Xah Lee wrote: Haskell has a new logo. A fantastic one. Beautiful. For creator, context, detail, see bottom of: What does this have to do with Python? Nothing. So why are you posting it to comp.lang.python? Chris -- Simplistix - Content Management, Batch Processing Python Consulting

Re: [Image-SIG] Some issue with easy_install and PIL/Imaging

2009-10-05 Thread Chris Withers
Fredrik Lundh wrote: The problem is that too many people arguing for eggs do this by sending nastygrams, which doesn't really provide much motivation for doing anything about it (I don't do asshole-driven development). Indeed, I couldn't agree more, and I'm sorry you've been subjected to

Re: Haskell's new logo, and the idiocy of tech geekers

2009-10-06 Thread Chris Withers
Jack Diederich wrote: It's Xah Lee, he's been trolling this and every other programing language group for over 10 years (preferably all at once). Let it go. I don't suppose there's any chance of just blocking the idiot, is there? Chris -- Simplistix - Content Management, Batch Processing

Re: a=[1,2,3,4].reverse() - why a is None?

2009-10-12 Thread Chris Withers
...becauase you were looking for: reversed([1,2,3,4]) Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: Cannot upload a good egg on pypi

2009-10-13 Thread Chris Withers
Luca Fabbri wrote: I've problems while using setuptools for getting an egg and upload it on pypi. The egg (in bdist_egg or sdist format) are always corrupted as far as a lot of files are not included in the zip, tar.gz or egg results. Looking at google it seems that this problem has been fixed

setting variables in the local namespace

2009-10-13 Thread Chris Withers
Hi All, Say I have a piece of code like this: mname = model.__name__ fname = mname+'_order' value = request.GET.get('order') if value: request.session[fname]=value else: value = request.session.get( fname,

Re: Why is python so sad?

2009-10-14 Thread Chris Withers
Zac Burns wrote: There are 10741 occurences of ): or :( in our source code and only 2 occurrences of :) or (:. Not what you would expect from a language named after a comedian. def ...(...): ... class ...(...): ... etc ;-) Chris -- Simplistix - Content Management, Batch Processing

Re: Pyusb

2009-10-14 Thread Chris Withers
Ronn Ross wrote: Does anyone know where I can download a copy of PyUSB 1.0? I can only find 0.x versions on sourceforge. I'm following a tutorial that requires 1.0. Thanks Googling pyusb gives me loads of hits and the newer versions appear to be on about the 3rd link down... Chris --

Re: Web development with Python 3.1

2009-10-26 Thread Chris Withers
Brendon Wickham wrote: I can vouch for what Paul says. I started in Python 3 years ago, and I did so with a web application (still working on it!). I'm using the cgi approach, and it certainly teaches you the concepts. I fail to see how starting with a framework is a good idea if you don't

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

Excel Formulae in Python ;-)

2009-06-19 Thread Chris Withers
Piet van Oostrum wrote: John Machin sjmac...@lexicon.net (JM) wrote: JM [1] No kidding: http://www.google.com/patents/about?id=QMwnEBAJ Apart from these patents probably being silly, why don't they just write the code in Python? :=) Would be cool, but there are things like Resolver

Re: Help

2009-06-22 Thread Chris Withers
tanner barnes wrote: Hi i was wondering how i should go about this problem: ok so i am writing a program for my school's football team and to keep the stats for each player there is a notebook with 3 tabs that has a txtctrl and a + and - button. i need to find a way to when you click the + or

Re: I look for private Python Index server on my local network... What do you use ?

2009-06-24 Thread Chris Withers
Klein Stéphane wrote: I wonder what Python Index server (like as pypi.python.org) do you use in your corporation for handle your private python eggs ? I found three solutions : * http://pypi.python.org/pypi/basketweaver/0.1.2-r6 * http://pypi.python.org/pypi/pypi/2005-08-01 *

Re: Tutorial on working with Excel files in Python (without COM and crossplatform!) at EuroPython 2009

2009-06-24 Thread Chris Withers
Jeremiah Jester wrote: Chris, Do you have any online tutorial for this topic? I'm afraid not currently... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading a large csv file

2009-06-24 Thread Chris Withers
Terry Reedy wrote: Mag Gam wrote: Yes, the system has 64Gig of physical memory. drool ;-). Well, except that, dependent on what OS he's using, the size of one process may well still be limited to 2GB... Chris -- Simplistix - Content Management, Zope Python Consulting -

Re: Decode a barcode ?

2009-06-24 Thread Chris Withers
Stephane Wirtel wrote: I would like to know if there is a way to decode a barcode with a library ? What do you mean by decode? Do you mean starting with a .gif or something containing a barcode? Most barcode readers just act as keyboards, so you don't often need to do this ;-) If you mean

Re: Python simple web development

2009-06-25 Thread Chris Withers
Private Private wrote: from those forms, etc. I have read a bit about Django and TurboGears but I am afraid that this is too big for my requirements (am I wrong ?). You are wrong :-) Can you suggest anything ? http://www.djangoproject.com/ http://bfg.repoze.org/ http://pylonshq.com/

Re: Python simple web development

2009-06-25 Thread Chris Withers
Private Private wrote: What I've read about Django, Turbogears is that they are powerful enough to create big web-based portals, applications, etc. I need just simple forms without any sophisticated functionality. So again: why I am wrong ? Just because something is powerful doesn't mean you

Re: Where does setuptools live?

2009-07-06 Thread Chris Withers
Floris Bruynooghe wrote: It is, see http://mail.python.org/pipermail/distutils-sig/2009-July/012374.html It's seen no changes in 9 months. It's setuptools... I'm sure you can find many flamefests on distutils- sig about this. Yeah, distutils-sig is the right place to discuss. I wonder

Re: Where does setuptools live?

2009-07-07 Thread Chris Withers
David Lyon wrote: setuptools... as far as I can see isn't actually installed until you install easyinstall... That depends... I exclusively use buildout to manage my python packages, and sadly that relies on setuptools... Pip (http://pypi.python.org/pypi/pip) and enstall

Re: Where does setuptools live?

2009-07-07 Thread Chris Withers
David Lyon wrote: On Tue, 07 Jul 2009 09:06:49 +0100, Chris Withers ch...@simplistix.co.uk wrote: What hasn't happened is enough testing of pypi packages and installing with setuptools/pip/enstall from pypi. What needs testing? It's software... therefore it needs testing... Yes, which

Re: Where does setuptools live?

2009-07-07 Thread Chris Withers
David Lyon wrote: I've written a package manager gui. I think it is orderly to comprehensively ascertain which packages will and won't install from pypi with the tool. I'll run the same install test for pip, easyinstall and enstall. And come up with a preferred installer. Which I will then

Re: Where does setuptools live?

2009-07-10 Thread Chris Withers
Inky 788 wrote: Currently, distutils itself is being actively developed. More info about this here: http://tarekziade.wordpress.com/ My (albeit anonymous) advice is: use distutils. Manually download packages as-needed from PyPI and install manually using standard distutils. No thanks. I'm a

httplib incredibly slow :-(

2009-08-11 Thread Chris Withers
Hi All, I'm using the following script to download a 150Mb file: from base64 import encodestring from httplib import HTTPConnection from datetime import datetime conn = HTTPSConnection('localhost') headers = {} auth = 'Basic '+encodestring('username:password').strip()

Re: httplib incredibly slow :-(

2009-08-11 Thread Chris Withers
Aahz wrote: In article mailman.4598.1250022343.8015.python-l...@python.org, Chris Withers ch...@simplistix.co.uk wrote: Does anyone know of an alternative library for creating http requests and getting their responses that's faster but hopefully has a similar interface? PyCurl This seems

Re: httplib incredibly slow :-(

2009-08-12 Thread Chris Withers
Answering myself... Chris Withers wrote: In article mailman.4598.1250022343.8015.python-l...@python.org, Chris Withers ch...@simplistix.co.uk wrote: Does anyone know of an alternative library for creating http requests and getting their responses that's faster but hopefully has a similar

Re: httplib incredibly slow :-(

2009-08-12 Thread Chris Withers
Max Erickson wrote: There is an httplib2 (but I don't know anything further about it...): http://code.google.com/p/httplib2/ I had a look, it uses httplib, so will likely suffer from the same problems... Calling wget or curl using a subprocess is probably as easy as it is ugly, I use the

Re: httplib incredibly slow :-(

2009-08-12 Thread Chris Withers
shaileshkumar wrote: We use PyCURL on Windows. http://pycurl.sourceforge.net/ provides pre- built versions for Windows and it works out of the box. Does it include libcurl? Are these builds available for Python 2.6? Chris -- Simplistix - Content Management, Batch Processing Python

Re: httplib incredibly slow :-(

2009-08-12 Thread Chris Withers
David Stanek wrote: I tried to reproduce this, but I could not. Could you paste in the output of your script? Not sure how that'll help, but sure: 2009-08-11 21:27:59.153000 request: 0:00:00.109000 response: 0:00:00.109000 read: 0:24:31.266000 Also on the same box where you run this script

Re: httplib incredibly slow :-(

2009-08-13 Thread Chris Withers
David Robinow wrote: On Wed, Aug 12, 2009 at 12:37 PM, Chris Withersch...@simplistix.co.uk wrote: David Stanek wrote: Also on the same box where you run this script can you test with curl or wget? It's a Windows box, so no :-( Why not? http://users.ugent.be/~bpuype/wget/

Re: csv.DictWriter.write_header()

2009-08-14 Thread Chris Withers
Alan G Isaac wrote: On 8/13/2009 7:58 AM John Machin apparently wrote: Duck typing: ask a silly question, get a silly answer. Maybe if you learned to be a more generous reader, fewer questions would look silly to you. If you take a look at the crap that John very patiently wades through on

Re: httplib incredibly slow :-(

2009-08-14 Thread Chris Withers
Aahz wrote: Sorry, I mostly have been working on our Mac port, so I'm not sure what's needed to make this work on Windows. Did you try downloading the PyCurl binary? Maybe it statically links libcurl on Windows. Shame it's not available as a bdist_egg, that's what I'm really after... What

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

2009-08-15 Thread Chris Withers
Hi All, I thought this was fixed back in Python 2.5, but I guess not? So, I'm playing in an interactive session: from xlrd import open_workbook b = open_workbook('some.xls',pickleable=0,formatting_info=1) At this point, top shows the process usage for python to be about 500Mb. That's okay,

Re: httplib incredibly slow :-(

2009-08-17 Thread Chris Withers
i3dmaster wrote: Just wanted to check if you can try turning on the debug mode for httplib and see if you can read a bit more debug info on where the calls get hung. In your example, it would be conn.set_debuglevel(1) I had a look through the code this debug level controls and I don't see any

xlutils 1.4.0 released!

2009-08-18 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. -

How do I fix this test so it runs on Windows? (it uses tzset)

2010-06-16 Thread Chris Withers
Hi All, I'd like to make test_non_gmt_timezone at the bottom of https://secure.simplistix.co.uk/svn/Simplistix/testfixtures/branches/1.8/testfixtures/tests/test_time.py run on Windows, any suggestions? cheers, Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I fix this test so it runs on Windows? (it uses tzset)

2010-06-17 Thread Chris Withers
Nobody wrote: On Wed, 16 Jun 2010 16:30:02 +0100, Chris Withers wrote: I'd like to make test_non_gmt_timezone at the bottom of https://... run on Windows, any suggestions? MSVCRT has _tzset(), which understands the TZ environment variable. http://msdn.microsoft.com/en-us/library/90s5c885

Re: SMTPHandler and Unicode

2010-07-05 Thread Chris Withers
norbert wrote: I want to send error messages with SMTPHandler logging. But SMTPHandler does not seem to be unicode aware. Is there something doable without playing with sys.setdefaultencoding ? try MailingLogger: http://www.simplistix.co.uk/software/python/mailinglogger If you have unicode

Re: SMTPHandler and Unicode

2010-07-05 Thread Chris Withers
norbert 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',toaddrs=('t...@example.com',)) LOG = logging.getLogger()

Re: SMTPHandler and Unicode

2010-07-05 Thread Chris Withers
Antoine Pitrou wrote: On Mon, 5 Jul 2010 06:17:38 -0700 (PDT) norbert ncaude...@gmail.com wrote: a FileHandler works as expected, the log file being UTF-8 encoded. Ouch. Implicit encoding sounds like a bad behaviour. Yes indeed, hence my question on python-dev... Chris -- Simplistix -

Re: Library versions

2010-07-30 Thread Chris Withers
Peo wrote: Is there some other smart way to do acheive this? Just turn them info python packages, and use buildout, pip or some other python package management tool to create the versions. You may, of course, just be able to svn the lot of them... (then you don't need to worry about

Re: A useful, but painful, one-liner to edit money amounts

2010-08-05 Thread Chris Withers
Peter Otten wrote: locale.setlocale(locale.LC_ALL, (en_US, UTF-8)) 'en_US.UTF8' print locale.currency(13535, grouping=True) $13,535.00 Okay, so if I'm writing a wsgi app, and I want to format depending on the choices of the currently logged in users, what would you recommend? I can't do

subprocess escaping POpen?!

2010-08-05 Thread Chris Withers
Hi All, I have a script that does the following: from subprocess import Popen,PIPE,STDOUT def execute(command,cwd): return Popen( command, stderr=STDOUT, stdout=PIPE, universal_newlines=True, cwd=cwd, shell=True, ).communicate()[0]

Re: subprocess escaping POpen?!

2010-08-05 Thread Chris Withers
Wolfgang Rohdewald wrote: On Donnerstag 05 August 2010, Chris Withers wrote: ...then the output is indeed captured. So, what is svn doing differently? How is it escaping its jail? maybe it does not read from stdin but directly from /dev/tty But why only the request for auth credentials

Re: subprocess escaping POpen?!

2010-08-05 Thread Chris Withers
Jean-Michel Pichavant wrote: You did not redirect stdin, so it is expected you can still read input from the console. Okay, so if I definitely wanted no input, what should I pass as the stdin parameter to the POpen constructor? And it looks like svn is writting the credentials prompt on

Re: subprocess escaping POpen?!

2010-08-05 Thread Chris Withers
Wolfgang Rohdewald wrote: On Donnerstag 05 August 2010, Chris Withers wrote: But why only the request for auth credentials? for security reasons I suppose - make sure a human enters the password Well yes, but what if you actually want to script it? Chris -- Simplistix - Content Management

Re: subprocess escaping POpen?!

2010-08-05 Thread Chris Withers
Kushal Kumaran wrote: - Original message - Wolfgang Rohdewald wrote: On Donnerstag 05 August 2010, Chris Withers wrote: But why only the request for auth credentials? for security reasons I suppose - make sure a human enters the password Well yes, but what if you

Re: subprocess escaping POpen?!

2010-08-05 Thread Chris Withers
Tim Golden wrote: See http://pexpect.sf.net for a python version. ...which doesn't work on Windows. There is a winpexpect: http://pypi.python.org/pypi/winpexpect/1.3 Are the two api-identical? Chris -- Simplistix - Content Management, Batch Processing Python Consulting -

Re: subprocess escaping POpen?!

2010-08-05 Thread Chris Withers
Tim Golden wrote: On 05/08/2010 15:49, Chris Withers wrote: Tim Golden wrote: See http://pexpect.sf.net for a python version. ...which doesn't work on Windows. There is a winpexpect: http://pypi.python.org/pypi/winpexpect/1.3 Are the two api-identical? From the bitbucket page: http

Re: A useful, but painful, one-liner to edit money amounts

2010-08-07 Thread Chris Withers
DarkBlue wrote: On Aug 5, 7:06 pm, Chris Withers ch...@simplistix.co.uk wrote: Peter Otten wrote: locale.setlocale(locale.LC_ALL, (en_US, UTF-8)) 'en_US.UTF8' print locale.currency(13535, grouping=True) $13,535.00 Okay, so if I'm writing a wsgi app, and I want to format depending

MailingLogger 3.3.3 Released!

2010-08-10 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

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

regex to remove lines made of only whitespace

2010-08-11 Thread Chris Withers
Hi All, I'm looking for a regex (or other solution, as long as it's quick!) that could be used to strip out lines made up entirely of whitespace. eg: 'x\n \t \n\ny' - 'x\ny' Does anyone have one handy? cheers, Chris -- Simplistix - Content Management, Batch Processing Python Consulting

Re: urgent requirement at Hyderabad

2010-08-11 Thread Chris Withers
sushma wrote: We are looking for Python Developers/programmers with 1+ years of experience. Send resume to sush...@millenniumsoft.com So urgent you can't even be bothered to describe the job or post the advert in the correct place on the python job board. Good luck with that ;-) Chris

Re: regex to remove lines made of only whitespace

2010-08-11 Thread Chris Withers
Steven D'Aprano wrote: def strip_blank_lines(lines): for line in lines: if not line.isspace(): yield line text = ''.join(strip_blank_lines(lines.split('\n'))) The final version I have is: def strip_blank_lines(text): result = [] for line in text.split('\n'):

bug? context managers vs ImportErrors

2010-08-19 Thread Chris Withers
Hi All, Am I right in thinking this is a bug: class MyContextManager: def __enter__(self): pass def __exit__(self,t,e,tb): print type(t),t print type(e),e with MyContextManager(): import foo.bar.baz ...when executed, gives me: type 'type' type

Re: bug? context managers vs ImportErrors

2010-08-19 Thread Chris Withers
Christian Heimes wrote: Why is 'e' ending up as a string rather than the ImportError object? This is with Python 2.6.5 if that makes a difference... It's a known bug in Python 2.6 and earlier. See http://docs.python.org/whatsnew/2.7.html#porting-to-python-2-7 When was it introduced? I've

converting a timezone-less datetime to seconds since the epoch

2010-03-16 Thread Chris Withers
Hi All, We have a bunch of datetime objects that have tzinfo=None. We want to turn them into float timestamps in seconds since the epoch. Here's the first attempt: import time from datetime import datetime from unittest import TestCase def timestamp(dttm): return

Re: converting a timezone-less datetime to seconds since the epoch

2010-03-18 Thread Chris Withers
Hey Chris, Chris Rebert wrote: def timestamp(dttm): return time.mktime(dttm.timetuple()) from calendar import timegm def timestamp(dttm): return timegm(dttm.utctimetuple()) #the *utc*timetuple change is just for extra consistency #it shouldn't actually make a difference here Ah,

PyDispatcher on sourceforge doesn't play nice with easy_install

2010-03-30 Thread Chris Withers
Hi All, Using easy_install to get PyDispatcher results in: Searching for PyDispatcher Reading http://pypi.python.org/simple/PyDispatcher/ Reading http://pydispatcher.sourceforge.net Reading https://sourceforge.net/project/showfiles.php?group_id=79755 Reading

Re: PyDispatcher on sourceforge doesn't play nice with easy_install

2010-03-31 Thread Chris Withers
Mike C. Fletcher wrote: Chris Withers wrote: Hi All, Using easy_install to get PyDispatcher results in: ... Who's the maintainer of PyDispatcher nowadays? Would be handy if they removed the sourceforge link from pypi. ... Thanks for the report. I've released a 2.0.2 version on PyPI

Re: converting a timezone-less datetime to seconds since the epoch

2010-04-07 Thread Chris Withers
Hi Chris, Chris Rebert wrote: from calendar import timegm def timestamp(dttm): return timegm(dttm.utctimetuple()) #the *utc*timetuple change is just for extra consistency #it shouldn't actually make a difference here And problem solved. As for what the problem was: Paraphrasing the table

Re: modifying open office spreadsheet (with OO installed)

2010-05-04 Thread Chris Withers
Jim Byrnes wrote: News123 wrote: Mumbling to myself, perhaps somebody else is interested. Yes I am. News123 wrote: Hi, I wanted to know who can recommend a good module/library, that allows to modify an Open Office spreadsheet. One can assume, that Open Office is installed on the host.

Re: ooolib, reading writing a spread sheet and keep formatting

2010-05-04 Thread Chris Withers
News123 wrote: from xlrd import open_workbook from xlutils.copy import copy rb = open_workbook('doc1.xls') open_workbook('doc1.xls',formatting_info=True) print WB with %d sheets % rb.nsheets wb = copy(rb) wb.save(doc2.xls) # file is created, but ALL formattng is lost and formulas are now

Re: ooolib, reading writing a spread sheet and keep formatting

2010-05-04 Thread Chris Withers
News123 wrote: Hi Chris, Chris Withers wrote: News123 wrote: from xlrd import open_workbook from xlutils.copy import copy rb = open_workbook('doc1.xls') open_workbook('doc1.xls',formatting_info=True) I'll try, but the doc mentioned explicitely, that formulas will be lost. I'll keep you

Re: unittest basics

2010-05-11 Thread Chris Withers
import unittest class MyTestCase(unittest.TestCase): def test_my_import(self): import blah cheers, Chris John Maclean wrote: is there a way to test that a certian library or module is or can be loaded successfully? self.assert('import blah') -- Simplistix - Content Management,

Re: Use company name for module

2010-11-29 Thread Chris Withers
On 12/11/2010 15:50, Robert Kern wrote: On 11/12/10 8:12 AM, Micah Carrick wrote: My company is working on releasing some of our code as open-source python modules. I don't want my foo module conflicting with other modules called foo on PyPi or github or a user's system. Is there anything

Re: TDD in python

2010-12-06 Thread Chris Withers
On 30/11/2010 13:33, Roy Smith wrote: In article 58fe3680-21f5-42f8-9341-e069cbb88...@r19g2000prm.googlegroups.com, rustomrustompm...@gmail.com wrote: Looking around I found this: http://bytes.com/topic/python/answers/43330-unittest-vs-py-test where Raymond Hettinger no less says quite

Re: Python assignments

2010-12-06 Thread Chris Withers
Try here: http://www.python.org/community/jobs/ Chris On 03/12/2010 13:50, Sverker Nilsson wrote: Dear friends, This is Sverker from Sweden. You probably know me better as the guy who made Guppy/Heapy: http://guppy-pe.sf.net I am currently in the process of preparing version 0.1.10 with

Re: A web site using Python

2010-12-06 Thread Chris Withers
On 04/12/2010 13:32, Virgil Stokes wrote: *How, armed with Python 2.6 (or 2.7) and all of the Python packages available, should I attack the problem of getting this web site up and running on a Windows platform?* 1. Pick a web framework, I'd suggest looking at: Django

Re: find memory leaks in running program

2010-12-13 Thread Chris Withers
On 07/12/2010 16:51, Marco Hornung wrote: 1. What are the best tools to analyze pythons memory stack, while it is running? Look for the heapy stuff in the guppy package. 2. Is there a possibility to analyze the memory stack of a program with external programs? (without to change the source

Re: Added Python, WSGI to XAMPP

2010-12-13 Thread Chris Withers
On 09/12/2010 21:29, Gerry Reno wrote: How-To: Add VirtualEnv and Pylons (WSGI framework) to XAMPP http://www.apachefriends.org/f/viewtopic.php?f=17t=42981 You mean Pyramid, right? ;-) Chris -- Simplistix - Content Management, Batch Processing Python Consulting -

Re: Added Python, WSGI to XAMPP

2010-12-13 Thread Chris Withers
On 14/12/2010 00:14, Gerry Reno wrote: On 12/13/2010 06:34 PM, Chris Withers wrote: On 09/12/2010 21:29, Gerry Reno wrote: How-To: Add VirtualEnv and Pylons (WSGI framework) to XAMPP http://www.apachefriends.org/f/viewtopic.php?f=17t=42981 Maybe, if there's no Zope. Or we'll run away

Re: Added Python, WSGI to XAMPP

2010-12-15 Thread Chris Withers
On 14/12/2010 00:58, Gerry Reno wrote: What I really don't like right off is that Pyramid is contorting the MVC model That specific pattern, I'm afraid, is a little antiquated nowadays, particularly when it comes to web apps... The VIEW is the bits that stream out of the webserver back to

TestFixtures 1.8.0 Released!

2011-01-14 Thread Chris Withers
Hi All, I'm very happy to announce the first fully-documented release of TestFixtures, my collection of testing fixtures and helpers that I've been collecting for the last couple of years. Along with my own take on a lot of the common fixtures and helpers, it has some bits that I haven't

Re: TestFixtures 1.8.0 Released!

2011-01-14 Thread Chris Withers
Hi Jack, On 14/01/2011 14:39, Jack Keegan wrote: objects. In particular, at the moment, testing some code that needs to access hardware IOs using DLLs. I do this using Ctypes. However, on my dev machine, I don't have the same hardware so calling the DLL functions will not work as expected.

TestFixtures 1.9.0 Released!

2011-02-11 Thread Chris Withers
Hi All, I'm happy to announce a new release of TestFixtures. This release adds a helper for tests of code using zope.component: http://packages.python.org/testfixtures/components.html The package is on PyPI and a full list of all the links to docs, issue trackers and the like can be found

mortar_rdb 1.0.0 released!

2011-02-18 Thread Chris Withers
Hi All, I'm very pleased to finally announce the release of mortar_rdb 1.0.0. This package ties together SQLAlchemy, sqlalchemy-migrate and the component architecture to make it easy to develop projects using SQLAlchemy through their complete lifecycle. While I'll be using it with Pyramid, the

mortar_rdb 1.1.0 released!

2011-02-27 Thread Chris Withers
Hi All, I'm pleased to announce a new release of mortar_rdb. This package ties together SQLAlchemy, sqlalchemy-migrate and the component architecture to make it easy to develop projects using SQLAlchemy through their complete lifecycle. This release allows you to register SessionExtensions

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

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

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

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

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

Announcing www.python-excel.org

2009-06-18 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-18 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-18 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-18 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

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

Re: [pyxl] xlrd-0.8.0 .xlsx formatting_info=True not implemented

2012-08-30 Thread Chris Withers
On 30/08/2012 03:57, python-ex...@raf.org wrote: hopefully the intention that xlrd not support formats in xlsx files will change one day into an intention to support them. :-) The intention is there, sadly the time to work on it is not. John Machin would be the person best placed to do the

Re: Context manager to save/restore a name binding

2012-08-31 Thread Chris Withers
Hi Ben, On 31/08/2012 03:36, Ben Finney wrote: That way, I can set ‘sys.dont_write_bytecode’ to the value I need in this part of the code, knowing that however the code continues the previous value of that setting will be restored to whatever it was before I touched it. Have I re-invented a

Re: Unittest - testing for filenames and filesize

2012-08-31 Thread Chris Withers
On 23/08/2012 12:25, Tigerstyle wrote: class FileTest(unittest.TestCase): def setUp(self): self.origdir = os.getcwd() self.dirname = tempfile.mkdtemp(testdir) os.chdir(self.dirname) I wouldn't change directories like this, it's pretty fragile, just use

metaclass question

2012-09-24 Thread Chris Withers
Hi All, Is there a metaclass-y way I could cause the following: class TheParser(Parser): def handle_ARecord(self): pass def handle_ARecord(self): pass ...to raise an exception as a result of the 'handle_ARecord' name being reused? cheers, Chris -- Simplistix -

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

2013-11-27 Thread Chris Withers
Hi All, I'm very happy to announce the a new 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. This release rounds out a few rough edges after a few months of real world use: - Runners can

<    1   2   3   4   5   6   >