Python Patterns & Practices

Find The Best Answers To Your Python Coding Problems



python - Jython or JRuby?

python - Handle sys.exit() in cherrypy service

python - smoothing irregularly sampled time data

python - Django Template Error : Template u'base.html' cannot be extended

Encryption with Python

How do convert unicode escape sequences to unicode characters in a python string

python+encryption: Encrypting session key using public key

python - 'Unstarring' posts using Google Reader API

excel - Using Python to replace MATLAB: how to import data?

What is the best approach for creating an agent framework in python for flexible script distribution and data collection

python - Working with django and sqlalchemy but backend mysql

multithreading - Python Global Interpreter Lock (GIL) workaround on multi-core systems using taskset on Linux?

python - Get POST data from a complex Django form?

Get first non-empty string from a list in python

Showing progress of python's XML parser when loading a huge file

python - Why does mass importing not work but importing definition individually works?

linux - virtualenv with all Python libraries

cryptography - Recommended Python cryptographic module?

windows - Bad pipe filedescriptor when reading from stdin in python

Python logging incompatibilty between 2.5 and 2.6

python - PYTHONPATH ignored

Python and if statement

python - Creating a decorator in a class with access to the (current) class itself

python - How to pickle a CookieJar?

thread local - How to put variables on the stack/context in Python

windows - Using pipes to communicate data between two anonymous python scripts

Using python scipy.weave inline with ctype variables?

Connecting C# (frontend) to an apache/php/python (backend)

macos - Python ctype for using libc.so.6 Linux and libc.dylib Mac OS X

How To Reversibly Store Password With Python On Linux?

python - Pass-through keyword arguments

python - Django: reverse function fails with an exception

Change process priority in Python, cross-platform

python - How to call a data member of the base class if it is being overwritten as a property in the derived class?

python - How to produce the i-th combination/permutation without iterating

Array division- translating from MATLAB to Python

winapi - How to do windows API calls in Python 3.1?

python - What is the correct way to document a **kwargs parameter?

python - One django installation different users per site

c# - What classes of applications or problems do you prefer Python to strictly OO Languages?

fast-ish python/jython IPC?

python - Help me understand the difference between CLOBs and BLOBs in Oracle

is it required to give path after installation MySQL db for Python 2.6

Why are there extra blank lines in my python program output?

python - Deploying Django

python - key=operator.attrgetter sort order?

Django/Python: How do i transfer a class's attributes to another via a for loop? (Form->Model Instance)

Python plugin in netbeans manually

When should I use varargs in designing a Python API?

How to code a Download/Upload Speed Monitor in PHP,Python, or Java?

Reading integers from binary file in Python

How can I pass the environment from my Python web application to a Perl program?

python - how do i filter an itertools chain() result?

recursion - Non-recursive means of printing a list in Python

How do I know which contract failed with Python's contract.py?

Weighted slope one algorithm? (porting from Python to R)

python - How to load all modules in a folder?

python - creating non-reloading dynamic webapps using Django

python - How to detect the country and city of a user accessing your site?

python - Scale an image in GTK

python - How can I make setuptools ignore subversion inventory?

python - In GTK, is there an easy way to scale all widgets by an arbitrary amount?

python - Problem getting date with Universal Feed Parser

python - Authenticated commenting in Django 1.1?

python - How do I access the request object or any other variable in a form's clean() method?

Python sys.path modification not working

python - Allowing user to configure cron

Python, Django, datetime

python - Formatting csv file data with html template

Cost of scaling Rails vs cost of scaling PHP vs Python frameworks

python - How to Redirect To Same Page on Failed Login

python - What is an efficient way of inserting thousands of records into an SQLite table using Django?

containers - Emulating membership-test in Python: delegating __contains__ to contained-object correctly

markup - Is it possible to encode (<em>asdf</em>) in python Textile?

python - How to analyze IE activity when opening a specific web page

java - How do I receive SNMP traps on OS X?

python - How would you model this database relationship?

python - Is there an API to access a Google Group data?

mysql - connecting Python 2.6.1 with MySQLdb

Why isn't Python very good for functional programming?

Writing XML from Python : Python equivalent of .NET XmlTextWriter?

python - How to split two nested lists and combine the parts to create two new nested lists

python - Django failing to find apps

Using python scripts in subversion hooks on windows

python - NameError: global name 'has_no_changeset' is not defined

python - How Do I Use A Decimal Number In A Django URL Pattern?

screen scraping - Python Scrapy , how to define a pipeline for an item?

iteration - Iterate over a string 2 (or n) characters at a time in Python

python - Cherrypy server does not accept incoming http request on MS Windows if output (stdout) is not redirected

python - increment int object

python - PostgreSQL - how to run VACUUM from code outside transaction block?

Need some help with python string / slicing operations

python - lxml retrieving odd items with cssselector

Python behavior of string in loop

c++ - Best Technology for a medical 3D Planning Software

Is there any Ruby or Python interpreter for Lego Mindstorm?

python - Preventing variable substitutions from occurring with buildout

python - To understand Typeset for PythonPath

cygwin - Python Hangs When Importing Swig Generated Wrapper

backend for python

Best way to randomize a list of strings in Python

abstract syntax tree - How can I obtain the full AST in Python?

python - Buildout recipe for a hierarchy of parts

python - What's the right way to use Unicode metadata in setup.py?

Python 2.4 plistlib on Linux

python - simple update in sqlalchemy

debugging - Easiest way to pop up interactive Python console?

reflection - Checking compatibility of two python functions (or methods)

UnicodeDecodeError when reading dictionary words file with simple Python script

python - wxPython, how do I fire events?

python - Ruby on Rails vs. Django

python - How to install django-haystack using buildout

Python cgi performance

python - Simple tray icon application using pygtk

python - Can I use pywikipedia to get just the text of a page?

python - Generate from generators

garbage collection - Python object has no referrers but still accessible via a weakref?

Random Python dictionary key, weighted by values

How can I get DNS records for a domain in python?

Special chars in Python

How do you call Python code from C code?

python - Django development add-ons

python - Django required field in model form

python - limit output from a sort method

python - Probability time series, observed data probabilities (deja vu)

python - Do I test a class that does nothing?

python - How to get the errno of an IOError?

shared libraries - Can two versions of the same library coexist in the same Python install?

python - Is it possible to go into ipython from code?

cookies - How to "keep-alive" with cookielib and httplib in python?

python - Retrieving Raw_Input from a system ran script

python - Server Logging - in Database or Logfile?

python - Problem with exiting a daemonized process

Python accessing web service protected by PKI/SSL

python - Keep ConfigParser output files sorted

python - How to call a property of the base class if this property is being overwritten in the derived class?

python - finding firefox version

windows xp - Best way to have full Python install under cygwin/XP?

syntax error - python docstrings

python - Cross-platform subprocess with hidden window

javascript - file I/O in Spidermonkey

python - django-timezones

Online Python interpreter for use *from* the iPhone?

Why can't I import this Zope component in a Python 2.4 virtualenv?

Interacting with another command line program in Python

Synthesis of general programming language (Python) with tailored language (PureData/MaxMSP/ChucK)

javascript - JSON serialization in Spidermonkey

python - How would you inherit from and override the django model classes to create a listOfStringsField?

python importing relative modules

python - How can I retrieve last x elements in Django

naming conventions - Python Notation?

python - urllib2 read to Unicode

dictionary - item frequency in a python list of dictionaries

writeline problem in python

python - Add data to Django form class using modelformset_factory

python - Are there any good online tutorials to TDD for an experienced programmer who is new to testing?

How to make a simple command-line chat in Python?

python - Passing Formatted Text Through XSLT

ipc - Python processes stops responding to SIGTERM / SIGINT after being restarted

python - how do I read everything currently in a subprocess.stdout pipe and then return?

How do I compile Python C extensions using MinGW inside a virtualenv?

How do I find out what Python libraries are installed on my Mac?

Python: Persistent shell variables in subprocess

javascript - When you write a Titanium app, is the source code visible to users?

python - Why can't IPython return records with multiple fields when submitting a query to sqlite?

Why is `self` in Python objects immutable?

python - Count lines of code in a Django Project

frame - Python database application framework and tools

Can you point me to a large Python open-source project?

Python: linking/binding variables together in a dictionary

python - Running programs w/ a GUI over a remote connection

Continuous unit testing with Pydev (Python and Eclipse)

python - win32api.dll Will Not Install

PHP equivalent to Python's yield operator

python - how to tell a variable is iterable but not a string

Running Python code from a server?

Unicode friendly alphabetic pattern for python regex?

python - Weird Problem with Classes and Optional Arguments

python - Django - last insert id

python - Django persistent database connection

pygame - Running Python code contained in a string

Browser automation: Python + Firefox using PyXPCOM

python - How to modify a NumPy.recarray using its two views

python - Adding tuples to produce a tuple with a subtotal per 'column'

python - How to use schemas in Django?

operating system - Question about paths in Python

python - models.py getting huge, what is the best way to break it up?

python - Is it possible to override the method used to call Django's admin delete confirmation page?

oop - What’s the point of inheritance in Python?

fast and easy way to template xml files in python

python - Generic object "ownership" in Django

How to extract the year from a Python datetime object?

python - Logging All Exceptions in a pyqt4 app

Interact with a Windows console application via Python

Unable to make a MySQL database of SO questions by Python

python - redirect browser in SimpleHTTPServer.py?

python - bug in "django-admin.py makemessages" or xgettext call? -> "warning: unterminated string"

emacs - How do you get Python documentation in Texinfo Info format?

syntax - Python error when running script - "IndentationError: unindent does not match any outer indentation"

python - Traversing foreign key related tables in django templates

encryption - How to do PGP in Python (generate keys, encrypt/decrypt)

python - Alternatives to using pack_into() when manipulating a list of bytes?

Python Math Library Independent of C Math Library and Platform Independent?

python - How can I find path to given file?

python - How do I do cross-project refactorings with ropemacs?

Consuming Python COM Server from .NET

Self Referencing Class Definition in python

python - Django serialization of inherited model

python - Regex for keyboard mashing

python - Django official tutorial for the absolute beginner, absolutely failed!

python - What is the best practice in deploying application on Windows?

python - Change current process environment's LD_LIBRARY_PATH

file io - Writing with Python's built-in .csv module

How to use a custom site-package using pth-files for Python 2.6?

compound sorting in python

python - Why is there module search path instead of typing the directory name + typing the file name?

Socket? python -m SimpleHTTPServer

python - Easy way to implement dynamic views?

python - Modifying Collection when using a foreach loop in c#

string - Decoding double encoded utf8 in Python

web applications - Storing files for testbin/pastebin in Python

keyboard - How can you read keystrokes when the python program isn't in the foreground?

python - Must a secure cryptographic signature reside outside of the file it refers to?

events - "select" on multiple Python multiprocessing Queues?

Python- about file-handle limits on OS

c++ - Graduation Project

python - Getting callable object from the frame

python - How to do scheduled sending of email with django-mailer

python - why __builtins__ is both module and dict

django - How frequently should Python decorators be used?

python - Drawing braces with Pyx

python - Permalinks with Russian/Cyrillic news articles

Python file read problem

python - Speeding up GTK tree view

python - formencode invalid return type

Python equivalent of Jstack?

python - Stopping a Long-Running Subprocess

python - OpenSocial Win32 compatibility

python - How do I add items to a gtk.ComboBox created through glade at runtime?

printing bit representation of numbers in python

Python: question about parsing human-readable text

python - Return files only from specific folder

python - Chain FormEncode Validators

python - wxPython: Handling events in a widget that is inside a notebook

gnupg - Python Pyme: Simple decryption without user interaction

c++ - Python Properties & Swig

string - Simple python / Beautiful Soup type question

python - Eliminating multiple inheritance

database - Using ADODBAPI-Python

With Python unittest, how do I create and use a "callable object that returns a test suite"?

python - Updated (current) recommendation on Rails versus Django?

python - Adding a field to a structured numpy array

python - Using the same decorator (with arguments) with functions and methods

python - Are Generators Threadsafe?

Unbuffered read from process using subprocess in Python

python - IO completion port key confusion

python - Django and File Permissions: Best Practices?

Is there any way to format a complete python buffer in emacs with a key press?

Is it possible to fetch a https page via an authenticating proxy with urllib2 in Python 2.5?

matrix - Very large matrices using Python and NumPy

How to set proxy in Windows with Python?

python - Why print statement is not pythonic?

eclipse - Python Strongly type lists

python - How to filter files (with known type) from os.walk?

Python: Zope's BTree OOSet, IISet, etc... Effective for this requirement?

How do I check if a process is alive in Python on Linux?

python - Does clause preventing exposure of PyQt in an application's script API close loophole in license?

How to identify the currently available wireless networks with Python in Windows?

Web service: PHP or Ruby on Rails or Python?

Changing python interpreter windows

python - Is it possible to pass a variable out of a pdb session into the original interactive session?

python - Any efficient way to read datas from large binary file?

python - How to generate pdf with epydoc?

performance - Is it better to use an exception or a return code in Python?

syntax - What does `@` mean in Python?

Is there something like Python's 'with' in C#?

Java Wrapper to Perl/Python code

python - django documentation locally setting up

apache - Python/mod_wsgi server global data

apache commons - Python equivalent of PropertyUtilsBean

To SHA512-hash a password in MySQL database by Python

python - 'datetime.time' has no 'mktime'

python - Alternative to the `match = re.match(); if match: ...` idiom?

python - Regex and a sequences of patterns?

python - How do I link relative to a Pylons application root?

voip - Python SIP library

Python iterators – how to dynamically assign self.next within a new style class?

download - python script for downloading all Ctrl+Alt+Del webcomics?

sqlite - Cannot insert data into an sqlite3 database using Python

configuration - Where to store secret keys and password in Python

python - Modeling a complex relationship in Django

How to use .pem file with Python M2Crypto

Python Printing StdOut As It Received

optimization - how fast is python's slice

html - Pure Python Tidy-like application/library

python - Sending an exception on the SimpleXMLRPCServer

How can I perform a ping or traceroute in python, accessing the output as it is produced?

python - Check if an element exists

python - How can I display updating output of a slow script using Pylons?

python scooping and recursion

django - Python dictionary/list help

python - Django - String to Date - Date to UNIX Timestamp

python - List of installed fonts OS X / C

python - Where and how is django Model objects attribute defined?

django - Iterative find/replace from a list of tuples in Python

Should I Start With Python 3.0?

import - Importing files in Python from __init__.py

trac - Python Win32 Extensions not Available?

python - pylint false positive for superclass __init__

Alice vs Python for someone with zero experience

List Comprehensions in Python : efficient selection in a list

decorator - Python lazy attributes that don't eval on hasattr()

How can I perform a ping or traceroute using native python?

python - Dropping the Unicode markers in Html output

Comparing dissimilar types in python

.net - How to get lxml working under IronPython?

python - How can I launch a background process in Pylons?

Safety of Python 'eval' For List Deserialization

multithreading - Opening a wx.Frame in Python via a new thread

python - Screen Scrape Form Results

python - Where to put message queue consumer in Django?

XML Parsing in Python using document builder factory

numpy - Python interpolation

Python: Multicore processing?

recursion - Python classes for simple GTD app

wxpython - Python wx (Python Card) logging subprocess output to window

Is there a way to modify a class in a class method in Python?

Unicode utf-8/utf-16 encoding in Python

python - Where can i get technical information on how the internals of Django works?

Import python package from local directory into interpreter

python - Which events can be bound to a Tkinter Frame?

Is there a good html parser like HtmlAgilityPack (.NET) for Python?

variables - How to read/copy ctype pointers into python class?

python - Writing a Template Tag in Django

python - cx_Oracle MemoryError when reading lob

python - os.path.basename works with URLs, why?

python - How To Clone/Mutate A Model In Django Without Subclassing

Python base 36 encoding

python - Django CharField limitations

Convert list of floats into buffer in Python?

python - signals or triggers in SQLAlchemy

python - How to efficiently calculate a running standard deviation

Perl equivalent of (Python-) list comprehension

Controlling mouse with Python

controls - How do I capture SIGINT in Python?

To calculate the sum of numbers in a list by Python

Convolution of two functions in Python

python - Cython and numpy speed

Practical point of view: Why would I want to use Python with C++?

python - django comments: how to prevent form errors from redirecting the user to the preview page?

optparse - Parsing empty options in Python

python - importing modules with submodules from deep in a library

python - dynamic plotting in wxpython

What are the different possible values for __name__ in a Python script, and what do they mean?

python - Why does Django post_save signal give me pre_save data?

forms - Using Python Mechanize like "Tamper Data"

php - emulating LiveHTTPheader in server side script or javascript?

Find unique elements in tuples in a python list

python - What would you call a non-persistent data structure that allows persistent operations?

server side - How do I use Python serverside with shared hosting?

Accessing Clipboard in Python version 3.1

python - Why isn't Django returning a datetime field from the database?

weak references - Python weakref callbacks and __del__ execution order

What is a basic example of single inheritance using the super() keyword in Python?

python - Filter a list to only leave objects that occur once

Executing a MySQL query on command line via os.system in Python

python - How to distribute and execute platform-specific unit tests?

combine javascript files at deployment in python

file - Problem with Twisted python - sending binary data

Replace URL with a link using regex in python

Django (?) really slow with large datasets after doing some python profiling

python - What are quines? Any specific purpose to have them?

python - need to put a nested Dict into a text file

How can you check if a key is currently pressed using Tkinter in Python?

python - Using Storm: ImportError: No module named local

python - using pyunit on a network thread

python - Globally-scoped variable: can its value change before it is picked up by the thread?

python - Why is BeautifulSoup throwing this HTMLParseError?

c# - Retrieving the return value of a Python script

python - Is it really OK to do object closeing/disposing in __del__?

python - Wxpython: Positioning a menu under a toolbar button

python - Spoofing the origination IP address of an HTTP request

returning a value to a c# program through python script

python - How to avoid html-escaping in evoque

java - Randomness in Jython

file - Whats the best way of putting tabular data into python?

charts - Barchart with vertical labels in python/matplotlib

Is there anything like HTTP::Recorder for Python?

python - Composite pattern for GTD app

interactive - How can I check to see if a Python script was started interactively?

python - Problem with hash function: hash(1) == hash(1.0)

python namespace hierarchy above object

mysql - Creating Date Intervals in Python

python - one liner for conditionally replacing dictionary values

python - How to scale matplotlib subplot heights individually

installed module on python editor

unit testing - Does Python unittest report errors immediately?

python - Problem loading a specific website through Qt Webkit

AJAX upload in Python (WSGI) without Flash/Silverlight, with progress bar

range - Python: Mapping from intervals to values

python - @staticmethod gives SyntaxError: invalid syntax

php - Python Server Pages Implementations

Interactive python

python - django auto entry generation

python - Double Iteration in List Comprehension

Python - Use a Regex to Filter Data

mysql - Python error: int argument required

licensing - Is there a non-GPL Python Library for reading ID3 information from an mp3?

Need to get the rest of an iterator in python

python - How to build an Ecommerce Shopping Cart in Django?

python - Using subprocess.Popen for Process with Large Output

python - How to make authkit session cookie HttpOnly in pylons?

datetime - Get time zone information of the system in Python?

multithreading - Debugging multi-threaded Python with Wing IDE

python - django one to many issue at the admin panel

python sqlalchemy performance?

python - Soaplib functions with default arguments

subprocess - Python Popen difficulties: File not found

python - "Watching" program being processed line-by-line?

python - Piping output of subprocess.call to progress bar

Python subprocess question

Python Graphing Utility for GUI with Animations

python - how can I grab video from usb video capture + dvb device with gstreamer?

python - can someone help me understand this short .py

python - Storing data and searching by metadata?

python - How to set LANG variable in Windows?

python - Why does Django's signal handling use weak references for callbacks by default?

python - How can I check for a blank image in Qt or PyQt?

Connecting to APNS for iPhone Using Python

Python GTK Drag and Drop - Get URL

python - Does one often use libraries outside the standard ones?

regex - Tokenizing blocks of code in Python

python - Activate a virtualenv via fabric as deploy user

mod wsgi - Stackless python stopped mod_python/apache from working

python - Substitutions inside links in reST / Sphinx

Python ftplib - uploading multiple files?

python - URLconfs in Django

python - Performance of list(...).insert(...)

string - Static vs instance methods of str in Python

windows - Python get wrong value for os.environ["ProgramFiles"] on 64bit vista

python - Workarounds when a string is too long for a .join. OverflowError occurs

What is a good configuration file library for c thats not xml (preferably has python bindings)?

php - Entity Framwework-like ORM NOT for .NET

python - Django-admin : How to display link to object info page instead of edit form , in records change list?

Best way to sort 1M records in Python

python - How can I tell if my script is being run from a cronjob or from the command line?

java and python equivalent of php's foreach($array as $key => $value)

function - Python Data Descriptor With Pass-through __set__ command

Python Matplotlib hangs when asked to plot a second chart (after closing first chart window)

multithreading - multiprocess or threading in python?

python - What is the most efficient way to store a list in the Django models?

python - Recursive generation + filtering. Better non-recursive?

python - django - circular import problem when executing a command

bash - A python based PowerShell?

python - How to solve this complex recursive problem, pyramid point system

python - Django ManyToMany relation add() error

python - Accessing data files before and after distutils/setuptools

python - What does keyword CONSTRAINT do in this CREATE TABLE statement

python - swfupload failing in my django runserver

python - Comparison of the multiprocessing module and pyro?

timer - Python clock function on FreeBSD

Expat parsing in python 3

python - Programmatically change font color of text in PDF

How do I do database transactions with psycopg2/python db api?

multithreading - Terminate long running python threads

How to control Webpage dialog with python

pipe - Python - capture Popen stdout AND display on console?

python singleton into multiprocessing

python - Trying to understand Django's sorl-thumbnail

In python when passing arguments what does ** before an argument do?

python - How to get the biggest numbers out from huge amount of numbers?

python - Overriding inherited behavior

Checking email with Python

python - How are nested dictionaries handled by DictWriter?

python - What's a good way to render outlined fonts?

Suggestions for python assert function

Segment a list in Python

python - Multiprocessing Debugging error

python - Getting list of pixel values from PIL

python - How to increase connection pool size for Twisted?

exception - exit failed script run (python)

user interface - Using Python to read the screen and controlling keyboard/mouse on OSX

list - python's sum() and non-integer values

python - Need to make multiple files from a single excel file

linux - aap - python trouble

Change Flash source by Python

Python: encryption as means to prevent data tampering

development environment - switch versions of python

python - Explain socket buffers please

ruby - Python string templater

python - Separation of ORM and validation

python - Whats the best way to duplicate data in a django template?

Python: How to import part of a namespace

python - How can I profile a SQLAlchemy powered application?

python - Handling both SSL and non-SSL connections when inheriting from httplib.HTTP(s)Connection

python - Issues with inspect.py when used inside Jython

python - Fit algorithm does not accept my data

python - In erlang: How do I expand wxNotebook in a panel?

python - Flexible 'em' style Fonts with wxPython

Calculating a SHA hash with a string + secret key in python





top