Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
Python pyc files

Python pyc files

2005-05-13       - By Aloys Baillet

 Back
Reply:     1     2     3     4     5     6  

Hi Alan,

What you might try to do is running the /urs/lib/python24/compileall.py
script over a directory (under windows: Python24\lib\compileall.py), it will
do what you want.
You can also launch Python with optimized bytecode:
python -OO compileall.py
in the directory were you .py files are.
You will get .pyo files, which are faster to run than .pyc.
Hope that helps...

Aloys

On 5/13/05, Alan Jones <skyphyr@(protected)> wrote:
>
> Very helpful thanks - though I was after more specifics actually :-)
> is it just "python filename" to load it?
>
> Cheers,
>
> Alan.
>
> On 5/13/05, Jerry Gamache <jerryg@(protected)> wrote:
> > Usually just importing or running the .py file in Python causes the
> Python interpreter to automatically generate a .pyc file if the interpreter
> has write permissions to that folder. That is something to consider when
> net-installing XSI Linux on a read-only server because each .py file should
> be loaded once by the superuser to make sure the .pyc is created and can be
> used to speed up Python execution. You will notice that Debian's apt and
> RedHat's rpm do that automatically as a post-install step since normal users
> are not privileged to write in /usr.
> >
> > Did this answer you question?
> >
> >
> > -- --Original Message-- --
> > From: owner-xsi@(protected) [mailto:owner-xsi@(protected)]On Behalf
> > Of Alan Jones
> > Posted At: Friday, May 13, 2005 8:42 AM
> > Posted To: xsi
> > Conversation: Python pyc files
> > Subject: Python pyc files
> >
> > Hi All,
> >
> > Sorry for the basic question, but googling was leading me to topics
> > way off. I'm just wondering what I could use to generate pyc files
> > from py files from the command line in linux?
> >
> > cheers,
> >
> > Alan.
> >
> > ---
> > Unsubscribe? Mail Majordomo@(protected) with the following text in
> body:
> > unsubscribe xsi
> >
> > ---
> > Unsubscribe? Mail Majordomo@(protected) with the following text in
> body:
> > unsubscribe xsi
> >
>
> ---
> Unsubscribe? Mail Majordomo@(protected) with the following text in body:
> unsubscribe xsi
>



--
Aloys Baillet - Character TD @ Animal Logic

Hi Alan,<br>
<br>
What you might try to do is running the /urs/lib/python24/compileall.py
script over a directory (under windows: Python24\lib\compileall.py), it
will do what you want.<br>
You can also launch Python with optimized bytecode:<br>
python -OO compileall.py<br>
in the directory were you .py files are.<br>
You will get .pyo files, which are faster to run than .pyc.<br>
Hope that helps...<br>
<br>
Aloys<br><br><div><span class="gmail_quote">On 5/13/05, <b class="gmail
_sendername">Alan Jones</b> &lt;<a href="mailto:skyphyr@(protected)">skyphyr@(protected)
.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left:
1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Very helpful thanks - though I was after more specifics actually :-)<br>is it
just &quot;python filename&quot; to load it?<br><br>Cheers,<br><br>Alan.<br><br
>On 5/13/05, Jerry Gamache &lt;<a href="mailto:jerryg@(protected)">
jerryg@(protected)</a>&gt; wrote:<br>&gt;
Usually just importing or running the .py file in Python causes the
Python interpreter to automatically generate a .pyc file if the
interpreter has write permissions to that folder. That is something to
consider when net-installing XSI Linux on a read-only server because
each .py file should be loaded once by the superuser to make sure the
.pyc is created and can be used to speed up Python execution. You will
notice that Debian's apt and RedHat's rpm do that automatically as a
post-install step since normal users are not privileged to write in
/usr.<br>&gt;<br>&gt; Did this answer you question?<br>&gt;<br>&gt;<br>&gt; ---
--Original Message-- --<br>&gt; From: <a href="mailto:owner-xsi@(protected)"
>owner-xsi@(protected)</a> [mailto:<a href="mailto:owner-xsi@(protected)">
owner-xsi@(protected)</a>]On Behalf<br>&gt; Of Alan Jones<br>&gt; Posted At:
Friday, May 13, 2005 8:42 AM<br>&gt; Posted To: xsi<br>&gt; Conversation:
Python pyc files<br>&gt; Subject: Python pyc files<br>&gt;<br>&gt; Hi All,
<br>&gt;<br>&gt; Sorry for the basic question, but googling was leading me to
topics<br>&gt; way off. I'm just wondering what I could use to generate pyc
files<br>&gt; from py files from the command line in linux?<br>&gt;
<br>&gt; cheers,<br>&gt;<br>&gt; Alan.<br>&gt;<br>&gt; ---<br>&gt; Unsubscribe?
Mail <a href="mailto:Majordomo@(protected)">Majordomo@(protected)</a> with
the following text in body:<br>&gt; unsubscribe xsi<br>&gt;<br>
&gt; ---<br>&gt; Unsubscribe? Mail <a href="mailto:Majordomo@(protected)"
>Majordomo@(protected)</a> with the following text in body:<br>&gt;
unsubscribe xsi<br>&gt;<br><br>---<br>Unsubscribe? Mail <a href="mailto
:Majordomo@(protected)">
Majordomo@(protected)</a> with the following text in body:<br>unsubscribe xsi
<br></blockquote></div><br><br><br>-- <br>Aloys Baillet - Character TD @ Animal
Logic