Hi Robert, just to tell you that I have built sage-4.2.1 from source (it took my athlon 64bits 1Gb almost 5 hours), although I cannot embed a main() with cython --embed hw.pyx I could generate the hw.so file with the setup.py and finally I could run the hw.so but not from the sage shell, because when I try sage -sh
/opt/sage-4.2.1 sage subshell$ ./hw.so Segmentation fault after many tries I found: geo...@george-desktop:/opt/sage-4.2.1$ ls hola* hola.c hola.pyx hola.so geo...@george-desktop:/opt/sage-4.2.1$ ls hw* hw.c hw.py hw.pyc hw.pyx hw.so geo...@george-desktop:/opt/sage-4.2.1$ rm hw.py hw.pyc ### I delete the hw.py and hw.pyc to make sure I am taking hw.so rm: remove write-protected regular file `hw.py'? y rm: remove write-protected regular file `hw.pyc'? y geo...@george-desktop:/opt/sage-4.2.1$ sage ---------------------------------------------------------------------- | Sage Version 4.2.1, Release Date: 2009-11-14 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: import hola Hooooola q tal!!! sage: import hw sage: from hw import * sage: hello_world() Welcome to Sage - 2^4 * 37 * 151 sage: exit Exiting SAGE (CPU time 0m0.07s, Wall time 0m43.36s). So I go back to my sage-4.1 installation and tried to make the corresponding imports: geo...@george-desktop:~$ mv hw.py hw0.py geo...@george-desktop:~$ sage0 ---------------------------------------------------------------------- | Sage Version 4.1, Release Date: 2009-07-09 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: from hw import * sage: hello_world() Welcome to Sage - 2^4 * 37 * 151 sage: !ls helloworld* helloworld.c helloworld.pyx helloworld.so sage: import helloworld Hooooola q tal!!! sage: exit Exiting SAGE (CPU time 0m0.06s, Wall time 2m21.93s). Then there is something I have not understood about how to run this *.so files. However this is all what I need. A barely connected question I have is that: now I have the new sage-4.2 installed I would like to just define a python path in the new site-packages pointing to the old one but I don't know what happens with the other files in /opt/sage4.1/local/bin and /../lib, do I need to make a logical link also?, is this a correct fast and easy way to do this? or I need to recompile and built again all the stuff. Ii rests me just want to thank you very much again for your help. Jorge > make sure they're in different folders and on different ports. To be > safe, you could just avoid opening the notebook in the new sage until > you're ready to switch over, as it will attempt to update the storage > format because of architectural changes in sage 4.1.2). This way you > can get Cython to work (I hope) and make sure all your other stuff > works fine too before switching over. > > - Robert > _________________________________________________________________ Otto te muestra IE8 www.otto.com.mx -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org