From: Chris B. <bu...@hv...> - 2002-10-07 15:50:15
|
Hi all. > This sounds like the problem I saw when trying to run outside the Idle > environment. Are you running inside Idle? Aha! That's the ticket. It works fine inside idle. I actually tried idle the first time, but it turns out I was using the wrong one. Python comes with it's own idle in /sw/bin (which was first in the path, before /usr/local/bin/idle). Thanks! Now I can show my students all the nifty things we can do. So what's so special about the idle environment? I thought it was just window dressing for the python interpreter. I'm a command-line enthusiast (and I edit my programs in vi), so I prefer just running from the shell, which works fine in Linux. Just curious why OS X is so different. Chris > > -steve > > On Friday, October 4, 2002, at 04:19 PM, Chris Burns wrote: > > > Hi all. > > > > Thanks for the quick reply! To clarify, the script I ran was the > > standard > > doublependulum.py that ships with the software. It works fine on my > > Linux > > computer (as well as other scripts I've written). I've tried > > installing > > VPython on two seperate Macs and get the same behaviour on both. > > Details: > > > > - Mac OSX 10.1.5 > > - python 2.2.1 installed using fink version 0.4.1 > > - Installed VPython (Visual-2002-07-22) using the install script > > > > Regarding the theta1 suggestion, the script sometimes bombs even before > > the pendulum completes an oscillation, so I don't think it's a problem > > with > > theta becoming too large. It does seem to have something to do with > > the > > number of computations, though. I wrote a double-pendulum of my own > > with > > Runga-Kutta and it consistently dies more quickly. > > > > Unfortunately, I don't maintain the Mac's, I just installed fink to get > > python working, so I don't know if there might be some esoteric > > software > > that might interfere. But fink seems to make its own little world > > below > > /sw, so I don't see how there could be a conflict. > > > > I also tried installing python from source (ie., not using fink) and I > > get > > the same problem. > > > > Chris > > > >> doublependulum.py is part of the standard VPython demo suite. All the > >> demos > >> work on other OSX machines. > >> > >> Bruce Sherwood > >> > >> ----- Original Message ----- > >> From: "Andy Dougherty" <dou...@la...> > >> To: "Bruce Sherwood" <bas...@un...> > >> Cc: "Andy Dougherty" <dou...@ma...>; > >> <cb...@sw...>; <vis...@li...> > >> Sent: Friday, October 04, 2002 3:20 PM > >> Subject: Re: [Visualpython-users] Errors running Vpython on OSX > >> > >> > >>> On Fri, 4 Oct 2002, Bruce Sherwood wrote: > >>> > >>>> This vague possibility would seem to be ruled out by the fact that > >>>> these > >>>> programs run on other people's Mac OSX machines, with presumably the > >> same > >>>> math libraries, no? > >>> > >>> Not quite, unless I've misunderstood the original poster's question. > >>> Yes, Vpython runs fine on other people's Mac OS X machines, but I'm > >>> unclear if this particular script runs fine on other people's Mac OS > >>> X > >>> machines. > >>> > >>>>>> Traceback (most recent call last): > >>>>>> File "doublependulum.py", line 71, in ? > >>>>>> atheta2 = -(A*atheta1+C*sin(theta1))/B > >>>>>> ValueError: unexpected math error > >>> > >>> What I'm imagining is that the user is simulating a (possibly damped, > >>> driven) double pendulum that might have swung over many many times, > >>> so > >>> that theta1 and/or theta2 might be very large compared to 2 pi. > >>> That's > >>> the sort of thing I've seen eventually lead to odd problems > >>> elsewhere. > >>> > >>> Perhaps if the original script were posted, others could test it. > >>> > >>> -- > >>> Andy Dougherty dou...@la... > >>> Dept. of Physics > >>> Lafayette College, Easton PA 18042 > >>> > >>> > >> > >> > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Visualpython-users mailing list > > Vis...@li... > > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > |