text
stringlengths
200
200k
source
stringclasses
2 values
# How to iterate over a timespan after days, hours, weeks and months in Python? ## Question How do I iterate over a timespan after days, hours, weeks or months? Something like: for date in foo(from_date, to_date, delta=HOURS): print date Where foo is a function, returning an iterator. I've been looking at the ...
stackoverflow-qa
# What is the preferred way to redirect a request in Pylons without losing form data? ## Question I'm trying to redirect/forward a Pylons request. The problem with using redirect_to is that form data gets dropped. I need to keep the POST form data intact as well as all request headers. Is there a simple way to do t...
stackoverflow-qa
# Python GUI Application redistribution ## Question I need to develop a small-medium sized desktop GUI application, preferably with Python as a language of choice because of time constraints. What GUI library choices do I have which allow me to redistribute my application standalone, assuming that the users don't hav...
stackoverflow-qa
# Python GUI Application redistribution ## Question I need to develop a small-medium sized desktop GUI application, preferably with Python as a language of choice because of time constraints. What GUI library choices do I have which allow me to redistribute my application standalone, assuming that the users don't hav...
stackoverflow-qa
# Python GUI Application redistribution ## Question I need to develop a small-medium sized desktop GUI application, preferably with Python as a language of choice because of time constraints. What GUI library choices do I have which allow me to redistribute my application standalone, assuming that the users don't hav...
stackoverflow-qa
# Python GUI Application redistribution ## Question I need to develop a small-medium sized desktop GUI application, preferably with Python as a language of choice because of time constraints. What GUI library choices do I have which allow me to redistribute my application standalone, assuming that the users don't hav...
stackoverflow-qa
# Python GUI Application redistribution ## Question I need to develop a small-medium sized desktop GUI application, preferably with Python as a language of choice because of time constraints. What GUI library choices do I have which allow me to redistribute my application standalone, assuming that the users don't hav...
stackoverflow-qa
# How to avoid .pyc files? ## Question Can I run the python interpreter without generating the compiled .pyc files? ## Answer As far as I know python will compile all modules you "import". However python will NOT compile a python script run using: "python script.py" (it will however compile any modules that the scrip...
stackoverflow-qa
# How to avoid .pyc files? ## Question Can I run the python interpreter without generating the compiled .pyc files? ## Answer You could make the directories that your modules exist in read-only for the user that the Python interpreter is running as. I don't think there's a more elegant option. PEP 304 appears to hav...
stackoverflow-qa
# How to avoid .pyc files? ## Question Can I run the python interpreter without generating the compiled .pyc files? ## Answer In 2.5, theres no way to suppress it, other than measures like not giving users write access to the directory. In python 2.6 and 3.0 however, there may be a setting in the sys module called "...
stackoverflow-qa
# How to avoid .pyc files? ## Question Can I run the python interpreter without generating the compiled .pyc files? ## Answer From "What’s New in Python 2.6 - Interpreter Changes": Python can now be prevented from writing .pyc or .pyo files by supplying the -B switch to the Python interpreter, or by setti...
stackoverflow-qa
# How to avoid .pyc files? ## Question Can I run the python interpreter without generating the compiled .pyc files? ## Answer There actually IS a way to do it in Python 2.3+, but it's a bit esoteric. I don't know if you realize this, but you can do the following: $ unzip -l /tmp/example.zip Archive: /tmp/example....
stackoverflow-qa
# How to avoid .pyc files? ## Question Can I run the python interpreter without generating the compiled .pyc files? ## Answer import sys sys.dont_write_bytecode = True Tags: python, compiler-construction, interpreter
stackoverflow-qa
# Is timsort general-purpose or Python-specific? ## Question Timsort is an adaptive, stable, natural mergesort. It has supernatural performance on many kinds of partially ordered arrays (less than lg(N!) comparisons needed, and as few as N-1), yet as fast as Python's previous highly tuned samplesort hybrid...
stackoverflow-qa
# Is timsort general-purpose or Python-specific? ## Question Timsort is an adaptive, stable, natural mergesort. It has supernatural performance on many kinds of partially ordered arrays (less than lg(N!) comparisons needed, and as few as N-1), yet as fast as Python's previous highly tuned samplesort hybrid...
stackoverflow-qa
# Is timsort general-purpose or Python-specific? ## Question Timsort is an adaptive, stable, natural mergesort. It has supernatural performance on many kinds of partially ordered arrays (less than lg(N!) comparisons needed, and as few as N-1), yet as fast as Python's previous highly tuned samplesort hybrid...
stackoverflow-qa
# Is timsort general-purpose or Python-specific? ## Question Timsort is an adaptive, stable, natural mergesort. It has supernatural performance on many kinds of partially ordered arrays (less than lg(N!) comparisons needed, and as few as N-1), yet as fast as Python's previous highly tuned samplesort hybrid...
stackoverflow-qa
# Is timsort general-purpose or Python-specific? ## Question Timsort is an adaptive, stable, natural mergesort. It has supernatural performance on many kinds of partially ordered arrays (less than lg(N!) comparisons needed, and as few as N-1), yet as fast as Python's previous highly tuned samplesort hybrid...
stackoverflow-qa
# Python module for wiki markup ## Question Is there a Python module for converting wiki markup to other languages (e.g. HTML)? A similar question was asked here, What's the easiest way to convert wiki markup to html, but no Python modules are mentioned. Just curious. :) Cheers. ## Answer mwlib provides ways of con...
stackoverflow-qa
# Python module for wiki markup ## Question Is there a Python module for converting wiki markup to other languages (e.g. HTML)? A similar question was asked here, What's the easiest way to convert wiki markup to html, but no Python modules are mentioned. Just curious. :) Cheers. ## Answer You should look at a good ...
stackoverflow-qa
# Python module for wiki markup ## Question Is there a Python module for converting wiki markup to other languages (e.g. HTML)? A similar question was asked here, What's the easiest way to convert wiki markup to html, but no Python modules are mentioned. Just curious. :) Cheers. ## Answer Django uses the following ...
stackoverflow-qa
# Python module for wiki markup ## Question Is there a Python module for converting wiki markup to other languages (e.g. HTML)? A similar question was asked here, What's the easiest way to convert wiki markup to html, but no Python modules are mentioned. Just curious. :) Cheers. ## Answer with python-creole you can...
stackoverflow-qa
# Programmatically focusing a hippo.CanvasEntry? ## Question Consider this Python program which uses PyGtk and Hippo Canvas to display a clickable text label. Clicking the text label replaces it with a Hippo CanvasEntry widget which contains the text of the label. import pygtk pygtk.require('2.0') import gtk, hippo ...
stackoverflow-qa
# Python Dependency Injection Framework ## Question Is there a framework equivalent to Guice (http://code.google.com/p/google-guice) for Python? ## Answer I haven't used it, but the Spring Python framework is based on Spring and implements Inversion of Control. There also appears to be a Guice in Python project: sna...
stackoverflow-qa
# Python Dependency Injection Framework ## Question Is there a framework equivalent to Guice (http://code.google.com/p/google-guice) for Python? ## Answer Besides that: Zope component architekture pyContainer Tags: python, dependency-injection
stackoverflow-qa
# Python Dependency Injection Framework ## Question Is there a framework equivalent to Guice (http://code.google.com/p/google-guice) for Python? ## Answer Spring Python is an offshoot of the Java-based Spring Framework and Spring Security, targeted for Python. This project currently contains the following features: ...
stackoverflow-qa
# Python Dependency Injection Framework ## Question Is there a framework equivalent to Guice (http://code.google.com/p/google-guice) for Python? ## Answer As an alternative to monkeypatching, I like DI. A nascent project such as http://code.google.com/p/snake-guice/ may fit the bill. Or see the blog post Dependency ...
stackoverflow-qa
# Python Dependency Injection Framework ## Question Is there a framework equivalent to Guice (http://code.google.com/p/google-guice) for Python? ## Answer If you just want to do dependency injection in Python, you don't need a framework. Have a look at Dependency Injection the Python Way. It's really quick and easy, ...
stackoverflow-qa
# Python Dependency Injection Framework ## Question Is there a framework equivalent to Guice (http://code.google.com/p/google-guice) for Python? ## Answer There is a somewhat Guicey python-inject project. It's quite active, and a LOT less code then Spring-python, but then again, I haven't found a reason to use it yet...
stackoverflow-qa
# Python Dependency Injection Framework ## Question Is there a framework equivalent to Guice (http://code.google.com/p/google-guice) for Python? ## Answer Here is a small example for a dependency injection container that does constructor injection based on the constructor argument names: http://code.activestate.com/...
stackoverflow-qa
# Python Dependency Injection Framework ## Question Is there a framework equivalent to Guice (http://code.google.com/p/google-guice) for Python? ## Answer I like this simple and neat framework. http://pypi.python.org/pypi/injector/ Dependency injection as a formal pattern is less useful in Python than in other...
stackoverflow-qa
# Python Dependency Injection Framework ## Question Is there a framework equivalent to Guice (http://code.google.com/p/google-guice) for Python? ## Answer pinject (https://github.com/google/pinject) is a newer alternative. It seems to be maintained by Google and follows a similar pattern to Guice (https://code.google...
stackoverflow-qa
# Get timer ticks in Python ## Question I'm just trying to time a piece of code. The pseudocode looks like: start = get_ticks() do_long_code() print "It took " + (get_ticks() - start) + " seconds." How does this look in Python? More specifically, how do I get the number of ticks since midnight (or however Python o...
stackoverflow-qa
# Get timer ticks in Python ## Question I'm just trying to time a piece of code. The pseudocode looks like: start = get_ticks() do_long_code() print "It took " + (get_ticks() - start) + " seconds." How does this look in Python? More specifically, how do I get the number of ticks since midnight (or however Python o...
stackoverflow-qa
# Get timer ticks in Python ## Question I'm just trying to time a piece of code. The pseudocode looks like: start = get_ticks() do_long_code() print "It took " + (get_ticks() - start) + " seconds." How does this look in Python? More specifically, how do I get the number of ticks since midnight (or however Python o...
stackoverflow-qa
# Get timer ticks in Python ## Question I'm just trying to time a piece of code. The pseudocode looks like: start = get_ticks() do_long_code() print "It took " + (get_ticks() - start) + " seconds." How does this look in Python? More specifically, how do I get the number of ticks since midnight (or however Python o...
stackoverflow-qa
# Get timer ticks in Python ## Question I'm just trying to time a piece of code. The pseudocode looks like: start = get_ticks() do_long_code() print "It took " + (get_ticks() - start) + " seconds." How does this look in Python? More specifically, how do I get the number of ticks since midnight (or however Python o...
stackoverflow-qa
# Get all items from thread Queue ## Question I have one thread that writes results into a Queue. In another thread (GUI), I periodically (in the IDLE event) check if there are results in the queue, like this: def queue_get_all(q): items = [] while 1: try: items.append(q.get_nowait()) ...
stackoverflow-qa
# Get all items from thread Queue ## Question I have one thread that writes results into a Queue. In another thread (GUI), I periodically (in the IDLE event) check if there are results in the queue, like this: def queue_get_all(q): items = [] while 1: try: items.append(q.get_nowait()) ...
stackoverflow-qa
# Get all items from thread Queue ## Question I have one thread that writes results into a Queue. In another thread (GUI), I periodically (in the IDLE event) check if there are results in the queue, like this: def queue_get_all(q): items = [] while 1: try: items.append(q.get_nowait()) ...
stackoverflow-qa
# Get all items from thread Queue ## Question I have one thread that writes results into a Queue. In another thread (GUI), I periodically (in the IDLE event) check if there are results in the queue, like this: def queue_get_all(q): items = [] while 1: try: items.append(q.get_nowait()) ...
stackoverflow-qa
# Customized command line parsing in Python ## Question I'm writing a shell for a project of mine, which by design parses commands that looks like this: COMMAND_NAME ARG1="Long Value" ARG2=123 ARG3=[EMAIL] My problem is that Python's command line parsing libraries (getopt and optparse) forces me to use '-' or '--' i...
stackoverflow-qa
# Customized command line parsing in Python ## Question I'm writing a shell for a project of mine, which by design parses commands that looks like this: COMMAND_NAME ARG1="Long Value" ARG2=123 ARG3=[EMAIL] My problem is that Python's command line parsing libraries (getopt and optparse) forces me to use '-' or '--' i...
stackoverflow-qa
# Customized command line parsing in Python ## Question I'm writing a shell for a project of mine, which by design parses commands that looks like this: COMMAND_NAME ARG1="Long Value" ARG2=123 ARG3=[EMAIL] My problem is that Python's command line parsing libraries (getopt and optparse) forces me to use '-' or '--' i...
stackoverflow-qa
# Customized command line parsing in Python ## Question I'm writing a shell for a project of mine, which by design parses commands that looks like this: COMMAND_NAME ARG1="Long Value" ARG2=123 ARG3=[EMAIL] My problem is that Python's command line parsing libraries (getopt and optparse) forces me to use '-' or '--' i...
stackoverflow-qa
# .order_by() isn't working how it should / how I expect it to ## Question In my Django project I am using Product.objects.all().order_by('order') in a view, but it doesn't seem to be working properly. This is it's output: Product Name Sort ...
stackoverflow-qa
# Emacs and Python ## Question I recently started learning Emacs. I went through the tutorial, read some introductory articles, so far so good. Now I want to use it for Python development. From what I understand, there are two separate Python modes for Emacs: python-mode.el, which is part of the Python project; and p...
stackoverflow-qa
# Emacs and Python ## Question I recently started learning Emacs. I went through the tutorial, read some introductory articles, so far so good. Now I want to use it for Python development. From what I understand, there are two separate Python modes for Emacs: python-mode.el, which is part of the Python project; and p...
stackoverflow-qa
# Emacs and Python ## Question I recently started learning Emacs. I went through the tutorial, read some introductory articles, so far so good. Now I want to use it for Python development. From what I understand, there are two separate Python modes for Emacs: python-mode.el, which is part of the Python project; and p...
stackoverflow-qa
# Most pythonic way of counting matching elements in something iterable ## Question I have an iterable of entries on which I would like to gather some simple statistics, say the count of all numbers divisible by two and the count of all numbers divisible by three. My first alternative, While only iterating through th...
stackoverflow-qa
# Most pythonic way of counting matching elements in something iterable ## Question I have an iterable of entries on which I would like to gather some simple statistics, say the count of all numbers divisible by two and the count of all numbers divisible by three. My first alternative, While only iterating through th...
stackoverflow-qa
# Most pythonic way of counting matching elements in something iterable ## Question I have an iterable of entries on which I would like to gather some simple statistics, say the count of all numbers divisible by two and the count of all numbers divisible by three. My first alternative, While only iterating through th...
stackoverflow-qa
# Most pythonic way of counting matching elements in something iterable ## Question I have an iterable of entries on which I would like to gather some simple statistics, say the count of all numbers divisible by two and the count of all numbers divisible by three. My first alternative, While only iterating through th...
stackoverflow-qa
# Most pythonic way of counting matching elements in something iterable ## Question I have an iterable of entries on which I would like to gather some simple statistics, say the count of all numbers divisible by two and the count of all numbers divisible by three. My first alternative, While only iterating through th...
stackoverflow-qa
# Most pythonic way of counting matching elements in something iterable ## Question I have an iterable of entries on which I would like to gather some simple statistics, say the count of all numbers divisible by two and the count of all numbers divisible by three. My first alternative, While only iterating through th...
stackoverflow-qa
# Template Lib (Engine) in Python running with Jython ## Question Im searching a Template Lib or Template Engine for generating HTML (XML) that runs under Jython (Jython 2.5 Alpha is ok). ## Answer Have you tried Cheetah, I don't have direct experience running it under Jython but there seem to be some people that do....
stackoverflow-qa
# Template Lib (Engine) in Python running with Jython ## Question Im searching a Template Lib or Template Engine for generating HTML (XML) that runs under Jython (Jython 2.5 Alpha is ok). ## Answer Jinja is pretty cool and seems to work on Jython. Tags: python, jython, template-engine
stackoverflow-qa
# Template Lib (Engine) in Python running with Jython ## Question Im searching a Template Lib or Template Engine for generating HTML (XML) that runs under Jython (Jython 2.5 Alpha is ok). ## Answer Use StringTemplate, see http://www.cs.usfca.edu/~parrt/papers/mvc.templates.pdf for details of why. There is nothing be...
stackoverflow-qa
# Accurate timestamping in Python ## Question I've been building an error logging app recently and was after a way of accurately timestamping the incoming data. When I say accurately I mean each timestamp should be accurate relative to each other (no need to sync to an atomic clock or anything like that). I've been u...
stackoverflow-qa
# Accurate timestamping in Python ## Question I've been building an error logging app recently and was after a way of accurately timestamping the incoming data. When I say accurately I mean each timestamp should be accurate relative to each other (no need to sync to an atomic clock or anything like that). I've been u...
stackoverflow-qa
# Accurate timestamping in Python ## Question I've been building an error logging app recently and was after a way of accurately timestamping the incoming data. When I say accurately I mean each timestamp should be accurate relative to each other (no need to sync to an atomic clock or anything like that). I've been u...
stackoverflow-qa
# Accurate timestamping in Python ## Question I've been building an error logging app recently and was after a way of accurately timestamping the incoming data. When I say accurately I mean each timestamp should be accurate relative to each other (no need to sync to an atomic clock or anything like that). I've been u...
stackoverflow-qa
# Accurate timestamping in Python ## Question I've been building an error logging app recently and was after a way of accurately timestamping the incoming data. When I say accurately I mean each timestamp should be accurate relative to each other (no need to sync to an atomic clock or anything like that). I've been u...
stackoverflow-qa
# Python 2.5 dictionary 2 key sort ## Question I have a dictionary of 200,000 items (the keys are strings and the values are integers). What is the best/most pythonic way to print the items sorted by descending value then ascending key (i.e. a 2 key sort)? a={ 'keyC':1, 'keyB':2, 'keyA':1 } b = a.items() b.sort( ke...
stackoverflow-qa
# Python 2.5 dictionary 2 key sort ## Question I have a dictionary of 200,000 items (the keys are strings and the values are integers). What is the best/most pythonic way to print the items sorted by descending value then ascending key (i.e. a 2 key sort)? a={ 'keyC':1, 'keyB':2, 'keyA':1 } b = a.items() b.sort( ke...
stackoverflow-qa
# Python 2.5 dictionary 2 key sort ## Question I have a dictionary of 200,000 items (the keys are strings and the values are integers). What is the best/most pythonic way to print the items sorted by descending value then ascending key (i.e. a 2 key sort)? a={ 'keyC':1, 'keyB':2, 'keyA':1 } b = a.items() b.sort( ke...
stackoverflow-qa
# What is the best way to sample/profile a PyObjC application? ## Question Sampling with Activity Monitor/Instruments/Shark will show stack traces full of C functions for the Python interpreter. I would be helpful to see the corresponding Python symbol names. Is there some DTrace magic that can do that? Python's cProf...
stackoverflow-qa
# Hiding a password in a (python) script ## Question I have got a python script which is creating an ODBC connection. The ODBC connection is generated with a connection string. In this connection string I have to include the username and password for this connection. Is there an easy way to obscure this password in...
stackoverflow-qa
# Hiding a password in a (python) script ## Question I have got a python script which is creating an ODBC connection. The ODBC connection is generated with a connection string. In this connection string I have to include the username and password for this connection. Is there an easy way to obscure this password in...
stackoverflow-qa
# Hiding a password in a (python) script ## Question I have got a python script which is creating an ODBC connection. The ODBC connection is generated with a connection string. In this connection string I have to include the username and password for this connection. Is there an easy way to obscure this password in...
stackoverflow-qa
# Hiding a password in a (python) script ## Question I have got a python script which is creating an ODBC connection. The ODBC connection is generated with a connection string. In this connection string I have to include the username and password for this connection. Is there an easy way to obscure this password in...
stackoverflow-qa
# Hiding a password in a (python) script ## Question I have got a python script which is creating an ODBC connection. The ODBC connection is generated with a connection string. In this connection string I have to include the username and password for this connection. Is there an easy way to obscure this password in...
stackoverflow-qa
# Hiding a password in a (python) script ## Question I have got a python script which is creating an ODBC connection. The ODBC connection is generated with a connection string. In this connection string I have to include the username and password for this connection. Is there an easy way to obscure this password in...
stackoverflow-qa
# Hiding a password in a (python) script ## Question I have got a python script which is creating an ODBC connection. The ODBC connection is generated with a connection string. In this connection string I have to include the username and password for this connection. Is there an easy way to obscure this password in...
stackoverflow-qa
# Hiding a password in a (python) script ## Question I have got a python script which is creating an ODBC connection. The ODBC connection is generated with a connection string. In this connection string I have to include the username and password for this connection. Is there an easy way to obscure this password in...
stackoverflow-qa
# Hiding a password in a (python) script ## Question I have got a python script which is creating an ODBC connection. The ODBC connection is generated with a connection string. In this connection string I have to include the username and password for this connection. Is there an easy way to obscure this password in...
stackoverflow-qa
# Hiding a password in a (python) script ## Question I have got a python script which is creating an ODBC connection. The ODBC connection is generated with a connection string. In this connection string I have to include the username and password for this connection. Is there an easy way to obscure this password in...
stackoverflow-qa
# Hiding a password in a (python) script ## Question I have got a python script which is creating an ODBC connection. The ODBC connection is generated with a connection string. In this connection string I have to include the username and password for this connection. Is there an easy way to obscure this password in...
stackoverflow-qa
# Python module dependency ## Question Ok I have two modules, each containing a class, the problem is their classes reference each other. Lets say for example I had a room module and a person module containing CRoom and CPerson. The CRoom class contains infomation about the room, and a CPerson list of every one in t...
stackoverflow-qa
# Python module dependency ## Question Ok I have two modules, each containing a class, the problem is their classes reference each other. Lets say for example I had a room module and a person module containing CRoom and CPerson. The CRoom class contains infomation about the room, and a CPerson list of every one in t...
stackoverflow-qa
# Python module dependency ## Question Ok I have two modules, each containing a class, the problem is their classes reference each other. Lets say for example I had a room module and a person module containing CRoom and CPerson. The CRoom class contains infomation about the room, and a CPerson list of every one in t...
stackoverflow-qa
# Python module dependency ## Question Ok I have two modules, each containing a class, the problem is their classes reference each other. Lets say for example I had a room module and a person module containing CRoom and CPerson. The CRoom class contains infomation about the room, and a CPerson list of every one in t...
stackoverflow-qa
# Best way to store and use a large text-file in python ## Question I'm creating a networked server for a boggle-clone I wrote in python, which accepts users, solves the boards, and scores the player input. The dictionary file I'm using is 1.8MB (the ENABLE2K dictionary), and I need it to be available to several game...
stackoverflow-qa
# Best way to store and use a large text-file in python ## Question I'm creating a networked server for a boggle-clone I wrote in python, which accepts users, solves the boards, and scores the player input. The dictionary file I'm using is 1.8MB (the ENABLE2K dictionary), and I need it to be available to several game...
stackoverflow-qa
# Best way to store and use a large text-file in python ## Question I'm creating a networked server for a boggle-clone I wrote in python, which accepts users, solves the boards, and scores the player input. The dictionary file I'm using is 1.8MB (the ENABLE2K dictionary), and I need it to be available to several game...
stackoverflow-qa
# Getting MAC Address ## Question I need a cross platform method of determining the MAC address of a computer at run time. For windows the 'wmi' module can be used and the only method under Linux I could find was to run ifconfig and run a regex across its output. I don't like using a package that only works on one O...
stackoverflow-qa
# Getting MAC Address ## Question I need a cross platform method of determining the MAC address of a computer at run time. For windows the 'wmi' module can be used and the only method under Linux I could find was to run ifconfig and run a regex across its output. I don't like using a package that only works on one O...
stackoverflow-qa
# Getting MAC Address ## Question I need a cross platform method of determining the MAC address of a computer at run time. For windows the 'wmi' module can be used and the only method under Linux I could find was to run ifconfig and run a regex across its output. I don't like using a package that only works on one O...
stackoverflow-qa
# Getting MAC Address ## Question I need a cross platform method of determining the MAC address of a computer at run time. For windows the 'wmi' module can be used and the only method under Linux I could find was to run ifconfig and run a regex across its output. I don't like using a package that only works on one O...
stackoverflow-qa
# Getting MAC Address ## Question I need a cross platform method of determining the MAC address of a computer at run time. For windows the 'wmi' module can be used and the only method under Linux I could find was to run ifconfig and run a regex across its output. I don't like using a package that only works on one O...
stackoverflow-qa
# Getting MAC Address ## Question I need a cross platform method of determining the MAC address of a computer at run time. For windows the 'wmi' module can be used and the only method under Linux I could find was to run ifconfig and run a regex across its output. I don't like using a package that only works on one O...
stackoverflow-qa
# Getting MAC Address ## Question I need a cross platform method of determining the MAC address of a computer at run time. For windows the 'wmi' module can be used and the only method under Linux I could find was to run ifconfig and run a regex across its output. I don't like using a package that only works on one O...
stackoverflow-qa
# Getting MAC Address ## Question I need a cross platform method of determining the MAC address of a computer at run time. For windows the 'wmi' module can be used and the only method under Linux I could find was to run ifconfig and run a regex across its output. I don't like using a package that only works on one O...
stackoverflow-qa
# Getting MAC Address ## Question I need a cross platform method of determining the MAC address of a computer at run time. For windows the 'wmi' module can be used and the only method under Linux I could find was to run ifconfig and run a regex across its output. I don't like using a package that only works on one O...
stackoverflow-qa
# Nginx + fastcgi truncation problem ## Question I'm running a Django site using the fastcgi interface to nginx. However, some pages are being served truncated (i.e. the page source just stops, sometimes in the middle of a tag). How do I fix this (let me know what extra information is needed, and I'll post it) Detail...
stackoverflow-qa
# Nginx + fastcgi truncation problem ## Question I'm running a Django site using the fastcgi interface to nginx. However, some pages are being served truncated (i.e. the page source just stops, sometimes in the middle of a tag). How do I fix this (let me know what extra information is needed, and I'll post it) Detail...
stackoverflow-qa
# Nginx + fastcgi truncation problem ## Question I'm running a Django site using the fastcgi interface to nginx. However, some pages are being served truncated (i.e. the page source just stops, sometimes in the middle of a tag). How do I fix this (let me know what extra information is needed, and I'll post it) Detail...
stackoverflow-qa
# Nginx + fastcgi truncation problem ## Question I'm running a Django site using the fastcgi interface to nginx. However, some pages are being served truncated (i.e. the page source just stops, sometimes in the middle of a tag). How do I fix this (let me know what extra information is needed, and I'll post it) Detail...
stackoverflow-qa
# Nginx + fastcgi truncation problem ## Question I'm running a Django site using the fastcgi interface to nginx. However, some pages are being served truncated (i.e. the page source just stops, sometimes in the middle of a tag). How do I fix this (let me know what extra information is needed, and I'll post it) Detail...
stackoverflow-qa
# What is the naming convention in Python for variable and function names? ## Question Coming from a C# background the naming convention for variables and method names are usually either CamelCase or Pascal Case: // C# example string thisIsMyVariable = "a" public void ThisIsMyMethod() In Python, I have seen the abo...
stackoverflow-qa