[Tutor] tkinter message & button questions

2011-11-30 Thread Cranky Frankie
Peter Otten <__pete...@web.de> wrote: To: tutor@python.org Subject: Re: [Tutor] tkinter message & button questions Message-ID: Content-Type: text/plain; charset="ISO-8859-1" <> Peter thanks again. The msg_widget is still resizing vertically depending on the lenght of the quote, but at least now

Re: [Tutor] tkinter message & button questions

2011-11-30 Thread Wayne Werner
On Wed, Nov 30, 2011 at 8:32 AM, Cranky Frankie wrote: > Peter Otten <__pete...@web.de> wrote: > Peter thanks again. The msg_widget is still resizing vertically > depending on the lenght of the quote, but at least now the horizontal > sizing is staying the same. Ideally the msg_widget would be the

Re: [Tutor] tkinter message & button questions

2011-11-30 Thread Peter Otten
Cranky Frankie wrote: > Peter thanks again. The msg_widget is still resizing vertically > depending on the lenght of the quote, but at least now the horizontal > sizing is staying the same. Ideally the msg_widget would be the *same > size*, no matter what the quote length is, but since this progra

Re: [Tutor] pass tuples to user defined function(beginner)

2011-11-30 Thread Emile van Sebille
On 11/29/2011 4:44 PM Dave Angel said... Any chance you were a customer or vendor of Wang? That 80mb drive, dumbed down, for prices around $20k, rings a bell. That was around 1980 as an ISV -- a Basic Four 610 -- we paid I think $50k? retailed at $70k. 8 user, 256k memory, two 35Mb drives tha

Re: [Tutor] tkinter message & button questions

2011-11-30 Thread Alan Gauld
On 30/11/11 14:32, Cranky Frankie wrote: The syntax you used, like "root.geometry("400x100")", I have not seen before, and I've done a lot of searching. Again, much of the tkinter stuff I see seems to be based on Python 2.6. If there is a definitive book or reference on using tkinter in Python 3

[Tutor] plotting in python

2011-11-30 Thread stm atoc
Hi there, I have a question regarding plotting with Python. I have the following python script: # coding: utf-8 from pylab import * import numpy filename='ourtest_out.list' fh=open(filename) line=fh.readline() fh.close z=array([ float(val) for val in line.split()[1:] ]) a = numpy.loadtxt(fi

Re: [Tutor] Do loop in Python

2011-11-30 Thread stm atoc
Yes. Actually, I have changed it to this kine od script: # == model loop == #Optione1 if True: z=zeros( (numlayers,) ) thickness= (thickness*1.0) for l in layers: z = arange ((-thickness - h * l),0,dz) ##z= t -h * l nu = num+ (0.001*exp(-0.005*(z+200.))*dz) #Option2 if False: thicknes

[Tutor] is there a better way to organise this code

2011-11-30 Thread Norman Khine
hello, is there a better way to organise this code or optimise it. http://pastie.org/2944797 thanks norman ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] plotting in python

2011-11-30 Thread Wayne Werner
On Wed, Nov 30, 2011 at 3:08 PM, stm atoc wrote: > Hi there, > > I have a question regarding plotting with Python. > > > ValueError: x and y must have same first dimension > > It looks like something is wrong with the data that you're trying to plot. Specifically, the data that you're trying to

Re: [Tutor] plotting in python

2011-11-30 Thread Emile van Sebille
On 11/30/2011 1:08 PM stm atoc said... Hi there, I have a question regarding plotting with Python. I have the following python script: # coding: utf-8 from pylab import * import numpy filename='ourtest_out.list' fh=open(filename) line=fh.readline() fh.close z=array([ float(val) for val in l

Re: [Tutor] is there a better way to organise this code

2011-11-30 Thread Wayne Werner
On Wed, Nov 30, 2011 at 3:34 PM, Norman Khine wrote: > hello, > > is there a better way to organise this code or optimise it. > > http://pastie.org/2944797 > > After glancing at it the only change that I would recommend (possibly) making is lines 58 and 39 - you can wrap the dictionaries (line li

Re: [Tutor] is there a better way to organise this code

2011-11-30 Thread Steven D'Aprano
Norman Khine wrote: hello, is there a better way to organise this code or optimise it. http://pastie.org/2944797 Is that a question? Because I get a syntax error in my brain when I parse it without the question mark. Sorry to pick on you, but it astonishes me when people don't bother with

Re: [Tutor] is there a better way to organise this code

2011-11-30 Thread Dave Angel
On 11/30/2011 07:49 PM, Steven D'Aprano wrote: Norman Khine wrote: hello, is there a better way to organise this code or optimise it. http://pastie.org/2944797 Is that a question? Because I get a syntax error in my brain when I parse it without the question mark. Sorry to pick on you, but

Re: [Tutor] plotting in python

2011-11-30 Thread Asokan Pichai
On Thu, Dec 1, 2011 at 2:38 AM, stm atoc wrote: > Hi there, > > I have a question regarding plotting with Python. > > I have the following python script: [SNIPPED] > plot(Conc[0],z) [SNIPPED] > ---So, What would you suggest? What is the output of print len(Conc[0]), len(z) You may insert t