Automated python compiling(?)
<p>Im trying to setup a script that converts all my .py scripts in the folder into windows .exe binaries and then reuploads them back to google code with svn commit.</p>

<p>I can make it work with a single .py file, but how can i have it do all in the directory and then delete the source .py's until the next time the script is run. This is just a snippet, the main thing i need help with is making the os.system command containing the pyinstaller.py command run on each file in the directory. Please and thank you ^_^</p>

<p>The hope is to assign a clustered group of servers to compile my code every hour, so any changes made will be compiled into binaries and tested for stability.</p>

<pre><code>#!/usr/bin/env python
import os
import sys
#filename = ".py"

def updatecode():
    os.system("sudo svn update")
    os.system('sudo cp /code/Python/*.py pyinstaller/'

def compile2exe(file):
    print "[!] Compiling input file to windows binary..."

    os.system('sudo python pyinstaller.py --onefile -o ../binaries/ %s'%file)


#for filename in os.listdir('/code/Python/'):
#   compile2exe(filename)
</code></pre>
