python Programming Glossary: uncomment
Compile the Python interpreter statically? http://stackoverflow.com/questions/1150373/compile-the-python-interpreter-statically star the word static and asterisk with no spaces b uncomment all modules that you want to be available statically such as..
How can I profile a SQLAlchemy powered application? http://stackoverflow.com/questions/1171166/how-can-i-profile-a-sqlalchemy-powered-application stats.sort_stats 'cumulative' stats.print_stats # uncomment this to see who's calling what # stats.print_callers return..
How do I use timezones with a datetime object in python? http://stackoverflow.com/questions/117514/how-do-i-use-timezones-with-a-datetime-object-in-python because I know that EDT is one hour ahead of me so I can uncomment the subtraction of myTimeZone import datetime re from datetime..
Streaming data with Python and Flask http://stackoverflow.com/questions/13386681/streaming-data-with-python-and-flask template_name rv t.stream context # uncomment if you don't need immediate reaction ##rv.enable_buffering 5..
python captcha decoder library http://stackoverflow.com/questions/13664161/python-captcha-decoder-library in the captcha. To obtain the initial patterns you can uncomment the lines that save the split numbers place a return after that..
How do I get my simple twisted proxy to work? http://stackoverflow.com/questions/2269380/how-do-i-get-my-simple-twisted-proxy-to-work a request to one of two servers depending on the url. If I uncomment either comment 1 or 2 and comment the rest the request is proxied..
How to comment out a block of Python code in Vim http://stackoverflow.com/questions/2561418/how-to-comment-out-a-block-of-python-code-in-vim lines. Ideally I would also like the same keymapping to uncomment the lines if the given lines have been commented out. python..
Controlling the mouse from Python in OS X http://stackoverflow.com/questions/281133/controlling-the-mouse-from-python-in-os-x kCGEventMouseMoved posx posy def mouseclick posx posy # uncomment this line if you want to force the mouse # to MOVE to the click..
Speed up bitstring/bit operations in Python? http://stackoverflow.com/questions/2897297/speed-up-bitstring-bit-operations-in-python the internal implementation of bitstring. You can comment uncomment the three lines to see what I changed to use BitString as the..
Python variable scope question http://stackoverflow.com/questions/370357/python-variable-scope-question print a print b print c # A #c 1 # B test However when I uncomment line B I get an UnboundLocalError 'c' not assigned at line A.. treated by default as a local variable. Therefore when you uncomment the line you are attempting to reference a local variable before..
Python: How to loop through blocks of lines http://stackoverflow.com/questions/3914454/python-how-to-loop-through-blocks-of-lines f isa_group_separator # print key list group # uncomment to see what itertools.groupby does. if not key data for item..
how can I use valgrind with python c++ extensions? http://stackoverflow.com/questions/3982036/how-can-i-use-valgrind-with-python-c-extensions trunk Misc valgrind python.supp IMPORTANT You need to uncomment the lines for PyObject_Free and PyObject_Realloc in the suppression..
Django: when trying domain.com/admin gives 404 with an old unexisting urls file http://stackoverflow.com/questions/4292382/django-when-trying-domain-com-admin-gives-404-with-an-old-unexisting-urls-file the site worked. I didn't have an admin. So i decided to uncomment the admin line and i would get error 404 Page not found 404..
Compute shadow length using PyEphem http://stackoverflow.com/questions/5720633/compute-shadow-length-using-pyephem map f x plt.grid True ####plt.show # use a b from the plot uncomment previous line to see it a b now 0.2 now 0.8 return opt.brentq..
using Python logger class to generate multiple logs for different log levels http://stackoverflow.com/questions/7447382/using-python-logger-class-to-generate-multiple-logs-for-different-log-levels or higher it will print to the logs. Of course once I uncomment debugLogFileHandler.addFilter LevelFilter logging.DEBUG I get..
Parallel file matching, Python http://stackoverflow.com/questions/7623211/parallel-file-matching-python import os import re import sys from stat import S_ISREG # uncomment these if you really want a hard coded HOME patterns file #home..
pymysql callproc() appears to affect subsequent selects http://stackoverflow.com/questions/8218870/pymysql-callproc-appears-to-affect-subsequent-selects len 0 .format len resultSet curr.close conn.close I can uncomment the close and cursor creation calls above but this doesn't change..
Python, want logging with log rotation and compression http://stackoverflow.com/questions/8467978/python-want-logging-with-log-rotation-and-compression 100 backupCount 5 when 's' interval 10 # encoding 'bz2' # uncomment for bz2 compression logger.addHandler handler for i in range..
Matplotlib 3D scatter color lost after redraw http://stackoverflow.com/questions/8971309/matplotlib-3d-scatter-color-lost-after-redraw the figure twice preserves the color mapping but if you uncomment the plt.show line it will still work on rotation for example..
GTK window capture: VPython (OpenGL) application http://stackoverflow.com/questions/10934787/gtk-window-capture-vpython-opengl-application knows anything about this... Meh. Here is the code I have. Uncomment the two commented out lines and comment a few obvious others..
Tkinter locks python when Icon loaded and tk.mainloop in a thread http://stackoverflow.com/questions/1198262/tkinter-locks-python-when-icon-loaded-and-tk-mainloop-in-a-thread command exit b.grid row 0 while 1 sleep 1 This code works. Uncomment the t.iconbitmap line and it locks. Re arrange it any way you..
Django: display time it took to load a page on every page http://stackoverflow.com/questions/17751163/django-display-time-it-took-to-load-a-page-on-every-page DB db_time .2fs Queries db_queries d ENDSTATS div ''' # Uncomment the following if you want to get stats on DEBUG True only #if..
Django: when trying domain.com/admin gives 404 with an old unexisting urls file http://stackoverflow.com/questions/4292382/django-when-trying-domain-com-admin-gives-404-with-an-old-unexisting-urls-file I had at some point an urls file that looked like that # Uncomment the next two lines to enable the admin from django.contrib import.. ' 'generalsettings.views.thankyou' name 'thankyou' # Uncomment the admin doc line below to enable admin documentation # r'^admin.. #url r'^reg ' 'generalsettings.views.home' # Uncomment the next line to enable the admin # r'^admin ' include admin.site.urls..
Mercurial and hgweb on IIS 7.5 - python error http://stackoverflow.com/questions/4355256/mercurial-and-hgweb-on-iis-7-5-python-error serve see 'hg help hgweb' config path to repo or config # Uncomment and adjust if Mercurial is not installed system wide import.. wide import sys sys.path.insert 0 c inetpub wwwroot hg # Uncomment to send python tracebacks to the browser if an error occurs..
More efficient movements editing python files in vim http://stackoverflow.com/questions/896145/more-efficient-movements-editing-python-files-in-vim block to left Shift block to right # Comment selection u Uncomment selection c Select current previous class d Select current previous..
Django static Files http://stackoverflow.com/questions/9824359/django-static-files 'FirstBlog.blog' 'django.contrib.flatpages' # Uncomment the next line to enable the admin 'django.contrib.admin' # Uncomment.. the next line to enable the admin 'django.contrib.admin' # Uncomment the next line to enable admin documentation 'django.contrib.admindocs'..
|