bad magic number in pyc from unix to windows

Martin Franklin martin.franklin at bedford.waii.com
Thu Nov 16 10:24:09 EST 2000


This is my last post on this I promise!

basically it came down to my code writting open(afile, 'w') and not 'wb'
and this counts on windows..... won't make that mistake again.

Thanks for listening
Martin

I wrote:
> 
> Hi,
> 
> I know it's bad form to reply to your own mail but...
> 
> It must be somthing to do with my deployment code.  Basically I use zlib
> to compress my pyc's then base64 to convert to text then I wrap this in
> a
> python script that extracts itself.....  This seems to work for all the
> unix
> platforms I use (AIX / Solaris / IRIX / LInux ) but not on windows...
> perhaps
> I should re-examine my code
> 
> Thanks
> Martin
> 
> I wrote:
> >
> > Hi,
> >
> > Has anyone else seen a bad magic number error when using pyc files
> > (created on a unix box ) on a windows machine.  I am using python 2.0
> > on both unix and windows.  The only difference is I didn't compile the
> > windows version myself.
> >
> > I deploy me applications with pyc's only (my bosses idea!) and I would
> > like
> > to deploy only one version..
> >
> > Any idea's...
> >
> > TIA
> > Martin
> >
> > --
> > http://www.python.org/mailman/listinfo/python-list
> 
> --
> http://www.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list