Re: TypeError: 'module object is not callable'

2007-09-04 Thread cjt22
On Sep 4, 11:24 am, "Amit Khemka" <[EMAIL PROTECTED]> wrote: > On 9/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Thanks guys. Changing to how Python does things has a lot of geting > > used to! > > Do any of you have any ideas on the best way to do the following > > problem: > > > Each

Re: Printing lists in columns (was: TypeError: 'module object is not callable')

2007-09-04 Thread cjt22
> But watch out if the lists aren't all the same length: zip won't pad out > any sequences, so it maynotbe exactly what is wanted here: > > >>> x = ['1', '2', '3'] > >>> y = ['4', '5'] > >>> for row in zip(x,y): > > print ', '.join(row) > > 1, 4 > 2, 5 > Unfortunately the lists will be of

Re: Printing lists in columns (was: TypeError: 'module object is not callable')

2007-09-04 Thread cjt22
On Sep 4, 2:06 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > >> But watch out if the lists aren't all the same length: zip won't pad out > >> any sequences, so it maynotbe exactly what is wanted here: > > >> >>> x = ['1', '2', '3'] > >> >>> y = ['4', '5'] > >> >>> for row

Re: Printing lists in columns

2007-09-04 Thread cjt22
On Sep 4, 3:20 pm, Bruno Desthuilliers wrote: > [EMAIL PROTECTED] a écrit : > (snip) > > > Thanks guys > > > I have a list of lists such as > > a = ["1" , "2"] b = ["4", "5", "6"] c = ["7",8", "9"] > > Stored in another list: d = [a,b,c] > > > I know this makes me sound very stupid but how woul

Re: Printing lists in columns

2007-09-04 Thread cjt22
On Sep 4, 3:20 pm, Bruno Desthuilliers wrote: > [EMAIL PROTECTED] a écrit : > (snip) > > > Thanks guys > > > I have a list of lists such as > > a = ["1" , "2"] b = ["4", "5", "6"] c = ["7",8", "9"] > > Stored in another list: d = [a,b,c] > > > I know this makes me sound very stupid but how woul

Re: Printing lists in columns

2007-09-05 Thread cjt22
Thanks guys, I really appreciate it. I have never used google groups before and am so impressed with how helpful you all are. It is also lovely that none of you mock my little knowledge of Python but just want to improve it. I have another question in relation to the izip_longest function (I persu

Accessing Module variables from another Module

2007-09-05 Thread cjt22
Hi I am new to Python (I have come from a large background of Java) and wondered if someone could explain to me how I can access variables stored in my main module to other functions within other modules called from this module for example file: main.py from Storage import store from Initialise

Re: Accessing Module variables from another Module

2007-09-05 Thread cjt22
On Sep 5, 1:22 pm, Bruno Desthuilliers wrote: > [EMAIL PROTECTED] a écrit : > > > Hi > > > I am new to Python (I have come from a large background of Java) and > > wondered if someone could explain to me how I can access variables > > stored in my main module to other functions within other module

startswith( prefix[, start[, end]]) Query

2007-09-06 Thread cjt22
Hi startswith( prefix[, start[, end]]) States: Return True if string starts with the prefix, otherwise return False. prefix can also be a tuple of suffixes to look for. However when I try and add a tuple of suffixes I get the following error: Type Error: expected a character buffer object For

Using s.sort([cmp[, key[, reverse]]]) to sort a list of objects based on a attribute

2007-09-07 Thread cjt22
Hi there I am fairly new to Python and have not really used regular expressions before (I think this might be needed for my query) and wondered if you could help I have a step class and store in a list step instances A step instance contains variables: name, startTime etc and startTime is stored

Using a time duration to print out data where every 2 seconds is a pixel

2007-09-10 Thread cjt22
Hi there, I wonder if any of you could tell me the best way to going about solving this little problem! I have a list of Step objects containing their start and finish times The steps are sorted so that they are in order of their step times The start and finish times are in string format of "%H:%S

Re: Using a time duration to print out data where every 2 seconds is a pixel

2007-09-10 Thread cjt22
Thanks however I am still having a problem using the time module for arithmetic My string times are of values such as 09:55:17 and I have code such as: >from time import * >startPoint = strptime(step.sTime, "%H:%S:%M") >finishPoint = strptime(step.fTime, "%H:%S:%M") >duration = mktime(startPoin

Re: Using a time duration to print out data where every 2 seconds is a pixel

2007-09-10 Thread cjt22
On Sep 10, 3:57 pm, [EMAIL PROTECTED] wrote: > Thanks however I am still having a problem using the time module for > arithmetic > > My string times are of values such as 09:55:17 > > and I have code such as: > > >from time import * > >startPoint = strptime(step.sTime, "%H:%S:%M") > >finishPoint =

Re: Using a time duration to print out data where every 2 seconds is a pixel

2007-09-10 Thread cjt22
On Sep 10, 6:39 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Mon, 10 Sep 2007 07:57:58 -0700, [EMAIL PROTECTED] declaimed the > following in comp.lang.python: > > > >from time import * > > >startPoint = strptime(step.sTime, "%H:%S:%M") > > >finishPoint = strptime(step.fTime, "%H:%S:%M") >

Re: Using a time duration to print out data where every 2 seconds is a pixel

2007-09-11 Thread cjt22
On Sep 11, 8:58 am, Tim Roberts <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > >Thanks however I am still having a problem using the time module for > >arithmetic > > >My string times are of values such as 09:55:17 > > >and I have code such as: > > >>from time import * > >>startPoint = str

Passing parameters at the command line (New Python User)

2007-09-24 Thread cjt22
Hi there. I just wondered whether anyone could recommend the correct way I should be passing command line parameters into my program. I am currently using the following code: def main(argv = None): file1= "directory1" file2 = "directory2" if argv is None: args = sys.argv[

WebBased Vector 2D Graphics

2007-10-05 Thread cjt22
Hi there I currently have a Python program outputing to the command line, durations of 'completed Steps' and 'data items' in relation to time i.e. --jfh -kl//kl started after jfh finished % Ds //new data arrived at this point in time

Re: WebBased Vector 2D Graphics

2007-10-05 Thread cjt22
On Oct 5, 11:43 am, Bjoern Schliessmann wrote: > [EMAIL PROTECTED] wrote: > > Is there any way this web programming can be done in python. > > Sure. Minimalistic approaches include using CGI > (http://docs.python.org/lib/module-cgi.html) > or using Apache with mod_python directly. There are also