From: Bruce P. <bap...@te...> - 2003-05-13 15:52:53
|
The curve object keeps two arrays in memory -- a position array and a color array. Slicing the position array doesn't affect the color array so that it will keep growing with each append. You need to slice both color and position arrays to keep from overflowing. At 04:07 PM 5/12/2003, you wrote: >From: "Gary Ruben" <ga...@em...> >To: Vis...@li... >Date: Sat, 10 May 2003 01:21:56 -0500 >Subject: [Visualpython-users] How do I truncate a curve? > >Hi fellow VPython Users, >A few times in my code I have wanted to show a trail behind some moving >object. >For example, you might want to see the path of the free end of the >double pendulum in the doublependulum.py example. To do this, you could >add the >following code: > ><code> >trailLength = 10000 # no of points in trail >trail = curve(color=(0.5,0.5,0.5)) > ># the existing while loop >while 1: > . > . other code here > . > posnew = frame2.pos+frame2.axis*L2 > trail.append(pos=posnew) > # Now keep the trail length finite > if len(trail.pos) > trailLength: > trail.pos = trail.pos[20:] > > t = t+dt > ></code> > >However, I have encountered a problem with doing this which I assume is to do >with the curve being held in a Numeric array structure. If I understand >Numeric >correctly, trail.pos = trail.pos[20:] won't cause a copy or truncation, just a >change to the offset to the start of the array, so the array/curve object will >continue to grow despite only showing the last 10000 points (in this example). >If a copy could be forced, the curve object would have to be reassociated with >the new array object, so I don't think a copy is occurring. A copy would be >very inefficient anyway. >Actually, when I run this example, everything seems to work OK, but in another >example I have, if I leave it running, the vpython window eventually locks up >and the lockup is associated with the code I have shown. I'm running Win98. >So, has anyone got a more efficient way to limit the length of a curve to some >maximum? Do others ever do this sort of thing and if so, do they agree that it >would be nice to have a property such as maxlength added to the curve object? > >Gary >-- |
From: Gary P. <pa...@in...> - 2003-05-14 20:50:16
|
Hi all, I've mentioned this before, so I already know that no on else may have these problems. But if someone else is having this problem, esp if he/she has a solution, I'd like to hear about it. 1.) I'm using win98, python2.2, and the latest visual for windows (cant put my hand on the date). I usually start scripts from a DOS command line (Idle and esp idlefork are not stable, see below) If I run a script, say for example, the demo orbit.py, it runs for about 30 seconds, and then the window freezes. I can close the window, but it does let go of the DOS window. I have to start the Close Program dialog and close "python". 2.) Idlefork simply doesn't work. It will let me launch a script, but I get a page fault crash as soon as I close the application's graphical window. Idle is better, but it causes a crash after 3 or 4 runs. I have reformatted my hard drive and rebuilt my system from scratch. Unless someone has a suggestion, I'm going to have to reformat and rebuild again (no fun) and add applications one by one till I find a suspect, then reformat and rebuild again, and so on ... yuck. 2a) I also run visual on linux. idlefork also crashes there. I must be cursed. ,gary |
From: Bruce S. <bas...@un...> - 2003-05-14 21:55:38
|
Sounds awful. The only thing I can think of is that you might try changing the settings of your screen resolution and color depth, and you might update your video driver. As you say, your problems don't sound familiar to any of us. Bruce Sherwood ----- Original Message ----- From: "Gary Pajer" <pa...@in...> To: <vis...@li...> Sent: Wednesday, May 14, 2003 4:48 PM Subject: [Visualpython-users] win98 freezing / idlefork crash > Hi all, > > I've mentioned this before, so I already know that no on else may have these > problems. > > But if someone else is having this problem, esp if he/she has a solution, > I'd like to hear about it. > > 1.) I'm using win98, python2.2, and the latest visual for windows (cant put > my hand on the date). > I usually start scripts from a DOS command line (Idle and esp idlefork are > not stable, see below) > If I run a script, say for example, the demo orbit.py, it runs for about 30 > seconds, and then the window freezes. I can close the window, but it does > let go of the DOS window. I have to start the Close Program dialog and > close "python". > > 2.) Idlefork simply doesn't work. It will let me launch a script, but I > get a page fault crash as soon as I close the application's graphical > window. Idle is better, but it causes a crash after 3 or 4 runs. > > I have reformatted my hard drive and rebuilt my system from scratch. Unless > someone has a suggestion, I'm going to have to reformat and rebuild again > (no fun) and add applications one by one till I find a suspect, then > reformat and rebuild again, and so on ... yuck. > > 2a) I also run visual on linux. idlefork also crashes there. I must be > cursed. > > ,gary > > > > ------------------------------------------------------- > Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara > The only event dedicated to issues related to Linux enterprise solutions > www.enterpriselinuxforum.com > > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Gary P. <pa...@in...> - 2003-05-19 22:15:53
|
I'm getting a little pressure from my new employer to toe the line and convert to iMac. I have almost no Mac experience, nor any religious affiliation to any particular os. Are there any issues getting visual to work on an iMac? I should be able to stand firm and keep my Windows and/or Linux if I want to. (Off topic (apologies): feel free to comment, perhaps in a private note, about what else I might be getting into. problems with scipy? anyone have experience with linux for PowerPC? ) -gary |
From: Jonathan B. <jbr...@ea...> - 2003-05-20 00:03:00
|
Configuring visual on OSX in general is possible, but a pain. We hope to fix that in a couple of days. See the thread "Max OS X issues update" from early May. In my limited experiance with the platform, the best information about python on OS X seems to come from the Python-Mac SIG mailing list. I highly reccomend browsing through their archives. Visual is known to work with the fink-distributed python, and should work with MacPython. Visual is probably not usable with the Apple-bundled python. HTH, Jonathan Brandmeyer On Mon, 2003-05-19 at 18:13, Gary Pajer wrote: > I'm getting a little pressure from my new employer to toe the line and > convert to iMac. I have almost no Mac experience, nor any religious > affiliation to any particular os. Are there any issues getting visual to > work on an iMac? I should be able to stand firm and keep my Windows and/or > Linux if I want to. > > (Off topic (apologies): feel free to comment, perhaps in a private note, > about what else I might be getting into. problems with scipy? anyone > have experience with linux for PowerPC? ) > > -gary > > > > ------------------------------------------------------- > This SF.net email is sponsored by: ObjectStore. > If flattening out C++ or Java code to make your application fit in a > relational database is painful, don't do it! Check out ObjectStore. > Now part of Progress Software. http://www.objectstore.net/sourceforge > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Jonathan B. <jbr...@ea...> - 2003-05-21 04:28:26
|
On Tue, 2003-05-20 at 22:29, Gary Pajer wrote: > THanks. refinement to the question: some (all?) of the Macs in the > classrooms are OS9. > Is visual running in OS9? I'm nervous about this. > -g We had considered deprecating that platform. There is an installer from the middle of last year on vpython.org, but it doesn't have any of the recent bugfixes. If someone doesn't volonteer to maintain the platform, it may not be supported in the future. That said, if someone out there has MWerks on an OS9 machine, and you want to help keep that platform alive, please speak up. Bruce, do you have any other thoughts on this matter? -Jonathan |
From: Bruce S. <bas...@un...> - 2003-05-21 13:23:09
|
I don't see any way to go forward with a version for OS9, which moreover has always been crippled because Idle doesn't work. Rather you have to edit a file with some editor of your choice, save the file, then drag that file onto the Python interpreter, thus losing the slick one-button edit/run cycle that Idle offers. It would take a lot of work by someone very knowledgeable to get Idle to work on OS9, mainly due (as I understand it) to threading issues. As a result of all this, and the rapid change of Macs from OS9 to OSX, we ourselves will not upgrade the OS9 version, though the old version will of course continue to be available at vpython.org. As Johathan says, if someone else wants to maintain OS9, great. Bruce Sherwood ----- Original Message ----- From: "Jonathan Brandmeyer" <jbr...@ea...> To: "Gary Pajer" <pa...@in...> Cc: <Vis...@li...>; "Bruce Sherwood" <bas...@un...> Sent: Wednesday, May 21, 2003 12:27 AM Subject: Re: [Visualpython-users] Advice: iMac > On Tue, 2003-05-20 at 22:29, Gary Pajer wrote: > > THanks. refinement to the question: some (all?) of the Macs in the > > classrooms are OS9. > > Is visual running in OS9? I'm nervous about this. > > -g > > We had considered deprecating that platform. There is an installer from > the middle of last year on vpython.org, but it doesn't have any of the > recent bugfixes. If someone doesn't volonteer to maintain the platform, > it may not be supported in the future. > > That said, if someone out there has MWerks on an OS9 machine, and you > want to help keep that platform alive, please speak up. > > Bruce, do you have any other thoughts on this matter? > > -Jonathan > > |
From: Arthur <ajs...@op...> - 2003-05-21 13:48:22
|
Bruce writes - > I don't see any way to go forward with a version for OS9, which moreover has > always been crippled because Idle doesn't work. Rather you have to No comment as to the general Mac issues - I am ignorant of Mac. But it should be no surprise from earlier comments I have made, that I think it is a mistake to tie the fate of VPython on Mac or on any other platform to IDLE. IDLE, on any platform, is just one of many alternatives for working with VPython scripts. Except as to the Python specific debugging features and the like that you have acknowledged are not utilized by either yourself and your students, IDLE is a generic programmers text editor. Period. The alternatives to IDLE are myriad. I have to assume, on Mac as well as any other platform. I am confused by your position on this. Art |
From: Bruce S. <bas...@un...> - 2003-05-21 14:13:24
|
You're correct, Arthur, that there is no required connection between IDLE and Visual: use any editor you like. But the VPython version of IDLE offers one-keypress interactivity, automatic saving of files, infinite un-do, and protection against the execution crashing, which together make the combination of Visual and this particular IDLE a particularly useful package (called VPython) for use by novices who are not experienced programmers. For that reason the VPython version of IDLE is not a generic programmer's text editor. "Visual" is a 3D module for Python programmers, and "VPython" is the name of a package with a number of parts bundled together for the benefit of novices. And since Visual is open source, anyone can compile it for any platform, including Mac OS9. What I don't know how to do, and what there are no resources for doing, is producing a nice "VPython" package for OS9. I've probably never formulated the difference between "Visual" and "VPython" quite this clearly before, and perhaps vpython.org could be restructured to make this distinction clear. Bruce Sherwood ----- Original Message ----- From: "Arthur" <ajs...@op...> To: <Vis...@li...> Sent: Wednesday, May 21, 2003 9:46 AM Subject: Re: [Visualpython-users] Advice: iMac > > Bruce writes - > > > I don't see any way to go forward with a version for OS9, which moreover > has > > always been crippled because Idle doesn't work. Rather you have to > > No comment as to the general Mac issues - I am ignorant of Mac. > > But it should be no surprise from earlier comments I have made, that I think > it is a mistake to tie the fate of VPython on Mac or on any other platform > to IDLE. IDLE, on any platform, is just one of many alternatives for > working with VPython scripts. Except as to the Python specific debugging > features and the like that you have acknowledged are not utilized by either > yourself and your students, IDLE is a generic programmers text editor. > Period. The alternatives to IDLE are myriad. I have to assume, on Mac as > well as any other platform. I am confused by your position on this. > > Art > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: ObjectStore. > If flattening out C++ or Java code to make your application fit in a > relational database is painful, don't do it! Check out ObjectStore. > Now part of Progress Software. http://www.objectstore.net/sourceforge > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Gary P. <pa...@in...> - 2003-05-21 14:13:31
|
Thanks. I'll cry and stamp my feet until they upgrade at least a couple of the OS9 systems. -gary > I don't see any way to go forward with a version for OS9, which moreover has > always been crippled because Idle doesn't work. Rather you have to edit a > file with some editor of your choice, save the file, then drag that file > onto the Python interpreter, thus losing the slick one-button edit/run cycle > that Idle offers. It would take a lot of work by someone very knowledgeable > to get Idle to work on OS9, mainly due (as I understand it) to threading > issues. As a result of all this, and the rapid change of Macs from OS9 to > OSX, we ourselves will not upgrade the OS9 version, though the old version > will of course continue to be available at vpython.org. As Johathan says, if > someone else wants to maintain OS9, great. > > Bruce Sherwood > > ----- Original Message ----- > From: "Jonathan Brandmeyer" <jbr...@ea...> > To: "Gary Pajer" <pa...@in...> > Cc: <Vis...@li...>; "Bruce Sherwood" > <bas...@un...> > Sent: Wednesday, May 21, 2003 12:27 AM > Subject: Re: [Visualpython-users] Advice: iMac > > > > On Tue, 2003-05-20 at 22:29, Gary Pajer wrote: > > > THanks. refinement to the question: some (all?) of the Macs in the > > > classrooms are OS9. > > > Is visual running in OS9? I'm nervous about this. > > > -g > > > > We had considered deprecating that platform. There is an installer from > > the middle of last year on vpython.org, but it doesn't have any of the > > recent bugfixes. If someone doesn't volonteer to maintain the platform, > > it may not be supported in the future. > > > > That said, if someone out there has MWerks on an OS9 machine, and you > > want to help keep that platform alive, please speak up. > > > > Bruce, do you have any other thoughts on this matter? > > > > -Jonathan > > > > > |