[Tutor] how to setup gnu.py

2005-03-30 Thread jrlen balane
hi! i don't know if this is the proper forum but i'll ask anyway... how am i going to setup gnu.py(or gnuplot.py) gnuplot with python??? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] how to read from a txt file

2005-03-29 Thread jrlen balane
am getting desperate on this, please help me, I just can't figure out how to read those tabs please help me! On Tue, 29 Mar 2005 22:16:11 -0800, jrlen balane <[EMAIL PROTECTED]> wrote: > I need the string representation of the data read so that i can put it > on a wxGrid >

Re: [Tutor] how to read from a txt file

2005-03-29 Thread jrlen balane
I need the string representation of the data read so that i can put it on a wxGrid while i am goin to need the integer representation of the data so that i can plot it. anybody, please help!!! On Tue, 29 Mar 2005 20:56:16 -0800, jrlen balane <[EMAIL PROTECTED]> wrote: > how should i mo

Re: [Tutor] how to read from a txt file

2005-03-29 Thread jrlen balane
f\t'%self.current11) self.table_file.write('\n') self.table_file.close() On Tue, 15 Mar 2005 17:05:46 +1300, Liam Clarke <[EMAIL PROTECTED]> wrote: > Whoops, golden rule - "Never post untested code" > Sorry. > > > On Mon, 14 Mar 2005 21:05:44 -050

Re: [Tutor] a shorter way to write this

2005-03-25 Thread jrlen balane
a, so thats the way to do it, a list comprehension, thanks for the info... On Fri, 25 Mar 2005 14:10:41 -0500, Gabriel Farrell <[EMAIL PROTECTED]> wrote: > how about > > manyones = [ 1 for x in range(96) ] > > > On Sat, Mar 26, 2005 at 03:02:34AM +0800, jrlen bal

[Tutor] a shorter way to write this

2005-03-25 Thread jrlen balane
basically, i'm going to create a list with 96 members but with only one value: list1[1,1,1,1...,1] is there a shorter way to write this one??? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] max. range of list

2005-03-25 Thread jrlen balane
thanks for the information... On Fri, 25 Mar 2005 10:26:00 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote: > jrlen balane wrote: > > how many is the maximum member can a list have??? > > According to this thread > http://groups-beta.google.com/group/comp.lang.pyt

[Tutor] max. range of list

2005-03-25 Thread jrlen balane
how many is the maximum member can a list have??? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] creating a tab delimited filename

2005-03-15 Thread jrlen balane
how would i make this the correct path: filename = "%s%s.txt" %('C:\Documents and Settings\nyer\My Documents\Info',time.strftime("%Y%m%d%H%M")) table_file = open(os.path.normpath(filename),"a") running on IDLE, i get the following error: Traceback (most recent call last): File "C:/Python23/prac

Re: [Tutor] creating a tab delimited filename

2005-03-15 Thread jrlen balane
that is exactly what i am looking for, but how would i add this to my filename??? should i use this: output_file = open(os.path.join(self.Save_Session.GetValue(), time.strftime('%Y%m%d%H%M')), 'w') the self.Save_Session.GetValue() is generated by a dirdialog On Tue, 15 Mar 2005 09:41:35 -0600, C

Re: [Tutor] creating a tab delimited filename

2005-03-14 Thread jrlen balane
so for example, i have 5 arrays, i can do this (is this correct): data1[1,2,3,4,5 (and so on)] data2[1,2,3,4,5 (and so on)] data3[1,2,3,4,5 (and so on)] data4[1,2,3,4,5 (and so on)] data5[1,2,3,4,5 (and so on)] datas = [data1, data2, data3, data4, data5] for data in datas: lines.append('\t'.j

Re: [Tutor] how to read from a txt file

2005-03-14 Thread jrlen balane
t; for line in list_of_lines: > try: >tempLine = int(line) > except TypeError: >print "Non numeric character in line", line > continue #Breaks, and starts with next line > > data_points.appe

Re: [Tutor] how to read from a txt file

2005-03-14 Thread jrlen balane
ion??? On Mon, 14 Mar 2005 19:57:26 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote: > jrlen balane wrote: > > this is what i get after running this on IDLE: > > > > import sys > > > > data_file = open('C:/Documents and Settings/nyer/Desktop/nyer.txt

Re: [Tutor] how to read from a txt file

2005-03-14 Thread jrlen balane
this is what i get after running this on IDLE: import sys data_file = open('C:/Documents and Settings/nyer/Desktop/nyer.txt', 'r') data = data_file.readlines() def process(list_of_lines): data_points = [] for line in list_of_lines: try: tempLine = int(line)

Re: [Tutor] how to read from a txt file

2005-03-14 Thread jrlen balane
say i have the code that reads decimal value from a text file: import sys data_file = open('C:/Documents and Settings/nyer/Desktop/nyer.txt', 'r') data = data_file.readlines() def process(list_of_lines): data_points = [] for line in list_of_lines: data_points.append(int(line))

Re: [Tutor] creating a tab delimited filename

2005-03-13 Thread jrlen balane
specifically, I want to write an array in to a text file, how am i going to make the file a tab-delimited file??? On Mon, 14 Mar 2005 08:37:35 +0800, jrlen balane <[EMAIL PROTECTED]> wrote: > so for example, i am creating a text file with > file.write() > > how am i going to m

Re: [Tutor] creating a tab delimited filename

2005-03-13 Thread jrlen balane
so for example, i am creating a text file with file.write() how am i going to make the file a tab-delimited file??? any parameters needed??? On Sun, 13 Mar 2005 15:59:46 -0800 (PST), Danny Yoo <[EMAIL PROTECTED]> wrote: > > > On Sun, 13 Mar 2005, jrlen balane wrote: > &

[Tutor] creating a tab delimited filename

2005-03-13 Thread jrlen balane
what does a tab delimited filename mean? how am i going to make this? also how does it differs from space delimited, csv, and others? can't really find an article that could put me in the right direction so i posted here. thanks in advance. ___ Tutor ma

Re: [Tutor] how to read from a txt file

2005-02-13 Thread jrlen balane
and this line: data_points.append(int(line)) this would turn the string back to an integer, am i right? and on this one: data_points = [ int(line) for line in data_file ] this did not use any read(), is this already equal to readline()? so this would already store all the data in the tx

Re: [Tutor] how to read from a txt file

2005-02-13 Thread jrlen balane
ei guys, chill out! what if i choose to numbered my data from 1-96 for example. how would i be able to exclude the numbered part from the data part? and, mind if I ask, what's a YAGNI by the way? ___ Tutor maillist - Tutor@python.org http://mail.pytho

[Tutor] how to read from a txt file

2005-02-13 Thread jrlen balane
guys, how would i do this: i want to read from a text file the text file should contain should contain data (say, decimal value from 1-1200). there should be no other type of entry but decimal it should contain 96 data all in all, with each data separated by a comma or each data is numbered from 1

Re: [Tutor] what is wrong with this?

2005-02-13 Thread jrlen balane
tty sure this isn't the > solution. > > jrlen, the error trace you sent looks incomplete, it doesn't show any of your > code. Is there more of it? > > Kent > > > > > Let me know how ya go. > > > > Regards, > > > > Liam Clarke >

Re: [Tutor] what is wrong with this?

2005-02-12 Thread jrlen balane
how would i find the stack trace? by the way, this is what the log says: 11:53:16: TypeError: wxGrid_CreateGrid() takes at least 3 arguments (2 given)Traceback(most recent call last): 11:53:16: TypeError: wxGrid_CreateGrid() takes at least 3 arguments (2 given) File "C:\PYTHON23\Lib\site-

[Tutor] what is wrong with this?

2005-02-12 Thread jrlen balane
this code is for a MDIChildFrame, It has a MDIParentFrame and when I run the MDIPrentFrame, there seems to be no problem, but when I attempt to edit the MDIChildFrame using the designer mode in BOA (i'm using BOA by the way), an error occurs that says: TypeError: wxGrid_CreateGrid() takes at least

[Tutor] What does this mean

2005-02-12 Thread jrlen balane
what does (*args, **kwargs) mean??? i'm sort of a bit confused... thanks. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] how to separate hexadecimal

2005-02-01 Thread jrlen balane
i have a 4 digit hex number (2 bytes) and i want to separate it into 2 digit hex (1 byte each) meaning i want to get the upper byte and the lower byte since i am going to add this two. how am i going to do this? should i treat it just like a normal string? please help, thanks. ex. hexa = '0x87BE"

[Tutor] how to plot a graph

2005-01-25 Thread jrlen balane
i'm going to use now the matplotlib in plotting a graph. i'm currently using python 2.3(enthought edition) on win 2000/xp. i'm using boa constructor on the GUI part. i am using an MDIParentFrame. one of the child frame will be used for the table part. then another child frame will be used to sho