Skip to main content

Home/ Python Programming/ Group items tagged py

Rss Feed Group items tagged

reckoner reckoner

Py++ introduction - 0 views

  • What is Py++? Definition: Py++ is an object-oriented framework for creating a code generator for Boost.Python library. Py++ uses few different programming paradigms to help you to expose C++ declarations to Python. This code generator will not stand on your way. It will guide you through the whole process. It will raise warnings in the case you are doing something wrong with a link to the explanation. And the most important it will save your time - you will not have to update code generator script every time source code is changed.
reckoner reckoner

py vs pyc - 0 views

  • When running "python test.py" the interpreter will first precompile the test.py source file, and then execute it. When running "python test.pyc", the interpreter will go straight to the execution of the script.
reckoner reckoner

psychotic - accelerate python code - 0 views

  • sychotic is an innovative optimizing compiler for Python code. It has unique features, the most important of which is that it breaks through the ConstantTimeBarrier. It is very easy to use and has an interface similar to that of the popular Psyco project. Below, you can see a usage example. You can also learn about HowItWorks, the ProjectHistory and KnownIssues. You can also browse the easy-to-understand source especially the alysis.py analyzer module and the dingo.py runtime bootstrap. There is an introductory screencast available (less than 5 minutes long). Usage
Jac Londe

cpython : Lib/HTMLParser.py - 0 views

  • Mercurial > cpython view Lib/HTMLParser.py @ 89979:3f8b801e7e76
  •  
    Testing parsing with ...
reckoner reckoner

IpythonOnConsole - IPython - 0 views

  • IPython on resizeable Win32 Console If you are on win32, you might want to use Console, an open source replacement for that inflexible old win32 terminal. Here's how. Install IPython using the .exe installer. Download stable version of Console (1.5 at this time). Create a shortcut to console.exe, right-click -> properties. Set target to e.g. C:\opt\Console\console.exe -c "/k python c:\python25\scripts\ipython.py -p sh" you can also create a tab dedicated to Ipython (and have other dedicated to other shells or command-line app). go to edit->settings->tabs : click on the add button and fill the following fields : * title : ipython ico : C:\Python24\py.ico shell : cmd.exe /k "ipython" start-up dir : whatever is good for you. note that python.exe need to be in the path Using IPython with Version 2 of Console use the -r option for creating the shortcut, e.g. C:\opt\Console2\console.exe -r "/k python c:\python25\scripts\ipython.py -p sh" Some advantages of Console2 over normal console (for IPython use) Distinctive taskbar icon Can reside in system tray There are many other benefits, so it's well worth setting up Example config for Console-2.00b120-Beta (you need to edit the xml file): http://vvtools.googlecode.com/svn/trunk/config/console.xml If you have problems with ctrl+C killing Console2 immediately, launch ipython from a normal Console2 session manually.
reckoner reckoner

Py25Bins - developer binaries for Open Source Projects - 0 views

  •  
    Some selected binaries for certain Python modules
reckoner reckoner

Lightweight Approach to AOP (aspect-oriented programming) in Python - 0 views

  • aspects.py library provides means to intercept function calls. Functions and methods (also in Python standard library and third party code) can be wrapped so that when they are called, the wrap is invoked first. Depending on the wrap, the execution of the original function can be omitted, or the function can be called arbitrarily many times. Wraps are able to modify the arguments and the return value of the original function. In the terminology of aspect-oriented programming, the library allows applying advices (wraps) to call join points of methods and functions in around fashion.
  •  
    aspect-oriented programming
reckoner reckoner

partiallydisassembled.net - 0 views

  • Neat script I wrote for a friend to annotate a Python script with the types observed during a run of the program
  •  
    Neat script I wrote for a friend to annotate a Python script with the types observed during a run of the program.
reckoner reckoner

Re: Python in Excel - 0 views

  • You can use Microsoft Script Control. If you have the win32 extensions of python, you can use python in place of vb in this control -open the VBA script editor - In menus/Tools/References add Microsoft Script Control -Make a new module and declare a new MsScriptControl.ScriptControl Global sc as new MsScriptControl.ScriptControl -Initialize the language attibute with python - Note that you and users of your document must have python and its win32 extensions installed. Activestate python distribustion include it. You can put sc.language="python" in the routine Workbook_Open() Now you can import python modules using ExecuteStatement method of the control in vba and have results from python functions with eval method. One interesting thing is that you can pass an object to the control with AddObject method and have python manipulate it. And so on..
  • Global sc As New MSScriptControl.ScriptControl Public Function os_getcwd() sc.Language = "python" sc.ExecuteStatement ("import os") os_getcwd = sc.Eval("os.getcwd()") End Function With this you can set your Excel formula to =os_getcwd() For me it returns "C:\Documents and Settings\Administrator\My Documents", which I needed to know at the time so I didn't have to screw around with the ever annoying pythonpath. You can put the first two lines of the function in the Workbook_Open hook, but I don't know where that is. I hope to use more Python in Excel soon. Hmm, actually, I suppose you can put those first two lines of the function after the Global declaration as well. I know just about zero VBScript and didn't get a chance to do anything else beyond proof of concept yet. I figured I would write something dynamic which allowed more transparent access to Python, maybe allowing formula like =py("os.getcwd()"), etc.
reckoner reckoner

How can I work on VIM for python code such as cscope for C code? - 0 views

  • Change to the top level directory that contains your python source files, and do find -name '*.py' > cscope.files cscope -b
  • How can I work on VIM for python code such as cscope for C code?
reckoner reckoner

TANGO Project - 0 views

  •  
    This is the Python wrapper for the solver. It calls the optimization solver (GENCAN for bound-constrainted problems and ALGENCAN for general nonlinear programming problems).
reckoner reckoner

PyReadline/Intro - IPython - 0 views

  • Install using binary installer Download installer from http://ipython.scipy.org/dist/pyreadline-1.3.win32.exe make sure no other readline is installed run installer The configuration file pyreadlineconfig.ini can be copied from Python24/lib/site-packages/pyreadline/configuration to your HOME directory (usually c:/documents and settings/YOURNAME). When using ipython pyreadline is automatically activated. If you want to use pyreadline from the interactive prompt of the python interpreter then you have to include the code in Python24/lib/site-packages/pyreadline/configuration/startup.py in your pythonstartup file or set the PYTHONSTARTUP environment variable to point to that file. Manual can be found in Python24/share/doc/pyreadline
  •  
    Need this to get ipython to work  on  python25
reckoner reckoner

PyInstaller - 0 views

  • PyInstaller is a program that converts (packages) Python programs into stand-alone executables, under Windows, Linux and Irix. Its main advantages over similar tools are that PyInstaller works with any version of Python since 1.5, it builds smaller executables thanks to transparent compression, it is multi-platform (so you can build one-file binaries also under Linux), and use the OS support to load the dynamic libraries, thus ensuring full compatibility. PyInstaller is an effort to rescue, maintain and further develop Gordon McMillan's Python Installer (now PyInstaller). Their official website is not longer available and the original package is not longer maintained. Believing that it is still far superior to py2exe, we have setup this site to continue its further development. Feel free to join us in the effort! Please consult our Roadmap to check our plans. Also usage reports are welcomed: let us know if PyInstaller works for you and how, or what problems you found in using it.
Mario Antonio Herrero Machado

tubo_tetra_0120_08 - 0 views

  •  
    fractal script python en blender.
1 - 20 of 20
Showing 20 items per page