Download presentation
Presentation is loading. Please wait.
Published byPaulina Wilkerson Modified over 9 years ago
1
A quick introduction to psyco: The Python Compiler Geoff Davis Triangle ZPUG December 6
2
What is psyco? Open source python compiler – http://psyco.sourceforge.net Very easy to use Only works on 32-bit x86 processors – (or 64 bit in 32-bit compatibility mode)
3
How to use psyco Quick overview: – import psyco – psyco.full() That’s it! psyco then takes over DEMO
4
Play nice with Macs If distributing code for mixed platforms, put code in a try block: try: – import psyco – psyco.full() except: – pass
5
Use psyco selectively psyco tries to compile everything Not always useful – Compilation overhead – Uses lots of memory – Disables pdb Can use psyco more selectively
6
Precision psyco Can tell psyco to compile individual functions – E.g. SpeedPack – Profiled everything in CMF, then compiled slowest methods with psyco Can have both compiled and uncompiled versions: – fastfunction = psyco.proxy(slowfunction) DEMO
7
Plug for 10 minute talks Easy to put together! Took me 1 hour Lots of stuff would be useful in this format – Editors / IDEs – Debugging tools – Plone/Zope products – Pure python products No need for a huge, involved presentation Please volunteer!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.