Python Tips - yszheda/wiki GitHub Wiki
-
http://python.net/~goodger/projects/pycon/2007/idiomatic/presentation.html
-
https://pythonconquerstheuniverse.wordpress.com/2011/08/29/lambda_tutorial/
-
http://stackoverflow.com/questions/511204/how-to-print-a-string-without-including-n-in-python
-
http://stackoverflow.com/questions/2058925/how-can-i-break-up-this-long-line-in-python
-
http://stackoverflow.com/questions/5982206/how-to-print-a-linebreak-in-a-python-function
-
http://stackoverflow.com/questions/19457227/how-to-print-like-printf-in-python3
-
http://stackoverflow.com/questions/13807748/when-to-use-utf8-as-a-header-in-py-files
-
http://stackoverflow.com/questions/12867140/python-mysqldb-get-the-result-of-fetchall-in-a-list
-
http://stackoverflow.com/questions/3170211/why-declare-unicode-by-string-in-python
-
http://stackoverflow.com/questions/13807748/when-to-use-utf8-as-a-header-in-py-files
-
http://stackoverflow.com/questions/511204/how-to-print-a-string-without-including-n-in-python
-
http://stackoverflow.com/questions/2058925/how-can-i-break-up-this-long-line-in-python
-
http://stackoverflow.com/questions/13807748/when-to-use-utf8-as-a-header-in-py-files
-
http://stackoverflow.com/questions/70797/python-user-input-and-commandline-arguments
-
http://stackoverflow.com/questions/19964603/creating-a-menu-in-python
- http://stackoverflow.com/questions/126524/iterate-a-list-with-indexes-in-python
- http://www.thegeekstuff.com/2013/06/python-list/
- http://stackoverflow.com/questions/14864922/is-python-list-comprehension-with-access-to-the-index-enumerate-possible
- http://www.secnetix.de/olli/Python/list_comprehensions.hawk
- http://stackoverflow.com/questions/10777271/python-using-enumerate-inside-list-comprehension
- https://docs.python.org/2/library/configparser.html
- https://wiki.python.org/moin/ConfigParserExamples
- http://stackoverflow.com/questions/19379120/how-to-read-a-config-file-using-python
- http://stackoverflow.com/questions/21275108/use-configparser-to-read-an-array-from-ini-file
- http://stackoverflow.com/questions/335695/lists-in-configparser
- http://stackoverflow.com/questions/30178077/configparser-with-multiple-sections-and-same-option-names
- http://stackoverflow.com/questions/9876059/parsing-configure-file-with-same-section-name-in-python
- http://stackoverflow.com/questions/20793283/python-with-statement-should-i-use-contextlib-closing
- http://stackoverflow.com/questions/8067690/context-manager-for-pythons-mysqldb
- http://stackoverflow.com/questions/5504340/python-mysqldb-connection-close-vs-cursor-close
- http://stackoverflow.com/questions/5669878/when-to-close-cursors-using-mysqldb/16718647#16718647
- http://codereview.stackexchange.com/questions/1274/should-i-use-atexit-to-close-db-connection
- http://www.4byte.cn/question/315833/mysqldb-cursor-execute-can-t-run-multiple-queries.html
- http://www.cnblogs.com/coser/archive/2013/01/28/2880328.html
- https://docs.python.org/2/library/getopt.html
- https://docs.python.org/2/library/argparse.html#module-argparse
- http://andylin02.iteye.com/blog/845355
- http://stackoverflow.com/questions/7556639/usage-function-doesnt-work-with-getopt
- http://andylin02.iteye.com/blog/845355
- http://stackoverflow.com/questions/2309329/inserting-an-item-in-a-tuple
- http://stackoverflow.com/questions/16730339/python-add-item-to-the-tuple
- http://stackoverflow.com/questions/114830/is-a-python-dictionary-an-example-of-a-hash-table
- http://stackoverflow.com/questions/14323045/checking-if-a-key-exists-and-its-value-is-not-an-empty-string-in-a-python-dictio
- http://learnpythonthehardway.org/book/ex32.html
- http://stackoverflow.com/questions/114830/is-a-python-dictionary-an-example-of-a-hash-table
- https://docs.python.org/2/library/sets.html
- http://www.tutorialspoint.com/python/python_dictionary.htm
- http://stackoverflow.com/questions/3294889/iterating-over-dictionaries-using-for-loops-in-python
- http://codereview.stackexchange.com/questions/25465/set-a-default-if-key-not-in-a-dictionary-or-value-is-none
- http://www.tutorialspoint.com/python/dictionary_setdefault.htm
- http://stackoverflow.com/questions/3483520/use-cases-for-the-setdefault-dict-method
- http://stackoverflow.com/questions/9139897/how-to-set-default-value-to-all-keys-of-a-dict-object-in-python
- http://stackoverflow.com/questions/9358983/python-dictionary-and-default-values
- https://docs.python.org/2/tutorial/controlflow.html#unpacking-argument-lists
- http://stackoverflow.com/questions/4979542/python-use-list-as-function-parameters
- http://stackoverflow.com/questions/334655/passing-a-dictionary-to-a-function-in-python-as-keyword-parameters
- http://stackoverflow.com/questions/8954746/python-arguments-as-a-dictionary
- http://stackoverflow.com/questions/2521901/get-a-list-tuple-dict-of-the-arguments-passed-to-a-function
- http://www.saltycrane.com/blog/2008/01/how-to-use-args-and-kwargs-in-python/
- http://stackoverflow.com/questions/919680/can-a-variable-number-of-arguments-be-passed-to-a-function
- http://stackoverflow.com/questions/9302436/python-function-takes-exactly-1-argument-2-given
- http://stackoverflow.com/questions/4909585/interesting-takes-exactly-1-argument-2-given-python-error
- http://stackoverflow.com/questions/1233655/what-is-the-simplest-way-to-ssh-using-python
- http://stackoverflow.com/questions/3586106/perform-commands-over-ssh-with-python
- http://laocao.blog.51cto.com/480714/525667
- http://askubuntu.com/questions/160388/how-to-use-rsync-from-within-a-python-script
- http://stackoverflow.com/questions/4260767/looking-for-cross-platform-rsync-like-functionality-in-python-such-as-rsync-py
- https://bitbucket.org/vds2212/rsync.py/
- http://blog.liw.fi/posts/rsync-in-python/
- https://pypi.python.org/pypi/rsync.py
- http://stackoverflow.com/questions/2796932/how-do-i-pass-a-python-variable-to-bash
- http://stackoverflow.com/questions/5971312/how-to-set-environment-variables-in-python
- http://stackoverflow.com/questions/4906977/how-to-access-environment-variables-from-python
- http://zhou123.blog.51cto.com/4355617/1312791
- http://unix.stackexchange.com/questions/74244/hybrid-code-in-shell-scripts-sharing-variables
- http://www.unix.com/shell-programming-and-scripting/172114-how-set-get-shell-env-variable-python-script.html
- https://docs.python.org/3/library/string.html
- http://stackoverflow.com/questions/5884517/python-assign-print-output-to-a-variable
- https://docs.python.org/2/library/stringio.html
- https://docs.python.org/2/library/string.html
- https://pyformat.info/
- http://stackoverflow.com/questions/1185524/how-to-trim-whitespace-including-tabs
- http://stackoverflow.com/questions/10711116/strip-spaces-tabs-newlines-python
- http://stackoverflow.com/questions/2594810/removing-non-breaking-spaces-from-strings-using-python
- http://stackoverflow.com/questions/7258411/python-strip-unicode-string
- http://stackoverflow.com/questions/18326762/python-regex-get-everything-except-for-string
- http://stackoverflow.com/questions/4309684/how-in-python-to-split-a-string-with-unknown-number-of-spaces-as-separator
- http://stackoverflow.com/questions/8113782/split-string-on-whitespace-in-python
- http://stackoverflow.com/questions/1038824/how-do-i-remove-a-substring-from-the-end-of-a-string-in-python
- http://stackoverflow.com/questions/28134319/fastest-way-to-remove-first-and-last-lines-from-a-python-string
- http://stackoverflow.com/questions/17236232/how-can-i-remove-the-first-character-from-a-stringio-object
- http://stackoverflow.com/questions/4796764/read-file-from-line-2-or-skip-header-row
- https://docs.python.org/2/library/stringio.html
- http://stackoverflow.com/questions/3253258/what-is-the-best-way-to-write-the-contents-of-a-stringio-to-a-file
- http://stackoverflow.com/questions/18422401/match-last-occurence-with-regex
- http://stackoverflow.com/questions/2802168/find-last-match-with-python-regular-expression
- http://stackoverflow.com/questions/4289331/python-extract-numbers-from-a-string
- http://stackoverflow.com/questions/3543559/python-regex-match-and-replace
- http://stackoverflow.com/questions/8703017/remove-sub-string-by-using-python
- http://stackoverflow.com/questions/2504411/proper-indentation-for-python-multiline-strings
- http://stackoverflow.com/questions/10660435/pythonic-way-to-create-a-long-multi-line-string
- http://stackoverflow.com/questions/10623727/python-spacing-and-aligning-strings
- http://stackoverflow.com/questions/7643579/modify-the-width-of-a-tab-in-a-format-string
- http://code.activestate.com/recipes/145672-multi-line-string-block-formatting/
- http://stackoverflow.com/questions/4166665/python-join-or-string-concatenation
- http://stackoverflow.com/questions/3055477/how-slow-is-pythons-string-concatenation-vs-str-join
- http://stackoverflow.com/questions/10880813/typeerror-sequence-item-0-expected-string-int-found
- http://stackoverflow.com/questions/28136435/python-munging-data-with-join-typeerror-sequence-item-0-expected-string
- http://www.runoob.com/python/python-email.html
- http://www.pythonforbeginners.com/code-snippets-source-code/using-python-to-send-email
- http://effbot.org/pyfaq/how-do-i-send-mail-from-a-python-script.htm
- http://stackoverflow.com/questions/5910104/python-how-to-send-utf-8-e-mail
- http://stackoverflow.com/questions/10295530/how-to-set-a-charset-in-email-using-smtplib-in-python-2-7
- http://www.wklken.me/posts/2012/09/02/python-email-smtplib.html
- http://stackoverflow.com/questions/6239304/how-do-i-set-up-a-localhost-in-python
- http://stackoverflow.com/questions/2835559/parsing-values-from-a-json-file-in-python
- http://liuzhijun.iteye.com/blog/1859857
- https://docs.python.org/2/library/json.html#encoders-and-decoders
- http://nullege.com/codes/search/cjson.decode
- http://www.cnblogs.com/coser/archive/2011/12/14/2287739.html
- http://www.cnblogs.com/lhj588/archive/2012/01/06/2314181.html
- http://python3-cookbook.readthedocs.io/zh_CN/latest/c06/p02_read-write_json_data.html
- https://pythontips.com/2013/08/08/storing-and-loading-data-with-json/
- http://stackoverflow.com/questions/3768895/how-to-make-a-class-json-serializable
- http://stackoverflow.com/questions/18478287/making-object-json-serializable-with-regular-encoder
- http://stackoverflow.com/questions/21411992/is-there-a-way-to-config-python-json-library-to-ignore-fields-that-has-null-valu
- http://stackoverflow.com/questions/17925166/json-dump-object-rename-attribute-before-the-dump
- http://stackoverflow.com/questions/31813111/how-to-convert-object-with-properties-to-json-without-in-python-3
inspect.getmembers(object[, predicate])
- How to enumerate an object's properties in Python?
- DUMP ALL THE ATTRIBUTES OF AN OBJECT (PYTHON RECIPE)
- http://www.pyimagesearch.com/2014/09/15/python-compare-two-images/
- http://stackoverflow.com/questions/1927660/compare-two-images-the-python-linux-way
- http://stackoverflow.com/questions/613183/sort-a-python-dictionary-by-value
- https://wiki.python.org/moin/HowTo/Sorting
- http://stackoverflow.com/questions/4174941/how-to-sort-a-list-of-lists-by-a-specific-index-of-the-inner-list
- http://stackoverflow.com/questions/403421/how-to-sort-a-list-of-objects-in-python-based-on-an-attribute-of-the-objects
- http://stackoverflow.com/questions/3417760/how-to-sort-a-python-dict-by-value
- http://stackoverflow.com/questions/16772071/sort-dict-by-value-python
- http://www.saltycrane.com/blog/2007/09/how-to-sort-python-dictionary-by-keys/
- http://stackoverflow.com/questions/17730173/python-cant-get-full-path-name-of-file
- http://stackoverflow.com/questions/51520/how-to-get-an-absolute-file-path-in-python
- http://stackoverflow.com/questions/595305/python-path-of-script
- http://stackoverflow.com/questions/4128144/replace-string-within-file-contents
- http://stackoverflow.com/questions/82831/how-to-check-whether-a-file-exists-using-python
- http://stackoverflow.com/questions/4369611/python-writing-to-a-file
- http://xahlee.info/perl-python/python_path_manipulation.html
- http://stackoverflow.com/questions/16333569/mixed-slashes-with-os-path-join-on-windows
- http://stackoverflow.com/questions/4900511/how-to-use-python-io-library-to-write-on-to-an-external-file
- http://stackoverflow.com/questions/3277503/how-to-read-a-file-line-by-line-into-a-list-with-python
- http://stackoverflow.com/questions/4579908/cross-platform-splitting-of-path-in-python
- https://www.safaribooksonline.com/library/view/python-cookbook/0596001673/ch04s16.html
- http://pythoncentral.io/how-to-recursively-copy-a-directory-folder-in-python/
- http://stackoverflow.com/questions/12683834/how-to-copy-directory-recursively-in-python-and-overwrite-all
- http://stackoverflow.com/questions/1994488/copy-file-or-directory-in-python
- http://stackoverflow.com/questions/123198/how-do-i-copy-a-file-in-python
- http://stackoverflow.com/questions/678236/how-to-get-the-filename-without-the-extension-from-a-path-in-python
- http://stackoverflow.com/questions/15849521/how-to-get-rid-of-extenstions-from-file-basename-using-python
- http://stackoverflow.com/questions/23213850/get-file-name-only-without-extension-and-directory-from-file-path
- http://stackoverflow.com/questions/541390/extracting-extension-from-filename-in-python
- http://stackoverflow.com/questions/7336096/python-glob-without-the-whole-path-only-the-filename
- http://stackoverflow.com/questions/973473/getting-a-list-of-all-subdirectories-in-the-current-directory
- http://stackoverflow.com/questions/3207219/how-to-list-all-files-of-a-directory-in-python
- https://docs.python.org/2/library/os.html#os.listdir
- http://www.saltycrane.com/blog/2010/04/options-listing-files-directory-python/
- http://stackoverflow.com/questions/2817264/how-to-get-the-parent-dir-location
- http://stackoverflow.com/questions/2860153/how-do-i-get-the-parent-directory-in-python
- http://stackoverflow.com/questions/273192/how-to-check-if-a-directory-exists-and-create-it-if-necessary
import os
if not os.path.exists(directory):
os.makedirs(directory)
- http://stackoverflow.com/questions/1724693/find-a-file-in-python
- http://stackoverflow.com/questions/3964681/find-all-files-in-directory-with-extension-txt-in-python
- http://my.oschina.net/duhaizhang/blog/68202
- http://pythoncentral.io/how-to-traverse-a-directory-tree-in-python-guide-to-os-walk/
- http://stackoverflow.com/questions/18724376/finding-duplicate-files-via-hashlib
- https://gist.github.com/miku/1158681
- http://stackoverflow.com/questions/748675/finding-duplicate-files-and-removing-them
- http://www.diveintopython3.net/xml.html
- http://stackoverflow.com/questions/1912434/how-do-i-parse-xml-in-python
- https://docs.python.org/2/library/xml.etree.elementtree.html
- http://pycoders-weekly-chinese.readthedocs.org/en/latest/issue6/processing-xml-in-python-with-element-tree.html
- http://stackoverflow.com/questions/3095434/inserting-newlines-in-xml-file-generated-via-xml-etree-elementtree-in-python
- http://stackoverflow.com/questions/12290091/reading-xml-file-and-fetching-its-attributes-value-in-python
- http://stackoverflow.com/questions/28243681/multiple-elements-in-elementmaker-in-lxml-python
- http://stackoverflow.com/questions/8186343/how-do-you-parse-nested-xml-tags-with-python
- http://stackoverflow.com/questions/27162339/issue-getting-nested-elements-in-xml-file-using-minidom
- http://stackoverflow.com/questions/12671516/walk-through-all-xml-nodes-in-an-element-nested-structure
- http://codereview.stackexchange.com/questions/25544/parsing-xml-with-double-nested-tags-using-mindom
- http://www.runoob.com/python/python-xml.html
- http://www.diveintopython3.net/xml.html
- https://en.wikipedia.org/wiki/Simple_API_for_XML
- http://my.oschina.net/renhc/blog/59646
- http://www.liaoxuefeng.com/article/00137389211128938dbe606058a4fedb3dbd83f31238aed000
- https://docs.python.org/2/library/xml.sax.reader.html
- https://wiki.python.org/moin/Sax
- https://www.safaribooksonline.com/library/view/python-cookbook/0596001673/ch12s06.html
- http://stackoverflow.com/questions/19791528/python-xml-sax-parser-drops-everything-including-amp
- http://www.xml.com/pub/a/2003/03/12/py-xml.html
- http://stackoverflow.com/questions/12263029/how-to-get-results-from-xml-sax-parser-in-python
- http://stackoverflow.com/questions/56229/xml-writing-tools-for-python
- http://stackoverflow.com/questions/4512085/simple-output-of-xml-from-python
- https://docs.python.org/2/library/xml.sax.utils.html#module-xml.sax.saxutils
- http://www.cs.cmu.edu/afs/cs.cmu.edu/project/cmt-40/OldFiles/Nice/Urdu-MT/code/Tools/POS/postagger/mallet_0.4/lib/jython/Lib/test/test_sax.py
- http://stackoverflow.com/questions/21074361/how-to-recursively-iterate-over-xml-tags-in-python-using-elementtree
- http://stackoverflow.com/questions/2723015/how-to-find-recursively-for-a-tag-of-xml-using-lxml
- http://lxml.de/tutorial.html#elementpath
- http://www.kaij.org/blog/?p=77
- http://everydayimlearning.blogspot.sg/2012/11/elementtree.html
- http://stackoverflow.com/questions/17202376/element-tree-cant-build-root-tree-when-getting-xml-from-webpage
- http://stackoverflow.com/questions/10757702/python-2-7-type-object-elementtree-has-no-attribute-register-namespace
- http://stackoverflow.com/questions/18919345/attributeerror-type-object-elementtree-has-no-attribute-tostring
- http://stackoverflow.com/questions/25428751/print-out-xml-to-the-console-xml-etree-elementtree
- http://stackoverflow.com/questions/17402323/use-xml-etree-elementtree-to-write-out-nicely-formatted-xml-files
- http://stackoverflow.com/questions/749796/pretty-printing-xml-in-python
- https://pymotw.com/2/xml/etree/ElementTree/create.html
- http://infohost.nmt.edu/~shipman/soft/pylxml/web/ElementTree-write.html
- http://stackoverflow.com/questions/1662351/problem-with-the-new-lines-when-i-use-toprettyxml
- http://stackoverflow.com/questions/14479656/empty-lines-while-using-minidom-toprettyxml
- http://stackoverflow.com/questions/10034747/python-issue-using-xml-dom-minidom-document-extra-empty-lines-between-child-ele
- http://code.activestate.com/recipes/576750-pretty-print-xml/
- http://ronrothman.com/public/leftbraned/xml-dom-minidom-toprettyxml-and-silly-whitespace
- http://www.resolvinghere.com/sof/14479656.shtml
- http://stackoverflow.com/questions/22793826/python-lxml-etree-is-it-more-effective-to-parse-xml-from-string-or-directly-fr
- http://lxml.de/FAQ.html
- http://stackoverflow.com/questions/5086922/python-pretty-xml-printer-with-lxml
- http://stackoverflow.com/questions/749796/pretty-printing-xml-in-python
from lxml import etree
# http://wiki.tei-c.org/index.php/Remove-Namespaces.xsl
xslt = """<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="no"/>
<xsl:template match="/|comment()|processing-instruction()">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="*">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="@*|node()"/>
</xsl:element>
</xsl:template>
<xsl:template match="@*">
<xsl:attribute name="{local-name()}">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
"""
def remove_xml_namespaces(xml_root):
xslt_doc = etree.parse(io.StringIO(xslt))
transform = etree.XSLT(xslt_doc)
return transform(xml_root).getroot()
from lxml import etree
root = etree.Element('root1')
element = etree.SubElement(root, 'element1')
tree = root.getroottree()
print(type(tree))
# <type 'lxml.etree._ElementTree'>
tree.write('xmltree.xml')
- http://www.simonzhang.net/?p=1072
- http://stackoverflow.com/questions/6369602/python-blank-lines-style-convention
- http://stackoverflow.com/questions/24810771/python-pep8-conventions
- http://stackoverflow.com/questions/8853063/pep-8-why-no-spaces-around-in-keyword-argument-or-a-default-parameter-value
- https://www.zhihu.com/question/19655689
- https://github.com/ma6174/vim
- http://codingpy.com/article/vim-and-python-match-in-heaven/
- https://github.com/klen/python-mode
- http://stackoverflow.com/questions/3781851/run-a-python-script-from-another-python-script-passing-in-args
- https://bytes.com/topic/python/answers/620147-how-execute-python-script-another-python-script
- https://docs.python.org/2/tutorial/modules.html
- http://stackoverflow.com/questions/67631/how-to-import-a-module-given-the-full-path
- http://stackoverflow.com/questions/1186789/what-is-the-best-way-to-call-a-python-script-from-another-python-script
- http://programmers.stackexchange.com/questions/182093/why-store-a-function-inside-a-python-dictionary
- http://stackoverflow.com/questions/279237/import-a-module-from-a-relative-path
- http://gmingzhe.blog.51cto.com/810664/163444
- http://stackoverflow.com/questions/2998215/if-python-is-interpreted-what-are-pyc-files/2998544
- https://stackoverflow.com/questions/11433579/what-are-motivations-behind-compiling-to-byte-code
- http://stackoverflow.com/questions/3723026/py2exe-problems
- http://stackoverflow.com/questions/32289972/py2exe-no-such-file-or-directory-error
- http://stackoverflow.com/questions/323424/py2exe-fails-to-generate-an-executable
- http://www.py2exe.org/
- https://evanmccall.wordpress.com/2015/03/09/how-to-develop-photoshop-tools-in-python/
- http://techarttiki.blogspot.com/2008/08/photoshop-scripting-with-python.html
- http://stackoverflow.com/questions/9145499/calling-private-function-within-the-same-class-python
- http://stackoverflow.com/questions/36941954/are-there-private-keys-in-dictionary-in-python
- http://stackoverflow.com/questions/243836/how-to-copy-all-properties-of-an-object-to-another-object-in-python
- http://stackoverflow.com/questions/1305532/convert-python-dict-to-object
- http://stackoverflow.com/questions/61517/python-dictionary-from-an-objects-fields
- https://docs.python.org/2/library/subprocess.html
- http://stackoverflow.com/questions/89228/calling-an-external-command-in-python
- Get exit code and stderr from subprocess call
- How to suppress or capture the output of subprocess.run()?
- How to catch exception output from Python subprocess.check_output()?
- Running shell command and capturing the output
- https://docs.python.org/3/library/subprocess.html#using-the-subprocess-module
- Why does this bash call from python not work?
- http://www.tutorialspoint.com/python/string_isnumeric.htm
- http://stackoverflow.com/questions/354038/how-do-i-check-if-a-string-is-a-number-float-in-python
- http://stackoverflow.com/questions/1301346/the-meaning-of-a-single-and-a-double-underscore-before-an-object-name-in-python
- http://igorsobreira.com/2010/09/16/difference-between-one-underline-and-two-underlines-in-python.html
- http://stackoverflow.com/questions/5893163/what-is-the-purpose-of-the-single-underscore-variable-in-python
- http://stackoverflow.com/questions/6930144/underscore-vs-double-underscore-with-variables-and-methods
- http://stackoverflow.com/questions/1739514/underscore-as-variable-name-in-python
- http://stackoverflow.com/questions/11360858/what-is-the-eafp-principle-in-python
- http://stackoverflow.com/questions/404795/lbyl-vs-eafp-in-java
- http://stackoverflow.com/questions/19053707/converting-snake-case-to-lower-camel-case-lowercamelcase
- http://codereview.stackexchange.com/questions/85311/transform-snake-case-to-camelcase
- http://stackoverflow.com/questions/4303492/how-can-i-simplify-this-conversion-from-underscore-to-camelcase-in-python
- http://stackoverflow.com/questions/4706499/how-do-you-append-to-a-file-in-python
- http://stackoverflow.com/questions/17749058/combine-multiple-text-files-into-one-text-file-using-python
- http://stackoverflow.com/questions/4617034/how-can-i-open-multiple-files-using-with-open-in-python
- http://stackoverflow.com/questions/20313941/merging-multiple-files-in-to-a-new-file
- http://stackoverflow.com/questions/17749484/python-script-to-concatenate-all-the-files-in-the-directory-into-one-file
- http://stackoverflow.com/questions/20607661/append-contents-from-one-file-to-another-with-newline-separation
- http://stackoverflow.com/questions/14271216/beginner-python-reading-and-writing-to-the-same-file
- http://ubuntuforums.org/archive/index.php/t-1525703.html
- http://stackoverflow.com/questions/10640804/how-to-add-lines-to-existing-file-using-python
- http://stackoverflow.com/questions/2677617/python-f-write-at-beginning-of-file
- http://stackoverflow.com/questions/5914627/prepend-line-to-beginning-of-a-file
- http://stackoverflow.com/questions/1001538/how-do-i-concatenate-files-in-python
- http://stackoverflow.com/questions/8858008/how-to-move-a-file-in-python
- http://openpyxl.readthedocs.io/en/default/tutorial.html
- http://stackoverflow.com/questions/32736419/get-cell-color-from-xlsx
- http://stackoverflow.com/questions/12043973/how-to-read-the-xlsx-color-infomation-by-using-openpyxl
- http://stackoverflow.com/questions/13377793/is-it-possible-to-get-an-excel-documents-row-count-without-loading-the-entire-d
- http://stackoverflow.com/questions/22613272/how-to-access-the-real-value-of-a-cell-using-the-openpyxl-module-for-python
- http://stackoverflow.com/questions/29488919/write-xlsx-file-using-openpyxl-module-in-python
- http://stackoverflow.com/questions/29355778/openpyxl-load-the-workbook-and-save-open-saved-file-with-error-message
- http://stackoverflow.com/questions/35725181/save-xlsx-file-to-a-specified-location-using-openpyxl
- http://stackoverflow.com/questions/31395058/how-to-write-to-a-new-cell-in-python-using-openpyxl
- http://zetcode.com/articles/openpyxl/
- http://stackoverflow.com/questions/1979004/what-is-the-difference-between-isinstanceaaa-basestring-and-isinstanceaaa
- https://docs.python.org/2/library/numbers.html
- http://stackoverflow.com/questions/4187185/how-can-i-check-if-my-python-object-is-a-number
- http://stackoverflow.com/questions/11204789/how-to-properly-use-pythons-isinstance-to-check-if-a-variable-is-a-number
- https://segmentfault.com/q/1010000000127305
- How do I find the location of my Python site-packages directory?
- What is the difference /usr/local/lib/python3.6/dist-packages vs /usr/lib/python3/dist-packages?
- How to Create a Diff of an Image in Python
- Image Difference with OpenCV and Python
- How can I quantify difference between two images?
- https://github.com/nicolashahn/python-image-diff/blob/master/diff_images.py
- https://gist.github.com/attilaolah/1940208
- Pyplot tutorial
- https://matplotlib.org/api/pyplot_api.html
- Numpy与Matplotlib直方图对比
- matplotlib的基本用法(十三)——figure绘制多图
- pylab_examples example code: subplots_demo.py
- matplotlib subplots 设置总图的标题
- In Matplotlib, what does the argument mean in fig.add_subplot(111)?
- pylab_examples example code: subplots_demo.py
print(sys._getframe().f_lineno)
- Python实例浅谈之三Python与C/C++相互调用
- https://docs.python.org/2/extending/extending.html
- 如何实现 C/C++ 与 Python 的通信?
- http://www.swig.org/
- https://pybind11.readthedocs.io/en/stable/classes.html
- PyBind - Overloaded functions
- Pybind11 bind lvalue const function to python
- Overload class member function marked const
python -m pdb myscript.py
(Pdb) import sys
(Pdb) sys.path.append('')
(Pdb) restart
import pdb; pdb.pm()
w(here)
Print a stack trace, with the most recent frame at the bottom. An arrow indicates the current frame, which determines the context of most commands.
d(own) [count]
Move the current frame count (default one) levels down in the stack trace (to a newer frame).
u(p) [count]
Move the current frame count (default one) levels up in the stack trace (to an older frame).
- How can i download all types of file in python with request library
- Python download all files from internet address?
- Download all the files in the website
unzip /path/to/file.egg
unzip /path/to/file.whl