From: Bruce S. <Bru...@nc...> - 2007-02-23 04:36:56
|
From time to time I've seen colleagues with extensive programming experience but who are new to Python trip over some aspects of Python that are different and unexpected. In response I've written a note about what I perceive to be the most common traps and posted the note on the home page of vpython.org (labeled "Python for experienced programmers"). If you see some other issues that should be included in this summary, I'd be grateful to have them pointed out. And if you think this might be useful elsewhere within the Python community, feel free to point people to it or copy it to other places. Thanks. Bruce Sherwood |
From: Bruce S. <Bru...@nc...> - 2007-02-23 14:09:40
|
Thanks! Updated. Bruce Sherwood Douglas S. Blank wrote: > A couple of typos etc: > > You refer to positions in mytup with mytup(1) which should be mytup[1]. > > Your html document doesn't have a TITLE section. > > Also, your class names have lowercase letters and your instance names have > uppercase letters. Maybe better to start out these Python newb's on the > right foot :) > > I think many experienced programmers might like ipython, too. Might be > worth mentioning. > > Thanks for the notes; I'll point people to it! > > -Doug > > On Thu, February 22, 2007 11:37 pm, Bruce Sherwood said: > >> From time to time I've seen colleagues with extensive programming >>experience but who are new to Python trip over some aspects of Python >>that are different and unexpected. In response I've written a note about >>what I perceive to be the most common traps and posted the note on the >>home page of vpython.org (labeled "Python for experienced programmers"). >> >>If you see some other issues that should be included in this summary, >>I'd be grateful to have them pointed out. >> >>And if you think this might be useful elsewhere within the Python >>community, feel free to point people to it or copy it to other places. >> >>Thanks. >> >>Bruce Sherwood > > > |
From: P H B. <p.h...@bh...> - 2007-02-27 23:06:39
|
Can one save vpython screen images within python, [i.e.not using prtscrn]? P H Borcherds phone +44 121 475 3029 p.h...@bh... |
From: Jeremy F. <Jer...@lo...> - 2007-02-28 08:09:40
|
Jose adviced you tu use PIL but i think it depends on which OS you would li= ke=20 to save an image from vpython screen. I tried PIL under linux but it seems that it is working really better under= =20 windows. I'm using something not really satisfying but it is working ... i really th= ink=20 there are some ways to improve it, because in that code, you must specify t= he=20 position and size of the area you would like to grab. It is more a script t= o=20 take screenshots. import gtk, gc width =3D 640 height =3D 480 x =3D 1 y =3D 1 filename =3D 'test.png' screenshot =3D gtk.gdk.Pixbuf.get_from_drawable( gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, True, 8, width, height), gtk.gdk.get_default_root_window(), gtk.gdk.colormap_get_system(), x, y, 0, 0, width, height) screenshot.save(filename, 'png') del screenshot gc.collect() Le mercredi 28 f=E9vrier 2007 00:06, P H Borcherds a =E9crit=A0: > Can one save vpython screen images within python, [i.e.not using prtscrn]? > > P H Borcherds phone +44 121 475 3029 > p.h...@bh... > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: <jam...@fd...> - 2007-02-27 23:24:57
|
I think that the PIL image library has a functionality to capture the screen, indeed specifiing a box. Thus using the window coordinates you can save the image indeed in a lot of formats. Hope this works and helps. I really hope so, please let me know if this works, I have not tried this. ============================================ Jose Antonio Martin H. Departamento de Sistemas Informáticos y Computación Facultad de Informática Universidad Complutense de Madrid Ciudad universitaria, 28040 Madrid ============================================ ----- Original Message ----- From: "P H Borcherds" <p.h...@bh...> To: "Bruce Sherwood" <Bru...@nc...>; "vpusers" <vis...@li...> Sent: Wednesday, February 28, 2007 12:06 AM Subject: [Visualpython-users] saving vpython images? > Can one save vpython screen images within python, [i.e.not using prtscrn]? > > P H Borcherds phone +44 121 475 3029 > p.h...@bh... > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |