¡@

Home 

python Programming Glossary: notes

Python metaclasses: Why isn't __setattr__ called for attributes set during class definition?

http://stackoverflow.com/questions/10762088/python-metaclasses-why-isnt-setattr-called-for-attributes-set-during-class

ValueError Key 'a' already exists in SingleAssignDict Some notes __prepare__ has to be a classmethod or staticmethod because..

Using property() on classmethods

http://stackoverflow.com/questions/128573/using-property-on-classmethods

improve this question Reading the Python 2.2 release notes I find the following. The get method of a property won't be..

Installing PIL (Python Imaging Library) in Win7 64 bits, Python 2.6.4

http://stackoverflow.com/questions/2088304/installing-pil-python-imaging-library-in-win7-64-bits-python-2-6-4

itself you'll need to build many dependencies. See these notes from the mailing list too. There's an unofficial precompiled..

Getting “Error loading MySQLdb module: No module named MySQLdb” - have tried previously posted solutions

http://stackoverflow.com/questions/2952187/getting-error-loading-mysqldb-module-no-module-named-mysqldb-have-tried-pre

use that system e.g. sudo apt get install ... Below Soli notes that if you receive the following error EnvironmentError mysql_config..

Passing variable urlname to url tag in django template

http://stackoverflow.com/questions/3057318/passing-variable-urlname-to-url-tag-in-django-template

load url from future According to the Django 1.3 release notes ...in Django 1.5 the old behavior will be replaced with the..

MANIFEST.in ignored on “python setup.py install” - no data files installed?

http://stackoverflow.com/questions/3596979/manifest-in-ignored-on-python-setup-py-install-no-data-files-installed

install distutils share improve this question Some notes in addition to Ned's answer which hits on the core problem Distutils..

Python pyc files (main file not compiled?)

http://stackoverflow.com/questions/3878479/python-pyc-files-main-file-not-compiled

modules.html#compiled python files Edit To include notes references From PEP 3147 on Byte code compilation CPython compiles..

Flattening a shallow list in Python

http://stackoverflow.com/questions/406121/flattening-a-shallow-list-in-python

for mi in h.get_image_menu And as @cdleary notes it's probably better style to avoid operator magic by using..

what language to program a site with?

http://stackoverflow.com/questions/441586/what-language-to-program-a-site-with

it would need to do would be alike watch people send notes upload tag access my sql etc . I am sure i will use a lot of..

Python: List to Dictionary

http://stackoverflow.com/questions/4576115/python-list-to-dictionary

probably the most Pythonic in Python 3 although as EOL notes in a comment zip is already lazy in Python 3 so you don't need..

In Python, is read() , or readlines() faster?

http://stackoverflow.com/questions/5076024/in-python-is-read-or-readlines-faster

to add I just checked back through some Python release notes. Python 2.5 said It ™s now illegal to mix iterating over a file..

python: can executable zip files include data files?

http://stackoverflow.com/questions/5355694/python-can-executable-zip-files-include-data-files

I also would like to bundle a copyright notice release notes etc so that the entire app and its data files is in a single..

Is it possible to specify your own distance function using Scikits.Learn K-Means Clustering?

http://stackoverflow.com/questions/5529625/is-it-possible-to-specify-your-own-distance-function-using-scikits-learn-k-means

time t0 1000 # also ~ py np kmeans test kmeans.py Some notes added 26mar 2012 1 for cosine distance first normalize all the..

How to convert an integer to the shortest url-safe string in Python?

http://stackoverflow.com/questions/561486/how-to-convert-an-integer-to-the-shortest-url-safe-string-in-python

num_encode 64 'BA' num_encode 64 5 1 ' _____' A few side notes You could marginally increase the human readibility of the base..

What's the difference between list and tuples in Python?

http://stackoverflow.com/questions/626759/whats-the-difference-between-list-and-tuples-in-python

You can then use this as a key in a dictionary to store notes on locations. A list on the other hand could be used to store..

OCR for sheet music

http://stackoverflow.com/questions/675077/ocr-for-sheet-music

PIL and Python would be fine for simple proof of concept O notes R. My question is Has anyone got any dont do it with PIL use..

Customize/remove Django select box blank option

http://stackoverflow.com/questions/739260/customize-remove-django-select-box-blank-option

working with an auto generated ModelForm. EDIT As jlpp notes in his answer this isn't complete you have to re assign the..

What's the difference between `globals()`, `locals()`, and `vars()`?

http://stackoverflow.com/questions/7969949/whats-the-difference-between-globals-locals-and-vars

test print d NameError global name 'd' is not defined Two notes This behavior is CPython specific other Pythons may allow the..

Python try-else

http://stackoverflow.com/questions/855759/python-try-else

I've never found a need. However Handling Exceptions notes The use of the else clause is better than adding additional..

Python multiprocessing pickling error

http://stackoverflow.com/questions/8804830/python-multiprocessing-pickling-error

python things work out well. I looked up some previous notes on this problem. They were all caused by using pool to call..

can I use expect on windows without installing cygwin?

http://stackoverflow.com/questions/1042778/can-i-use-expect-on-windows-without-installing-cygwin

improve this question There is WExpect for Python . Notes in the wexpect.py file typos unchanged and highlighting added..

Iterating through a range of dates in Python

http://stackoverflow.com/questions/1060279/iterating-through-a-range-of-dates-in-python

if d end_date print strftime Y m d single_date.timetuple Notes I'm not actually using this to print. That's just for demo purposes...

Tips on upgrading to python 3.0?

http://stackoverflow.com/questions/1072028/tips-on-upgrading-to-python-3-0

Wiki about porting applications to Python 3.x The Release Notes for python 3.0 contains a section about porting. I'm quoting..

Clean way to get near-LIFO behavior from multiprocessing.Queue? (or even just *not* near-FIFO)

http://stackoverflow.com/questions/12042575/clean-way-to-get-near-lifo-behavior-from-multiprocessing-queue-or-even-just-n

but I got lost in the rabbit hole trying to find it. Notes I believe multiprocessing.Queue does not guarantee order . Fine...

log syntax errors and uncaught exceptions for a python subprocess and print them to the terminal

http://stackoverflow.com/questions/12508752/log-syntax-errors-and-uncaught-exceptions-for-a-python-subprocess-and-print-them

over the files that are being run using my error logger. Notes I am fairly restricted on the machines that this code will run..

Save list of DataFrames to multisheet Excel spreadsheet

http://stackoverflow.com/questions/14225676/save-list-of-dataframes-to-multisheet-excel-spreadsheet

into one Excel spreadsheet The docs for to_excel state Notes If passing an existing ExcelWriter object then the sheet will..

Python regex - r prefix

http://stackoverflow.com/questions/2241600/python-regex-r-prefix

recognized escape sequences are Escape Sequence Meaning Notes newline Ignored Backslash ' Single quote ' Double quote a ASCII..

Using one Scrapy spider for several websites

http://stackoverflow.com/questions/2396529/using-one-scrapy-spider-for-several-websites

self.regexes regexes def parse self response ... Notes You can extend CrawlSpider too if you want to take advantage..

Why is '\x' invalid in Python?

http://stackoverflow.com/questions/2704654/why-is-x-invalid-in-python

meanings in the documentation . Escape Sequence Meaning Notes xhh Character with hex value hh 4 5 Notes 4. Unlike in Standard.. Meaning Notes xhh Character with hex value hh 4 5 Notes 4. Unlike in Standard C exactly two hex digits are required...

Parsing files (ics/ icalendar) using Python

http://stackoverflow.com/questions/3408097/parsing-files-ics-icalendar-using-python

8 VERSION 2.0 PRODID Lotus Development Corporation NONSGML Notes 8.0 EN METHOD PUBLISH BEGIN VTIMEZONE TZID India BEGIN STANDARD.. nDr. Ferri n UID 12D3901F0AD9E83E65257743001F2C9A Lotus_Notes_Generated X LOTUS UPDATE SEQ 1 X LOTUS UPDATE WISL S 1 L 1 B.. 8778 92050462 UID 07F96A3F1C9547366525775000203D96 Lotus_Notes_Generated X LOTUS UPDATE SEQ 1 X LOTUS UPDATE WISL S 1 L 1 B..

Regex that only matches text that's not part of HTML markup? (python)

http://stackoverflow.com/questions/401726/regex-that-only-matches-text-thats-not-part-of-html-markup-python

outputstr output mxry hxd x b class foo little lxxmx b Notes The ^ pattern to match HTML tags is obviously flawed I wrote..

Installing Python 3.0 on Cygwin

http://stackoverflow.com/questions/440547/installing-python-3-0-on-cygwin

to install Python 3.0 alongside Python 2.x using Cygwin Notes I already have a working copy of Cygwin and Python 2.x is installed..

Python import coding style

http://stackoverflow.com/questions/477096/python-import-coding-style

the code extremely difficult to refactor or repackage. Notes On Performance Because of the way python caches modules there..

Python in Xcode 4 or Xcode 5

http://stackoverflow.com/questions/5276967/python-in-xcode-4-or-xcode-5

Building or simply use the keyboard shortcut ^ ˜R . Other Notes To change the text encoding line endings and or indentation..

Django: multiple models in one template using forms

http://stackoverflow.com/questions/569468/django-multiple-models-in-one-template-using-forms

one page. Tickets belong to a Customer via a ForeignKey. Notes belong to Tickets via a ForeignKey as well. I'd like to have..

Understanding python imports

http://stackoverflow.com/questions/900591/understanding-python-imports

Django and Python. I can't make sense of this. Example Notes 'helloworld' is the name of my project. It has 1 app called..

scipy.optimize.leastsq with bound constraints

http://stackoverflow.com/questions/9878558/scipy-optimize-leastsq-with-bound-constraints

doc scipy reference generated scipy.optimize.leastsq.html Notes The bounds may not be met if boundsweight is too small check..

Error: AttributeError: Transaction instance has no attribute 'trans_handle'

http://stackoverflow.com/questions/12781696/error-attributeerror-transaction-instance-has-no-attribute-trans-handle

VARCHAR 15 COUNTRY REGION VARCHAR 50 WEB SITE VARCHAR 25 NOTES BLOB SUB_TYPE 1 INCLUDING BLOB s1 'create ascending index IDX_CLIENTS_CITY.. VARCHAR 15 COUNTRY REGION VARCHAR 50 WEB SITE VARCHAR 25 NOTES BLOB SUB_TYPE 1 INCLUDING BLOB CONSTRAINT PK_CLIENTS_ID PRIMARY..

Connection error to Access database

http://stackoverflow.com/questions/12800101/connection-error-to-access-database

VARCHAR 15 COUNTRY REGION VARCHAR 50 WEB SITE VARCHAR 25 NOTES BLOB SUB_TYPE 1 INCLUDING BLOB CONSTRAINT PK_CLIENTS_ID PRIMARY..

matplotlib wont draw python3

http://stackoverflow.com/questions/12948446/matplotlib-wont-draw-python3

and error thing and update my question as I go. Thanks NOTES on stuff I'm trying For TkAgg since tkinter imports correctly..

What is the difference between AF_INET and PF_INET constants?

http://stackoverflow.com/questions/2549461/what-is-the-difference-between-af-inet-and-pf-inet-constants

other AF_ constants for the domain parameter. Also at the NOTES section of the same manpage we can read The manifest constants..

Python's underlying hash data structure for dictionaries

http://stackoverflow.com/questions/4279358/pythons-underlying-hash-data-structure-for-dictionaries

are not recomputed when the dictionary is resized. The NOTES ON OPTIMIZING DICTIONARIES are worth reading too. So if your..

How can I check the data transfer on a network interface in python?

http://stackoverflow.com/questions/7731411/how-can-i-check-the-data-transfer-on-a-network-interface-in-python

self oid 'ifName' self._index self.bulkwalk oid oid END NOTES SNMP v2c uses clear text authentication. If you are worried..