GetPaid module that supports deferred payments?

2009-09-28 Thread Phillip B Oldham
Are any of the GetPaid modules able to handle deferred payments? As in, the money to be taken is placed on hold in the customer's account and can be released to the vendor at a later date. -- http://mail.python.org/mailman/listinfo/python-list

Validation in RPC call?

2009-09-07 Thread Phillip B Oldham
I'm building an RPC service, and I need to validate the input and provide informative error messages to users. What would be the best way to do this? Simple `if` statements each raising a custom exception? `assert` statements inside a try/except block to translate the assertion errors into

Most active coroutine library project?

2009-08-23 Thread Phillip B Oldham
I've been taking a look at the multitude of coroutine libraries available for Python, but from the looks of the projects they all seem to be rather quiet. I'd like to pick one up to use on a current project but can't deduce which is the most popular/has the largest community. Libraries I looked

Re: Suggestions for Python MapReduce?

2009-07-28 Thread Phillip B Oldham
In answer to my own question, I came across Octo.py[1] today. Not tested/played-with/used it yet, however, though it seems simple enough. Still welcoming any suggestions for other/similar tools. [1] http://code.google.com/p/octopy/ -- http://mail.python.org/mailman/listinfo/python-list

Suggestions for Python MapReduce?

2009-07-22 Thread Phillip B Oldham
I understand that there are a number of MapReduce frameworks/tools that play nicely with Python (Disco, Dumbo/Hadoop), however these have large dependencies (Erlang/Java). Are there any MapReduce frameworks/ tools which are either pure-Python, or play nicely with Python but don't require the

Re: Suggestions for Python MapReduce?

2009-07-22 Thread Phillip B Oldham
On Jul 22, 2:23 pm, Casey Webster casey...@gmail.com wrote: I can't answer your question, but I would like to better understand the problem you are trying to solve.  The Apache Hadoop/MapReduce java application isn't really that large by modern standards, although it is generally run with

Re: Suggestions for Python MapReduce?

2009-07-22 Thread Phillip B Oldham
On Jul 22, 5:55 pm, Paul Rubin http://phr...@nospam.invalid wrote: Phillip B Oldham phillip.old...@gmail.com writes: I usually just spew ssh tasks across whatever computing nodes I can get my hands on.  It's less organized than something like mapreduce, but I tend to run one-off tasks that I

Help understanding the decisions *behind* python?

2009-07-20 Thread Phillip B Oldham
My colleagues and I have been working with python for around 6 months now, and while we love a lot of what python has done for us and what it enables us to do some of the decisions behind such certain data-types and their related methods baffle us slightly (when compared to the decisions made in

Re: Help understanding the decisions *behind* python?

2009-07-20 Thread Phillip B Oldham
On Jul 20, 6:08 pm, Duncan Booth duncan.bo...@invalid.invalid wrote: The main reason why you need both lists and tuples is that because a tuple of immutable objects is itself immutable you can use it as a dictionary key. Really? That sounds interesting, although I can't think of any real-

Options for creating a statistics screen on a Mac with Python?

2009-05-16 Thread Phillip B Oldham
I've come into possession of a mac mini and a large LCD tv at the office. I'd like to set it up in the corner to pull statistics from our various servers (load, uptimes, etc) and display them in a graphical format, full-screen, with a reasonable refresh rate (say every 30 seconds). There will be

Re: Options for creating a statistics screen on a Mac with Python?

2009-05-16 Thread Phillip B Oldham
On May 16, 2:15 pm, Diez B. Roggisch de...@nospam.web.de wrote: matplotlib should serve you well. Thanks, I'll check that out. Or you use some web-based solution with a javascript-based chart library. I'd rather stay away from web-based solutions; since this is going to be running 24/7 and

Re: Essential tools for Python development

2009-04-22 Thread Phillip B Oldham
On Apr 22, 5:00 am, Ben Finney ben+pyt...@benfinney.id.au wrote: [snip] and code each module so that the behaviour is easily introspected and tested from outside the module. If I'm not able to easily introspect the code at an interactive prompt, that's a clear sign that the code interface is

Please help me grok: webserver python

2009-04-21 Thread Phillip B Oldham
I'm having trouble grok'ing how to get python talking through a webserver. I've got a lot of experience working with nginx+php-fcgi (via a unix socket) and I'd like to know what would be the bare minimum to get python talking in the same way. Now, I've looked at modules like CherryPy but they're

Re: Are there any python libraries/packages like Juicer/Sprockets/bundle_fu?

2009-03-09 Thread Phillip B Oldham
On Mar 4, 7:23 pm, Jason Scheirer jason.schei...@gmail.com wrote: Do you have a reason for needing the same thing implemented in Python, or are the options in Ruby enough? I'd rather have things in Python so I don't have to worry about having Ruby available on the host machines we're using.

Are there any python libraries/packages like Juicer/Sprockets/bundle_fu?

2009-03-04 Thread Phillip B Oldham
Hi all. Just wondering whether there are any libraries for python like ruby's Juicer[1], Sprocets[2], or bundle_fu[3]? Thanks! [1] http://www.cjohansen.no/en/ruby/juicer_a_css_and_javascript_packaging_tool [2] http://getsprockets.com/ [3] http://code.google.com/p/bundle-fu/ --

Python shell scripting and errors

2009-02-23 Thread Phillip B Oldham
I've got a python script running as a daemon (using someone else's daemon module). It runs fine for a while, but will occasionally balk and die. Since its running in the background, I'm getting no error from it. What's the best way to capture the output into a file for later review? --

Convert date/time to unix timestamp?

2009-02-10 Thread Phillip B Oldham
Is there a simple way to set a date/time and convert it to a unix timestamp? After some googling I found the following: t = datetime.time(7,0,0) starttime = time.mktime(t.timetuple())+1e-6*t.microsecond That seems like very long-winded. Is there an easier way? I've read the docs on the datetime

ORM recommendation when using live/predefined DB?

2009-01-28 Thread Phillip B Oldham
We're trying to move to Python for a few parts of our application. We have a live database, which has been modeled for a specific use, and has other code connecting to and working with it. We'd like to reduce the amount of work we have to do in terms of keeping our python code up-to-date with

Can I run an operation on an object's attribute when reading?

2009-01-19 Thread Phillip B Oldham
Is it possible to automatically run an operation on a object's attribute when reading? For instance, if I have the following: class Item(object): tags = ['default','item'] item = Item() desc = item.tags When I'm reading the item.tags, I'd like to automagically have the value converted to a

Re: Can I run an operation on an object's attribute when reading?

2009-01-19 Thread Phillip B Oldham
On Mon, Jan 19, 2009 at 12:15 PM, Chris Rebert c...@rebertia.com wrote: Assuming I'm interpreting you correctly (you're going to have to use something like a getter): Thanks, but I'm looking for a way to do it *without* using a getter as I don't have easy access to the class (its being

Re: Are there any FOSS Python Single-Sign-on Servers?

2008-11-12 Thread Phillip B Oldham
On Nov 12, 1:12 am, Ben Finney [EMAIL PROTECTED] wrote: Phillip B Oldham [EMAIL PROTECTED] writes: OpenID is a means of *authentication*, it doesn't mandate any particular system of registration or account creation. You presumably already have solutions for those; use them, but de-couple

Are there any FOSS Python Single-Sign-on Servers?

2008-11-11 Thread Phillip B Oldham
Are there any FOSS Python Single-Sign-on Servers? We're looking to centralise the sign-on for our numerous internal webapps (across multiple servers, languages, and domains) to speed user management and application development. I've searched around but can only seem to find OpenID servers, which

Re: Are there any FOSS Python Single-Sign-on Servers?

2008-11-11 Thread Phillip B Oldham
On Nov 11, 9:24 pm, paul [EMAIL PROTECTED] wrote: Phillip B Oldham schrieb: Are there any FOSS Python Single-Sign-on Servers? [snip] I've searched around but can only seem to find OpenID servers, which will probably be too open for our needs. So if it is not OpenID, which protocol

Re: Are there any FOSS Python Single-Sign-on Servers?

2008-11-11 Thread Phillip B Oldham
On Nov 11, 11:00 pm, Ben Finney [EMAIL PROTECTED] wrote: Phillip B Oldham [EMAIL PROTECTED] writes: I've searched around but can only seem to find OpenID servers, which will probably be too open for our needs. Please, if you're going to be coding new systems, use established, standard

Re: Are there any FOSS Python Single-Sign-on Servers?

2008-11-11 Thread Phillip B Oldham
On Nov 11, 11:48 pm, Ben Finney [EMAIL PROTECTED] wrote: Phillip B Oldham [EMAIL PROTECTED] writes: I think maybe there's some misunderstanding. The protocol isn't the issue; I'm happy to use whatever (HTTP, LDAP, SOAP, XMPP, etc). The issue is that OpenID, by its name, is open. We don't

Will Python 3 be stackless?

2008-10-23 Thread Phillip B Oldham
Will Python 3 be stackless? Or, rather, will it have any features similar to stackless' microthreads and channels? -- http://mail.python.org/mailman/listinfo/python-list

Re: Will Python 3 be stackless?

2008-10-23 Thread Phillip B Oldham
On Thu, Oct 23, 2008 at 9:20 PM, Chris Rebert [EMAIL PROTECTED] wrote: No, it will definitely not. From your statement (and I'm terribly sorry if I've taken it out of context) it would seem that such features are frowned-upon. Is this correct? And if so, why? -- Phillip B Oldham [EMAIL

Re: Event-driven framework (other than Twisted)?

2008-10-02 Thread Phillip B Oldham
On Oct 2, 1:32 am, James Mills [EMAIL PROTECTED] wrote: http://hg.shortcircuit.net.au/index.wsgi/pymills/file/b7498cd4c6a4/ex... Thanks for the example, but its not loading. -- http://mail.python.org/mailman/listinfo/python-list

Re: Event-driven framework (other than Twisted)?

2008-10-02 Thread Phillip B Oldham
On Oct 2, 1:28 am, James Mills [EMAIL PROTECTED] wrote: Phillip, I have been developing a rather unique event-driven and component architecture library for quite some time that is (not twisted). Actually it's nothing like twisted, but based on 2 core concepts:  * Everything is a Component  

Event-driven framework (other than Twisted)?

2008-10-01 Thread Phillip B Oldham
Are there any python event driven frameworks other than twisted? -- http://mail.python.org/mailman/listinfo/python-list

Are there any python micro-frameworks (like ruby's Camping)?

2008-10-01 Thread Phillip B Oldham
Are there any python micro-frameworks (like ruby's Camping)? -- http://mail.python.org/mailman/listinfo/python-list

Re: Event-driven framework (other than Twisted)?

2008-10-01 Thread Phillip B Oldham
On Oct 1, 9:25 am, Lie Ryan [EMAIL PROTECTED] wrote: Most GUI package use event-driven model (e.g. Tkinter). I've noticed that. I'm thinking more for a web environment (instead of MVC) or as a HTTP server. I know Twisted has TwistedWeb, but I'm looking for alternatives. --

Re: Are there any python micro-frameworks (like ruby's Camping)?

2008-10-01 Thread Phillip B Oldham
On Oct 1, 9:53 am, Sam [EMAIL PROTECTED] wrote: Did you try WebPy?http://webpy.org/Hum, the website seems to be down today Not yet - I'm hoping the python community can suggest some examples of micro/small frameworks (which just supply the basics; no forms/ templating/ORM/etc) so I can compare

Re: Are there any python micro-frameworks (like ruby's Camping)?

2008-10-01 Thread Phillip B Oldham
On Oct 1, 10:29 am, Michele Simionato [EMAIL PROTECTED] wrote: How about wsgiref in the standard library? It is as small as you can get without resorting to CGI. Interesting... I'll be sure to check that out also. Someone also mentioned Paste/WebOb, so now I have 3 to test. Any others? --

Re: Event-driven framework (other than Twisted)?

2008-10-01 Thread Phillip B Oldham
On Oct 1, 4:12 pm, Thomas Guettler [EMAIL PROTECTED] wrote: Please explain what you want to do. I'm primarily looking for alternatives to MVC frameworks for web development, particularly SAAS. I've looked around, and some whitepapers suggest that event-based frameworks often perform better than

Re: Event-driven framework (other than Twisted)?

2008-10-01 Thread Phillip B Oldham
On Oct 1, 6:53 pm, Lie Ryan [EMAIL PROTECTED] wrote: In fact, MVC and event-driven is two entirely different concept. You can have both, or none. It is, in the end, your choice which one to use or whether you want to use both or none. Event-driven programming is a concept that your programs

Trying ZODB, background in Relational: mimic auto_increment?

2008-08-14 Thread Phillip B Oldham
Hi all. I'm playing with standalone ZODB at the moment trying to get a better understanding of its use in applications. I come from a PHP/MySQL background, and I'm taking my first steps with Python at the same time. One of the things I'm not understanding about ZODB is assigning incremental IDs

Large production environments using ZODB/ZOE?

2008-08-07 Thread Phillip B Oldham
I've been reading a lot recently on ZODB/ZOE, but I've not seen any reference to its use in large-scale production envrironments. Are there any real-world examples of ZODB/ZOE in use for a large system? By large, I'm thinking in terms of both horizontally-scaled systems and in terms of data

Standard module for parsing emails?

2008-07-30 Thread Phillip B Oldham
Is there a standard library for parsing emails that can cope with the different way email clients quote? -- http://mail.python.org/mailman/listinfo/python-list

Re: Standard module for parsing emails?

2008-07-30 Thread Phillip B Oldham
On Jul 30, 2:36 pm, Thomas Guettler [EMAIL PROTECTED] wrote: What do you mean with quote here? 2. Prefix of quoted text like your text above in my mail Basically, just be able to parse an email into its actual and quoted parts - lines which have been prefixed to indent from a previous email.

Re: Standard module for parsing emails?

2008-07-30 Thread Phillip B Oldham
If there isn't a standard library for parsing emails, is there one for connecting to a pop/imap resource and reading the mailbox? -- http://mail.python.org/mailman/listinfo/python-list

Framework recommendations for web service?

2008-07-16 Thread Phillip B Oldham
We're looking at the next phase of development for our webapp, and the main focus will be to move the core from the app to a web service so other systems can use the data we've gathered (we're thinking along the lines of the XML API of Highrise from 37Signals). Its possible that we'll extend the

Re: Is there any component-oriented (non-MVC) web framework available for Python?

2008-07-16 Thread Phillip B Oldham
On Jul 16, 6:48 pm, Alis [EMAIL PROTECTED] wrote: Hi Is there any component-oriented (non-MVC) web framework available for Python? That is something like Apache Wicket, Tapestry or JSF, but I need it to be in Python. Regards, Ali Have you looked at kamaelia?

Re: FOSS projects exhibiting clean/good OOP?

2008-07-10 Thread Phillip B Oldham
On Jul 9, 9:26 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: This is somewhat subjective... Some would say that Python's object model is fundamentally broken and crappy (not MHO, needless to say) that Python + solid OO principles is antinomic !-) Really? Would you happen to be able to

Re: FOSS projects exhibiting clean/good OOP?

2008-07-10 Thread Phillip B Oldham
Thanks all - lots to go through there! :D I'd heard previously that Trac was a nice example, or rather its core was, but I'd also heard that there were lots of problems with it and that they were redeveloping it from scratch? -- http://mail.python.org/mailman/listinfo/python-list

FOSS projects exhibiting clean/good OOP?

2008-07-09 Thread Phillip B Oldham
I'm wondering whether anyone can offer suggestions on FOSS projects/ apps which exhibit solid OO principles, clean code, good inline documentation, and sound design principles? I'm devoting some time to reviewing other people's code to advance my skills. Its good to review bad code (of which I

Re: Comments on my first script?

2008-06-13 Thread Phillip B Oldham
Thanks guys. Those comments are really helpful. The odd semi-colon is my PHP background. Will probably be a hard habbit to break, that one! ;) If I do accidentally drop a semi-colon at the end of the line, will that cause any weird errors? Also, Chris, can you explain this: a, b = line.split(':

Functionality similar to PHP's SimpleXML?

2008-06-13 Thread Phillip B Oldham
I'm sure I'll soon figure out how to find these things out for myself, but I'd like to get the community's advice on something. I'm going to throw together a quick project over the weekend: a spider. I want to scan a website for certain elements. I come from a PHP background, so normally I'd: -

Making HEAD/PUT/DELETE requests with urllib2?

2008-06-13 Thread Phillip B Oldham
In my attempt to learn python in a weekend, I've fallen foul at line 10 of my second scripting attempt. Basically I'm writing a simple spider, but currently I'm unable to find any documentation on making HEAD requests using the urllib2 library to test whether a file exists on a remote webserver.

Re: Making HEAD/PUT/DELETE requests with urllib2?

2008-06-13 Thread Phillip B Oldham
Thanks for the info. That's working like a charm. Looks as though I'll be able to handle all request types with that object. I got a little worried then that the python dev's had missed something truly important! -- http://mail.python.org/mailman/listinfo/python-list

Best way to make a number of tests against an object('s attributes) with absence of switch statement?

2008-06-13 Thread Phillip B Oldham
What would be the optimal/pythonic way to subject an object to a number of tests (based on the object's attributes) and redirect program flow? Say I had the following: pets[0] = {'name': 'fluffy', 'species': 'cat', 'size': 'small'} pets[1] = {'name': 'bruno', 'species': 'snake', 'size': 'small'}

Comments on my first script?

2008-06-12 Thread Phillip B Oldham
I'm keen on learning python, with a heavy lean on doing things the pythonic way, so threw the following script together in a few hours as a first-attempt in programming python. I'd like the community's thoughts/comments on what I've done; improvements I can make, don'ts I should be avoiding, etc.

Re: Advice for a python newbie on parsing whois records?

2008-06-11 Thread Phillip B Oldham
On Jun 10, 8:21 pm, Miki [EMAIL PROTECTED] wrote: Hello, Hi. I'm stretching my boundaries in programming with a little python shell-script which is going to loop through a list of domain names, grab the whois record, parse it, and put the results into a csv. I've got the results coming

Advice for a python newbie on parsing whois records?

2008-06-10 Thread Phillip B Oldham
Hi. I'm stretching my boundaries in programming with a little python shell-script which is going to loop through a list of domain names, grab the whois record, parse it, and put the results into a csv. I've got the results coming back fine, but since I have *no* experience with python I'm