From: K. U. <u.k...@gm...> - 2010-07-02 11:45:04
|
Hi, I'm trying to build vpython on my Mac OS X10.6.4. I've installed gtkglextmm, libglademml, ftgl and boost from macports. After executing PYTHON=/opt/local/bin/python2.6 ./configure --prefix=/opt/local && make, I get a error message; "Compiling ./python/arrayprim.cpp ... make[1]: *** [arrayprim.lo] Error 1 make: *** [all-recursive] Error 1". Is possible to avoid this error and to build visual python on Mac OS X? -- K. Uebayashi |
From: Steve S. <st...@sp...> - 2010-07-02 13:18:58
|
Hi K, I'm pretty sure the gtk/glade etc are only needed for an X-Windows build. The Mac port uses the Carbon API to run on macos x. It may be possible to build an X-Windows version (in fact that was originally how visual was ported to the mac, except using fink rather than macports) but it hasn't been done in some time (I don't think at all for Visual 5.X, as far as I know, but I may be wrong here..) Anyway.. if you really want help building an X-Windows version for Mac you'll need to include more of the error message. It's pretty hard to diagnose with only a '...' ;-) thanks, -steve On Jul 2, 2010, at 7:44 AM, K. Uebayashi wrote: > Hi, > > I'm trying to build vpython on my Mac OS X10.6.4. > > I've installed gtkglextmm, libglademml, ftgl and boost from macports. > > After executing > PYTHON=/opt/local/bin/python2.6 ./configure --prefix=/opt/local > && make, > I get a error message; > "Compiling ./python/arrayprim.cpp ... > make[1]: *** [arrayprim.lo] Error 1 > make: *** [all-recursive] Error 1". > > > Is possible to avoid this error and > to build visual python on Mac OS X? > > > -- > K. Uebayashi > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: K. U. <u.k...@gm...> - 2010-07-03 08:09:53
|
Thank for your reply. > Anyway.. if you really want help building an X-Windows version for Mac > you'll need to include more of the error message. It's pretty hard to > diagnose with only a '...' As you mentioned above, I attach the error message from "make -d". It is very long, so I put the last lines. I don't think this error message is good enough, could you tell me how to get a right error message? -- K. Uebayashi $ make -d |tail -38 make[1]: *** [arrayprim.lo] Error 1 make: *** [all-recursive] Error 1 Prerequisite `gtk2/timer.cpp' is older than target `timer.lo'. Prerequisite `../include/util/timer.hpp' is older than target `timer.lo'. No need to remake target `timer.lo'. Considering target file `arrayprim.lo'. File `arrayprim.lo' does not exist. Looking for an implicit rule for `arrayprim.lo'. Trying pattern rule with stem `arrayprim'. Trying implicit prerequisite `arrayprim.cpp'. Found prerequisite `arrayprim.cpp' as VPATH `./python/arrayprim.cpp' Found an implicit rule for `arrayprim.lo'. Considering target file `arrayprim.cpp'. Looking for an implicit rule for `arrayprim.cpp'. Trying pattern rule with stem `arrayprim.cpp'. Trying implicit prerequisite `arrayprim.cpp,v'. Trying pattern rule with stem `arrayprim.cpp'. Trying implicit prerequisite `RCS/arrayprim.cpp,v'. Trying pattern rule with stem `arrayprim.cpp'. Trying implicit prerequisite `RCS/arrayprim.cpp'. Trying pattern rule with stem `arrayprim.cpp'. Trying implicit prerequisite `s.arrayprim.cpp'. Trying pattern rule with stem `arrayprim.cpp'. Trying implicit prerequisite `SCCS/s.arrayprim.cpp'. No implicit rule found for `arrayprim.cpp'. Finished prerequisites of target file `arrayprim.cpp'. No need to remake target `arrayprim.cpp'; using VPATH name `./python/arrayprim.cpp'. Finished prerequisites of target file `arrayprim.lo'. Must remake target `arrayprim.lo'. Putting child 0x10019aab0 (arrayprim.lo) PID 19092 on the chain. Live child 0x10019aab0 (arrayprim.lo) PID 19092 Compiling ./python/arrayprim.cpp ... Reaping winning child 0x10019aab0 PID 19092 Live child 0x10019aab0 (arrayprim.lo) PID 19093 Reaping winning child 0x10019aab0 PID 19093 Live child 0x10019aab0 (arrayprim.lo) PID 19094 Reaping losing child 0x10019aab0 PID 19094 Removing child 0x10019aab0 PID 19094 from chain. Reaping losing child 0x100116ea0 PID 19078 Removing child 0x100116ea0 PID 19078 from chain. |
From: Steve S. <st...@sp...> - 2010-07-03 16:13:21
|
Hi K, What's the full message if you just type 'make'? -steve On Jul 3, 2010, at 4:09 AM, K. Uebayashi wrote: > Thank for your reply. > >> Anyway.. if you really want help building an X-Windows version for >> Mac >> you'll need to include more of the error message. It's pretty hard to >> diagnose with only a '...' > > As you mentioned above, > I attach the error message from "make -d". > It is very long, so I put the last lines. > > I don't think this error message is good enough, > could you tell me how to get a right error message? > > -- > K. Uebayashi > > > $ make -d |tail -38 > make[1]: *** [arrayprim.lo] Error 1 > make: *** [all-recursive] Error 1 > Prerequisite `gtk2/timer.cpp' is older than target `timer.lo'. > Prerequisite `../include/util/timer.hpp' is older than target > `timer.lo'. > No need to remake target `timer.lo'. > Considering target file `arrayprim.lo'. > File `arrayprim.lo' does not exist. > Looking for an implicit rule for `arrayprim.lo'. > Trying pattern rule with stem `arrayprim'. > Trying implicit prerequisite `arrayprim.cpp'. > Found prerequisite `arrayprim.cpp' as VPATH `./python/ > arrayprim.cpp' > Found an implicit rule for `arrayprim.lo'. > Considering target file `arrayprim.cpp'. > Looking for an implicit rule for `arrayprim.cpp'. > Trying pattern rule with stem `arrayprim.cpp'. > Trying implicit prerequisite `arrayprim.cpp,v'. > Trying pattern rule with stem `arrayprim.cpp'. > Trying implicit prerequisite `RCS/arrayprim.cpp,v'. > Trying pattern rule with stem `arrayprim.cpp'. > Trying implicit prerequisite `RCS/arrayprim.cpp'. > Trying pattern rule with stem `arrayprim.cpp'. > Trying implicit prerequisite `s.arrayprim.cpp'. > Trying pattern rule with stem `arrayprim.cpp'. > Trying implicit prerequisite `SCCS/s.arrayprim.cpp'. > No implicit rule found for `arrayprim.cpp'. > Finished prerequisites of target file `arrayprim.cpp'. > No need to remake target `arrayprim.cpp'; using VPATH name > `./python/arrayprim.cpp'. > Finished prerequisites of target file `arrayprim.lo'. > Must remake target `arrayprim.lo'. > Putting child 0x10019aab0 (arrayprim.lo) PID 19092 on the chain. > Live child 0x10019aab0 (arrayprim.lo) PID 19092 > Compiling ./python/arrayprim.cpp ... > Reaping winning child 0x10019aab0 PID 19092 > Live child 0x10019aab0 (arrayprim.lo) PID 19093 > Reaping winning child 0x10019aab0 PID 19093 > Live child 0x10019aab0 (arrayprim.lo) PID 19094 > Reaping losing child 0x10019aab0 PID 19094 > Removing child 0x10019aab0 PID 19094 from chain. > Reaping losing child 0x100116ea0 PID 19078 > Removing child 0x100116ea0 PID 19078 from chain. |
From: K. U. <u.k...@gm...> - 2010-07-03 23:54:46
|
I attached make.log and src/build.log. >From src/build.log, it seems that I get a error at numpy/arrayobject.h. Thanks. 2010/7/4 Steve Spicklemire <st...@sp...>: > Hi K, > > What's the full message if you just type 'make'? > > -steve > -- K. Uebayashi |
From: Steve S. <st...@sp...> - 2010-07-04 09:49:55
|
OK.. here's the trouble: In file included from ../../visual-5.2_release/include/python/ arrayprim.hpp:9:0, from ../../visual-5.2_release/src/python/ arrayprim.cpp:1: ../../visual-5.2_release/include/python/num_util.hpp:73:31: fatal error: numpy/arrayobject.h: No such file or directory compilation terminated. Did you build/install numpy? Do you have the sources someplace where visual can find the header files? -steve On Jul 3, 2010, at 7:54 PM, K. Uebayashi wrote: > <build.log> |
From: K. U. <u.k...@gm...> - 2010-07-11 01:02:40
|
I only replied to Steve, personally. So, I resend my message to this list. After executed ./configure --prefix=/opt/local \ CPPFLAGS="-I/opt/local/Library/Frameworks/Python.framework/\ Versions/2.6/lib/python2.6/site-packages/numpy/core/include/" , I met "new" error message, $ make .... Compiling ./gtk2/rate.cpp ... Linking cvisualmodule.so ... make[1]: *** [cvisualmodule.so] Error 1 make: *** [all-recursive] Error 1 . "src/build.log" ends with $tail -3 src/build.log Configured with: /var/tmp/gcc/gcc-5659~1/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 Thread model: posix gcc version 4.2.1 (Apple Inc. build 5659) . Could I fix the above error "Error 1" ? -- K. Uebayashi 2010/7/4 Steve Spicklemire <st...@sp...>: > OK.. here's the trouble: > > In file included from > ../../visual-5.2_release/include/python/arrayprim.hpp:9:0, > from ../../visual-5.2_release/src/python/arrayprim.cpp:1: > ../../visual-5.2_release/include/python/num_util.hpp:73:31: fatal error: > numpy/arrayobject.h: No such file or directory > compilation terminated. > > Did you build/install numpy? Do you have the sources someplace where visual > can find the header files? > > -steve > > On Jul 3, 2010, at 7:54 PM, K. Uebayashi wrote: > >> <build.log> > > -- K. Uebayashi |
From: Bruce S. <bas...@nc...> - 2010-07-11 21:17:44
|
The error indicates that some library was not found in the linking stage. If you showed just a bit more of the tail end of build.log, there might be a specific indication of what library it is. Bruce Sherwood On Sat, Jul 10, 2010 at 7:02 PM, K. Uebayashi <u.k...@gm...> wrote: > I only replied to Steve, personally. > So, I resend my message to this list. > > > > After executed > ./configure --prefix=/opt/local \ > CPPFLAGS="-I/opt/local/Library/Frameworks/Python.framework/\ > Versions/2.6/lib/python2.6/site-packages/numpy/core/include/" > , I met "new" error message, > $ make > .... > Compiling ./gtk2/rate.cpp ... > Linking cvisualmodule.so ... > make[1]: *** [cvisualmodule.so] Error 1 > make: *** [all-recursive] Error 1 > . > > "src/build.log" ends with > $tail -3 src/build.log > Configured with: /var/tmp/gcc/gcc-5659~1/src/configure > --disable-checking --enable-werror --prefix=/usr --mandir=/share/man > --enable-languages=c,objc,c++,obj-c++ > --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ > --with-slibdir=/usr/lib --build=i686-apple-darwin10 > --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 > --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 > Thread model: posix > gcc version 4.2.1 (Apple Inc. build 5659) > . > > Could I fix the above error "Error 1" ? > > -- > K. Uebayashi > > 2010/7/4 Steve Spicklemire <st...@sp...>: > > OK.. here's the trouble: > > > > In file included from > > ../../visual-5.2_release/include/python/arrayprim.hpp:9:0, > > from ../../visual-5.2_release/src/python/arrayprim.cpp:1: > > ../../visual-5.2_release/include/python/num_util.hpp:73:31: fatal error: > > numpy/arrayobject.h: No such file or directory > > compilation terminated. > > > > Did you build/install numpy? Do you have the sources someplace where > visual > > can find the header files? > > > > -steve > > > > On Jul 3, 2010, at 7:54 PM, K. Uebayashi wrote: > > > >> <build.log> > > > > > > > > -- > K. Uebayashi > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: K. U. <u.k...@gm...> - 2010-07-20 01:40:15
Attachments:
config.log.bz2
build.log.bz2
|
After adding some patchs, error message has changed. # I use visual-5.2_release.tar.bz2. This is my patch.(thanks Mirko) ======= $ diff visual-5.2_releaseORIG/src/Makefile.in visual-5.2_release/src/Makefile.in 46c46 < OSX_CPPFLAGS = #-no-cpp-precomp -fno-common -Wno-long-double --- > OSX_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include # -no-cpp-precomp -fno-common -Wno-long-double 202c202 < $(GTHREAD_LIBS) /sw/lib/libboost_python-mt.a -lboost_thread-mt -lboost_signals) --- > $(GTHREAD_LIBS) /opt/local/lib/libboost_python-mt.a -lboost_thread-mt -lboost_signals) ======= These are my process, 1. adding my patch 2. ./configure --prefix=/opt/local 3. make, then I met new error. I attached config.log and build.log. 2010/7/12 Bruce Sherwood <bas...@nc...>: > The error indicates that some library was not found in the linking stage. If > you showed just a bit more of the tail end of build.log, there might be a > specific indication of what library it is. > Bruce Sherwood > > On Sat, Jul 10, 2010 at 7:02 PM, K. Uebayashi <u.k...@gm...> wrote: >> >> I only replied to Steve, personally. >> So, I resend my message to this list. >> >> >> >> After executed >> ./configure --prefix=/opt/local \ >> CPPFLAGS="-I/opt/local/Library/Frameworks/Python.framework/\ >> Versions/2.6/lib/python2.6/site-packages/numpy/core/include/" >> , I met "new" error message, >> $ make >> .... >> Compiling ./gtk2/rate.cpp ... >> Linking cvisualmodule.so ... >> make[1]: *** [cvisualmodule.so] Error 1 >> make: *** [all-recursive] Error 1 >> . >> >> "src/build.log" ends with >> $tail -3 src/build.log >> Configured with: /var/tmp/gcc/gcc-5659~1/src/configure >> --disable-checking --enable-werror --prefix=/usr --mandir=/share/man >> --enable-languages=c,objc,c++,obj-c++ >> --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ >> --with-slibdir=/usr/lib --build=i686-apple-darwin10 >> --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 >> --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 >> Thread model: posix >> gcc version 4.2.1 (Apple Inc. build 5659) >> . >> >> Could I fix the above error "Error 1" ? >> >> -- >> K. Uebayashi >> >> 2010/7/4 Steve Spicklemire <st...@sp...>: >> > OK.. here's the trouble: >> > >> > In file included from >> > ../../visual-5.2_release/include/python/arrayprim.hpp:9:0, >> > from >> > ../../visual-5.2_release/src/python/arrayprim.cpp:1: >> > ../../visual-5.2_release/include/python/num_util.hpp:73:31: fatal error: >> > numpy/arrayobject.h: No such file or directory >> > compilation terminated. >> > >> > Did you build/install numpy? Do you have the sources someplace where >> > visual >> > can find the header files? >> > >> > -steve >> > >> > On Jul 3, 2010, at 7:54 PM, K. Uebayashi wrote: >> > >> >> <build.log> >> > >> > >> >> >> >> -- >> K. Uebayashi >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > -- K. Uebayashi |
From: Bruce S. <bas...@nc...> - 2010-07-20 05:07:41
|
The missing links all seem to be Python symbols such as _PyExc_RuntimeError and _PyInt_AsLong, which are part of the Python API for connecting to C. I don't have any experience with the darwin environment, but maybe someone on this list will recognize what the problem is. It probably is irrelevant, but why are you using 5.2 rather than an up-to-date version of Visual, which is now at 5.32? Also, what problem are you trying to address by trying to build Visual in the darwin environment rather than using the fink package or the native Mac package? Bruce Sherwood On Mon, Jul 19, 2010 at 7:31 PM, K. Uebayashi <u.k...@gm...> wrote: > After adding some patchs, error message has changed. > # I use visual-5.2_release.tar.bz2. > > This is my patch.(thanks Mirko) > ======= > $ diff visual-5.2_releaseORIG/src/Makefile.in > visual-5.2_release/src/Makefile.in > 46c46 > < OSX_CPPFLAGS = #-no-cpp-precomp -fno-common -Wno-long-double > --- >> OSX_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include # -no-cpp-precomp -fno-common -Wno-long-double > 202c202 > < $(GTHREAD_LIBS) /sw/lib/libboost_python-mt.a > -lboost_thread-mt -lboost_signals) > --- >> $(GTHREAD_LIBS) /opt/local/lib/libboost_python-mt.a -lboost_thread-mt -lboost_signals) > ======= > > These are my process, > 1. adding my patch > 2. ./configure --prefix=/opt/local > 3. make, > then I met new error. > > I attached config.log and build.log. > > > > 2010/7/12 Bruce Sherwood <bas...@nc...>: >> The error indicates that some library was not found in the linking stage. If >> you showed just a bit more of the tail end of build.log, there might be a >> specific indication of what library it is. >> Bruce Sherwood >> >> On Sat, Jul 10, 2010 at 7:02 PM, K. Uebayashi <u.k...@gm...> wrote: >>> >>> I only replied to Steve, personally. >>> So, I resend my message to this list. >>> >>> >>> >>> After executed >>> ./configure --prefix=/opt/local \ >>> CPPFLAGS="-I/opt/local/Library/Frameworks/Python.framework/\ >>> Versions/2.6/lib/python2.6/site-packages/numpy/core/include/" >>> , I met "new" error message, >>> $ make >>> .... >>> Compiling ./gtk2/rate.cpp ... >>> Linking cvisualmodule.so ... >>> make[1]: *** [cvisualmodule.so] Error 1 >>> make: *** [all-recursive] Error 1 >>> . >>> >>> "src/build.log" ends with >>> $tail -3 src/build.log >>> Configured with: /var/tmp/gcc/gcc-5659~1/src/configure >>> --disable-checking --enable-werror --prefix=/usr --mandir=/share/man >>> --enable-languages=c,objc,c++,obj-c++ >>> --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ >>> --with-slibdir=/usr/lib --build=i686-apple-darwin10 >>> --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 >>> --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 >>> Thread model: posix >>> gcc version 4.2.1 (Apple Inc. build 5659) >>> . >>> >>> Could I fix the above error "Error 1" ? >>> >>> -- >>> K. Uebayashi >>> >>> 2010/7/4 Steve Spicklemire <st...@sp...>: >>> > OK.. here's the trouble: >>> > >>> > In file included from >>> > ../../visual-5.2_release/include/python/arrayprim.hpp:9:0, >>> > from >>> > ../../visual-5.2_release/src/python/arrayprim.cpp:1: >>> > ../../visual-5.2_release/include/python/num_util.hpp:73:31: fatal error: >>> > numpy/arrayobject.h: No such file or directory >>> > compilation terminated. >>> > >>> > Did you build/install numpy? Do you have the sources someplace where >>> > visual >>> > can find the header files? >>> > >>> > -steve >>> > >>> > On Jul 3, 2010, at 7:54 PM, K. Uebayashi wrote: >>> > >>> >> <build.log> >>> > >>> > >>> >>> >>> >>> -- >>> K. Uebayashi >>> >>> >>> ------------------------------------------------------------------------------ >>> This SF.net email is sponsored by Sprint >>> What will you do first with EVO, the first 4G phone? >>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >>> _______________________________________________ >>> Visualpython-users mailing list >>> Vis...@li... >>> https://lists.sourceforge.net/lists/listinfo/visualpython-users >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users >> >> > > > > -- > K. Uebayashi > |
From: Stefano M. <mwi...@gm...> - 2010-07-20 05:48:07
|
Hello friends, I have been for long out of Vpython for long now, but I have plans to develop Scientific simulation Program for Physics students. As we know, Visual Did not support integration with wxPython or any toolkit. Is that possible now? If no what are plans to implement that feature? Thanks |
From: Chris F. <cf...@th...> - 2010-07-20 07:46:55
|
You can run Visual Python "alongside" any toolkit, I believe. You can do this with most toolkits, actually, it's just a tricky juggling act, and usually not worth it. All you need to do is run one event loop at a time, and swap between (among?!) them. I've done this with wx and Tkinter in the past. I use GTK and VPython together. GTK has a quirk, though. On Windows, you need to tell GTK about it if you're using multithreading. Yeah, the naive approach runs fine (for the limited tests I've done, there's probably a way to break it) on Linux. Point is, VPython runs in a background thread under the hood, so you need this element if you're on Windows. Here's some demo code: ---------------------------------------------------------- import pygtk pygtk.require('2.0') import gtk from visual import display, frame, convex, color class GtkApp(gtk.Window): def buildVisual(self): scene0 = display(title='Visual Python') f = frame() half1 = convex(frame=f, pos=[ [-0.5,-0.5,-0.5], [0.5,0.5,0.5],[0.0,-0.5,0.5], [0.0,0.5,-0.5], [0.5,-0.5,0.5], [0.5,-0.5,-0.5], [0.5,0.5,-0.5] ], color=color.cyan) half0 = convex(frame=f, pos=[ [-0.5,-0.5,-0.5], [0.5,0.5,0.5], [0.0,-0.5,0.5], [0.0,0.5,-0.5], [-0.5,0.5,-0.5],[-0.5,0.5,0.5],[-0.5,-0.5,0.5] ], color=(0.0,.5,1.0)) def onPress(self, w): print 'close the Visual Python window to exit' def buildGUI(self): box = gtk.VBox(False, 0) btn = gtk.Button('press me') btn.connect('clicked', self.onPress) btn.set_border_width(5) box.pack_start(btn, False, False, 0) btn.show() self.add(box) box.show() def __init__(self): gtk.Window.__init__(self) self.set_title('GIMP Toolkit') self.buildGUI() self.buildVisual() if __name__ == '__main__': gtk.gdk.threads_init() myapp = GtkApp() myapp.show() gtk.gdk.threads_enter() gtk.main() gtk.gdk.threads_leave() ---------------------------------------------------------- Here's the relevant bit in the pygtk faq: http://faq.pygtk.org/index.py?req=show&file=faq20.006.htp I believe VPython will run your callbacks/handlers in the main thread, but check this before you try to call pygtk from the wrong thread.. ack! Cheers! On Tuesday 20 July 2010, Stefano Mtangoo wrote: > Hello friends, > I have been for long out of Vpython for long now, but I have plans to > develop Scientific simulation > Program for Physics students. As we know, Visual Did not support > integration with wxPython or any toolkit. > Is that possible now? If no what are plans to implement that feature? > Thanks > > --------------------------------------------------------------------------- > --- This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Stef M. <ste...@gm...> - 2010-07-20 08:11:51
|
On 20-07-2010 07:47, Stefano Mtangoo wrote: > Hello friends, > I have been for long out of Vpython for long now, but I have plans to > develop Scientific simulation > Program for Physics students. As we know, Visual Did not support > integration with wxPython or any toolkit. > Is that possible now? If no what are plans to implement that feature? > Thanks you mean something like this http://mientki.ruhosting.nl/data_www/pylab_works/pw_application_vpython3.html cheers, Stef |
From: Stefano M. <mwi...@gm...> - 2010-07-20 08:44:43
|
Definitely, How do you marry them? Do you alternate btwn eventloops? On 07/20/2010 11:11 AM, Stef Mientki wrote: > On 20-07-2010 07:47, Stefano Mtangoo wrote: > >> Hello friends, >> I have been for long out of Vpython for long now, but I have plans to >> develop Scientific simulation >> Program for Physics students. As we know, Visual Did not support >> integration with wxPython or any toolkit. >> Is that possible now? If no what are plans to implement that feature? >> Thanks >> > you mean something like this > http://mientki.ruhosting.nl/data_www/pylab_works/pw_application_vpython3.html > > cheers, > Stef > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Stef M. <ste...@gm...> - 2010-07-20 11:35:19
|
On 20-07-2010 10:44, Stefano Mtangoo wrote: > Definitely, > How do you marry them? > Do you alternate btwn eventloops? The VPython event loop runs within the (overriden) wx-eventloop. cheers, Stef > > On 07/20/2010 11:11 AM, Stef Mientki wrote: >> On 20-07-2010 07:47, Stefano Mtangoo wrote: >> >>> Hello friends, >>> I have been for long out of Vpython for long now, but I have plans to >>> develop Scientific simulation >>> Program for Physics students. As we know, Visual Did not support >>> integration with wxPython or any toolkit. >>> Is that possible now? If no what are plans to implement that feature? >>> Thanks >>> >> you mean something like this >> http://mientki.ruhosting.nl/data_www/pylab_works/pw_application_vpython3.html >> >> cheers, >> Stef >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users >> > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Stefano M. <mwi...@gm...> - 2010-07-20 11:40:06
|
seems like I'm missing something. Could you give an example on how you override that? On 07/20/2010 02:35 PM, Stef Mientki wrote: > On 20-07-2010 10:44, Stefano Mtangoo wrote: > >> Definitely, >> How do you marry them? >> Do you alternate btwn eventloops? >> > The VPython event loop runs within the (overriden) wx-eventloop. > > cheers, > Stef > >> On 07/20/2010 11:11 AM, Stef Mientki wrote: >> >>> On 20-07-2010 07:47, Stefano Mtangoo wrote: >>> >>> >>>> Hello friends, >>>> I have been for long out of Vpython for long now, but I have plans to >>>> develop Scientific simulation >>>> Program for Physics students. As we know, Visual Did not support >>>> integration with wxPython or any toolkit. >>>> Is that possible now? If no what are plans to implement that feature? >>>> Thanks >>>> >>>> >>> you mean something like this >>> http://mientki.ruhosting.nl/data_www/pylab_works/pw_application_vpython3.html >>> >>> cheers, >>> Stef >>> >>> ------------------------------------------------------------------------------ >>> This SF.net email is sponsored by Sprint >>> What will you do first with EVO, the first 4G phone? >>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >>> _______________________________________________ >>> Visualpython-users mailing list >>> Vis...@li... >>> https://lists.sourceforge.net/lists/listinfo/visualpython-users >>> >>> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users >> > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Stef M. <ste...@gm...> - 2010-07-20 12:50:53
|
On 20-07-2010 13:39, Stefano Mtangoo wrote: > seems like I'm missing something. > Could you give an example on how you override that? class My_App ( wx.App ) : def MainLoop(self): # take over the event loop, but save the old one self.My_EventLoop = wx.EventLoop () old = wx.EventLoop.GetActive () wx.EventLoop.SetActive ( self.My_EventLoop ) while PG.App_Running : do what ever you like here, e.g. do a step of VPython while self.My_EventLoop.Pending(): self.My_EventLoop.Dispatch() self.ProcessIdle() # normally 50 fps ddT = Application.VM_Delay - ( time.time() - Loop_Time ) if ddT > 0 : time.sleep ( ddT ) Loop_Time = time.time() |
From: Stefano M. <mwi...@gm...> - 2010-07-20 15:13:19
|
Thanks Stef On 07/20/2010 03:50 PM, Stef Mientki wrote: > On 20-07-2010 13:39, Stefano Mtangoo wrote: > >> seems like I'm missing something. >> Could you give an example on how you override that? >> > class My_App ( wx.App ) : > > def MainLoop(self): > # take over the event loop, but save the old one > self.My_EventLoop = wx.EventLoop () > old = wx.EventLoop.GetActive () > wx.EventLoop.SetActive ( self.My_EventLoop ) > > while PG.App_Running : > > do what ever you like here, e.g. do a step of VPython > > while self.My_EventLoop.Pending(): > self.My_EventLoop.Dispatch() > self.ProcessIdle() > > # normally 50 fps > ddT = Application.VM_Delay - ( time.time() - Loop_Time ) > if ddT> 0 : > time.sleep ( ddT ) > Loop_Time = time.time() > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Martin C. <cos...@wa...> - 2010-07-03 23:49:38
|
Steve Spicklemire wrote: > Hi K, > > I'm pretty sure the gtk/glade etc are only needed for an X-Windows > build. The Mac port uses the Carbon API to run on macos x. > > It may be possible to build an X-Windows version (in fact that was > originally how visual was ported to the mac, except using fink rather > than macports) but it hasn't been done in some time (I don't think at > all for Visual 5.X, as far as I know, but I may be wrong here..) You are wrong: Fink has version 5.32 (package "visual-py26"), which uses X11. -- Martin |
From: Steve S. <st...@sp...> - 2010-07-04 09:48:45
|
Good! This means it should "work". K, You might try building the fink port, or looking at Martin's fink package: http://pdb.finkproject.org/pdb/package.php/visual-py26 If I remember how fink works correctly, most of the info for building goes in the 'info' file and the 'patch' file: http://fink.cvs.sourceforge.net/fink/dists/10.4/unstable/main/finkinfo/sci/visual-py26.info http://fink.cvs.sourceforge.net/fink/dists/10.4/unstable/main/finkinfo/sci/visual-py26.patch The only real change/patch that I see there that would affect compiling deal with a linker flag (-bundle_loader vs. -undefined). Also there is a mention that the port is only compatible with python-2.6. Maybe you should give the fink port a try? At least you could build the fink port and see what else might be different? One problem is that there are a lot of dependencies and sometimes building visual is as much about getting the dependencies (version/build-flags) right as it is about the visual code itself. (Also.. sorry Martin! I didn't realize there was a fink 5.x version. Good show!) -steve On Jul 3, 2010, at 7:49 PM, Martin Costabel wrote: > Steve Spicklemire wrote: >> Hi K, >> I'm pretty sure the gtk/glade etc are only needed for an X-Windows >> build. The Mac port uses the Carbon API to run on macos x. >> It may be possible to build an X-Windows version (in fact that was >> originally how visual was ported to the mac, except using fink >> rather than macports) but it hasn't been done in some time (I >> don't think at all for Visual 5.X, as far as I know, but I may be >> wrong here..) > > You are wrong: > Fink has version 5.32 (package "visual-py26"), which uses X11. > > -- > Martin > |
From: Mirko B. <mir...@ie...> - 2010-07-04 09:54:16
|
As K. pointed out, I sent this message to his address only: since it might be of interest to somebody else as well, here it is for the whole list. K.: the errors from your log seem to boil down to a "cvs export: move away `(some file name)'; it is in the way", which I did never experience, or at least not with the visual python cvs repository. Maybe somebody else did? bye Hi, I wrote a portfile to build visual through macports, but since I had some problems having it accepted in the official macports repositories (and no time right now to fix those problems) I had to resort to our department macports repository. Alternatively, you can setup a local one and install it from there. http://www.mip.sdu.dk/macports/python/py26-visual.tgz nb: I believe that there might be problems building it with python 2.6.5, as the included boost libs where compiled against 2.6.4. You can still try to fix this by recompiling the boost libs though, if you already moved to 2.6.5. <http://www.mip.sdu.dk/macports/python/py26-visual.tgz>regards, Mirko On Fri, Jul 2, 2010 at 1:44 PM, K. Uebayashi <u.k...@gm...> wrote: > Hi, > > I'm trying to build vpython on my Mac OS X10.6.4. > > I've installed gtkglextmm, libglademml, ftgl and boost from macports. > > After executing > PYTHON=/opt/local/bin/python2.6 ./configure --prefix=/opt/local > && make, > I get a error message; > "Compiling ./python/arrayprim.cpp ... > make[1]: *** [arrayprim.lo] Error 1 > make: *** [all-recursive] Error 1". > > > Is possible to avoid this error and > to build visual python on Mac OS X? > > > -- > K. Uebayashi > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Martin C. <cos...@wa...> - 2010-07-20 09:56:58
|
Bruce Sherwood wrote: > The missing links all seem to be Python symbols such as > _PyExc_RuntimeError and _PyInt_AsLong, which are part of the Python > API for connecting to C. I don't have any experience with the darwin > environment, but maybe someone on this list will recognize what the > problem is. It is a problem with python-2.6. There the python executable does not export the symbols such as PyExc_RuntimeError any more, as it did until python2.5. Up to python2.5, the external symbols in the python executable were identical to those in the python library libpython. The recommended way to link python modules on MacOSX (and this is what is coded in src/Makefile.in) was to use the "-bundle_loader $PYTHON" flag, meaning that symbols in the module were resolved from the python executable. Linking with the python library instead led to a runtime error "interpreter version mismatch". On python2.6 (I haven't looked at later versions yet), this is different. Now the python executable itself is linked with the python library. You need to link the module with the flag "-undefined dynamic_lookup" instead of -bundle_loader. At runtime, the symbols are then looked up from the python library. For the Fink visual-py26 package, I am patching src/Makefile.in correspondingly. I have not found a way to link cvisualmodule.so that would work both with (Fink's) python2.5 and python2.6. -- Martin |
From: Bruce S. <bas...@nc...> - 2010-07-20 16:56:50
|
Thanks much for the helpful information, Martin. Why don't I have problems building the native-mode version of VPython on the Mac, using either Python 2.5 or Python 2.6? The makefile I'm using contains -bundle_loader. Bruce Sherwood On Tue, Jul 20, 2010 at 3:56 AM, Martin Costabel <cos...@wa...> wrote: > Bruce Sherwood wrote: >> >> The missing links all seem to be Python symbols such as >> _PyExc_RuntimeError and _PyInt_AsLong, which are part of the Python >> API for connecting to C. I don't have any experience with the darwin >> environment, but maybe someone on this list will recognize what the >> problem is. > > It is a problem with python-2.6. There the python executable does not export > the symbols such as PyExc_RuntimeError any more, as it did until python2.5. > > Up to python2.5, the external symbols in the python executable were > identical to those in the python library libpython. The recommended way to > link python modules on MacOSX (and this is what is coded in src/Makefile.in) > was to use the "-bundle_loader $PYTHON" flag, meaning that symbols in the > module were resolved from the python executable. Linking with the python > library instead led to a runtime error "interpreter version mismatch". > > On python2.6 (I haven't looked at later versions yet), this is different. > Now the python executable itself is linked with the python library. You need > to link the module with the flag "-undefined dynamic_lookup" instead of > -bundle_loader. At runtime, the symbols are then looked up from the python > library. > > For the Fink visual-py26 package, I am patching src/Makefile.in > correspondingly. I have not found a way to link cvisualmodule.so that would > work both with (Fink's) python2.5 and python2.6. > > -- > Martin > > |
From: Lenore H. <lh...@si...> - 2010-07-20 13:22:32
|
> Also, what problem > are you trying to address by trying to build Visual in the darwin > environment rather than using the fink package or the native Mac > package? > > Bruce Sherwood I'm not trying this, but I'd like to be able to do it. Installing Visual as instructed leads to yet another installation of Python on my system. ( I know, disks are huge, but it seems so silly.) I use MacPorts for a couple of packages and the general statement from both fink and MacPorts is don't use Fink and MacPorts at the same time (even though they install in different paths), so the Fink package isn't particularly helpful. If we figure out how to compile against some other python than MacPython, then we can make a MacPorts package and folks will have one more option for installation. Lenore Horner |
From: Bruce S. <bas...@nc...> - 2010-07-20 16:58:31
|
I see. Then let's hope that Martin Costabel's advice solves the problem for those interested. Bruce Sherwood On Tue, Jul 20, 2010 at 7:03 AM, Lenore Horner <lh...@si...> wrote: >> Also, what problem >> are you trying to address by trying to build Visual in the darwin >> environment rather than using the fink package or the native Mac >> package? >> >> Bruce Sherwood > > I'm not trying this, but I'd like to be able to do it. Installing Visual as instructed leads to yet another installation of Python on my system. ( I know, disks are huge, but it seems so silly.) I use MacPorts for a couple of packages and the general statement from both fink and MacPorts is don't use Fink and MacPorts at the same time (even though they install in different paths), so the Fink package isn't particularly helpful. If we figure out how to compile against some other python than MacPython, then we can make a MacPorts package and folks will have one more option for installation. > > Lenore Horner > > |