[Compiler-sig] My code runs - but I can't 'compile' it... WHY?!

Michael Hudson mwh at python.net
Mon Aug 2 15:30:40 CEST 2004


"Phil Hornby" <phil.hornby at accutest.co.uk> writes:

> Hi out there...

This isn't really a very good place to ask this question...

> I have what seems to me like a VERY strange situation.
>
> I have some code that I want to compile - i.e. generate a .pyc file for -
> because I want to essentially hide the contents from prying eyes.

I'll spare you the homily on how much use this is :-)

> The code runs fine from a command prompt but when I try to compile
> it from an interactive session of the Python interpreter as below I
> get the error shown... ANY IDEAS??

Why are you using Lib/compiler and not py_compile?  But it's hard to
say more without ... erm ... seeing some code.  Maybe you can comment
things out and use binary chop to find the syntax that is defeating
Lib/compiler.  This would be interesting in itself as I thought I'd
fixed all of those problems...

Cheers,
mwh

-- 
  To summarise the summary of the summary:- people are a problem.
                   -- The Hitch-Hikers Guide to the Galaxy, Episode 12


More information about the Compiler-sig mailing list