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
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
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
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
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
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.
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
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
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