easy_install from svn

2007-06-19 Thread Rob Cowie
of appending a fragment to the url? Would anyone be so kind as to provide a working example? cheers, Rob Cowie -- http://mail.python.org/mailman/listinfo/python-list

Re: easy_install from svn

2007-06-19 Thread Rob Cowie
On Jun 19, 8:13 pm, Stefan Behnel [EMAIL PROTECTED] wrote: Rob Cowie wrote: I currently use easy_install to install packages from a custom, locally hosted package_index. The index consists of a single html doc with a list of package names and urls. All works well. I would like to get

Re: Documenting a package with Pydoc

2006-08-19 Thread Rob Cowie
Anyone? -- http://mail.python.org/mailman/listinfo/python-list

Re: Documenting a package with Pydoc

2006-08-19 Thread Rob Cowie
Gabriel Genellina wrote: At Friday 18/8/2006 11:45, Rob Cowie wrote: Pydoc seems to be capable of writing documentation for all modules within a package by simply pointing it to the package on the command line... pydoc -w packagename_without_/ Certainly, the method writedocs() appears

Documenting a package with Pydoc

2006-08-18 Thread Rob Cowie
I have searched this group and the wider net to find an answer to this, but I haven't been successful. Pydoc seems to be capable of writing documentation for all modules within a package by simply pointing it to the package on the command line... pydoc -w packagename_without_/ Certainly, the

Re: Type conversion?

2006-08-18 Thread Rob Cowie
KraftDiner wrote: I have the following code... import array len32 = array.array('L') len16 = array.array('H') len32.append(0) len16.append(0) y = len32[0] print y.__class__ type 'long' z = len16[0] print z.__class__ type 'int' how can I change Zs type to long? z_long = long(z)

Re: how can I avoid abusing lists?

2006-07-07 Thread Rob Cowie
Just forget the lists... counters = {0:0, 1:0, 2:0, 3:0, 4:0} def increment(value): counters[value] += 1 increment(1) increment(1) increment(3) increment(4) print counters[0] 0 print counters[1] 2 print coutners[2] 0 print counters[3] 1 print coutners[4] 1 The increment function

Re: how can I avoid abusing lists?

2006-07-07 Thread Rob Cowie
No, your question was clear. With hindsght and a more thorough read of your post I see my error ;^) -- http://mail.python.org/mailman/listinfo/python-list

Calling every method of an object from __init__

2006-06-19 Thread Rob Cowie
Hi all, Is there a simple way to call every method of an object from its __init__()? For example, given the following class, what would I replace the comment line in __init__() with to result in both methods being called? I understand that I could just call each method by name but I'm looking

Re: Most elegant way to generate 3-char sequence

2006-06-10 Thread Rob Cowie
John Machin wrote: On 10/06/2006 7:49 AM, Rob Cowie wrote: Hi all, I wish to generate a sequence of the form 'aaa', 'aab', aac' 'aba', 'abb', 'abc' etc. all the way to 'zzz'. How would you construct a generator to acheive this? A simple, working but somewhat inelegant solution

Most elegant way to generate 3-char sequence

2006-06-09 Thread Rob Cowie
Hi all, I wish to generate a sequence of the form 'aaa', 'aab', aac' 'aba', 'abb', 'abc' etc. all the way to 'zzz'. How would you construct a generator to acheive this? A simple, working but somewhat inelegant solution is... alpha = ['a','b','c','d'] #shortened for brevity alpha2 =

Re: Standalone Python functions in UML?

2006-04-04 Thread Rob Cowie
Roman Susi wrote: Hi! Out of curiosity, how do I draw functions outside classes with UML? How module could be drawn in this case? I would say that within a class diagram, you can't. In other UML diagrams (such as sequence interaction), the function is simply used as if it were a method

Re: Installing PySQLite on OS X 10.4

2006-03-16 Thread Rob Cowie
Cheers. I should have read the installation notes more carefully :) Rob C -- http://mail.python.org/mailman/listinfo/python-list

Installing PySQLite on OS X 10.4

2006-03-15 Thread Rob Cowie
Hi all, I'm having difficulty installing pysqlite 2.1.3 on Mac OS X 10.4.4 There are some notes on the pysqlite wiki regarding modification of the setup.py script and I've followed them to no avail. Build and install appear to go smoothly but attempting to run the tests from the python

Re: Installing PySQLite on OS X 10.4

2006-03-15 Thread Rob Cowie
Fredrik Lundh wrote: Rob Cowie wrote: There are some notes on the pysqlite wiki regarding modification of the setup.py script and I've followed them to no avail. Build and install appear to go smoothly but attempting to run the tests from the python interpreter fails. Likewise any

Re: Installing PySQLite on OS X 10.4

2006-03-15 Thread Rob Cowie
Gerhard Häring wrote: Rob Cowie wrote: [...] However, if I do from pysqlite2 import test as suggested after installation, I get the following traceback... Traceback (most recent call last): File stdin, line 1, in ? File pysqlite2/test/__init__.py, line 25, in ? from

Re: Separating elements from a list according to preceding element

2006-03-06 Thread Rob Cowie
Thanks everyone. I assumed there was something I had not considered... list slicing is that thing. The pyParsing example looks interesting - but for this case, a little too heavy. It doesn't really warrant including a third party module. Rob C --

Separating elements from a list according to preceding element

2006-03-05 Thread Rob Cowie
it into the relevant list. However, I have not been successful. Is there a better way that I have not considered? If this method is suitable, how might I implement it? Thanks all, Rob Cowie -- http://mail.python.org/mailman/listinfo/python-list

Re: good library for pdf

2006-01-26 Thread Rob Cowie
Take a look at www.reportlab.org. The ReportLab library includes a graphics module that might well do what you need. I'm not sure at present if it allows one to set alpha-channels to achieve transparency. Also, if you have access to a mac running OS X 10.4, the Automator application has a

Re: Using CGI to interface with an XML-RPC server

2006-01-18 Thread Rob Cowie
Please? I really could do with some help! -- http://mail.python.org/mailman/listinfo/python-list

Re: Using CGI to interface with an XML-RPC server

2006-01-18 Thread Rob Cowie
Python ships with cgi and xmlrpc support (cgi and xmlrpclib, respectively), so I'm not sure why you even think you have to ask... 1. use cgi to parse form data 2. use xmlrpclib to issue request 3. use print or your favourite html templating library to generate output (it might be

Using CGI to interface with an XML-RPC server

2006-01-17 Thread Rob Cowie
Hi all, Assume I have a working XML-RPC server that runs persistently and correctly accepts remote calls, executes the relevant code and outputs the XML-RPC result. This is fine when using an XML-RPC client. However, I wish to provide a web user interface. I gather it is possible to use PHP as

Re: chi-squared tests in python?

2006-01-17 Thread Rob Cowie
Matthew ps: given the batteries included philosphy, there's a remarkable dearth of stats in python... I think Chi^2 tests fall distinctly in the third-party library category, myself. I don't know... I've often thought the Standard Library should include a stats package. --

Invoking Unix commands from a Python app

2005-12-16 Thread Rob Cowie
invesitgated it. My question is, can a command line application be invoked by a python program? If so, how does one pass parameters to it and retrieve its response? Cheers and Merry Christmas, Rob Cowie -- http://mail.python.org/mailman/listinfo/python-list

Re: Invoking Unix commands from a Python app

2005-12-16 Thread Rob Cowie
Excellent... just the thing I was looking for. Thanks. Does anyone know of a unix app that could be used to monitor the duration of processes etc.? Would 'top' do the trick? Rob C -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a Python mentor

2005-10-13 Thread Rob Cowie
I'll gladly give you a hand. I should point out - I'm no expert. I think I've reached a point a bit beyond yours; I learnt OO programming principles with java and have spent this last Summer learning python. I have a good grasp of it. If you want to get in touch, email rob_cowie AT mac DOT com

Re: noob question Letters in words?

2005-10-08 Thread Rob Cowie
Well.. that put me in my place! Fredrik Lundh - I hadn't realised that 'is' does not test for equivalence. Thanks for the advice. -- http://mail.python.org/mailman/listinfo/python-list

Re: noob question Letters in words?

2005-10-07 Thread Rob Cowie
A string can be thought of as a tuple of characters. Tuples support membership testing thus... choice1 = raw_input( ) if '1' or 's' or 'S' in choice1: #do something elif '2' or 'e' or E' in choice1: #do something It doesn't seem to me to be a good idea; If the input is 'Start', option1 is

Re: GUI on Macintosh

2005-10-07 Thread Rob Cowie
FYI... the preinstalled python distributed with OS X 10.4 includes the Tk and wxPython GUI frameworks. I am unaware of how to get either of these installed on OS 9. -- http://mail.python.org/mailman/listinfo/python-list

Re: New project coming up...stay with Python, or go with a dot net language??? Your thoughts please!

2005-10-03 Thread Rob Cowie
Perhaps with the time saved by using Python instead of C# or some such, you could help to improve adodbapi.py, ensuring support for the next version of MS SQLServer, although that might be of little help in the short term. Just a thought. Also, have a gander at

Barcode Recognition

2005-09-19 Thread Rob Cowie
an undertaking this is for someone with no image processing experience? Cheers, Rob Cowie -- http://mail.python.org/mailman/listinfo/python-list

Creating BibTex files with XdkBibTeX

2005-09-11 Thread Rob Cowie
/Xavier.Decoret/resources/xdkbibtex/). It is a python wrapper around a C library. Has anyone used this? More interestingly to me... has anyone successfully installed it on Mac OS X? Also, can anyone suggest an alternative? Cheers, Rob Cowie -- http://mail.python.org/mailman/listinfo/python-list

Retrieving Filename from Path

2005-08-31 Thread Rob Cowie
is that it is platform specific. I would prefer to use a built in method if possible. Cheers, Rob Cowie -- http://mail.python.org/mailman/listinfo/python-list

Re: Retrieving Filename from Path

2005-08-31 Thread Rob Cowie
Thanks, os.path.basename(filePath) it is then. BTW, the help(module) function is new to me! Must have missed it when reading the tutorial. Cheers! -- http://mail.python.org/mailman/listinfo/python-list

Re: Web frame systems vs. pure Python

2005-07-22 Thread Rob Cowie
I don't know what your project is, but a web framework might make your system more scalable and maintainable if it gets larger. They often provide useful mechanisms for maintaining state and persistance. Template systems IMHO should be considered separately from App frameworks (although they may

Separation of Code in CGI App

2005-07-22 Thread Rob Cowie
Hi, I need to create a planner/calendar system using python cgi scripts. It is my first CGI app (beyond a few tutorial examples). I wish to separate the code according to function. For instance, the code to handle the DB connection, SQL querying, HTML form variable retrieval, rendering of HTML

Re: is this possible?

2005-07-22 Thread Rob Cowie
Yeah, Acrobat Reader is for viewing PDF's, not creating them. See http://www.reportlab.org/ for a couple of mature PDF libraries. -- http://mail.python.org/mailman/listinfo/python-list

Re: Separation of Code in CGI App

2005-07-22 Thread Rob Cowie
So, do I separate out whatever code I want to into .py modules, then have the cgi script import them, and utilise them as required? If so, do I need to put these modules somewhere described in the System Path? Can I modify the PATH at runtime to point to my modules? How? Cheers for being

Re: Separation of Code in CGI App

2005-07-22 Thread Rob Cowie
Thanks, I have run through the tutorial - very good. One day, I'd like to try and organise a similar tutorial involving CGI programming. There are several very basic examples, but they leave plenty of unanswered questions such as how to best structure a cgi app, apache permissions, etc So to be

Re: Create our own python source repository

2005-06-07 Thread Rob Cowie
I'm not entirely sure what the point of your exercise is - if you have access to the net, ,why do you want to collate code examples? They are frequently updated in the cookbook so an offline repository would quickly become out of date. However you've aroused my interest in something related.

Re: Information about Python Codyng Projects Ideas

2005-06-01 Thread Rob Cowie
Ha, I've just headed over here to ask the same thing! Any good ideas not listed on the wiki? I too am taking a Masters in Computer Science, however my first degree was not purely CS - mostly microbiology, so I'm not yet what one would call an expert Cheers --

Re: Newbie Here

2005-05-31 Thread Rob Cowie
As a relalative newbie myself I think I can say Python is used for anything any major programming language is used for. One of its many strengths is scalability - it can be used to great effect as a scripting language AND as an object oriented language for creating large, GUI apps. Yours is not

Re: Help with choice of suitable Architecture

2005-05-29 Thread Rob Cowie
Thanks for the comments. I kind of get the impression that CGI is the way to go for this application, and that I should forget about adding client-side scripting based functionality for the sake of accessibility - which I understand and kind of agree with. I'll look into the problem of

Help with choice of suitable Architecture

2005-05-28 Thread Rob Cowie
with Python. I'm not asking for a comparison of each architecture per se that seems to be well covered in this group. I would like to know how you all would set about creating this realtively simple application. Cheers, Rob Cowie Coventry University, Britain -- http://mail.python.org/mailman

Re: Help with choice of suitable Architecture

2005-05-28 Thread Rob Cowie
I agree with the sentiments that a single XML file is not the way to go for storing data that may be accessed concurrently. However, my hands are tied. It seems that CGI is likely to be the most straightforward option. Is the learning curve likely to be steeper for pure CGI or a web application