Skip to main content

Home/ Groups/ Python Programming
2More

Notes on using Vim with Python - 0 views

    • chao wang
       
  •  
    aracter instead of spaces because it makes it easier when pressing BACKSPACE or DELETE, since if the indent is using spaces it will take 4 keystrokes to delete the indent. Using this setting, however, makes VIM see multiple space characters as tabstops, and so does the right thing and will delete four spaces (assuming 4 is your setting).
1More

tinypy :: home - 0 views

  • tinypy is a minimalist implementation of python in 64k of code
1More

google-chartwrapper - Google Code - 0 views

  • Easily create Google charts using python syntax and datasets. Python wrapper for the Google Chart API. The wrapper can render the URL of the Google chart, based on your parameters, or it can render an HTML img tag to insert into webpages on the fly. Made for dynamic python websites (Django,Zope,CGI,etc.) that need on the fly chart generation without any extra modules. The wrapper SHOULD also work with Eastwood the Google Chart API workalike. G = GChart('p3', [5,10])
1More

simple? embedding question - Object Mix - 0 views

  • PyObject *mainmod = PyImport_AddModule("__main__"); PyObject *foo = PyImport_ImportModule("foo"); Py_INCREF(foo); //Increment foo module since PyModule_AddObject() steals reference PyModule_AddObject(mainmod, "foo", foo);
1More

Amazon.com: The Definitive Guide to Django: Web Development Done Right: Adrian Holovaty... - 0 views

  • The Definitive Guide to Django: Web Development Done Right (Paperback)
1More

PyGUI - 0 views

  • This is a project to develop a cross-platform pythonic GUI API.  The goals of this project are:
1More

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
2More

pyspec - Release: PySpec 0.51 - 0 views

  • This is first version at CodePlex. PySpec is BDD framework for python. It includes following items PySpec for CUIPySpec for wxPython(little buggy)Any documents(tutorial, reference)
  •  
    behavioral programming python framework
1More

Basic Threading in Python - Open Source Web Development Tutorials - 0 views

  • You can "turn an ordinary function into a thread" using the Thread class: just pass the function as the value for the `target' argument: import threading threading.Thread(target=your_function).start()
1More

vimpdb - Google Code - 0 views

  • Tired of debugging Python using print statements? Don't like the cumbersome PDB (Python debugger) console? Prefer using Vim for coding your Python programs? VimPdb is the solution - allows debugging Python in an IDE-fashion, right within the Vim editor.
1More

Cross platform way of finding number of processors on a machine? - comp.lang.python | G... - 0 views

  • > Is there a way to find the number of processors on a machine (on linux/ > windows/macos/cygwin) using python code (using the same code/cross > platform code)? From processing <http://cheeseshop.python.org/pypi/processing/0.34> : def cpuCount():     '''     Returns the number of CPUs in the system     '''     if sys.platform == 'win32':         try:             num = int(os.environ['NUMBER_OF_PROCESSORS'])         except (ValueError, KeyError):             pass     elif sys.platform == 'darwin':         try:             num = int(os.popen('sysctl -n hw.ncpu').read())         except ValueError:             pass     else:         try:             num = os.sysconf('SC_NPROCESSORS_ONLN')         except (ValueError, OSError, AttributeError):             pass     if num >= 1:         return num     else:         raise NotImplementedError --
1More

Parallelization on muli-CPU hardware? - comp.lang.python | Google Groups - 0 views

  •  > According to the fact that all Thread run on the same CPU (if i didn't  > understand wrong), i'm asking if python will suffer from the future  > multicore CPU. Will not python use only one core, then a half or a  > quarter of CPU ? It could be a serious problem for the future of python... I agree that it could potentially be a serious hindrance for cpython if "multiple core" CPUs become commonplace. This is in contrast to jython and ironpython, both of which support multiple-cpu parallelism. Although I completely accept the usual arguments offered in defense of the GIL, i.e. that it isn't a problem in the great majority of use cases, I think that position will become more difficult to defend as desktop CPUs sprout more and more execution pipelines. I think that this also fits in with AM Kuchling's recent musing/thesis/prediction that the existing cpython VM may no longer be in use in 5 years, and that it may be superceded by python "interpreters" running on top of other VMs, namely the JVM, the CLR, Smalltalk VM, Parrot, etc, etc, etc. http://www.amk.ca/diary/archives/cat_python.html#003382 I too agree with Andrew's basic position: the Python language needs a period of library consolidation. There is so much duplication of functionality out there, with the situation only getting worse as people re-invent the wheel yet again using newer features such generators, gen-exps and decorators.
2More

Rutherfurd.net: SendKeys - 0 views

  • SendKeys SendKeys(keys, pause = 0.05, with_spaces = False, with_tabs = False, with_newlines = False, turn_off_numlock = True) Parameters keys : str A string of keys. pause : float The number of seconds to wait between sending each key or key combination. with_spaces : bool Whether to treat spaces as {SPACE}. If False, spaces are ignored. with_tabs : bool Whether to treat tabs as {TAB}. If False, tabs are ignored. with_newlines : bool Whether to treat newlines as {ENTER}. If False, newlines are ignored. turn_off_numlock : bool Whether to turn off NUMLOCK before sending keys.
  • Key Code BACKSPACE {BACKSPACE}, {BS}, or {BKSP} BREAK {BREAK} CAPS LOCK {CAPSLOCK} or {CAP} DEL or DELETE {DELETE} or {DEL} DOWN ARROW {DOWN} END {END} ENTER {ENTER} or ~ ESC {ESC} HELP {HELP} HOME {HOME} INS or INSERT {INSERT} or {INS} LEFT ARROW {LEFT} NUM LOCK {NUMLOCK} PAGE DOWN {PGDN} PAGE UP {PGUP} PRINT SCREEN {PRTSC} RIGHT ARROW {RIGHT} SCROLL LOCK {SCROLLLOCK} SPACE BAR {PACE} TAB {TAB} UP ARROW {UP} F1 {F1} F2 {F2} F3 {F3} F4 {F4} F5 {F5} F6 {F6} F7 {F7} F8 {F8} F9 {F9} F10 {F10} F11 {F11} F12 {F12} F13 {F13} F14 {F14} F15 {F15} F16 {F16} F17 {F17} F18 {F18} F19 {F19} F20 {F20} F21 {F21} F22 {F22} F23 {F23} F24 {F24} Keypad add {ADD} Keypad subtract {SUBTRACT} Keypad multiply {MULTIPLY} Keypad divide {DIVIDE} Left Windows(R) {LWIN} Right Windows(R) {RWIN}
1More

ONLamp.com -- Introduction to Stackless Python - 0 views

  • What's the relation between these benefits and Stackless's implementation details? Here's a quick sketch: Continuations are the general-purpose concurrency construct. A continuation represents all the future computations of a particular program. Capturing all this control flow in a single conceptual object makes it programmable: It becomes possible to calculate or reason over the control flow. In particular, there's great scope for optimizing assignment of different calculations to different processes or threads or even hosts.
1More

Charming Python: Using state machines - 0 views

  • Charming Python: Using state machinesAlgorithms and programming approaches in Python
1More

Charming Python: SimPy simplifies complex models - 0 views

  • Charming Python: SimPy simplifies complex models
1More

Charming Python: Inside Python's implementations - 0 views

  • To attempt to explain it in the simplest terms, a continuation is a representation, at a particular point in a program, of everything the program is capable of doing subsequently. A continuation is a potential that depends on initial conditions. Rather than loop in a traditional way, it is possible to invoke the same continuation recursively with different initial conditions. One broad claim I have read is that continuations, in a theoretical sense, are more fundamental and underlie every other control structure. Don't worry if these ideas cause your brain to melt; that is a normal reaction.
1More

ONLamp.com -- Introduction to Stackless Python - 0 views

  • Stackless Python is an alternative implementation of Python created by independent developer Christian Tismer. He started with the conventional Python language processor managed by the language's inventor, Guido van Rossum, and patched his own Stackless invention in place of a small but central part of Python's internals. Stackless Python is the result. This article introduces Tismer's technology and its significance. In future articles, you'll be able to read about how to make your own start at programming Stackless Python, as well as the prospects for a merger between Stackless and the main Python distribution.
2More

non-interactive ipython for script - 0 views

  • Note that it's more rebust to run methods on the public IPython api.I.e. do ip = ipshell.api and then ip.magic('px import os')You can explore the api interactively by playing with _ip object.
  •  
    noninteractive ipython for regular python script
1More

Huffman coding in Python - Program - Python - Builder AU - 0 views

  • In our last article on compression we showed you how to demonstrate run time encoding in Python. In this article we'll show you how to implement another kind of compression, Huffman encoding, which is useful when dealing with small sets of items, such as character strings.
« First ‹ Previous 41 - 60 Next › Last »
Showing 20 items per page