Re: [Tutor] dynamic arrays?

2010-09-27 Thread Joel Levine
I'm guessing you are also using numpy and that you want arrays (or matrices) for the sake of either (a) matrix and array functions or (b) much greater processing speed. Add from numpy import * Then hat you can do is go back and forth: Build what you intend to be an array, but build it as

Re: [Tutor] generating independent random numbers

2010-09-27 Thread Joel Levine
You might try fixing up the following. I did not match the scale to what you are looking for. But the trick is to take advantage of the time module's association of numbers with dates: import time import random """ Sample output Wed Apr 29 14:35:58 1992 Thu Jun 24 12:04:15 1971 Fri Oct 7

Re: [Tutor] Mapping of co-ordinates... pygame

2009-07-23 Thread Joel Levine
Think "linear relation". For each of your new "horizontal" coordinates, there is a linear relation changing the "old" coordinate into the pixel coordinate of the pygame map. You have to find the intercept and the slope of that linear relation. There will be a second, unrelated "linear transform

Re: [Tutor] easygui question, again

2007-06-10 Thread Joel Levine
Suggestion: Consider Unix for Mac Wiley Publishing & maranGraphics. also Python Programming for the absolute beginner by Michael Dawson ... and don't be offended if it looks too simple. The problem with 'beginning' a computer language is that few people agree where the beginning is. We com

[Tutor] Menus / Mac

2006-10-09 Thread Joel Levine
basic would not be running & not be noticed -- but I'm at a loss. The program is below. Thanks, Joel Levine from Tkinter import * def callback(): print "called the callback!" root = Tk() # create a menu menu = Menu(root) root.config(menu=menu) filemenu = M

[Tutor] distribution

2006-10-17 Thread Joel Levine
27;s, who-knows-what vintage Python, with or without numpy, numeric, and Tkinter. Any suggestions for keeping my sanity? Is there something in particular I should be reading? Thanks, Joel Levine ___ Tutor maillist - Tutor@python.org http://mail.python.

[Tutor] numpy memory muncher

2006-11-11 Thread Joel Levine
I'm using, perhaps misusing numpy which is eating up the memory and, eventually crashing my program. Isolating it, the following piece of code continually eats memory. Is it my program or what ...? Thanks Joel Levine Using Mac OSX 10.4.7 Not clear on versions: Appears to be 0.9.8 with

[Tutor] saving postscript graphics

2008-07-16 Thread Joel Levine
I am trying to save a Tkinter canvas to a postscript file. This script creates an image on screen and it creates a postscript file. But the image in the file seems to be trashed. I'm working on OSX, but similar problems in a larger program failed (same way) in unix. JL #DwV_p

[Tutor] askopenfilename - columns missing in navigationwindow

2012-08-25 Thread Joel Levine
d the askopenfilename. This is Python 2.6 on a Mac. A complete restart of the machine did not solve the problem. Any suggestions? Joel Levine ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/lis