Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #4K
~61.8K People Reached
About Me

Scientist - Experimental Psychologist

PC Specs
MacBook Pro/ OS X
Favorite Forums
Favorite Tags

37 Posted Topics

Member Avatar for aot

As a psychologist, it's useful to be able to time people's reactions in milliseconds. What kind of accuracy could I expect to get in this regard from Python? From what I've read so far, it doesn't look like I can hope to get precise enough timing to get reliable results, …

Member Avatar for BBTK
0
9K
Member Avatar for aot

I'm frustrated by the nature of time.sleep(), which prevents the script from doing anything else during the allotted time period. For example, I have: [CODE]while True: checkSomething() time.sleep(0.1) print 'hello'[/CODE] In this case, "hello" is never printed. I really want to check something every few milliseconds, but I also need …

Member Avatar for txfoo
0
1K
Member Avatar for aot

Okay, now that I consider myself to have decently mastered Python/Tkinter (or at least I'm no longer a complete noob), I'm turning my attention to the web. I'd love to be able to program applications that can be run easily via web sites (especially quick experiments). The easiest thing for …

Member Avatar for aot
0
226
Member Avatar for aot

I've realized that it would be very helpful to me to SET the mouse cursor to a particular location. Having done the usual internet searches, I can't seem to find anything on how to do it. Any ideas? (So I'm still set on converting to wx, but the project I've …

Member Avatar for Gribouillis
0
4K
Member Avatar for aot

I'd like to make a bogus Windows window pop up asking the user to choose between energy settings (better performance vs. better energy savings). This is for a social psychological experiment about ecologically sustainable behavior, so it's completely legitimate; it's approved by an ethical board, and the participants will be …

Member Avatar for jlm699
0
105
Member Avatar for aot

I have a nice little Tkinter program but need to make the mouse cursor invisible for parts of it. I have seen ways to make the cursor change to other images, but I need it to actually be invisible. Any help? P.S. If you think it's impossible that would be …

Member Avatar for Fistroman
0
162
Member Avatar for Horia.Muntean

The easiest way to do this is to use python's inbuilt random library, with the randint function. This function takes two integers, which define the range between which you want to get a random number. You can use it like so: [CODE]from random import * def setStats(numberOfStats): stats = [] …

Member Avatar for Horia.Muntean
0
127
Member Avatar for aot

So far the move to wxPython has been going fairly smoothly. However, it's crucial that I be able to display items in the center of the screen (images, buttons, and radioboxes). I read about wx.ALIGN_CENTER_VERTICAL and wx.ALIGN_CENTER_HORIZONTAL, but the vertical option just doesn't seem to be working for me. Below …

Member Avatar for sneekula
0
1K
Member Avatar for aot

So, as a scientist, I have plenty of geeky friends... and one of them is interested in creating a sound file from the brain waves she records. Essentially, she has a brain wave, and wants to feed it into a sound program to play it as if it were a …

Member Avatar for Bill Fisher
0
148
Member Avatar for aparadox

Here's how I write to a file: [CODE] import tempfile # The path for storing any files with randomly generated (temp) names. path = 'data' tempfile.tempdir = path # Generates a random filename not already in use. filename = tempfile.mktemp() # Writes the given text to the file. def write(text=""): …

Member Avatar for comprookie2000
0
175
Member Avatar for aot

Okay, so I'm thinking of taking the plunge into wxPython. But it's especially important to me to know if wxPython can do the following things easily and well: 1) Display a vertical array of radio buttons (or perhaps any buttons will do). They must have no labels, and I need …

Member Avatar for aot
0
255
Member Avatar for aot

I'd really like to be able to ask my program "where is the mouse pointer?" at any given time. Ideally I'll want people to click and hold a button, which will cause a stream of events to occur, and then (at varying points) the program should find out where their …

Member Avatar for aot
0
114
Member Avatar for aot

I'm having trouble unpickling a file -- it gives me ValueError: insecure string pickle. The trouble is, it is nearly identical to another file that I was able to unpickle just fine. For the life of me I cannot see what is strange or different about the new file -- …

Member Avatar for woooee
0
981
Member Avatar for aot

Can python programs with GUIs (such as Tkinter) be embedded into web pages? I have looked into CGI programming before, but despite a search, I have found no books relating how to do this with python. Is it possible? Can anyone recommend a good book? If not, what would you …

Member Avatar for Jon Pierce
0
185
Member Avatar for aot

I've been trying to get some .JPGs to show up in Tkinter but have had no luck so far. Up until now I was just using PhotoImage, which takes .GIFs, but it would be nice if I could expand and use other formats. Any ideas? Also, I know that wxPython …

Member Avatar for woooee
0
234
Member Avatar for aot

I've been using Eclipse as my IDE for python programming, mostly because it's free. However, as far as I can tell, its debugger is not that great. All I ever get are notices of what line the error occurs on (and what the error type is) and, while this can …

Member Avatar for ZZucker
0
148
Member Avatar for aot

I'd like to be able to make a slider widget without the knob that users can click and drag -- that is, I want the user to simply click somewhere on an empty slider and *then* have the knob appear where clicked. Is this possible with either Tkinter or wxPython? …

Member Avatar for Ene Uran
0
266
Member Avatar for aot

I was wondering if it's possible to show videos via a python GUI -- preferably quicktime videos, but any format would be a start. If it's not possible to play them from within the GUI, is it possible to at least have the person press a button that will automatically …

Member Avatar for linux
0
106
Member Avatar for rysin

You could do this: [CODE]while True: now = time.time() print now time.sleep(10)[/CODE] The main problem with this approach is that the program can't do anything else during the sleeping period. You could potentially make a separate thread (look up threading if you don't know what this is) that would run …

Member Avatar for aot
0
186
Member Avatar for aot

I've just downloaded and installed Vision Egg, a library built for python that displays various common scientific stimuli. While I was able to install it according to their specifications and get it to run from the command line (Terminal in my case), I have not been able to get it …

Member Avatar for Ene Uran
0
113
Member Avatar for aot

I'd like a program that reads through one or more weather web pages and records information from them on a daily (or even hourly) basis. Is this kind of thing possible at all to create with python? (Alternatively, if anyone knows of a program that already does this, or a …

Member Avatar for aot
0
108
Member Avatar for aot

I've been trying to use binding to a KeyPress/KeyRelease such that a particular function runs as long as the key is pressed and ceases when it is released. However, it seems like my major problem is that most keys are considered to continually activate as long as you hold them …

Member Avatar for Quarks
0
15K
Member Avatar for aot

Does anyone out there happen to know much about Pydev? It's my preferred IDE (it's the only free IDE that received good reviews when I looked it up), but I'm getting frustrated trying to download some new modules and use them in it. I downloaded and installed the module tkSnack, …

Member Avatar for arsham
0
83
Member Avatar for Lapinbriac

I think vegaseat is right -- it's much easier to make your program self-contained in the GUI. You can still easily print to the console (for viewing later), or write information to a file. I guess I just don't see what added functionality you are hoping to get from combining …

Member Avatar for aot
0
189
Member Avatar for aot

So I would really like to use Python to play some sound files -- it doesn't particularly matter what format, as they're just going to be basic "ping" type noises. However, it seems like whatever advice I find doesn't work out for my situation -- most modules seem to be …

Member Avatar for aot
0
98
Member Avatar for jrcagle

Okay, I have a question: Is there any way to resize an image using only Tkinter? This question stems from a deeper root problem -- I can't actually seem to get PIL to install. I keep getting the following error: unable to execute gcc: No such file or directory error: …

Member Avatar for aot
0
6K
Member Avatar for aot

So, it would be nice to be able to insert scrollbars into my program (with Tkinter). Right now I'm using labels to display all my long blocks of text, and people flip through pages to get throught it all. I thought I'd try to add a scrollbar, but it doesn't …

Member Avatar for Lardmeister
0
109
Member Avatar for aot

So I'm at the final stages of my program -- it's a working experiment that creates a data file for each participant. My hope was that when I was done, it would be relatively easy to create an analysis program that searches through all the data files and create a …

Member Avatar for aot
0
131
Member Avatar for aot

Does anyone know if there's a way to make a larger entry box in Tkinter? I'm looking to allow users to enter comments at the end of my program, so there should be plenty of space.

Member Avatar for aot
0
87
Member Avatar for aot

So I have to enter a lot of text for display by Tkinter, and I've been rather miffed that I can't seem to find a way to get Eclipse (PyDev) to do any kind of auto-wrapping. Wrapping the lines myself with [inlinecode]"string1" + \ "string2"[/inlinecode] is, of course, beyond annoying. …

Member Avatar for jrcagle
0
67
Member Avatar for aot

I want to be able to use scales to let the user answer various questions on screen. However, though I can get scales to work fine in other programs, in this one in particular they seem to have bugged out. What's happening is that, if I set [inlinecode]showvalue = False[/inlinecode], …

Member Avatar for bumsfeld
0
79
Member Avatar for sneekula

There's one other way that I've found, although sometimes it feels like cheating: bind another function to the mouseclick of that button. For example: [code=python]button = Button(text="Two Functions", command=f1) button.pack() button.bind('<ButtonRelease-1>', f2) button.focus_force()[/code] Thus the usual command is to perform [inlinecode]f1[/inlinecode], while when the mouse has clicked the button and …

Member Avatar for aot
0
3K
Member Avatar for aot

Here's something that I've wished for a number of times so far: the ability to create a function (taking X) that creates X variables, even if they are all initialized to the same value. For example, [inlinecode]f(3)[/inlinecode] would assign [inlinecode]var1 = 0[/inlinecode], [inlinecode]var2 = 0[/inlinecode], and [inlinecode]var3 = 0[/inlinecode]. My …

Member Avatar for aot
0
134
Member Avatar for aot

I want to have radiobuttons with text that is displayed underneath the actual buttons. Is there a way to do this (within the contents of the Radiobutton widget, that is, not resorting to labels)? I know this question is ridiculously simple, but I haven't been able to find anything in …

Member Avatar for jrcagle
0
89
Member Avatar for aot

Thanks to mawe and Jeff for answering my first question. Next question: is there a way to get Tkinter to display the window without a title bar? I'm an experimental psychologist, and I don't want my participants to easily be able to exit my experiments... so hints on disabling alt-tab …

Member Avatar for scru
0
17K
Member Avatar for aot

I've been having a lot of trouble with the [inlinecode]after[/inlinecode] method. What I want to do is show a series of images at the push of a button/press of a key -- each image should appear for 500ms, then be replaced by the next image, which should go on indefinitely …

Member Avatar for Ene Uran
0
114
Member Avatar for aot

Hi, I'm a noob Python/Tkinter user, and I'm finding that gathering information on the two is not as easy as I'd like... hopefully you guys will be able to help. My first question: I was just wondering if there's a way to tell Python, &quot;take all the files in X …

Member Avatar for mawe
0
99

The End.