Python Patterns & Practices

Find The Best Answers To Your Python Coding Problems



python - Giving anonymous users the same functionality as registered ones

serialization - Python - Save the context

webdav for wsgi/python?

linux - Does python have hooks into EXT3

python - Find a HAL object based on /dev node path

php - Get remote text file, process, and update database - approach and scripting language to use?

urllib2 - Downloading a web page and all of its resource files in Python

python - Uploading multiple images in Django admin

python - wxPython: Drawing a vector-based image from file

Python Tkinter Tk/Tcl usage Problem

python - How can I check Hamming Weight without converting to binary?

subprocess - When I write a python script to run Devenv with configure "Debug|Win32" it does nothing

ctypes - Python double pointer

python - Can I use Expect on Windows without installing Cygwin?

python - Django : Adding a property to the User class. Changing it at runtime and UserManager.create_user

python - How do you specify a default for a Django ForeignKey Model or AdminModel field?

python - How do I constrain the SCons Command builder to run only if its dependencies have changed?

python - subprocess module: using the call method with tempfile objects

python - Splitting a string @ once using different seps

class - Patching classes in Python

python - FastCgi crashes -- Want to catch all exceptions but how?

python - list.append or list +=?

python queue & multiprocessing queue: how they behave?

Python interpreter with Linux Screen

Python 2.6 - Upload zip file - Poster 0.4

javascript - how to remove text between <script> and </script> using python?

objective c - How do I choose which Python installation to run in a PyObjC program?

python - Use Django ORM as standalone

Dictionaries with volatile values in Python unit tests?

python - Scope, using functions in current module

php - Convert param into python?

floating - python formatting float numbers

Profiling in Python: Who called the function?

php - Can you pass a dictionary when replacing strings in Python?

How Python calculate number?

python - Importing database data into Joomla

python - call function between time intervals

python - Get a dict of all variables currently in scope and their values

directory walk - A Python walker that can ignore directories

python - How should I debug Trac plugins?

python - PyODBC and Microsoft Access: Inconsistent results from simple query

python - Context-sensitive string splitting, preserving delimiters

How to write Strategy Pattern in Python differently than example in Wikipedia?

python - wxPython SplitterWindow does not expand within a Panel

python - Writing a __init__ function to be used in django model

Unable to see Python's approximations in mathematical calculations

python - Parse JavaScript to instrument code

python - How do I link a combo box and a command button?

Unable to make a factorial function in Python

python - Keep code from running during syncdb

python - Best way to retrieve variable values from a text file?

django - Should my python web app use unicode for all strings?

python - Using virtualenv on Mac OS X

python - Recursion and return statements

python - Display row count from another table in Django

python - Capturing Implicit Signals of Interest in Django

sound lib python

Python RegEx - Getting multiple pieces of information out of a string

python - DJANGO - How do you access the current model instance from inside a form

python - Is there a way to list all the available Windows' drives?

python - How can I instantiate a comment element programatically using lxml?

How does garbage collection in Python work with class methods?

Python and PGP/encryption

python - BoundedSemaphore hangs in threads on KeyboardInterrupt

python - Unit testing for D-Bus and HAL?

python - Tab view in CSS with tables

matplotlib - Barchart (o plot) 3D in Python

Python "Event" equivalent in Java?

urllib - Python: Get HTTP headers from urllib2.urlopen call?

Disable Python return statement from printing object it returns

python - Why does "**" bind more tightly than negation?

python - Resize images in directory

python - Why is django giving error: no module named django.core?

How do I call template defs with names only known at runtime in the Python template language Mako?

HTML tags within JSON (in Python)

oop - reading a configuration information only once in Python

deployment - Problem deploying Python program (packaged with py2exe)

crontab in python

qt4 - Python taskbar applet

ssh - Why no pure Python SSH1 (version 1) client implementations?

Logout or switch user in Windows using Python

python - How to start a process on a remote server, disconnect, then later collect output?

networking - Python Library/Framework for writing P2P applications

python - Combining 2 .csv files by common column

Crunching json with python

regex - How to parse for tags with '+' in python

python - How to render contents of a tag in unicode in BeautifulSoup?

python - How to sort on number of visits in Django app?

python - Remove all files in a directory

networking - Creating connection between two computers in python

python - How can I use Django admin list and filterering in my own views?

When calling a Python script from a PHP script, temporary file that is created on a console run, is not created via the PHP invocation

python - how to use session/cookie in twisted.web?

regex - What's the most efficient way to find one of several substrings in Python?

PHP Sockets or Python, Perl, Bash Sockets?

multithreading - How do I pass an exception between threads in python

Controlling VirtualBox via COM from Python?

windows - When reading a socket in python, is there any difference between os.read and socket.recv?

timer - Run a task at specific intervals in python

python - Using Sql Server with Django in production

Python Environment Variables in Windows?

loops - Python and subprocess

How to use dict in python?

Configure pyflakes to work with Zope's "script (python)" objects on the filesystem

python - How do I remove a substring from the end of a string?

reflection - Python: changing methods and attributes at runtime

MS Access library for python

Retrieving network mask in Python

list - python - match on array return value

how to use list of python objects whose representation is unicode

python - How should I setup the Wing IDE for use with IronPython

find in files using ruby or python

python - Matching text within P tags in HTML

How to call up attributes in python 3.1 -- easy

xml - Is there an Oracle wrapper for Python that supports xmltype columns?

python - List Comprehensions and Conditions?

In Python, how do I easily generate an image file from some source data?

python - Retrieving a tuple from a collection of tuples based on a contained value

How do I convert a string 2 bytes long to an integer in python

python - Scraping Multiple html files to CSV

What are some good ways to set a path in a Multi-OS supported Python script

python - Custom Managers and "through"

python - PyQt - QLabel inheriting

python - An algorithm to generate subsets of a set satisfying certian conditions

Keeping a session in python while making HTTP requests

python - orbited comment server issue

Python Mod_WSGI Output Buffer

python - Data structure for maintaining tabular data in memory?

python - How to pull a random record using Django's ORM?

python - Auto-incrementing attribute with custom logic in SQLAlchemy

python - Changing case (upper/lower) on adding data through Django admin site

python - Creating a logging handler to connect to Oracle?

python - Which is more accurate, x**.5 or math.sqrt(x)?

python - How can I speed up update/replace operations in PostgreSQL?

gnuplot syntax error when using python

windows - Piping Batch File output to a Python script

How to use numpy with 'None' value in Python?

python - Cast a class instance to a subclass

Abstract class + mixin + multiple inheritance in python

Chat comet site using python and twisted

python - Difference between "__method__" and "method"

python - Instance methods called in a separate thread than the instantiation thread

tkinter - Pure python gui library?

java - Practical GUI toolkit?

exception handling - Catch only some runtime errors in Python

operators - Overriding "+=" in Python? (__iadd__() method)

python - Bazaar: Modify file content before commit via hook?

python - Extract domain name from a host name

setuptools - Using easy_install inside a python script?

Are there stack based variables in Python?

python - What to do after starting simple_server?

http - Python urllib2 with keep alive

python - Django equivalent of COUNT with GROUP BY

python - Python3.0 - tokenize and untokenize

python - Change/adapt date widget on admin interface

Making a plain ASCII/UTF-8 request/stream HTTP POST request in Python?

multithreading - Can a slow network cause a Python app to use *more* CPU?

python - How to automatically create postgis database for Django testing?

Accessing a PHP-set memcache key from Python

loops - How to enumerate a list of non-string objects in Python?

Python: ODBC Exception Handling

python - Implementing NSText delegate methods in PyObjc and Cocoa

sql - How do you make the Python Msqldb module use ? in stead of %s for query parameters?

python - Simple Image Metrics with PIL

python - Pygame cannot find include file "sdl.h"

python - How do I find out if a numpy array contains integers?

python - Why in the world does Tkinter break using canvas.create_image?

heap - Does Python's heapify() not play well with list comprehension and slicing?

python - How can I speed up a web-application? (Avoid rebuilding a structure.)

html - Python Web-based Bot

python: can I extend the upper bound of the range() method?

double - How do I convert a Python float to a hexadecimal string in python 2.5? Nonworking solution attached

python - Insert/Delete performance

sockets - Python's asyncore to periodically send data using a variable timeout. Is there a better way?

python - An integer is required? open()

python logarithm

python - Django: Model name clash

Importing Python modules from different working directory

Java equivalent of function mapping in Python

Changes to Python since Dive into Python

Python Generator - what not to use it for

python - Can you access a subbed-classed model from within the super-class model in the Django ORM?

pexpect - How to spawn multiple python scripts from a python program?

python - Screenshot an application, regardless of what's in front of it?

python - Getting response from bluetooth device

Unable to put a variable in Python's print

python - Is there any way to create a "project file" in Emacs?

Recursively convert python object graph to dictionary

Python - Subprocess - How to call a Piped command in Windows?

Any Python Script to Save Websites Like Firefox?

python - pygtk: How to set the height of pop-up window in gtk.EntryCompletion

python - psycopg2 on OSX: do I have to install PostgreSQL too?

module - In Python, how do you change an instantiated object after a reload?

python db connection

django - python observer pattern

python - Setting the flags field of the IP header

Testing for ImportErrors in Python

Convert integer to string in Python

latex - Sensible python source line wrapping for printout

How to find out a^b of very large numbers in python?

How can I convert a Perl regex with named groups to Python?

python - Removing the Label From Django's TextArea Widget

utf 8 - Write to UTF-8 file in Python

python - wxpython: How can I redraw something when a window is retored?

python - Identical Error Codes

python - matplotlib "DLL load failed" when import pylab

licensing - Question on importing a GPL'ed Python library in commercial code

Why is Ruby more suitable for Rails than Python?

xml.dom.minidom Document() in Python/django outputting memory location

django - python classes that refer to each other

Comparison of data in SQL through Python

python - Writing tests for Django's admin actions

java - Would one have to know the machine architecture to write code?

python - Is registered atexit handler inherited by spawned child processes?

import - How to reload a Python module that was imported in another file?

pygame - game design - handling bonuses / duck typing - python

Python module for editing text in CLI

python - Install pyCurl in ActivePython-2.6?

python - Generic Views from the object_id or the parent object

python - for statement and i.find in list

how to multiply two different array of integers in python?

python - Is &#x10; a valid character in XML?

python - how to make table partitions?

Python Regex Search And Replace

c# - Packaging script source files in IronPython and IronRuby

linux - How can I parse the output of /proc/net/dev into key:value pairs per interface using Python?

python - HTTPS log in with urllib2

python - Help me lambda-nize this

variables - Two values from one input in python?

perl - Real-time intercepting of stdout from another process in Python

python - Formatting output when writing a list to textfile

python - What is the best way to fetch/render one-to-many relationships?

gtk - Run a function every X minutes - Python

python - Random list with rules

python - Cleaning an image to only black

python - Custom Markup in Django

python - Can I use Win32 COM to replace text inside a word document?

python - Extract only numbers from data in Jython

python - Problem with printing contents of a list

python - Django ImportError at / no matter what I do

python - Platform-independent version of /var/lib and ~/.config

python - How do I use TLS with asyncore?

How do you create an incremental ID in a Python Class

keyword argument - Proper way to use **kwargs in Python

python - Handling authentication and proxy servers with httplib2

apply - Is there a way to invoke a Python function with the wrong number of arguments without invoking a TypeError?

lambda - Python create function in a loop capturing the loop variable

Would Like Open Source RSS / News Reader Code or Widget Python or Javascript

cometd - Python Comet Server

.net - Is there any good reason to convert an app written in python to c#?

python - Make my code handle in the background function calls that take a long time to finish

python - Looking for elegant glob-like DNA string expansion

python - How to create Fibonacci Sequence in Java

How can I get the order of an element attribute list using Python xml.sax?

Is os.popen really deprecated in Python 2.6?

C++ or Python as a starting point into GUI programming?

python - How to model an object with references to arbitrary number of arbitrary field types? (django orm)

javascript - Control an embedded into website flash player with Python?

algorithm - Trie (Prefix Tree) in Python

iteration - Is there a map without result in python?

Unable to have a command line parameter in Python

python - Django-like abstract database API for non-Django projects

python 3.x - PEP 302 Example: New Import Hooks

matrix - Creating lists of lists in a pythonic way

How do I store desktop application data in a cross platform way for python?

iterator - Python: StopIteration exception and list comprehensions

How to make Python check if ftp directory exists?

python - How can I capture the stdout output of a child process?

python - Is 'if element in aList' possible with Django templates?

Reallocating list in python

python - Hash method and UnicodeEncodeError

python - Generic many-to-many relationships

java - How do you extract a JAR in a UNIX filesystem with a single command and specify its target directory using the JAR command?

Python: deep appending to dictionary? - in a single expression

class - NameError using execfile in python

cpython - Preventing invoking C types from Python

python - Clipping FFT Matrix

introspection - Find functions explicitly defined in a module (python)

Stripping spaces between XML nodes with Python

Python urllib2 timeout when using Tor as proxy?

python - Do I have any obligations if I upload an egg to the CheeseShop?

active directory - SPNEGO (kerberos token generation/validation) for SSO using Python

python - Getting a dict out of a method?

python - What's the correct way to use win32inet.WinHttpGetProxyForUrl

How to empty a socket in python?

python - Finding Nth item of unsorted list without sorting the list

python - System theme icons and PyQt4

easy install - installing easy_install for Python 2.6.2 (missing?)

Writing a kernel mode profiler for processes in python

python - Make your program USE a gui

python - Sphinx templating

python - How do I grab an instance of a dynamic php script output?

python - Obtaining references to function objects on the execution stack from the frame object?

python - How does os.path map to posixpath.pyc and not os/path.py?

python - How to emulate language complement operator in .hgignore?

What does %s mean in a Python format string?

python - Check if input is a list/tuple of strings or a single string

python - How to get repository for core-plot

clipping text in python/tkinter

Python: most idiomatic way to convert None to empty string?

xpath - How to get an xpathContext from an xmlNode in python

python - Looking for Windows Text Editor which supports GIT

python - Syntax Highlight for Mako in Eclipse or TextMate?

python - Setting a timeout function in django

python - How to make these dynamically typed functions type-safe?

Python: better way to open lots of sockets

Can python mechanize handle HTTP auth?

In Python, how do I obtain the current frame?

python - Best way to programmatically create image

Can I view the doc string of a function in Python using VIM?

language features - How are these type of python decorators written?

python - Django: Converting an entire set of a Model's objects into a single dictionary

Any yahoo messenger lib for python?

solaris - Installing/configuring gdbm Python module for cvs2svn?

linux - How do I use the bash time function from python?

browser - Python fails to execute firefox webbrowser from a root executed script with privileges drop

python - using registered com object dll from .NET

Why is my bubble sort in Python so slow?

python - wxPython: Making something expand

oop - Python inheritance and calling parent class constructor

python - Incorporate custom template into the django admin interface and session

python - Unicode problems in PyObjC

python - How to lock a critical section in Django?

python - improving Boyer-Moore string search

python - PyQT: QTableWidget.setItemPrototype not working?

python - How to handle back and forward buttons in the hildon.Seekbar?

I'd like to call the Windows C++ function WinHttpGetProxyForUrl from Python - can this be done?

Unit testing for exceptions in Python constructor

Python List Question

python - Combining two JSON objects in to one

hook - How to mark a global as deprecated in Python?

Get brief human-readable info about XRI OpenID with Python?

python - Refactor this block cipher keying function

python - Is it possible to launch a Paster shell with some modules pre-imported?

Missing datetime.timedelta.to_seconds() -> float in Python?

python - Starting an INDIVIDUAL instance of a subclass from asynchat

Display triangles in 3D using Python

.net - Advanced SAX Parser in C#

python - What is the difference between converting to hex on the client end and using rawtohex?

python - How do I deactivate an egg?

python csv question

python - Per-session transactions in Django

python - wxPython menu doesn't display image

python - How can I write my own aggregate functions with sqlalchemy?

Does Python have anonymous classes?

python - storing uploaded photos and documents - filesystem vs database blob

datetime - What is the easiest way to handle dates/times in Python?

Exporting a zope folder with python

How to make urllib2 requests through Tor in Python?

python - Which process was responsible for an event signalled by inotify?

utf 8 - How to exclude U+2028 from line separators in Python when reading file?

Running JSON through Python's eval()?

python - Deploying a Web.py application with WSGI, several servers

python - bash/cygwin/$PATH: Do I really have to reboot to alter $PATH?

svn - Python package install using pip or easy_install from repos

python - Methods for modular customization of locale messages?

python - Pylons/Routes rewrite POST or GET to fancy URL

list - Pythonic way to get some rows of a matrix

python - Is it acceptable to use tricks to save programmer when putting data in your code?

python - How to make mechanize not fail with forms on this page?

python - Parsing an existing config file

SharePoint via SOAP using Python

pyqt - How would you adblock using Python?

Python and Qt - function reloading

reference - Monkeypatching a method call in Python

Play mp3 using Python, PyQt, and Phonon

Python tell when an ftp transfer sits on completion

python - Restarting a Django application running on Apache + mod_python

Override namespace in Python

python - py2exe windows service problem

parsing - Learning parser in python

django - python class attribute inheritance

python - Enumeration of combinations of N balls in A boxes?

python - Django ManyToMany Template rendering and performance issues

Python C extension: method signatures for documentation?

Retrieving all Cookies in Python

python - What is the Pythonic way to write this loop?

How to remove bad path characters in Python?

python - pymacs: General question and Installation problem

Comparing and updating array values in Python

Lengthy single line strings in Python without going over maximum line length

Pylons - use Python 2.5 or 2.6?

python - What can I attach to pylons.request in Pylons?

python - IOError "no such file or folder" even though files are present

How to use classes derived from Python's list class

command line - Handling exceptions without try block in Python's interactive shell

what next after 'dive into python'

python - Twisted sometimes throws (seemingly incomplete) 'maximum recursion depth exceeded' RuntimeError

python - SQLAlchemy: Object Mappings lost after commit?

python - Which revision of html5lib is stable?

python - Using data from django queries in the same view

formatting - Formatted output in OpenOffice/Microsoft Word with Python

python - Tkinter button bind and parent deatroy

python - where does django install in ubuntu

Write unit tests for restish in Python

Apache: VirtualHost with [PHP|Python|Ruby] support

python - KOI8-R: Having trouble translating a string

python - Scrolling QGraphicsView programmatically

python - Specifying TkInter Callbacks In Dictionary For Display Launcher Function

python - Does get_or_create() have to save right away? (Django)

What is the maximum simultaneous HTTP connections allowed on one machine (windows server 2008) using python

python - Decorators that are properties of decorated objects?

python - Windows Application Programming & wxPython

packaging - Combining module files in Python

How do you subclass the file type in Python?

python - The right way to auto filter SQLAlchemy queries?

python - mod_python caching of variables

Python to drive Emacs; pymacs doesn't work

python - Template driven feed parsing

loops - When to use "while" or "for" in Python

python - How to model one way one-to-one relationship in Django

Find module name of the originating exception in Python

python - Dump stacktraces of all active Threads

Python Cookies question

ctypes in python, problem calling a function in a DLL

linux - Running both python 2.6 and 3.1 on the same machine

Run (remote) php script from (local) python script

Using cookies with python to store searches

python - How can this be written on a single line?

python - Eliminating certain Django Session Calls

Can I send SIGINT to a Python subprocess on Windows?

using two for loops in python

file - Upload a potentially huge textfile to a plain WSGI-server in Python

python - Sort a list of strings based on regular expression match

Python Unix time doesn't work in Javascript

Using python regex to extract namespaces from C++ sources

python - Check if only one variable in a list of variables is set

How to match search strings to content in python

sockets - Improve a IRC Client in Python

Python Formatter Tool

django - Different behavior of python logging module when using mod_python

stack trace - Get __name__ of calling function's module in Python

scripting - Automatically pressing a "submit" button using python

Hello World in Python

How do you address data returned to a socket in python?

Python: finding keys with unique values in a dictionary?

python - Can I detect if my code is running on cPython or Jython?

bash - Redirecting console output to a Python string

math - 2D vector projection in Python

python - How can I parse a C header file with Perl?

python - Stuck on official Django Tutorial

regex - Finding partial strings in a list of strings - python

python - why does this code break out of loop?

iterator - Why is there no first(iterable) built-in function in Python?

Python data/file Crc

dynamic - In python, how can you unload generated classes

python - wxPython: Good way to overlay a wx.Panel on an existing wx.Panel

networking - Yahoo Chat in Python

Which is better in python, del or delattr?

windows - Moving files under python

multithreading - How to obtain a Thread id in Python?

Matrix from Python to MATLAB

python - How to strip the 8th bit in a KOI8-R encoded character?

datetime - How to specify time zone (UTC) when converting to Unix time? (Python)

python - How to recommend the next achievement

python - Django templates: adding sections conditionally

django - tools to aid in browsing/following (large) python projects' source code

python - Django file upload input validation and security

python - How do I store multiple values in a single attribute

csv - Python strings / match case

design patterns - python how to create different instances of the same class into an iteration

Programming with hardware in python

python - What's the simplest possible buildout.cfg to install Zope 2?

mysql - PYTHON: Update MULTIPLE COLUMNS with python variables

python - Problem storing Unicode character to MySQL with Django

python - How do I detect whether sys.stdout is attached to terminal or not?

python service restart (when compiled to exe)

python - Progress bar with long web requests

java - Emulator Framework

python - Transition from Python2.4 to Python2.6 on CentOS, module migration problem

foreach - Using Python to execute a command on every file in a folder

macos - Python: How to set breakpoints on mac with IDLE debugger?

python - IPython Modules

python - Join Records on Multiple Line File based on Criteria

python - Should I use Celery or Carrot for a Django project?

python - Get human readable version of file size?

functional programming - python list comprehensions; compressing a list of lists?

python - Does Jython have the GIL?

Profiling self and arguments in python?

python tab completion in windows

Is there a way to plan and diagram an architecture for dynamic scripting languages like groovy or python?

php - Does anyone know any train timetable API service?

python - How can I report the API of a class programmatically?

python - How do we precompile base templates in Cheetah so that #include, #extends and #import works properly in Weby

python - urllib.urlopen isn't working. Is there a workaround?

python - How do you do something after you render the view? (Django)

encryption/decryption of one time password in python

java - Platform for developing all things google?

Python/Django or C#/ASP.NET for web development?

inheritance - Inheriting from instance in Python

Unicode problem Django-Python-URLLIB-MySQL

python - How do you cast an instance to a derived class?

python - Resize ctypes array

matplotlib - Wavelet plot with Python libraries

list comprehension - One liner to replicate lines coming from a file (Python)

python - Elegant way to abstract multiple function calls?

Good geometry library in python?

httpserver - How to serve any file type with Python's BaseHTTPRequestHandler

regex - Find cpu-hogging plugin in multithreaded python

flash - Decompile .swf file to get images in python





top