Hi I am currently running pypy-c on Windows and I was wondering what the default mode of execution is. Is it a bytecode interpreter or is it doing a JIT compilation? Is there a native code option and how can I invoke it? Thanks Raj
Raj Bandyopadhyay wrote:
Hi
I am currently running pypy-c on Windows and I was wondering what the default mode of execution is. Is it a bytecode interpreter or is it doing a JIT compilation? Is there a native code option and how can I invoke it?
Before asking new questions, I would like to ask you for the solution of your previous problem, to share it with others. It is a bytecode interpreter. For trying Jit and other flavors of PyPy, you need to check out the svn repository and do your own PyPy build, at the moment. cheers - chris -- Christian Tismer :^) <mailto:tismer@stackless.com> tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/
Well, for my previous problem, pypy-c on windows worked only when I ran it in the installation directory, so I did copped out and ran my programs by copying them over. Didn't really find a proper solution to the problem, but I assume it involves setting some path variables. Thanks! Raj Quoting Christian Tismer <tismer@stackless.com>:
Before asking new questions, I would like to ask you for the solution of your previous problem, to share it with others.
It is a bytecode interpreter. For trying Jit and other flavors of PyPy, you need to check out the svn repository and do your own PyPy build, at the moment.
cheers - chris
--
Hi Raj, On Tue, Oct 16, 2007 at 11:30:56AM -0500, Raj wrote:
Well, for my previous problem, pypy-c on windows worked only when I ran it in the installation directory, so I did copped out and ran my programs by copying them over. Didn't really find a proper solution to the problem, but I assume it involves setting some path variables.
I'm confused. I tried downloading the file pypy-1.0.0-win32.zip and looked around (didn't test it on Windows myself though). The zip contains all the necessary standard library .py files, and I think that the paths you get in the zip are correct. In other words, if you run pypy-1.0.0\pypy-c.exe, it should pick up its stdlib at pypy-1.0.0\share\pypy-1.0\lib-python and pypy-1.0.0\share\pypy-1.0\pypy\lib. Of course it doesn't work if you try to move the .exe files elsewhere without also moving the 'share' subdirectory there. However, as I said this is untested, so something might be going wrong. A bientot, Armin.
Hi Armin It only worked for me when I cd'ed to the pypy-1.0.0 directory and ran pypy-c there. When I added pypy-1.0.0 to my path and ran pypy-c from somewhere else, it gave me errors saying that some modules are not found. This could definitely be a result of my inexperience with windows, but if you get a chance, please do test it out. Thanks! Raj On Oct 21, 2007, at 5:53 AM, Armin Rigo wrote:
Hi Raj,
On Tue, Oct 16, 2007 at 11:30:56AM -0500, Raj wrote:
Well, for my previous problem, pypy-c on windows worked only when I ran it in the installation directory, so I did copped out and ran my programs by copying them over. Didn't really find a proper solution to the problem, but I assume it involves setting some path variables.
I'm confused. I tried downloading the file pypy-1.0.0-win32.zip and looked around (didn't test it on Windows myself though). The zip contains all the necessary standard library .py files, and I think that the paths you get in the zip are correct. In other words, if you run
My guess is the pypy-c considers the current directory as its root directory. This differs from Cpython which uses a registry entry. Raj Bandyopadhyay wrote:
Hi Armin
It only worked for me when I cd'ed to the pypy-1.0.0 directory and ran pypy-c there. When I added pypy-1.0.0 to my path and ran pypy-c from somewhere else, it gave me errors saying that some modules are not found. This could definitely be a result of my inexperience with windows, but if you get a chance, please do test it out.
Thanks! Raj
On Oct 21, 2007, at 5:53 AM, Armin Rigo wrote:
Hi Raj,
On Tue, Oct 16, 2007 at 11:30:56AM -0500, Raj wrote:
Well, for my previous problem, pypy-c on windows worked only when I ran it in the installation directory, so I did copped out and ran my programs by copying them over. Didn't really find a proper solution to the problem, but I assume it involves setting some path variables.
I'm confused. I tried downloading the file pypy-1.0.0-win32.zip and looked around (didn't test it on Windows myself though). The zip contains all the necessary standard library .py files, and I think that the paths you get in the zip are correct. In other words, if you run
_______________________________________________ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
-- Lenard Lindstrom <len-l@telus.net>
Lenard Lindstrom wrote:
My guess is the pypy-c considers the current directory as its root directory. This differs from Cpython which uses a registry entry.
The truth is that: 1. We didn't decide yet how to handle interaction with cpython library (use the same place, use different place, link somewhere) 2. We don't have a single windows developer which means that we don't experience such things on a day-to-day basis (and pypy source code is changing very rapidly, which means it's hard to follow). Cheers, fijal :.
Maciek Fijalkowski wrote:
Lenard Lindstrom wrote:
My guess is the pypy-c considers the current directory as its root directory. This differs from Cpython which uses a registry entry.
The truth is that: 1. We didn't decide yet how to handle interaction with cpython library (use the same place, use different place, link somewhere) 2. We don't have a single windows developer which means that we don't experience such things on a day-to-day basis (and pypy source code is changing very rapidly, which means it's hard to follow).
Cheers, fijal
In short - yes, you're right :) :.
Hi Raj, On Sun, Oct 21, 2007 at 08:55:12AM -0500, Raj Bandyopadhyay wrote:
It only worked for me when I cd'ed to the pypy-1.0.0 directory and ran pypy-c there. When I added pypy-1.0.0 to my path and ran pypy-c from somewhere else, it gave me errors saying that some modules are not found. This could definitely be a result of my inexperience with windows, but if you get a chance, please do test it out.
Ok. For anyone interested in helping out, the relevant code is in translator/goal/app_main.py. In particular, on Unix at least, the 10 first lines of entry_point() look if sys.argv[0] contains no '/' and if so search along the $PATH for the likely full path to the executable. After a quick look the same code appears ok for Windows too, but clearly something goes wrong somewhere. A way to check if these 10 lines worked is to print sys.executable from the command-line of pypy-c. A bientot, Armin
Armin Rigo wrote:
Hi Raj,
On Sun, Oct 21, 2007 at 08:55:12AM -0500, Raj Bandyopadhyay wrote:
It only worked for me when I cd'ed to the pypy-1.0.0 directory and ran pypy-c there. When I added pypy-1.0.0 to my path and ran pypy-c from somewhere else, it gave me errors saying that some modules are not found. This could definitely be a result of my inexperience with windows, but if you get a chance, please do test it out.
Ok. For anyone interested in helping out, the relevant code is in translator/goal/app_main.py. In particular, on Unix at least, the 10 first lines of entry_point() look if sys.argv[0] contains no '/' and if so search along the $PATH for the likely full path to the executable. After a quick look the same code appears ok for Windows too, but clearly something goes wrong somewhere. A way to check if these 10 lines worked is to print sys.executable from the command-line of pypy-c.
Ok, I checked again. One fault of mine was that I happened to have another pypy-c.exe executable around. So actually, I now also crash with the import errors. Python 2.4.1 (pypy 1.0.0 build 41438) on win32 Type "help", "copyright", "credits" or "license" for more information. Error calling sys.excepthook: debug: OperationError: debug: operror-type: ImportError debug: operror-value: No module named traceback Then I tested what you said from the command line: C:\Dokumente und Einstellungen\tismer.MACGYVERXP>pypy-c.exe -c "import sys; print sys.executable" debug: WARNING: library path not found, using compiled-in sys.path C:\Dokumente und Einstellungen\tismer.MACGYVERXP\pypy-c.exe This is in fact nonsense, the executable came from the temp directory mentioned before, all other pypy-c's were removed. So something is wrong, and I'm looking into this. cheers - chris -- Christian Tismer :^) <mailto:tismer@stackless.com> tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/
Armin Rigo wrote:
Hi Raj,
On Tue, Oct 16, 2007 at 11:30:56AM -0500, Raj wrote:
Well, for my previous problem, pypy-c on windows worked only when I ran it in the installation directory, so I did copped out and ran my programs by copying them over. Didn't really find a proper solution to the problem, but I assume it involves setting some path variables.
I'm confused. I tried downloading the file pypy-1.0.0-win32.zip and looked around (didn't test it on Windows myself though). The zip contains all the necessary standard library .py files, and I think that the paths you get in the zip are correct. In other words, if you run pypy-1.0.0\pypy-c.exe, it should pick up its stdlib at pypy-1.0.0\share\pypy-1.0\lib-python and pypy-1.0.0\share\pypy-1.0\pypy\lib. Of course it doesn't work if you try to move the .exe files elsewhere without also moving the 'share' subdirectory there. However, as I said this is untested, so something might be going wrong.
I tested this right now. D:\tmp\pypy-1.0.0-win32\pypy-1.0.0>pypy-c Python 2.4.1 (pypy 1.0.0 build 41438) on win32 Type "help", "copyright", "credits" or "license" for more information.
import pickle pickle.__file__ 'D:\\tmp\\pypy-1.0.0-win32\\pypy-1.0.0\\share\\pypy-1.0\\lib-python\\modified-2.4.1\\pickle.py'
Tried it from a different folder as well: D:\tmp\pypy-1.0.0-win32\pypy-1.0.0>cd \pypy D:\pypy>\tmp\pypy-1.0.0-win32\pypy-1.0.0\pypy-c.exe Python 2.4.1 (pypy 1.0.0 build 41438) on win32 Type "help", "copyright", "credits" or "license" for more information.
import pickle pickle.__file__ '\\tmp\\pypy-1.0.0-win32\\pypy-1.0.0\\share\\pypy-1.0\\lib-python\\modified-2.4.1\\pickle.pyc'
Looks all pretty good so far. What else should I try for validation? The basic stuff appears to be in place. cheers - chris -- Christian Tismer :^) <mailto:tismer@stackless.com> tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/
Hmmm, which windows OS are you using. Mine's a windows XP. OK, so you invoked pypy-c using the full pathname of the executable? I tried it by adding the pypy-1.0.0 to the system PATH variable and just using 'pypy-c'. I should have tried it your way :headdesk: :) Raj On Oct 21, 2007, at 7:59 PM, Christian Tismer wrote:
I tested this right now.
D:\tmp\pypy-1.0.0-win32\pypy-1.0.0>pypy-c Python 2.4.1 (pypy 1.0.0 build 41438) on win32 Type "help", "copyright", "credits" or "license" for more information.
import pickle pickle.__file__ 'D:\\tmp\\pypy-1.0.0-win32\\pypy-1.0.0\\share\\pypy-1.0\\lib-python\ \modified-2.4.1\\pickle.py'
Tried it from a different folder as well:
D:\tmp\pypy-1.0.0-win32\pypy-1.0.0>cd \pypy
D:\pypy>\tmp\pypy-1.0.0-win32\pypy-1.0.0\pypy-c.exe Python 2.4.1 (pypy 1.0.0 build 41438) on win32 Type "help", "copyright", "credits" or "license" for more information.
import pickle pickle.__file__ '\\tmp\\pypy-1.0.0-win32\\pypy-1.0.0\\share\\pypy-1.0\\lib-python\ \modified-2.4.1\\pickle.pyc'
Looks all pretty good so far.
What else should I try for validation? The basic stuff appears to be in place.
cheers - chris
'Sam, how far do we have to go?' 'I don't know, Mr. Frodo', said Sam 'because I don't know where we're going'. -- JRR Tolkien, Return of the King
Raj Bandyopadhyay wrote:
Hmmm, which windows OS are you using. Mine's a windows XP.
Of course.
OK, so you invoked pypy-c using the full pathname of the executable? I tried it by adding the pypy-1.0.0 to the system PATH variable and just using 'pypy-c'. I should have tried it your way :headdesk: :)
Trying your way as well... Ok. I added D:\tmp\pypy-1.0.0-win32\pypy-1.0.0 to the system's path variable. let's see (after restarting the DOS shell with the changed environ, of course): C:\Dokumente und Einstellungen\tismer.MACGYVERXP>cd d:\ C:\Dokumente und Einstellungen\tismer.MACGYVERXP>pypy-c.exe debug: WARNING: library path not found, using compiled-in sys.path Python 2.4.1 (pypy 1.0.0 build 46843) on win32 Type "help", "copyright", "credits" or "license" for more information.
import pickle pickle.__file__ 'd:\\pypy\\dist\\lib-python\\modified-2.4.1\\pickle.pyc'
You are right!!! This comes from my active pypy check-out, not from the package that you downloaded. So I have to say: you are right! PyPy does not behave correctly on windows. Please take my deepest apologies for not testing this enough. We will figure this out, ASAP, and supply a patch. Armin, sorry about that, but he is just right with his complaint. cheers - chris -- Christian Tismer :^) <mailto:tismer@stackless.com> tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/
participants (6)
-
Armin Rigo
-
Christian Tismer
-
Lenard Lindstrom
-
Maciek Fijalkowski
-
Raj
-
Raj Bandyopadhyay