[Tutor] bytecode primer, and avoiding a monster download

Oscar Benjamin oscar.j.benjamin at gmail.com
Mon May 27 22:09:58 CEST 2013


On 27 May 2013 21:01, Jim Mooney <cybervigilante at gmail.com> wrote:
>
> I was looking at the bytecode doc page as a break from the Lutz book,
> since I like Assembler-type code due to its total non-ambiguity, but
> the page doesn't say much. Is there a doc somewhere that corresponds
> some of the bytecode to Python source? I thought rot_1, 2, 3, and 4
> looked useful, but it would take awhile to disassemble random programs
> to see what source they come from.

What do you want these for? I've never needed to know what the
interpreter's bytecodes are.

> Another question. I tried installing a package that back-compiles (in
> win 7), so I could see things that way, and got the error
> "Unable to find vcvarsall.bat"

I don't know what you mean by "back-compiles" but I guess this package
contains extension modules in C. To install that from source you will
need a C compiler. The project may provide an installer with
pre-compiled binaries for Windows (check on their download page).

> Looking around it said I needed to install Visual Studio (Express, of
> course ;'). I'm on a very slow connection, right now. Is there any
> alternative to downloading this monster 600 Mb ISO just to install a
> package, or am I doomed to getting Visual Studio?

You can use MinGW instead of Visual Studio but you will need to apply
the fix to cygwinccompiler.py described here:
http://stackoverflow.com/questions/6034390/compiling-with-cython-and-mingw-produces-gcc-error-unrecognized-command-line-o

Otherwise you could install Python(x, y). This will install Python,
MinGW and a bunch of other useful packages in one go:
https://code.google.com/p/pythonxy/wiki/Downloads?tm=2


Oscar


More information about the Tutor mailing list