You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(1) |
Aug
|
Sep
(15) |
Oct
(32) |
Nov
(35) |
Dec
(48) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(46) |
Feb
(22) |
Mar
(65) |
Apr
(49) |
May
(22) |
Jun
(29) |
Jul
(51) |
Aug
(34) |
Sep
(32) |
Oct
(46) |
Nov
(30) |
Dec
(32) |
2002 |
Jan
(48) |
Feb
(4) |
Mar
(20) |
Apr
(28) |
May
(13) |
Jun
(34) |
Jul
(51) |
Aug
(15) |
Sep
(15) |
Oct
(35) |
Nov
(15) |
Dec
(20) |
2003 |
Jan
(31) |
Feb
(111) |
Mar
(41) |
Apr
(28) |
May
(36) |
Jun
(29) |
Jul
(27) |
Aug
(29) |
Sep
(47) |
Oct
(28) |
Nov
(7) |
Dec
(26) |
2004 |
Jan
(44) |
Feb
(9) |
Mar
(17) |
Apr
(26) |
May
(58) |
Jun
(13) |
Jul
(44) |
Aug
(64) |
Sep
(30) |
Oct
(11) |
Nov
(21) |
Dec
(28) |
2005 |
Jan
(29) |
Feb
(11) |
Mar
(11) |
Apr
(22) |
May
(85) |
Jun
(46) |
Jul
(17) |
Aug
(18) |
Sep
(14) |
Oct
(22) |
Nov
(1) |
Dec
(45) |
2006 |
Jan
(20) |
Feb
(36) |
Mar
(18) |
Apr
(24) |
May
(21) |
Jun
(48) |
Jul
(23) |
Aug
(20) |
Sep
(10) |
Oct
(41) |
Nov
(46) |
Dec
(40) |
2007 |
Jan
(40) |
Feb
(20) |
Mar
(13) |
Apr
(6) |
May
(24) |
Jun
(31) |
Jul
(30) |
Aug
(11) |
Sep
(11) |
Oct
(10) |
Nov
(56) |
Dec
(64) |
2008 |
Jan
(64) |
Feb
(22) |
Mar
(63) |
Apr
(28) |
May
(25) |
Jun
(36) |
Jul
(11) |
Aug
(9) |
Sep
(14) |
Oct
(41) |
Nov
(46) |
Dec
(130) |
2009 |
Jan
(95) |
Feb
(41) |
Mar
(24) |
Apr
(35) |
May
(53) |
Jun
(67) |
Jul
(48) |
Aug
(48) |
Sep
(86) |
Oct
(75) |
Nov
(64) |
Dec
(52) |
2010 |
Jan
(57) |
Feb
(31) |
Mar
(28) |
Apr
(40) |
May
(25) |
Jun
(42) |
Jul
(79) |
Aug
(31) |
Sep
(49) |
Oct
(66) |
Nov
(38) |
Dec
(25) |
2011 |
Jan
(29) |
Feb
(18) |
Mar
(44) |
Apr
(6) |
May
(28) |
Jun
(31) |
Jul
(36) |
Aug
(24) |
Sep
(30) |
Oct
(23) |
Nov
(21) |
Dec
(27) |
2012 |
Jan
(14) |
Feb
(11) |
Mar
(2) |
Apr
(48) |
May
(7) |
Jun
(32) |
Jul
(22) |
Aug
(25) |
Sep
(31) |
Oct
(32) |
Nov
(21) |
Dec
(17) |
2013 |
Jan
(44) |
Feb
(27) |
Mar
(3) |
Apr
(1) |
May
|
Jun
|
Jul
(3) |
Aug
(4) |
Sep
(1) |
Oct
(7) |
Nov
(5) |
Dec
(5) |
2014 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(2) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Andreas H. <ma...@an...> - 2011-08-04 05:22:55
|
Hi there, I am very new to vPython and have the following question: Would it be possible somehow to three-dimensionally display Nifti-Images via NiBabel in 3D using vPython? Nifti is a 3d-file type we use in Neuroscience. Where would I start? Is there some way to extract 3D-Information from external files in vPython at all? Thank you so much for your help! Yours, sincerely, Andreas Horn |
From: Bruce S. <Bru...@nc...> - 2011-08-03 03:39:31
|
Depends on what you're trying to do. The Linux tarball is useful for building on a Mac if you're not trying to build a version of VPython with the Mac look and feel -- it's aimed at using GTK and X Windows, not the Mac windowing environment. A related environment is Fink. The tools for building VPython on a Mac with a Mac look and feel, using Carbon, are available in CVS. Because it is rare that someone wants to build this from source on the Mac, there's no special package available for the purpose, and you need to get what you need from CVS. Bruce Sherwood On Sun, Jul 31, 2011 at 4:37 AM, K.-Michael Aye <kmi...@gm...> wrote: > > On Jul 31, 2011, at 5:22 , Bruce Sherwood wrote: > >> It's not clear to me what "tar file for MAC" you're referring to. >> There's a tar file for Linux but not for Mac at vpython.org. > > But that tar file is meant to be used for Mac compilation from source, I thought? Am I wrong? > Or do I HAVE to go via CVS on a Mac? > If yes, it's clear that the MAC-OSX.txt does not have to be included in the tar file. If no, it would be helpful to include it > in the tar, because it's actually referred to (or even required? I can't judge that yet). > > For information, I am going through the compiling ordeal, because I want to compile it for the Enthought package. > Any useful stuff will be written up and put online somewhere. I will notify the list about any success, shall it come. ;) > > Michael > > > >> All files >> are in CVS at sourceforge.net. In any case, here is the content of the >> file MAC-OSX.txt: >> >> HOW TO BUILD VISUAL 5 USING CARBON >> Install XcodeTools from the optional materials on the Mac installation DVD. >> Installing XcodeTools automatically installs the large number of individualvp >> components also listed on the DVD. >> >> Install Python for the Mac ("MacPython") from python.org. >> There is already a /usr/bin/python that at the moment is up to date, but >> because this isn't always the case, and because the Python community seems to >> strongly prefer it, we will base Visual on MacPython, which is >> /usr/local/bin/python. >> >> PYTHON INSTALLERS >> The standard Python installers at python.org for the Mac install into >> /Library/Frameworks/Python.framework/Versions/ >> >> For Python 2.x, the installer modified .profile to add the newly >> installed Python >> to the application search PATH. The installer also added or changed a link >> /Library/Frameworks/Python.framework/Versions/Current >> to point to the newly installed Python. However, the Python 3.x installer does >> NOT modify .profile or Current. >> >> For the makefile to pick out the correct Python framework in building >> Visual, you need >> to create or modify >> /Library/Frameworks/Python.framework/Versions/Current. Assume >> that the new Python is in /Library/Frameworks/Python.framework/Versions/3.1: >> cd /Library/Frameworks/Python.framework/Versions >> (if necessary, "sudo rm Current" if there already is one) >> sudo ln -s 3.1 Current >> >> You should also add the following to .profile (in your home directory), so that >> executing "python" in a Terminal will run the newly installed Python: >> PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}" >> export PATH >> >> INSTALLING MODULES NEEDED BY VISUAL >> Next you need to install numpy. You may find an installer for it. Otherwise: >> Download the source for numpy and unpack it (http://www.scipy.org/Download). >> In the numpy directory, execute "sudo python setup.py install". >> This installs the numpy module which includes needed header files. >> >> For Visual 5.3 and later, you need the Python modules FontTools, >> ttfquery, and Polygon. >> Be sure to get ttfquery 1.0.4 or later. >> Polygon is available at http://polygon.origo.ethz.ch/download >> Currently, use the Polygon 2.0.1 binary for Python 2.6, which works >> with Python 27; >> I have not succeeded in building Polygon from source. Nor did I >> succeed with Python 3.1 >> but got a Mac binary from the Polygon maintainer Joerg Raedler >> <jo...@j-...>. >> >> Note The following copyright notice applies to the Polygon module when >> included in >> the VPython distribution concerning Polygon: >> >> "This distribution contains code from the GPC Library, and/or code >> resulting from the use of the GPC Library. This usage has been >> authorized by The University of Manchester, on the understanding >> that the GPC-related features are used only in the context of this >> distribution. It is not permitted to extract the GPC code from the >> distribution as the basis for commercial exploitation, unless a >> GPC Commercial Use Licence is obtained from The University of >> Manchester, contact: http://www.cs.man.ac.uk/~toby/gpc/". >> >> BUILD VISUAL >> You need Boost libraries for the Mac. See below for how to build the >> Boost libraries. >> (The following may not work, because up-to-date files are not also >> provided in CVS: >> In the dependencies section of CVS, unzip the zip file. You should >> name the resulting >> folder in dependencies "boost_files", containing boost (the include files), >> win_libs (for Windows), and mac_libs (for Mac).) >> >> In src/mac, execute sudo make setup. >> This creates a build directory mbuild parallel to the CVS files, and >> creates links >> from /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages >> to >> the visual directory in the CVS files. >> >> In the mbuild directory, execute sudo make install to build and install Visual. >> This creates cvisual.so in the CVS site-packages/visual directory, which is >> linked as explained above, ready to run. >> >> In site-packages/vidle, execute "python MacBuildApp.py build" to build >> an app to drive VIDLE, >> an updated alternative to the IDLE shipped with Python. However, the >> resulting launcher seems >> to be not very robust and the resulting launcher has been modified and >> is found in >> src/mac/PackageMaker/VIDLE_launcher.zip. >> For more details, see src/mac/PackageMaker/packaging.txt. >> >> Run compilevisual.py (top of CVS) to compile all Visual Python files. >> >> Another option to compile all of the .py files in a directory is this: >> import compileall >> compileall.compile_dir("mylib", force=1) >> >> CREATE INSTALLER >> In src/mac/PackageMaker is an Apple PackageMaker project file, a >> Welcome text file >> for creating a VPython installer for the Mac, and instructions in packaging.txt. >> >> Be sure to set the project status to require OSX 10.4 and above. >> >> BUILDING BOOST LIBRARIES >> The Boost libraries were built by downloading the source. >> cd to the Boost directory and execute >> >> ./bootstrap.sh --with-toolset=gcc --with-python-version=3.1 >> --with-python-root=/Library/Frameworks/Python.framework/Versions/3.1 >> --with-python=python3.1 --with-libraries=python,signals,thread >> >> to create the bjam tool and project-config.jam. >> >> In the file project-config.jam, change "using gcc ;" to "using gcc : >> 4.0 : g++-4.0 ;" >> >> The purpose is to build Boost libraries using the same g++-4.0 >> compiler used to build Visual, which >> should enable Visual to run on OSX 10.4 (for which g++-4.2 doesn't work). >> >> Now execute ./bjam to build the Boost libraries. >> >> The files you want will be in stage/lib. >> Move the following files to dependencies/boost_files/mac_libs: >> libboost_python.a >> libboost_signals.a >> libboost_thread.a >> >> In the past the following was used, but it seems neither necessary nor >> sufficient with Python 2.7: >> --------------------- >> ./bjam --toolset=darwin >> -sPYTHON_ROOT=/Library/Frameworks/Python.framework/Versions/2.7/bin/python >> --address-model=32_64 --architecture=x86 --build-type=complete >> --layout=versioned --with-python --with-thread --with-signals stage >> >> The files you want will be in stage/lib. >> Move these files to dependencies/boost_files/mac_libs (file names will >> be similar to the following): >> libboost_python-mt-s-1_35.a >> libboost_signals-mt-s-1_35.a >> libboost_thread-mt-s-1_35.a >> ---------------------- >> >> ---------- >> I built Boost libraries on a PowerPC running OS X 10.4 and tried using them >> on a PowerPC running OS X 10.5. Example programs ran okay, but in each case >> there was the following warning. In retrospect there may have been confusion >> between two different Python 2.5's on the machine. >> >> Warning (from warnings module): >> File "/Library/Python/2.5/site-packages/visual/__init__.py", line 149 >> import cvisual >> RuntimeWarning: Python C API version mismatch for module cvisual: >> This Python has API version 1013, module cvisual has version 1012. >> >> After rebuilding the Boost libraries on a PowerPC running OS X 10.5 this >> warning went away. >> >> ------------------------------------------------------ >> Obsolete, of historical interest only: HOW TO BUILD VISUAL 4 ON Apple >> OSX using GTK2 (Version 10.4.x) >> >> If you find gaps in this information, please tell Bru...@nc.... >> >> Make sure X11 and Xcode are installed (found on the installation DVD). >> X11 is automatically installed on 10.5. >> >> To do a clean install of fink (www.finkproject.org), I deleted /sw and >> started from scratch. >> Install fink from fink.sourceforge.net. Probably best to install from source? >> I use Fink Commander as a GUI to fink, but you can use the command line. >> >> Create a file in your home directory named ".profile" with these contents: >> test -r /sw/bin/init.sh && . /sw/bin/init.sh >> >> Start up a new terminal program, which will read the .profile file >> with the effect that >> /sw/bin will be on your application search path. >> >> Use fink to install the components listed for Linux in INSTALL.txt >> (details repeated here). >> >> If you're not using Fink Commander (and despite its graphic user >> interface there are >> hints that maybe it is buggy), on a command line you say for example >> "fink install python25". >> >> Execute fink selfupdate to get the latest packages. (You may need to >> invoke /sw/bin/fink.) >> >> Install numpy-py25, which also installs python25. >> (2008/4/2 on OSX 10.5; accepted the choice "db44-aes-shlibs: Shared >> Libraries for db44-aes") >> >> Currently (Jan. 2008) you will find 10 entries for Boost libraries; >> if using Fink Commander >> you need to expand the package name field wide enough to be able to >> see the full names, >> as you want the Boost libraries for Python 2.5. >> >> Install boost1.34.python25, boost1.34.systempython, and boost1.34.nopython. >> (You can say fink install boost1.34.python25 boost1.34.systempython >> boost1.34.nopython) >> >> Next install gtkmm2.4-dev, which installs many other packages on >> which it depends, including >> gtk+2, glib, glibmm, libsig++, atk, pango, expat1, libpng3, >> automake, autoconf, libtool, pkgconfig >> >> Next, install these libraries: >> libglademm2.4 (also installs libglademm2.4-shlibs) >> >> cairomm1 (also installs cairomm1-shlibs, freetype219, >> freetype219-shlibs etc; takes a LONG time) >> >> gtkglextmm (also installs gtkglextmm-shlibs, gtkglext1, gtkglext1-shlibs) >> >> Need freetype2, but freetype219 and freetype219-shlibs are installed >> instead (by cairomm1). >> Because this does not put freetype2.pc into the usual place >> (/sw/lib/pkgconfig), >> PKG_CONFIG_PATH is set in the configure script to find it. >> >> You can test the pkgconfig machinery by executing the following: >> pkg-config --libs pango (or /sw/bin/pkg-config --libs pango) >> The output should be -L/sw/lib -lpango-1.0 -lm -lgobject-2.0 >> -lgmodule-2.0 -lglib-2.0 -lintl -liconv >> >> Next cd into the vpython-core2 directory and execute chmod +x >> autogen.sh, then ./autogen.sh >> Here is what happens when I run autogen.sh: >> /sw/share/aclocal/gtkglextmm-1.2.m4:225: warning: >> underquoted definition of AC_GTKGLEXTMM_SUPPORTS_MULTIHEAD >> run info '(automake)Extending aclocal' >> or see http://sources.redhat.com/automake/automake.html#Extending-aclocal >> configure.ac: installing `./missing' >> Completed successfully >> >> Apparently the warning about AC_GTKGLEXTMM_SUPPORTS_MULTIHEAD isn't >> fatal, as it was possible >> to build Visual. >> >> After important help from Martin Costabel, I was able to make, >> install, and run successfully. >> I placed this file in a build directory at the same level as vpython-core2: >> #!/bin/sh -ex >> export CPPFLAGS="-Wno-long-double" >> export PKG_CONFIG_PATH=/sw/lib/fontconfig2/lib/pkgconfig:/sw/lib/xft2/lib/pkgconfig:/sw/lib/freetype219/lib/pkgconfig >> export PYTHON=/sw/bin/python2.5 >> export CXXFLAGS="-O2 -g -finline-functions" >> export CFLAGS='-O3 -g ' >> ../vpython-core2/configure --prefix=/sw --disable-dependency-tracking >> >> If you call this file config.txt, in the build directory you need to execute >> chmod +x config.txt >> to make the file be executable by "./config.txt". >> >> Before making a change to src/Makefile.in, I got a message about >> possible mismatch of versions, >> as though when I build against /sw/bin/python2.5 and then run >> /sw/bin/python2.5 the system thinks >> these are different pythons. Martin Costabel commented: >> >> "I am getting this, too, when using the dynamic boost-python library, >> but not with the static >> libboost_python-mt.a. This is certainly a bug with the >> libboost_python-mt.dylib, but I haven't >> yet found a combination of build flags to build it correctly, in >> particular in a way that would >> also work on OSX 10.5." >> >> Following his suggestion, I put Mac-specific code into src/Makefile.in >> to link to these other >> libraries. But then I got this error message in the link phase of the make: >> >> /usr/bin/ld: table of contents for archive: >> /sw/lib/libboost_python-mt.a is out of date; rerun ranlib(1) (can't >> load from it) >> >> So I executed ranlib /sw/lib/libboost_python-mt.a, redid the make, >> executed make install, and it worked. >> >> When there looked to be a Boost problem, tried building Boost >> libraries from scratch: >> >> ./configure --prefix=/sw --with-libraries=python,thread >> --with-python=/sw/bin/python2.5 >> (This creates user-config.jam) >> make >> (apparently equivalent to bjam --user-config=user-config.jam >> --with-python --with-thread) >> sudo make install >> There's a name issue; the boost includes need to be available at >> /sw/include/boost, so do this: >> cd /sw/include/boost_1_34_1 >> sudo cp -r boost /sw/include >> I don't understand how /sw/include/boost is found. Looking at our >> src/build.log, I don't see >> anything that specifies we should look generally in /sw/include. Yet >> when boost is buried in >> boost_1_34_1, we don't find header files, and when it is unburied into >> /sw/include/boost we do. >> >> After a successfull make and "make install" invoking dynamic libraries, >> copy these new boost files to /sw/lib/python2.5/site-packages: >> bin.v2/libs/python/build/darwin/release/libboost_python-1_34_1.dylib >> bin.v2/libs/python/build/darwin/release/threading-multi/libboost_python-mt-1_34_1.dylib >> bin.v2/libs/thread/build/darwin/release/threading-multi/libboost_thread-mt-1_34_1.dylib >> >> But cvisual can't find a dylib: >> >> Traceback (most recent call last): >> File "/sw/lib/python2.5/site-packages/visual/examples/bounce2.py", >> line 1, in <module> >> from visual import * >> File "/sw/lib/python2.5/site-packages/visual/__init__.py", line 140, >> in <module> >> import cvisual >> ImportError: dlopen(/sw/lib/python2.5/site-packages/cvisualmodule.so, >> 2): Library not loaded: >> bin.v2/libs/python/build/darwin/release/libboost_python-1_34_1.dylib >> Referenced from: /sw/lib/python2.5/site-packages/cvisualmodule.so >> Reason: image not found >> >> I think I've seen stuff on the web about problems with locating dylibs. >> >> Tried changing src/Makefile.in to use only static boost libraries: >> >> ifeq ($(PYTHON_PLATFORM),darwin) >> # Special rules for OSX >> CVISUAL_LIBS += $(filter-out $(_FILTER_OUT), $(GTK_LIBS) \ >> $(GTHREAD_LIBS) /sw/lib/libboost_python-mt.a >> /sw/lib/libboost_thread-mt.a) >> >> This happened on the make: >> >> /usr/bin/ld: table of contents for archive: >> /sw/lib/libboost_python-mt.a is out of date; rerun ranlib(1) (can't >> load from it) >> /usr/bin/ld: table of contents for archive: >> /sw/lib/libboost_thread-mt.a is out of date; rerun ranlib(1) (can't >> load from it) >> >> So I did this: >> >> bruce-sherwoods-computer:~/Documents/workspace/build brucesherwood$ cd /sw/lib >> bruce-sherwoods-computer:/sw/lib brucesherwood$ sudo ranlib libboost_python-mt.a >> Password: >> bruce-sherwoods-computer:/sw/lib brucesherwood$ sudo ranlib libboost_thread-mt.a >> ranlib: file: libboost_thread-mt.a(tss_hooks.o) has no symbols >> ranlib: file: libboost_thread-mt.a(tss_dll.o) has no symbols >> ranlib: file: libboost_thread-mt.a(tss_pe.o) has no symbols >> bruce-sherwoods-computer:/sw/lib brucesherwood$ >> >> ----------------- >> Unsuccessful approach >> bjam --prefix=/sw --toolset=darwin --with-python-version=2.5 --with-thread stage >> >> Copy the directory named "boost" to /sw/include. >> >>> cp stage/lib/libboost_thread-mt.a /sw/lib >>> cp bin.v2/libs/python/build/darwin/release/link-static/threading-multi/libboost_python-mt-1_34_1.a /sw/lib/libboost_python.a >> >> After a successfull make and "make install" invoking dynamic libraries, >> copied these new boost files to /sw/lib/python2.5/site-packages: >> stage/lib/libboost_thread-mt-1_34_1.dylib >> bin.v2/libs/python/build/darwin/release/libboost_python-1_34_1.dylib >> bin.v2/libs/python/build/darwin/release/threading-multi/libboost_python-mt-1_34_1.dylib >> >> This attempt didn't help. Still get "Fatal Python error: Interpreter >> not initialized (version mismatch?). >> Is it possible that bjam worked against an old version of Python? >> Maybe /user/bin/python (which is the >> one I see with "which python" and which is version 2.3.5)? No reason >> bjam should look for python in /sw. >> >> >> On Sat, Jul 30, 2011 at 12:50 PM, K.-Michael Aye <kmi...@gm...> wrote: >>> Dear all, >>> >>> I think the MAC-OSX.txt is missing in the most recent tar file for MAC, but it's referred to by INSTALL.txt and HACKING .txt. >>> Is it just missing or do I not need it anymore because I should read and rely on INSTALL and HACKING? >>> >>> Best regards, >>> Michael >>> >>> >>> ------------------------------------------------------------------------------ >>> Got Input? Slashdot Needs You. >>> Take our quick survey online. Come on, we don't ask for help often. >>> Plus, you'll get a chance to win $100 to spend on ThinkGeek. >>> http://p.sf.net/sfu/slashdot-survey >>> _______________________________________________ >>> Visualpython-users mailing list >>> Vis...@li... >>> https://lists.sourceforge.net/lists/listinfo/visualpython-users >>> >> >> ------------------------------------------------------------------------------ >> Got Input? Slashdot Needs You. >> Take our quick survey online. Come on, we don't ask for help often. >> Plus, you'll get a chance to win $100 to spend on ThinkGeek. >> http://p.sf.net/sfu/slashdot-survey >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users > > |
From: K.-Michael A. <kmi...@gm...> - 2011-07-31 10:37:52
|
On Jul 31, 2011, at 5:22 , Bruce Sherwood wrote: > It's not clear to me what "tar file for MAC" you're referring to. > There's a tar file for Linux but not for Mac at vpython.org. But that tar file is meant to be used for Mac compilation from source, I thought? Am I wrong? Or do I HAVE to go via CVS on a Mac? If yes, it's clear that the MAC-OSX.txt does not have to be included in the tar file. If no, it would be helpful to include it in the tar, because it's actually referred to (or even required? I can't judge that yet). For information, I am going through the compiling ordeal, because I want to compile it for the Enthought package. Any useful stuff will be written up and put online somewhere. I will notify the list about any success, shall it come. ;) Michael > All files > are in CVS at sourceforge.net. In any case, here is the content of the > file MAC-OSX.txt: > > HOW TO BUILD VISUAL 5 USING CARBON > Install XcodeTools from the optional materials on the Mac installation DVD. > Installing XcodeTools automatically installs the large number of individualvp > components also listed on the DVD. > > Install Python for the Mac ("MacPython") from python.org. > There is already a /usr/bin/python that at the moment is up to date, but > because this isn't always the case, and because the Python community seems to > strongly prefer it, we will base Visual on MacPython, which is > /usr/local/bin/python. > > PYTHON INSTALLERS > The standard Python installers at python.org for the Mac install into > /Library/Frameworks/Python.framework/Versions/ > > For Python 2.x, the installer modified .profile to add the newly > installed Python > to the application search PATH. The installer also added or changed a link > /Library/Frameworks/Python.framework/Versions/Current > to point to the newly installed Python. However, the Python 3.x installer does > NOT modify .profile or Current. > > For the makefile to pick out the correct Python framework in building > Visual, you need > to create or modify > /Library/Frameworks/Python.framework/Versions/Current. Assume > that the new Python is in /Library/Frameworks/Python.framework/Versions/3.1: > cd /Library/Frameworks/Python.framework/Versions > (if necessary, "sudo rm Current" if there already is one) > sudo ln -s 3.1 Current > > You should also add the following to .profile (in your home directory), so that > executing "python" in a Terminal will run the newly installed Python: > PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}" > export PATH > > INSTALLING MODULES NEEDED BY VISUAL > Next you need to install numpy. You may find an installer for it. Otherwise: > Download the source for numpy and unpack it (http://www.scipy.org/Download). > In the numpy directory, execute "sudo python setup.py install". > This installs the numpy module which includes needed header files. > > For Visual 5.3 and later, you need the Python modules FontTools, > ttfquery, and Polygon. > Be sure to get ttfquery 1.0.4 or later. > Polygon is available at http://polygon.origo.ethz.ch/download > Currently, use the Polygon 2.0.1 binary for Python 2.6, which works > with Python 27; > I have not succeeded in building Polygon from source. Nor did I > succeed with Python 3.1 > but got a Mac binary from the Polygon maintainer Joerg Raedler > <jo...@j-...>. > > Note The following copyright notice applies to the Polygon module when > included in > the VPython distribution concerning Polygon: > > "This distribution contains code from the GPC Library, and/or code > resulting from the use of the GPC Library. This usage has been > authorized by The University of Manchester, on the understanding > that the GPC-related features are used only in the context of this > distribution. It is not permitted to extract the GPC code from the > distribution as the basis for commercial exploitation, unless a > GPC Commercial Use Licence is obtained from The University of > Manchester, contact: http://www.cs.man.ac.uk/~toby/gpc/". > > BUILD VISUAL > You need Boost libraries for the Mac. See below for how to build the > Boost libraries. > (The following may not work, because up-to-date files are not also > provided in CVS: > In the dependencies section of CVS, unzip the zip file. You should > name the resulting > folder in dependencies "boost_files", containing boost (the include files), > win_libs (for Windows), and mac_libs (for Mac).) > > In src/mac, execute sudo make setup. > This creates a build directory mbuild parallel to the CVS files, and > creates links > from /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages > to > the visual directory in the CVS files. > > In the mbuild directory, execute sudo make install to build and install Visual. > This creates cvisual.so in the CVS site-packages/visual directory, which is > linked as explained above, ready to run. > > In site-packages/vidle, execute "python MacBuildApp.py build" to build > an app to drive VIDLE, > an updated alternative to the IDLE shipped with Python. However, the > resulting launcher seems > to be not very robust and the resulting launcher has been modified and > is found in > src/mac/PackageMaker/VIDLE_launcher.zip. > For more details, see src/mac/PackageMaker/packaging.txt. > > Run compilevisual.py (top of CVS) to compile all Visual Python files. > > Another option to compile all of the .py files in a directory is this: > import compileall > compileall.compile_dir("mylib", force=1) > > CREATE INSTALLER > In src/mac/PackageMaker is an Apple PackageMaker project file, a > Welcome text file > for creating a VPython installer for the Mac, and instructions in packaging.txt. > > Be sure to set the project status to require OSX 10.4 and above. > > BUILDING BOOST LIBRARIES > The Boost libraries were built by downloading the source. > cd to the Boost directory and execute > > ./bootstrap.sh --with-toolset=gcc --with-python-version=3.1 > --with-python-root=/Library/Frameworks/Python.framework/Versions/3.1 > --with-python=python3.1 --with-libraries=python,signals,thread > > to create the bjam tool and project-config.jam. > > In the file project-config.jam, change "using gcc ;" to "using gcc : > 4.0 : g++-4.0 ;" > > The purpose is to build Boost libraries using the same g++-4.0 > compiler used to build Visual, which > should enable Visual to run on OSX 10.4 (for which g++-4.2 doesn't work). > > Now execute ./bjam to build the Boost libraries. > > The files you want will be in stage/lib. > Move the following files to dependencies/boost_files/mac_libs: > libboost_python.a > libboost_signals.a > libboost_thread.a > > In the past the following was used, but it seems neither necessary nor > sufficient with Python 2.7: > --------------------- > ./bjam --toolset=darwin > -sPYTHON_ROOT=/Library/Frameworks/Python.framework/Versions/2.7/bin/python > --address-model=32_64 --architecture=x86 --build-type=complete > --layout=versioned --with-python --with-thread --with-signals stage > > The files you want will be in stage/lib. > Move these files to dependencies/boost_files/mac_libs (file names will > be similar to the following): > libboost_python-mt-s-1_35.a > libboost_signals-mt-s-1_35.a > libboost_thread-mt-s-1_35.a > ---------------------- > > ---------- > I built Boost libraries on a PowerPC running OS X 10.4 and tried using them > on a PowerPC running OS X 10.5. Example programs ran okay, but in each case > there was the following warning. In retrospect there may have been confusion > between two different Python 2.5's on the machine. > > Warning (from warnings module): > File "/Library/Python/2.5/site-packages/visual/__init__.py", line 149 > import cvisual > RuntimeWarning: Python C API version mismatch for module cvisual: > This Python has API version 1013, module cvisual has version 1012. > > After rebuilding the Boost libraries on a PowerPC running OS X 10.5 this > warning went away. > > ------------------------------------------------------ > Obsolete, of historical interest only: HOW TO BUILD VISUAL 4 ON Apple > OSX using GTK2 (Version 10.4.x) > > If you find gaps in this information, please tell Bru...@nc.... > > Make sure X11 and Xcode are installed (found on the installation DVD). > X11 is automatically installed on 10.5. > > To do a clean install of fink (www.finkproject.org), I deleted /sw and > started from scratch. > Install fink from fink.sourceforge.net. Probably best to install from source? > I use Fink Commander as a GUI to fink, but you can use the command line. > > Create a file in your home directory named ".profile" with these contents: > test -r /sw/bin/init.sh && . /sw/bin/init.sh > > Start up a new terminal program, which will read the .profile file > with the effect that > /sw/bin will be on your application search path. > > Use fink to install the components listed for Linux in INSTALL.txt > (details repeated here). > > If you're not using Fink Commander (and despite its graphic user > interface there are > hints that maybe it is buggy), on a command line you say for example > "fink install python25". > > Execute fink selfupdate to get the latest packages. (You may need to > invoke /sw/bin/fink.) > > Install numpy-py25, which also installs python25. > (2008/4/2 on OSX 10.5; accepted the choice "db44-aes-shlibs: Shared > Libraries for db44-aes") > > Currently (Jan. 2008) you will find 10 entries for Boost libraries; > if using Fink Commander > you need to expand the package name field wide enough to be able to > see the full names, > as you want the Boost libraries for Python 2.5. > > Install boost1.34.python25, boost1.34.systempython, and boost1.34.nopython. > (You can say fink install boost1.34.python25 boost1.34.systempython > boost1.34.nopython) > > Next install gtkmm2.4-dev, which installs many other packages on > which it depends, including > gtk+2, glib, glibmm, libsig++, atk, pango, expat1, libpng3, > automake, autoconf, libtool, pkgconfig > > Next, install these libraries: > libglademm2.4 (also installs libglademm2.4-shlibs) > > cairomm1 (also installs cairomm1-shlibs, freetype219, > freetype219-shlibs etc; takes a LONG time) > > gtkglextmm (also installs gtkglextmm-shlibs, gtkglext1, gtkglext1-shlibs) > > Need freetype2, but freetype219 and freetype219-shlibs are installed > instead (by cairomm1). > Because this does not put freetype2.pc into the usual place > (/sw/lib/pkgconfig), > PKG_CONFIG_PATH is set in the configure script to find it. > > You can test the pkgconfig machinery by executing the following: > pkg-config --libs pango (or /sw/bin/pkg-config --libs pango) > The output should be -L/sw/lib -lpango-1.0 -lm -lgobject-2.0 > -lgmodule-2.0 -lglib-2.0 -lintl -liconv > > Next cd into the vpython-core2 directory and execute chmod +x > autogen.sh, then ./autogen.sh > Here is what happens when I run autogen.sh: > /sw/share/aclocal/gtkglextmm-1.2.m4:225: warning: > underquoted definition of AC_GTKGLEXTMM_SUPPORTS_MULTIHEAD > run info '(automake)Extending aclocal' > or see http://sources.redhat.com/automake/automake.html#Extending-aclocal > configure.ac: installing `./missing' > Completed successfully > > Apparently the warning about AC_GTKGLEXTMM_SUPPORTS_MULTIHEAD isn't > fatal, as it was possible > to build Visual. > > After important help from Martin Costabel, I was able to make, > install, and run successfully. > I placed this file in a build directory at the same level as vpython-core2: > #!/bin/sh -ex > export CPPFLAGS="-Wno-long-double" > export PKG_CONFIG_PATH=/sw/lib/fontconfig2/lib/pkgconfig:/sw/lib/xft2/lib/pkgconfig:/sw/lib/freetype219/lib/pkgconfig > export PYTHON=/sw/bin/python2.5 > export CXXFLAGS="-O2 -g -finline-functions" > export CFLAGS='-O3 -g ' > ../vpython-core2/configure --prefix=/sw --disable-dependency-tracking > > If you call this file config.txt, in the build directory you need to execute > chmod +x config.txt > to make the file be executable by "./config.txt". > > Before making a change to src/Makefile.in, I got a message about > possible mismatch of versions, > as though when I build against /sw/bin/python2.5 and then run > /sw/bin/python2.5 the system thinks > these are different pythons. Martin Costabel commented: > > "I am getting this, too, when using the dynamic boost-python library, > but not with the static > libboost_python-mt.a. This is certainly a bug with the > libboost_python-mt.dylib, but I haven't > yet found a combination of build flags to build it correctly, in > particular in a way that would > also work on OSX 10.5." > > Following his suggestion, I put Mac-specific code into src/Makefile.in > to link to these other > libraries. But then I got this error message in the link phase of the make: > > /usr/bin/ld: table of contents for archive: > /sw/lib/libboost_python-mt.a is out of date; rerun ranlib(1) (can't > load from it) > > So I executed ranlib /sw/lib/libboost_python-mt.a, redid the make, > executed make install, and it worked. > > When there looked to be a Boost problem, tried building Boost > libraries from scratch: > > ./configure --prefix=/sw --with-libraries=python,thread > --with-python=/sw/bin/python2.5 > (This creates user-config.jam) > make > (apparently equivalent to bjam --user-config=user-config.jam > --with-python --with-thread) > sudo make install > There's a name issue; the boost includes need to be available at > /sw/include/boost, so do this: > cd /sw/include/boost_1_34_1 > sudo cp -r boost /sw/include > I don't understand how /sw/include/boost is found. Looking at our > src/build.log, I don't see > anything that specifies we should look generally in /sw/include. Yet > when boost is buried in > boost_1_34_1, we don't find header files, and when it is unburied into > /sw/include/boost we do. > > After a successfull make and "make install" invoking dynamic libraries, > copy these new boost files to /sw/lib/python2.5/site-packages: > bin.v2/libs/python/build/darwin/release/libboost_python-1_34_1.dylib > bin.v2/libs/python/build/darwin/release/threading-multi/libboost_python-mt-1_34_1.dylib > bin.v2/libs/thread/build/darwin/release/threading-multi/libboost_thread-mt-1_34_1.dylib > > But cvisual can't find a dylib: > > Traceback (most recent call last): > File "/sw/lib/python2.5/site-packages/visual/examples/bounce2.py", > line 1, in <module> > from visual import * > File "/sw/lib/python2.5/site-packages/visual/__init__.py", line 140, > in <module> > import cvisual > ImportError: dlopen(/sw/lib/python2.5/site-packages/cvisualmodule.so, > 2): Library not loaded: > bin.v2/libs/python/build/darwin/release/libboost_python-1_34_1.dylib > Referenced from: /sw/lib/python2.5/site-packages/cvisualmodule.so > Reason: image not found > > I think I've seen stuff on the web about problems with locating dylibs. > > Tried changing src/Makefile.in to use only static boost libraries: > > ifeq ($(PYTHON_PLATFORM),darwin) > # Special rules for OSX > CVISUAL_LIBS += $(filter-out $(_FILTER_OUT), $(GTK_LIBS) \ > $(GTHREAD_LIBS) /sw/lib/libboost_python-mt.a > /sw/lib/libboost_thread-mt.a) > > This happened on the make: > > /usr/bin/ld: table of contents for archive: > /sw/lib/libboost_python-mt.a is out of date; rerun ranlib(1) (can't > load from it) > /usr/bin/ld: table of contents for archive: > /sw/lib/libboost_thread-mt.a is out of date; rerun ranlib(1) (can't > load from it) > > So I did this: > > bruce-sherwoods-computer:~/Documents/workspace/build brucesherwood$ cd /sw/lib > bruce-sherwoods-computer:/sw/lib brucesherwood$ sudo ranlib libboost_python-mt.a > Password: > bruce-sherwoods-computer:/sw/lib brucesherwood$ sudo ranlib libboost_thread-mt.a > ranlib: file: libboost_thread-mt.a(tss_hooks.o) has no symbols > ranlib: file: libboost_thread-mt.a(tss_dll.o) has no symbols > ranlib: file: libboost_thread-mt.a(tss_pe.o) has no symbols > bruce-sherwoods-computer:/sw/lib brucesherwood$ > > ----------------- > Unsuccessful approach > bjam --prefix=/sw --toolset=darwin --with-python-version=2.5 --with-thread stage > > Copy the directory named "boost" to /sw/include. > >> cp stage/lib/libboost_thread-mt.a /sw/lib >> cp bin.v2/libs/python/build/darwin/release/link-static/threading-multi/libboost_python-mt-1_34_1.a /sw/lib/libboost_python.a > > After a successfull make and "make install" invoking dynamic libraries, > copied these new boost files to /sw/lib/python2.5/site-packages: > stage/lib/libboost_thread-mt-1_34_1.dylib > bin.v2/libs/python/build/darwin/release/libboost_python-1_34_1.dylib > bin.v2/libs/python/build/darwin/release/threading-multi/libboost_python-mt-1_34_1.dylib > > This attempt didn't help. Still get "Fatal Python error: Interpreter > not initialized (version mismatch?). > Is it possible that bjam worked against an old version of Python? > Maybe /user/bin/python (which is the > one I see with "which python" and which is version 2.3.5)? No reason > bjam should look for python in /sw. > > > On Sat, Jul 30, 2011 at 12:50 PM, K.-Michael Aye <kmi...@gm...> wrote: >> Dear all, >> >> I think the MAC-OSX.txt is missing in the most recent tar file for MAC, but it's referred to by INSTALL.txt and HACKING .txt. >> Is it just missing or do I not need it anymore because I should read and rely on INSTALL and HACKING? >> >> Best regards, >> Michael >> >> >> ------------------------------------------------------------------------------ >> Got Input? Slashdot Needs You. >> Take our quick survey online. Come on, we don't ask for help often. >> Plus, you'll get a chance to win $100 to spend on ThinkGeek. >> http://p.sf.net/sfu/slashdot-survey >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users >> > > ------------------------------------------------------------------------------ > Got Input? Slashdot Needs You. > Take our quick survey online. Come on, we don't ask for help often. > Plus, you'll get a chance to win $100 to spend on ThinkGeek. > http://p.sf.net/sfu/slashdot-survey > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Bruce S. <Bru...@nc...> - 2011-07-31 03:22:50
|
It's not clear to me what "tar file for MAC" you're referring to. There's a tar file for Linux but not for Mac at vpython.org. All files are in CVS at sourceforge.net. In any case, here is the content of the file MAC-OSX.txt: HOW TO BUILD VISUAL 5 USING CARBON Install XcodeTools from the optional materials on the Mac installation DVD. Installing XcodeTools automatically installs the large number of individualvp components also listed on the DVD. Install Python for the Mac ("MacPython") from python.org. There is already a /usr/bin/python that at the moment is up to date, but because this isn't always the case, and because the Python community seems to strongly prefer it, we will base Visual on MacPython, which is /usr/local/bin/python. PYTHON INSTALLERS The standard Python installers at python.org for the Mac install into /Library/Frameworks/Python.framework/Versions/ For Python 2.x, the installer modified .profile to add the newly installed Python to the application search PATH. The installer also added or changed a link /Library/Frameworks/Python.framework/Versions/Current to point to the newly installed Python. However, the Python 3.x installer does NOT modify .profile or Current. For the makefile to pick out the correct Python framework in building Visual, you need to create or modify /Library/Frameworks/Python.framework/Versions/Current. Assume that the new Python is in /Library/Frameworks/Python.framework/Versions/3.1: cd /Library/Frameworks/Python.framework/Versions (if necessary, "sudo rm Current" if there already is one) sudo ln -s 3.1 Current You should also add the following to .profile (in your home directory), so that executing "python" in a Terminal will run the newly installed Python: PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}" export PATH INSTALLING MODULES NEEDED BY VISUAL Next you need to install numpy. You may find an installer for it. Otherwise: Download the source for numpy and unpack it (http://www.scipy.org/Download). In the numpy directory, execute "sudo python setup.py install". This installs the numpy module which includes needed header files. For Visual 5.3 and later, you need the Python modules FontTools, ttfquery, and Polygon. Be sure to get ttfquery 1.0.4 or later. Polygon is available at http://polygon.origo.ethz.ch/download Currently, use the Polygon 2.0.1 binary for Python 2.6, which works with Python 27; I have not succeeded in building Polygon from source. Nor did I succeed with Python 3.1 but got a Mac binary from the Polygon maintainer Joerg Raedler <jo...@j-...>. Note The following copyright notice applies to the Polygon module when included in the VPython distribution concerning Polygon: "This distribution contains code from the GPC Library, and/or code resulting from the use of the GPC Library. This usage has been authorized by The University of Manchester, on the understanding that the GPC-related features are used only in the context of this distribution. It is not permitted to extract the GPC code from the distribution as the basis for commercial exploitation, unless a GPC Commercial Use Licence is obtained from The University of Manchester, contact: http://www.cs.man.ac.uk/~toby/gpc/". BUILD VISUAL You need Boost libraries for the Mac. See below for how to build the Boost libraries. (The following may not work, because up-to-date files are not also provided in CVS: In the dependencies section of CVS, unzip the zip file. You should name the resulting folder in dependencies "boost_files", containing boost (the include files), win_libs (for Windows), and mac_libs (for Mac).) In src/mac, execute sudo make setup. This creates a build directory mbuild parallel to the CVS files, and creates links from /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages to the visual directory in the CVS files. In the mbuild directory, execute sudo make install to build and install Visual. This creates cvisual.so in the CVS site-packages/visual directory, which is linked as explained above, ready to run. In site-packages/vidle, execute "python MacBuildApp.py build" to build an app to drive VIDLE, an updated alternative to the IDLE shipped with Python. However, the resulting launcher seems to be not very robust and the resulting launcher has been modified and is found in src/mac/PackageMaker/VIDLE_launcher.zip. For more details, see src/mac/PackageMaker/packaging.txt. Run compilevisual.py (top of CVS) to compile all Visual Python files. Another option to compile all of the .py files in a directory is this: import compileall compileall.compile_dir("mylib", force=1) CREATE INSTALLER In src/mac/PackageMaker is an Apple PackageMaker project file, a Welcome text file for creating a VPython installer for the Mac, and instructions in packaging.txt. Be sure to set the project status to require OSX 10.4 and above. BUILDING BOOST LIBRARIES The Boost libraries were built by downloading the source. cd to the Boost directory and execute ./bootstrap.sh --with-toolset=gcc --with-python-version=3.1 --with-python-root=/Library/Frameworks/Python.framework/Versions/3.1 --with-python=python3.1 --with-libraries=python,signals,thread to create the bjam tool and project-config.jam. In the file project-config.jam, change "using gcc ;" to "using gcc : 4.0 : g++-4.0 ;" The purpose is to build Boost libraries using the same g++-4.0 compiler used to build Visual, which should enable Visual to run on OSX 10.4 (for which g++-4.2 doesn't work). Now execute ./bjam to build the Boost libraries. The files you want will be in stage/lib. Move the following files to dependencies/boost_files/mac_libs: libboost_python.a libboost_signals.a libboost_thread.a In the past the following was used, but it seems neither necessary nor sufficient with Python 2.7: --------------------- ./bjam --toolset=darwin -sPYTHON_ROOT=/Library/Frameworks/Python.framework/Versions/2.7/bin/python --address-model=32_64 --architecture=x86 --build-type=complete --layout=versioned --with-python --with-thread --with-signals stage The files you want will be in stage/lib. Move these files to dependencies/boost_files/mac_libs (file names will be similar to the following): libboost_python-mt-s-1_35.a libboost_signals-mt-s-1_35.a libboost_thread-mt-s-1_35.a ---------------------- ---------- I built Boost libraries on a PowerPC running OS X 10.4 and tried using them on a PowerPC running OS X 10.5. Example programs ran okay, but in each case there was the following warning. In retrospect there may have been confusion between two different Python 2.5's on the machine. Warning (from warnings module): File "/Library/Python/2.5/site-packages/visual/__init__.py", line 149 import cvisual RuntimeWarning: Python C API version mismatch for module cvisual: This Python has API version 1013, module cvisual has version 1012. After rebuilding the Boost libraries on a PowerPC running OS X 10.5 this warning went away. ------------------------------------------------------ Obsolete, of historical interest only: HOW TO BUILD VISUAL 4 ON Apple OSX using GTK2 (Version 10.4.x) If you find gaps in this information, please tell Bru...@nc.... Make sure X11 and Xcode are installed (found on the installation DVD). X11 is automatically installed on 10.5. To do a clean install of fink (www.finkproject.org), I deleted /sw and started from scratch. Install fink from fink.sourceforge.net. Probably best to install from source? I use Fink Commander as a GUI to fink, but you can use the command line. Create a file in your home directory named ".profile" with these contents: test -r /sw/bin/init.sh && . /sw/bin/init.sh Start up a new terminal program, which will read the .profile file with the effect that /sw/bin will be on your application search path. Use fink to install the components listed for Linux in INSTALL.txt (details repeated here). If you're not using Fink Commander (and despite its graphic user interface there are hints that maybe it is buggy), on a command line you say for example "fink install python25". Execute fink selfupdate to get the latest packages. (You may need to invoke /sw/bin/fink.) Install numpy-py25, which also installs python25. (2008/4/2 on OSX 10.5; accepted the choice "db44-aes-shlibs: Shared Libraries for db44-aes") Currently (Jan. 2008) you will find 10 entries for Boost libraries; if using Fink Commander you need to expand the package name field wide enough to be able to see the full names, as you want the Boost libraries for Python 2.5. Install boost1.34.python25, boost1.34.systempython, and boost1.34.nopython. (You can say fink install boost1.34.python25 boost1.34.systempython boost1.34.nopython) Next install gtkmm2.4-dev, which installs many other packages on which it depends, including gtk+2, glib, glibmm, libsig++, atk, pango, expat1, libpng3, automake, autoconf, libtool, pkgconfig Next, install these libraries: libglademm2.4 (also installs libglademm2.4-shlibs) cairomm1 (also installs cairomm1-shlibs, freetype219, freetype219-shlibs etc; takes a LONG time) gtkglextmm (also installs gtkglextmm-shlibs, gtkglext1, gtkglext1-shlibs) Need freetype2, but freetype219 and freetype219-shlibs are installed instead (by cairomm1). Because this does not put freetype2.pc into the usual place (/sw/lib/pkgconfig), PKG_CONFIG_PATH is set in the configure script to find it. You can test the pkgconfig machinery by executing the following: pkg-config --libs pango (or /sw/bin/pkg-config --libs pango) The output should be -L/sw/lib -lpango-1.0 -lm -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv Next cd into the vpython-core2 directory and execute chmod +x autogen.sh, then ./autogen.sh Here is what happens when I run autogen.sh: /sw/share/aclocal/gtkglextmm-1.2.m4:225: warning: underquoted definition of AC_GTKGLEXTMM_SUPPORTS_MULTIHEAD run info '(automake)Extending aclocal' or see http://sources.redhat.com/automake/automake.html#Extending-aclocal configure.ac: installing `./missing' Completed successfully Apparently the warning about AC_GTKGLEXTMM_SUPPORTS_MULTIHEAD isn't fatal, as it was possible to build Visual. After important help from Martin Costabel, I was able to make, install, and run successfully. I placed this file in a build directory at the same level as vpython-core2: #!/bin/sh -ex export CPPFLAGS="-Wno-long-double" export PKG_CONFIG_PATH=/sw/lib/fontconfig2/lib/pkgconfig:/sw/lib/xft2/lib/pkgconfig:/sw/lib/freetype219/lib/pkgconfig export PYTHON=/sw/bin/python2.5 export CXXFLAGS="-O2 -g -finline-functions" export CFLAGS='-O3 -g ' ../vpython-core2/configure --prefix=/sw --disable-dependency-tracking If you call this file config.txt, in the build directory you need to execute chmod +x config.txt to make the file be executable by "./config.txt". Before making a change to src/Makefile.in, I got a message about possible mismatch of versions, as though when I build against /sw/bin/python2.5 and then run /sw/bin/python2.5 the system thinks these are different pythons. Martin Costabel commented: "I am getting this, too, when using the dynamic boost-python library, but not with the static libboost_python-mt.a. This is certainly a bug with the libboost_python-mt.dylib, but I haven't yet found a combination of build flags to build it correctly, in particular in a way that would also work on OSX 10.5." Following his suggestion, I put Mac-specific code into src/Makefile.in to link to these other libraries. But then I got this error message in the link phase of the make: /usr/bin/ld: table of contents for archive: /sw/lib/libboost_python-mt.a is out of date; rerun ranlib(1) (can't load from it) So I executed ranlib /sw/lib/libboost_python-mt.a, redid the make, executed make install, and it worked. When there looked to be a Boost problem, tried building Boost libraries from scratch: ./configure --prefix=/sw --with-libraries=python,thread --with-python=/sw/bin/python2.5 (This creates user-config.jam) make (apparently equivalent to bjam --user-config=user-config.jam --with-python --with-thread) sudo make install There's a name issue; the boost includes need to be available at /sw/include/boost, so do this: cd /sw/include/boost_1_34_1 sudo cp -r boost /sw/include I don't understand how /sw/include/boost is found. Looking at our src/build.log, I don't see anything that specifies we should look generally in /sw/include. Yet when boost is buried in boost_1_34_1, we don't find header files, and when it is unburied into /sw/include/boost we do. After a successfull make and "make install" invoking dynamic libraries, copy these new boost files to /sw/lib/python2.5/site-packages: bin.v2/libs/python/build/darwin/release/libboost_python-1_34_1.dylib bin.v2/libs/python/build/darwin/release/threading-multi/libboost_python-mt-1_34_1.dylib bin.v2/libs/thread/build/darwin/release/threading-multi/libboost_thread-mt-1_34_1.dylib But cvisual can't find a dylib: Traceback (most recent call last): File "/sw/lib/python2.5/site-packages/visual/examples/bounce2.py", line 1, in <module> from visual import * File "/sw/lib/python2.5/site-packages/visual/__init__.py", line 140, in <module> import cvisual ImportError: dlopen(/sw/lib/python2.5/site-packages/cvisualmodule.so, 2): Library not loaded: bin.v2/libs/python/build/darwin/release/libboost_python-1_34_1.dylib Referenced from: /sw/lib/python2.5/site-packages/cvisualmodule.so Reason: image not found I think I've seen stuff on the web about problems with locating dylibs. Tried changing src/Makefile.in to use only static boost libraries: ifeq ($(PYTHON_PLATFORM),darwin) # Special rules for OSX CVISUAL_LIBS += $(filter-out $(_FILTER_OUT), $(GTK_LIBS) \ $(GTHREAD_LIBS) /sw/lib/libboost_python-mt.a /sw/lib/libboost_thread-mt.a) This happened on the make: /usr/bin/ld: table of contents for archive: /sw/lib/libboost_python-mt.a is out of date; rerun ranlib(1) (can't load from it) /usr/bin/ld: table of contents for archive: /sw/lib/libboost_thread-mt.a is out of date; rerun ranlib(1) (can't load from it) So I did this: bruce-sherwoods-computer:~/Documents/workspace/build brucesherwood$ cd /sw/lib bruce-sherwoods-computer:/sw/lib brucesherwood$ sudo ranlib libboost_python-mt.a Password: bruce-sherwoods-computer:/sw/lib brucesherwood$ sudo ranlib libboost_thread-mt.a ranlib: file: libboost_thread-mt.a(tss_hooks.o) has no symbols ranlib: file: libboost_thread-mt.a(tss_dll.o) has no symbols ranlib: file: libboost_thread-mt.a(tss_pe.o) has no symbols bruce-sherwoods-computer:/sw/lib brucesherwood$ ----------------- Unsuccessful approach bjam --prefix=/sw --toolset=darwin --with-python-version=2.5 --with-thread stage Copy the directory named "boost" to /sw/include. > cp stage/lib/libboost_thread-mt.a /sw/lib > cp bin.v2/libs/python/build/darwin/release/link-static/threading-multi/libboost_python-mt-1_34_1.a /sw/lib/libboost_python.a After a successfull make and "make install" invoking dynamic libraries, copied these new boost files to /sw/lib/python2.5/site-packages: stage/lib/libboost_thread-mt-1_34_1.dylib bin.v2/libs/python/build/darwin/release/libboost_python-1_34_1.dylib bin.v2/libs/python/build/darwin/release/threading-multi/libboost_python-mt-1_34_1.dylib This attempt didn't help. Still get "Fatal Python error: Interpreter not initialized (version mismatch?). Is it possible that bjam worked against an old version of Python? Maybe /user/bin/python (which is the one I see with "which python" and which is version 2.3.5)? No reason bjam should look for python in /sw. On Sat, Jul 30, 2011 at 12:50 PM, K.-Michael Aye <kmi...@gm...> wrote: > Dear all, > > I think the MAC-OSX.txt is missing in the most recent tar file for MAC, but it's referred to by INSTALL.txt and HACKING .txt. > Is it just missing or do I not need it anymore because I should read and rely on INSTALL and HACKING? > > Best regards, > Michael > > > ------------------------------------------------------------------------------ > Got Input? Slashdot Needs You. > Take our quick survey online. Come on, we don't ask for help often. > Plus, you'll get a chance to win $100 to spend on ThinkGeek. > http://p.sf.net/sfu/slashdot-survey > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: JuanPabloAJ <jpa...@gm...> - 2011-07-31 00:29:32
|
ok, I installed the drivers, reboot and now work. Many thanks. -- JuanPabloAJ El sábado 30 de julio de 2011 a las 15:36, Anton Hvornum escribió: > Because you don't have any OpenGL drivers installed. > Linux will boot with native graphic drivers which mainly just gets some graphics going, not to play games. > > You need to install your graphic drivers to get some OpenGL drivers running, since vPython is built upon it. > > On Sat, Jul 30, 2011 at 5:54 PM, JuanPabloAJ <jpa...@gm... (mailto:jpa...@gm...)> wrote: > > I don't know if I have the driver installed. > > > > if I don't have a video card, I can use python ? > > $ lsmod > > Module Size Used by > > lp 10169 0 > > parport 36936 1 lp > > bnx2 78788 0 > > psmouse 62080 0 > > hed 2362 0 > > i7core_edac 18122 0 > > serio_raw 4942 0 > > edac_core 46822 3 i7core_edac > > joydev 11171 0 > > dcdbas 6942 0 > > usbhid 41934 0 > > hid 84486 1 usbhid > > mptsas 52760 2 > > mptscsih 37546 1 mptsas > > mptbase 93593 2 mptsas,mptscsih > > scsi_transport_sas 35585 1 mptsas > > > > > > -- > > JuanPabloAJ > > > > El sábado 30 de julio de 2011 a las 4:10, Anton Hvornum escribió: > > > > > Install your graphics driver, do you have nVidia or ATi? > > > On Jul 29, 2011 6:26 PM, "JuanPabloAJ" <jpa...@gm... (mailto:jpa...@gm...)> wrote: > > > > Anton, > > > > > > > > $ glxinfo > > > > name of display: localhost:10.0 > > > > Error: couldn't find RGB GLX visual or fbconfig > > > > > > > > > > > > -- > > > > JuanPabloAJ > > > > > > > > El viernes 29 de julio de 2011 a las 2:43, Anton Hvornum escribió: > > > > > > > >> Could you give Us your output from the console when doing: > > > >> glxinfo¦more > > > >> Do you have mesa and NVIDIA drivers installed? > > > >> Also Can you try running glxgears and see if you can? > > > >> On Jul 29, 2011 5:52 AM, "JuanPabloAJ" <jpa...@gm... (mailto:jpa...@gm...) (mailto:jpa...@gm...)> wrote: > > > >> > Hi, > > > >> > I have a ubuntu 10.10 and when i try use visual > > > >> > > > > >> > from visual import * > > > >> > sphere() > > > >> > > > > >> > > > > >> > I get this message > > > >> > > > > >> > VPython ***CRITICAL ERROR***: /build/buildd/python-visual-5.12/./src/gtk2/render_surface.cpp:88: render_surface: failed to initialize any OpenGL configuration, Aborting. > > > >> > > > > >> > any idea ? > > > >> > > > > >> > Many thanks. > > > >> > -- > > > >> > JuanPabloAJ > > > > > > > |
From: K.-Michael A. <kmi...@gm...> - 2011-07-30 18:50:48
|
Dear all, I think the MAC-OSX.txt is missing in the most recent tar file for MAC, but it's referred to by INSTALL.txt and HACKING .txt. Is it just missing or do I not need it anymore because I should read and rely on INSTALL and HACKING? Best regards, Michael |
From: JuanPabloAJ <jpa...@gm...> - 2011-07-30 15:54:10
|
I don't know if I have the driver installed. if I don't have a video card, I can use python ? $ lsmod Module Size Used by lp 10169 0 parport 36936 1 lp bnx2 78788 0 psmouse 62080 0 hed 2362 0 i7core_edac 18122 0 serio_raw 4942 0 edac_core 46822 3 i7core_edac joydev 11171 0 dcdbas 6942 0 usbhid 41934 0 hid 84486 1 usbhid mptsas 52760 2 mptscsih 37546 1 mptsas mptbase 93593 2 mptsas,mptscsih scsi_transport_sas 35585 1 mptsas -- JuanPabloAJ El sábado 30 de julio de 2011 a las 4:10, Anton Hvornum escribió: > Install your graphics driver, do you have nVidia or ATi? > On Jul 29, 2011 6:26 PM, "JuanPabloAJ" <jpa...@gm... (mailto:jpa...@gm...)> wrote: > > Anton, > > > > $ glxinfo > > name of display: localhost:10.0 > > Error: couldn't find RGB GLX visual or fbconfig > > > > > > -- > > JuanPabloAJ > > > > El viernes 29 de julio de 2011 a las 2:43, Anton Hvornum escribió: > > > >> Could you give Us your output from the console when doing: > >> glxinfo¦more > >> Do you have mesa and NVIDIA drivers installed? > >> Also Can you try running glxgears and see if you can? > >> On Jul 29, 2011 5:52 AM, "JuanPabloAJ" <jpa...@gm... (mailto:jpa...@gm...) (mailto:jpa...@gm...)> wrote: > >> > Hi, > >> > I have a ubuntu 10.10 and when i try use visual > >> > > >> > from visual import * > >> > sphere() > >> > > >> > > >> > I get this message > >> > > >> > VPython ***CRITICAL ERROR***: /build/buildd/python-visual-5.12/./src/gtk2/render_surface.cpp:88: render_surface: failed to initialize any OpenGL configuration, Aborting. > >> > > >> > any idea ? > >> > > >> > Many thanks. > >> > -- > >> > JuanPabloAJ > > |
From: JuanPabloAJ <jpa...@gm...> - 2011-07-29 16:26:10
|
Anton, $ glxinfo name of display: localhost:10.0 Error: couldn't find RGB GLX visual or fbconfig -- JuanPabloAJ El viernes 29 de julio de 2011 a las 2:43, Anton Hvornum escribió: > Could you give Us your output from the console when doing: > glxinfo¦more > Do you have mesa and NVIDIA drivers installed? > Also Can you try running glxgears and see if you can? > On Jul 29, 2011 5:52 AM, "JuanPabloAJ" <jpa...@gm... (mailto:jpa...@gm...)> wrote: > > Hi, > > I have a ubuntu 10.10 and when i try use visual > > > > from visual import * > > sphere() > > > > > > I get this message > > > > VPython ***CRITICAL ERROR***: /build/buildd/python-visual-5.12/./src/gtk2/render_surface.cpp:88: render_surface: failed to initialize any OpenGL configuration, Aborting. > > > > any idea ? > > > > Many thanks. > > -- > > JuanPabloAJ |
From: K.-Michael A. <kmi...@gm...> - 2011-07-29 11:09:30
|
On Jul 29, 2011, at 13:20 , Andreas Pavlogiannis wrote: > Hi, > > I 'm a new vpython user, trying to get familiar with working with 3D objects. In particular, I'm trying to understand how I can make an arbitrary checkers board with N rows and M columns. Unfortunately, taking the following sample code from http://www.vpython.org/contents/docs/visual/materials.html > > from visual import * > checkerboard = ( (0,1,0,1), > (1,0,1,0), > (0,1,0,1), > (1,0,1,0) ) > tex = materials.texture(data=checkerboard, > mapping="rectangular", > interpolate=False) > box(axis=(0,0,1), color=color.cyan, material=tex) > > and just adding some extra rows, columns, or both to the checkerboard variable does not work. > Could you please give me some pointers on this? > What's the error? How did you add 'some extra rows'? The obvious extension to 5 elements per element does not work? Like so: (1,0,1,0,1), (0,1,0,1,0), etc. ? Michael > Thanks, > Andreas > ------------------------------------------------------------------------------ > Got Input? Slashdot Needs You. > Take our quick survey online. Come on, we don't ask for help often. > Plus, you'll get a chance to win $100 to spend on ThinkGeek. > http://p.sf.net/sfu/slashdot-survey_______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Andreas P. <pau...@gm...> - 2011-07-29 10:18:27
|
Hi, I 'm a new vpython user, trying to get familiar with working with 3D objects. In particular, I'm trying to understand how I can make an arbitrary checkers board with N rows and M columns. Unfortunately, taking the following sample code from http://www.vpython.org/contents/docs/visual/materials.html /from visual import * checkerboard = ( (0,1,0,1), (1,0,1,0), (0,1,0,1), (1,0,1,0) ) tex = materials.texture(data=checkerboard, mapping="rectangular", interpolate=False) box(axis=(0,0,1), color=color.cyan, material=tex)/ and just adding some extra rows, columns, or both to the checkerboard variable does not work. Could you please give me some pointers on this? Thanks, Andreas |
From: JuanPabloAJ <jpa...@gm...> - 2011-07-29 03:52:01
|
Hi, I have a ubuntu 10.10 and when i try use visual from visual import * sphere() I get this message VPython ***CRITICAL ERROR***: /build/buildd/python-visual-5.12/./src/gtk2/render_surface.cpp:88: render_surface: failed to initialize any OpenGL configuration, Aborting. any idea ? Many thanks. -- JuanPabloAJ |
From: Bruce S. <Bru...@nc...> - 2011-07-26 15:35:10
|
In the VPython documentation, under "Work with objects", see "Materials/Textures", where you'll find detailed information on applying textures. As for creating or importing arbitrary models, the key element is the VPython "faces" object. An example of import can be found in the contributed section of vpython.org: "Convert STL 3D graphics files (Derek Lura and Bruce Sherwood)". I'll also point you to the extrusion object, which makes it particularly easy to extrude an arbitrary 2D surface along an arbitrary 3D curve. Bruce Sherwood On Tue, Jul 26, 2011 at 8:30 AM, Anton Hvornum <ant...@gm...> wrote: > Hi. > Information appears to be thin on this project even tho it's up to date. > If there any documentation what so ever on how to add textures to objects > and/or how to import external models into vPython (if that's supported). > I've tried a few different 3D libs for Python such as Panda3D, Pyglet, > Pygame and PyOpenGL but from what i can tell vPython is the most up-to-date > while still being the smallest of them, and vPython supports 3D object right > off the bat without having to implement to much mathematical stuff yourself. > But as mentioned, is it possible to apply textures to objects and create > your own objects either from within vPython or import external models? > Best regards: > Anton > IT Tech and Developer > > ------------------------------------------------------------------------------ > Magic Quadrant for Content-Aware Data Loss Prevention > Research study explores the data loss prevention market. Includes in-depth > analysis on the changes within the DLP market, and the criteria used to > evaluate the strengths and weaknesses of these DLP solutions. > http://www.accelacomm.com/jaw/sfnl/114/51385063/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > |
From: Anton H. <ant...@gm...> - 2011-07-26 14:30:32
|
Hi. Information appears to be thin on this project even tho it's up to date. If there any documentation what so ever on how to add textures to objects and/or how to import external models into vPython (if that's supported). I've tried a few different 3D libs for Python such as Panda3D, Pyglet, Pygame and PyOpenGL but from what i can tell vPython is the most up-to-date while still being the smallest of them, and vPython supports 3D object right off the bat without having to implement to much mathematical stuff yourself. But as mentioned, is it possible to apply textures to objects and create your own objects either from within vPython or import external models? Best regards: Anton IT Tech and Developer |
From: Frank W. P. a. A. U of R <wo...@pa...> - 2011-07-26 11:07:29
|
My installation on 10.6 continues to run fine in 10.7 (no changes were required). Frank Wolfs On Mon, 25 Jul 2011, Joe Heafner wrote: > Has anyone tried VPython on OS X 10.7 (aka Lion) yet? I'm hoping I won't be the first. > > Joe Heafner > Sent from one of my Macs > > > ------------------------------------------------------------------------------ > Magic Quadrant for Content-Aware Data Loss Prevention > Research study explores the data loss prevention market. Includes in-depth > analysis on the changes within the DLP market, and the criteria used to > evaluate the strengths and weaknesses of these DLP solutions. > http://www.accelacomm.com/jaw/sfnl/114/51385063/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > _____________________________________________________________________ Frank L. H. Wolfs e-mail: wo...@pa... Department of Physics and Astronomy University of Rochester B&L 203A, RC Box 270171 fax: (585) 273 - 3237 500 Wilson Blvd. phone: (585) 643 - 5496 Rochester, NY 14627 http://teacher.pas.rochester.edu/ |
From: Joe H. <hea...@gm...> - 2011-07-26 03:44:53
|
Has anyone tried VPython on OS X 10.7 (aka Lion) yet? I'm hoping I won't be the first. Joe Heafner Sent from one of my Macs |
From: 左明 <zuo...@gm...> - 2011-07-25 01:41:59
|
I've been trying this all week. Using PyRun_SimpleString(_T("execfile(\"bounce.py\")")); the vpython window will get the focus and until the MFC application will be unresponsive it is closed. Is there any way vpthon can work with mfc? |
From: Bruce S. <Bru...@nc...> - 2011-07-23 22:57:58
|
The discussion you found about a memory leak referred to a bug that was fixed last March. From the "recent developments" section of vpython.org: 2011-03-01 Visual 5.51: Fix memory leak on Windows and Mac. You've found a different memory leak, one that has not previously been reported. The leak that was fixed was a bug in rendering the scene on Windows and Mac, with the effect that setting object.visible = False eliminated the leak. Setting object.visible = False in your program doesn't make any difference: the leak is still there. Thanks much for reporting this. At the moment I don't know what is causing the leak. I note that commenting out make_normals, smooth, and make_twosided has no effect on the leak. The leak is associated with self.model.pos = self.vertices (but, I repeat, independent of whether the faces object is visible or not). I also note that if one executes m.Draw just once (putting a break at the end of the while loop), there is no leak, confirming that the leak is not associated with the repeated rendering that is automatically performed, unlike the case with the old leak. Since the problem is somehow associated with the statement self.model.pos = self.vertices, I made a version of your program that allocates once and for all the pos array, then assigns values to the pos array rather than constructing a vertices array first. The following program does not show a memory leak. This of course leaves open the question of why there is a leak when one assigns an array to faces.pos. from visual import * class Model: def __init__(self): self.frame = frame() self.model = faces(frame=self.frame, color=color.cyan, visible=True) class Mesh (Model): def __init__(self, z): Model.__init__(self) self.length = (z.shape[0]-1)*(z.shape[1]-1)*6 # length of one-sided data self.model.pos = zeros( (2*self.length,3), float ) # space for two-sided data def Update(self, xvalues, yvalues, zvalues): points = zeros( xvalues.shape + (3,), float ) points[...,0] = xvalues points[...,1] = yvalues points[...,2] = zvalues p = 0 for i in range(zvalues.shape[0]-1): for j in range(zvalues.shape[1]-1): self.model.pos[p ] = points[i,j] self.model.pos[p+1] = points[i,j+1] self.model.pos[p+2] = points[i+1,j+1] self.model.pos[p+3] = points[i,j] self.model.pos[p+4] = points[i+1,j+1] self.model.pos[p+5] = points[i+1,j] self.model.pos[self.length+p ] = points[i,j] self.model.pos[self.length+p+2] = points[i,j+1] self.model.pos[self.length+p+1] = points[i+1,j+1] self.model.pos[self.length+p+3] = points[i,j] self.model.pos[self.length+p+5] = points[i+1,j+1] self.model.pos[self.length+p+4] = points[i+1,j] p += 6 self.model.make_normals() self.model.smooth() x = arange(-1,1,2./20) y = arange(-1,1,2./20) z = zeros( (len(x),len(y)), float ) x,y = x[:,None]+z, y+z m = Mesh(y) i = 0 dt = 0.05 while True: m.Update( x, (sin(x*pi + i*dt)+sin(y*pi + i*dt))*0.2, y ) i += 1 rate(100) Bruce Sherwood On Fri, Jul 22, 2011 at 3:15 AM, Wojtek Frycz <woj...@gm...> wrote: > Hi! > I'm new to VPython project but I found a memory leak. There was something > mentioned about this problem before. I found it here: > http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTim8RL8kjW0%3DSK%2B9f-2A5TCQv6wAu9aTpBmisbNS%40mail.gmail.com&forum_name=visualpython-users. > But unfortunately I didn't find the solution. |
From: Thomas S. <to...@fe...> - 2011-07-23 16:00:16
|
Hi list, the subject says it all. Here is the error message: ./gtk2/random_device.cpp:30:63: error: 'const result_type boost::random::random_device::min_value' is not a static member of 'class boost::random::random_device' ./gtk2/random_device.cpp:30:41: error: uninitialized const 'boost::random::random_device::min_value' [-fpermissive] ./gtk2/random_device.cpp:31:63: error: 'const result_type boost::random::random_device::max_value' is not a static member of 'class boost::random::random_device' ./gtk2/random_device.cpp:31:41: error: uninitialized const 'boost::random::random_device::max_value' [-fpermissive] ./gtk2/random_device.cpp:39:42: error: 'const char* const boost::random::random_device::default_token' is not a static member of 'class boost::random::random_device' Here is the full log of the build: http://koji.fedoraproject.org/koji/getfile?taskID=3224810&name=build.log Greetings, Thomas |
From: Wojtek F. <woj...@gm...> - 2011-07-22 09:16:14
|
Hi! I'm new to VPython project but I found a memory leak. There was something mentioned about this problem before. I found it here: http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTim8RL8kjW0%3DSK%2B9f-2A5TCQv6wAu9aTpBmisbNS%40mail.gmail.com&forum_name=visualpython-users. But unfortunately I didn't find the solution. I want to use VPython to render a surface which is beeing changed during the program execution. To show you what I'm talking about I changed one of the example programs (faces_heighfield.py). Now it looks something like this: <code> from visual import * class Model: def __init__(self): self.frame = frame() self.model = faces(frame=self.frame, color=color.cyan) self.vertices = [] def FacetedTriangle(self, v1, v2, v3, color=color.white): """Add a triangle to the model""" for v in (v1,v2,v3): self.vertices.append(v) def FacetedPolygon(self, *v): """Appends a planar polygon of any number of vertices to the model""" for t in range(len(v)-2): self.FacetedTriangle( v[0], v[t+1], v[t+2] ) class Mesh (Model): def __init__(self): Model.__init__(self) def Draw(self, xvalues, yvalues, zvalues): points = zeros( xvalues.shape + (3,), float ) points[...,0] = xvalues points[...,1] = yvalues points[...,2] = zvalues self.vertices = [] for i in range(zvalues.shape[0]-1): for j in range(zvalues.shape[1]-1): self.FacetedPolygon( points[i,j], points[i,j+1], points[i+1,j+1], points[i+1,j] ) self.model.pos = self.vertices self.model.make_normals() self.model.smooth() self.model.make_twosided() x = arange(-1,1,2./20) y = arange(-1,1,2./20) z = zeros( (len(x),len(y)), float ) x,y = x[:,None]+z, y+z m = Mesh() i = 0 dt = 0.1 while True: m.Draw( x, (sin(x*pi + i*dt)+sin(y*pi + i*dt))*0.2, y ) i += 1 rate(10) </code> When running this code we see quite a nice surface movement. That is what I need. But the memory usage grows infinitely! My question is... is there any fix for this memory leak? Or do you know other way to achieve similar visual effect in VPython? I also tried to render the surface using convexes or points instead of faces but the memory leak always existed... Thanks in advance for your help. Greetings, Wojciech Frycz |
From: Aaron M. <mav...@gm...> - 2011-07-20 17:00:18
|
Simple question. Is it possible to disable the functionality of the escape key (i.e. summarily shutting down my application) from within Python? Setting scene.exit = False appears to stop it from exiting the program entirely, but it still destroys the display window, and there doesn't appear to be any way to get it back.* My application involves interactive use over extended periods of time, and accidentally hitting ESC in the middle of a run -- often an intuitive thing to do, even for myself, the author of the software -- is a frustrating experience, to say the least. Thanks! * I am using Visual 5.4 on Gentoo Linux. -- Aaron Mavrinac www.mavrinac.com |
From: Bruce S. <Bru...@nc...> - 2011-07-20 11:26:52
|
Yes, it just works. There's no difference in the status of VPython for 2.6, 2.7, and 3.1 Bruce Sherwood On Wed, Jul 20, 2011 at 3:05 AM, Russell Jones <rus...@ph...> wrote: > Hello, > I'm trying to create a MacPorts port for visual, and I seem to be getting > somewhere with the python 2.6 version (just rebuilding boost with python 2.6 > support which takes a while). However, we mostly use python 2.7 in our > MacPorts installation, and I'd rather not build Boost with the 2.6 variant > as it excludes 2.7 support. Thus it'd be good to create the port py27-visual > as well as py26-visual. > So I'm wondering, what's the status of 2.7 support? How would I find this > out? I couldn't find an obvious tracking bug for 2.7 problems, or even > anything that mentioned 2.7 in the title. Does it just work, then? > Russell > ------------------------------------------------------------------------------ > 10 Tips for Better Web Security > Learn 10 ways to better secure your business today. Topics covered include: > Web security, SSL, hacker attacks & Denial of Service (DoS), private keys, > security Microsoft Exchange, secure Instant Messaging, and much more. > http://www.accelacomm.com/jaw/sfnl/114/51426210/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > |
From: Mirko B. <mir...@ie...> - 2011-07-20 09:40:27
|
Hi everybody, for the record, I wrote a portfile for vpython on python 2.6 time ago, and I think I also wrote an email to this list to advertise its availability. At the time I submitted it for inclusion in the official MacPorts repository but that was denied due to some issues that I did not have the time to solve. If anybody can still benefit from such portfile, please help yourself: http://www.mip.sdu.dk/~mirko/macports/python/py26-visual.tgz Bye, Mirko On Wed, Jul 20, 2011 at 11:05 AM, Russell Jones < rus...@ph...> wrote: > Hello, > > I'm trying to create a MacPorts port for visual, and I seem to be getting > somewhere with the python 2.6 version (just rebuilding boost with python 2.6 > support which takes a while). However, we mostly use python 2.7 in our > MacPorts installation, and I'd rather not build Boost with the 2.6 variant > as it excludes 2.7 support. Thus it'd be good to create the port py27-visual > as well as py26-visual. > > So I'm wondering, what's the status of 2.7 support? How would I find this > out? I couldn't find an obvious tracking bug for 2.7 problems, or even > anything that mentioned 2.7 in the title. Does it just work, then? > > Russell > > > ------------------------------------------------------------------------------ > 10 Tips for Better Web Security > Learn 10 ways to better secure your business today. Topics covered include: > Web security, SSL, hacker attacks & Denial of Service (DoS), private keys, > security Microsoft Exchange, secure Instant Messaging, and much more. > http://www.accelacomm.com/jaw/sfnl/114/51426210/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > |
From: Russell J. <rus...@ph...> - 2011-07-20 09:05:18
|
Hello, I'm trying to create a MacPorts port for visual, and I seem to be getting somewhere with the python 2.6 version (just rebuilding boost with python 2.6 support which takes a while). However, we mostly use python 2.7 in our MacPorts installation, and I'd rather not build Boost with the 2.6 variant as it excludes 2.7 support. Thus it'd be good to create the port py27-visual as well as py26-visual. So I'm wondering, what's the status of 2.7 support? How would I find this out? I couldn't find an obvious tracking bug for 2.7 problems, or even anything that mentioned 2.7 in the title. Does it just work, then? Russell |
From: Bruce S. <Bru...@nc...> - 2011-07-20 03:21:08
|
There's nothing built-in. I suppose you could constantly interrogate scene.mouse.ray and figure out what was pointed at. Bruce Sherwood On Tue, Jul 19, 2011 at 8:55 PM, Dan Aldrich <dal...@ea...> wrote: > Does vPython have a way to do a mouse over an object? I was looking > for a method like in java where you know which object the mouse is > over. May not be doable with a 3D display model. > > -d > > > > ------------------------------------------------------------------------------ > 10 Tips for Better Web Security > Learn 10 ways to better secure your business today. Topics covered include: > Web security, SSL, hacker attacks & Denial of Service (DoS), private keys, > security Microsoft Exchange, secure Instant Messaging, and much more. > http://www.accelacomm.com/jaw/sfnl/114/51426210/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Dan A. <dal...@ea...> - 2011-07-20 02:56:41
|
Does vPython have a way to do a mouse over an object? I was looking for a method like in java where you know which object the mouse is over. May not be doable with a 3D display model. -d |