Retrieval of widget property values

2010-10-27 Thread Jah_Alarm
hi, here's my problem: let's say I have a function that uses some widget's property. How canI retireve the value of this property? For example, PopSize=IntVar(); popsize=Entry(root,width=10,textvariable=PopSize) def rand_opo_gen (self,event): popsize_start=#need to get the textvariable v

Re: Interface centering

2010-10-24 Thread Jah_Alarm
hi, I'm using Tkinter cheers, Alex On 24 окт, 20:26, Chris Rebert wrote: > On Sun, Oct 24, 2010 at 12:21 AM, Jah_Alarm wrote: > > sorry 4 the sillu question. > > > I've designed a GUI. How can I center on the screen? (i.e. it's always > > launched in

Interface centering

2010-10-24 Thread Jah_Alarm
sorry 4 the sillu question. I've designed a GUI. How can I center on the screen? (i.e. it's always launched in the center of the screen) cheers, Alex -- http://mail.python.org/mailman/listinfo/python-list

numpad in idle

2010-10-23 Thread Jah_Alarm
hi, here's my problem: I'm running IDLE in Ubuntu. For some reason numpad buttons do not work. I'm kinda used to this layout. Doesn anyone have an idea on how to switch it on? cheers, Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: update of elements in GUI

2010-08-17 Thread Jah_Alarm
In MATLAB this command is drawnow, just in case On Aug 17, 9:49 pm, Jah_Alarm wrote: > thanks. The thing is, the objects actually get updated without this > command, but when I run the GUI outside of python shell (i.e. in > command prompt as python filename.py or compile it to .exe

message box in Tkinter

2010-08-17 Thread Jah_Alarm
I need to display a message box at the click of a button. I od the following: from Tkinter import * def msg1(): messagebox.showinfo(message='Have a good day') Button(mainframe,text="About",command=msg1()).grid(column=360,row=36,sticky=W) I get the error msg 'global name 'messagebox' is not

Re: update of elements in GUI

2010-08-17 Thread Jah_Alarm
).update_idletasks() and mainframe.update_idletasks() but it still doesn't work. On Aug 17, 7:19 pm, Eric Brunel wrote: > In article > <24dc97b3-a8b5-4638-9cf5-a397f1eae...@q16g2000prf.googlegroups.com>, > >  Jah_Alarm wrote: > > hi, I've already asked this questio

update of elements in GUI

2010-08-16 Thread Jah_Alarm
hi, I've already asked this question but so far the progress has been small. I'm running Tkinter. I have some elements on the screen (Labels, most importantly) which content has to be updated every iteration of the algorithm run, e.g. "Iteration =" [i] for i in range(n), n=100. I'm using the updat

random number generation

2010-08-16 Thread Jah_Alarm
hi, I need to generate a binary array with a specified average proportion of 1s (e.g. [1 0 0 0 0 1 0 0] has this proportion = 25%). In Matlab I run something like random(m,n)http://mail.python.org/mailman/listinfo/python-list

Re: Textvariable display in label (GUI design)

2010-08-16 Thread Jah_Alarm
On Aug 17, 3:32 am, Eric Brunel wrote: > In article > <993d9560-564d-47f0-b2db-6f0c6404a...@g6g2000pro.googlegroups.com>, > >  Jah_Alarm wrote: > > hi, > > > pls help me out with the following issue: I wrote a function that uses > > a for loop that cha

Textvariable display in label (GUI design)

2010-08-16 Thread Jah_Alarm
hi, pls help me out with the following issue: I wrote a function that uses a for loop that changes a value of a certain variable each iteration. What I want is by clicking a button in GUI (with the command bound to this function) this value each iteration is displayed in a textbox (label). So far

nonuniform sampling with replacement

2010-03-21 Thread Jah_Alarm
I've got a vector length n of integers (some of them are repeating), and I got a selection probability vector of the same length. How will I sample with replacement k (<=n) values with the probabilty vector. In Matlab this function is randsample. I couldn't find anything to this extent in Scipy or