text stringlengths 200 200k | source stringclasses 2
values |
|---|---|
# Is there a function in Python to print all the current properties and values of an object?
## Question
So what I'm looking for here is something like PHP's print_r function. This is so I can debug my scripts by seeing what's the state of the object in question.
## Answer
You want vars() mixed with pprint:
from ppr... | stackoverflow-qa |
# Is there a function in Python to print all the current properties and values of an object?
## Question
So what I'm looking for here is something like PHP's print_r function. This is so I can debug my scripts by seeing what's the state of the object in question.
## Answer
To print the current state of the object you... | stackoverflow-qa |
# Is there a function in Python to print all the current properties and values of an object?
## Question
So what I'm looking for here is something like PHP's print_r function. This is so I can debug my scripts by seeing what's the state of the object in question.
## Answer
A metaprogramming example Dump object with m... | stackoverflow-qa |
# Is there a function in Python to print all the current properties and values of an object?
## Question
So what I'm looking for here is something like PHP's print_r function. This is so I can debug my scripts by seeing what's the state of the object in question.
## Answer
In most cases, using __dict__ or dir() will ... | stackoverflow-qa |
# Is there a function in Python to print all the current properties and values of an object?
## Question
So what I'm looking for here is something like PHP's print_r function. This is so I can debug my scripts by seeing what's the state of the object in question.
## Answer
pprint contains a âpretty printerâ for p... | stackoverflow-qa |
# Is there a function in Python to print all the current properties and values of an object?
## Question
So what I'm looking for here is something like PHP's print_r function. This is so I can debug my scripts by seeing what's the state of the object in question.
## Answer
Might be worth checking out --
Is there a P... | stackoverflow-qa |
# Is there a function in Python to print all the current properties and values of an object?
## Question
So what I'm looking for here is something like PHP's print_r function. This is so I can debug my scripts by seeing what's the state of the object in question.
## Answer
Why not something simple:
for key,value in ... | stackoverflow-qa |
# Is there a function in Python to print all the current properties and values of an object?
## Question
So what I'm looking for here is something like PHP's print_r function. This is so I can debug my scripts by seeing what's the state of the object in question.
## Answer
I was needing to print DEBUG info in some lo... | stackoverflow-qa |
# Is there a function in Python to print all the current properties and values of an object?
## Question
So what I'm looking for here is something like PHP's print_r function. This is so I can debug my scripts by seeing what's the state of the object in question.
## Answer
To dump "myObject":
from bson import json_u... | stackoverflow-qa |
# Is there a function in Python to print all the current properties and values of an object?
## Question
So what I'm looking for here is something like PHP's print_r function. This is so I can debug my scripts by seeing what's the state of the object in question.
## Answer
from pprint import pprint
def print_r(the_o... | stackoverflow-qa |
# Is there a function in Python to print all the current properties and values of an object?
## Question
So what I'm looking for here is something like PHP's print_r function. This is so I can debug my scripts by seeing what's the state of the object in question.
## Answer
If you're using this for debugging, and you ... | stackoverflow-qa |
# Is there a function in Python to print all the current properties and values of an object?
## Question
So what I'm looking for here is something like PHP's print_r function. This is so I can debug my scripts by seeing what's the state of the object in question.
## Answer
This prints out all the object contents recu... | stackoverflow-qa |
# How do I log an exception at warning- or info-level with trace back using the python logging framework?
## Question
Using something like this:
try:
#Something...
except BaseException, excep:
logger = logging.getLogger("componet")
logger.warning("something raised an exception: " + excep)
logger.info("so... | stackoverflow-qa |
# How do I log an exception at warning- or info-level with trace back using the python logging framework?
## Question
Using something like this:
try:
#Something...
except BaseException, excep:
logger = logging.getLogger("componet")
logger.warning("something raised an exception: " + excep)
logger.info("so... | stackoverflow-qa |
# How do I log an exception at warning- or info-level with trace back using the python logging framework?
## Question
Using something like this:
try:
#Something...
except BaseException, excep:
logger = logging.getLogger("componet")
logger.warning("something raised an exception: " + excep)
logger.info("so... | stackoverflow-qa |
# Pylons with Elixir
## Question
I would like to use Pylons with Elixir, however, I am not sure what is the best way to get about doing this. There are several blog posts (cleverdevil, beachcoder, adam hoscilo) and even an entire new framework about how to go about doing this; however, I am not certain about the diffe... | stackoverflow-qa |
# Pylons with Elixir
## Question
I would like to use Pylons with Elixir, however, I am not sure what is the best way to get about doing this. There are several blog posts (cleverdevil, beachcoder, adam hoscilo) and even an entire new framework about how to go about doing this; however, I am not certain about the diffe... | stackoverflow-qa |
# In Django how do I notify a parent when a child is saved in a foreign key relationship?
## Question
I have the following two models:
class Activity(models.Model):
name = models.CharField(max_length=50, help_text='Some help.')
entity = models.ForeignKey(CancellationEntity)
...
class Cancellation(models... | stackoverflow-qa |
# In Django how do I notify a parent when a child is saved in a foreign key relationship?
## Question
I have the following two models:
class Activity(models.Model):
name = models.CharField(max_length=50, help_text='Some help.')
entity = models.ForeignKey(CancellationEntity)
...
class Cancellation(models... | stackoverflow-qa |
# TFS Webservice Documentation
## Question
We use a lot of of python to do much of our deployment and would be handy to connect to our TFS server to get information on iteration paths, tickets etc. I can see the webservice but unable to find any documentation. Just wondering if anyone knew of anything?
## Answer
The ... | stackoverflow-qa |
# TFS Webservice Documentation
## Question
We use a lot of of python to do much of our deployment and would be handy to connect to our TFS server to get information on iteration paths, tickets etc. I can see the webservice but unable to find any documentation. Just wondering if anyone knew of anything?
## Answer
So, ... | stackoverflow-qa |
# Can you monkey patch methods on core types in python?
## Question
Ruby can add methods to the Number class and other core types to get effects like:
1.should_equal(1)
But it seems like python cannot do this. Is this true? And if so, why? Does it have something to do with the fact that type can't be modified?
Up... | stackoverflow-qa |
# Can you monkey patch methods on core types in python?
## Question
Ruby can add methods to the Number class and other core types to get effects like:
1.should_equal(1)
But it seems like python cannot do this. Is this true? And if so, why? Does it have something to do with the fact that type can't be modified?
Up... | stackoverflow-qa |
# Can you monkey patch methods on core types in python?
## Question
Ruby can add methods to the Number class and other core types to get effects like:
1.should_equal(1)
But it seems like python cannot do this. Is this true? And if so, why? Does it have something to do with the fact that type can't be modified?
Up... | stackoverflow-qa |
# Can you monkey patch methods on core types in python?
## Question
Ruby can add methods to the Number class and other core types to get effects like:
1.should_equal(1)
But it seems like python cannot do this. Is this true? And if so, why? Does it have something to do with the fact that type can't be modified?
Up... | stackoverflow-qa |
# Can you monkey patch methods on core types in python?
## Question
Ruby can add methods to the Number class and other core types to get effects like:
1.should_equal(1)
But it seems like python cannot do this. Is this true? And if so, why? Does it have something to do with the fact that type can't be modified?
Up... | stackoverflow-qa |
# Can you monkey patch methods on core types in python?
## Question
Ruby can add methods to the Number class and other core types to get effects like:
1.should_equal(1)
But it seems like python cannot do this. Is this true? And if so, why? Does it have something to do with the fact that type can't be modified?
Up... | stackoverflow-qa |
# Can you monkey patch methods on core types in python?
## Question
Ruby can add methods to the Number class and other core types to get effects like:
1.should_equal(1)
But it seems like python cannot do this. Is this true? And if so, why? Does it have something to do with the fact that type can't be modified?
Up... | stackoverflow-qa |
# Can you monkey patch methods on core types in python?
## Question
Ruby can add methods to the Number class and other core types to get effects like:
1.should_equal(1)
But it seems like python cannot do this. Is this true? And if so, why? Does it have something to do with the fact that type can't be modified?
Up... | stackoverflow-qa |
# Can you monkey patch methods on core types in python?
## Question
Ruby can add methods to the Number class and other core types to get effects like:
1.should_equal(1)
But it seems like python cannot do this. Is this true? And if so, why? Does it have something to do with the fact that type can't be modified?
Up... | stackoverflow-qa |
# Can you monkey patch methods on core types in python?
## Question
Ruby can add methods to the Number class and other core types to get effects like:
1.should_equal(1)
But it seems like python cannot do this. Is this true? And if so, why? Does it have something to do with the fact that type can't be modified?
Up... | stackoverflow-qa |
# Can you monkey patch methods on core types in python?
## Question
Ruby can add methods to the Number class and other core types to get effects like:
1.should_equal(1)
But it seems like python cannot do this. Is this true? And if so, why? Does it have something to do with the fact that type can't be modified?
Up... | stackoverflow-qa |
# Can you monkey patch methods on core types in python?
## Question
Ruby can add methods to the Number class and other core types to get effects like:
1.should_equal(1)
But it seems like python cannot do this. Is this true? And if so, why? Does it have something to do with the fact that type can't be modified?
Up... | stackoverflow-qa |
# Can you monkey patch methods on core types in python?
## Question
Ruby can add methods to the Number class and other core types to get effects like:
1.should_equal(1)
But it seems like python cannot do this. Is this true? And if so, why? Does it have something to do with the fact that type can't be modified?
Up... | stackoverflow-qa |
# XML parsing - ElementTree vs SAX and DOM
## Question
Python has several ways to parse XML...
I understand the very basics of parsing with SAX. It functions as a stream parser, with an event-driven API.
I understand the DOM parser also. It reads the XML into memory and coverts it to objects that can be accessed w... | stackoverflow-qa |
# XML parsing - ElementTree vs SAX and DOM
## Question
Python has several ways to parse XML...
I understand the very basics of parsing with SAX. It functions as a stream parser, with an event-driven API.
I understand the DOM parser also. It reads the XML into memory and coverts it to objects that can be accessed w... | stackoverflow-qa |
# XML parsing - ElementTree vs SAX and DOM
## Question
Python has several ways to parse XML...
I understand the very basics of parsing with SAX. It functions as a stream parser, with an event-driven API.
I understand the DOM parser also. It reads the XML into memory and coverts it to objects that can be accessed w... | stackoverflow-qa |
# XML parsing - ElementTree vs SAX and DOM
## Question
Python has several ways to parse XML...
I understand the very basics of parsing with SAX. It functions as a stream parser, with an event-driven API.
I understand the DOM parser also. It reads the XML into memory and coverts it to objects that can be accessed w... | stackoverflow-qa |
# Standalone Python applications in Linux
## Question
How can I distribute a standalone Python application in Linux?
I think I can take for granted the presence of a recent Python interpreter in any modern distribution. The problem is dealing with those libraries that do not belong to the standard library, i.e. wxPyt... | stackoverflow-qa |
# Standalone Python applications in Linux
## Question
How can I distribute a standalone Python application in Linux?
I think I can take for granted the presence of a recent Python interpreter in any modern distribution. The problem is dealing with those libraries that do not belong to the standard library, i.e. wxPyt... | stackoverflow-qa |
# Standalone Python applications in Linux
## Question
How can I distribute a standalone Python application in Linux?
I think I can take for granted the presence of a recent Python interpreter in any modern distribution. The problem is dealing with those libraries that do not belong to the standard library, i.e. wxPyt... | stackoverflow-qa |
# Standalone Python applications in Linux
## Question
How can I distribute a standalone Python application in Linux?
I think I can take for granted the presence of a recent Python interpreter in any modern distribution. The problem is dealing with those libraries that do not belong to the standard library, i.e. wxPyt... | stackoverflow-qa |
# Standalone Python applications in Linux
## Question
How can I distribute a standalone Python application in Linux?
I think I can take for granted the presence of a recent Python interpreter in any modern distribution. The problem is dealing with those libraries that do not belong to the standard library, i.e. wxPyt... | stackoverflow-qa |
# Standalone Python applications in Linux
## Question
How can I distribute a standalone Python application in Linux?
I think I can take for granted the presence of a recent Python interpreter in any modern distribution. The problem is dealing with those libraries that do not belong to the standard library, i.e. wxPyt... | stackoverflow-qa |
# What is the best project structure for a Python application?
## Question
Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy?
Desirable features are ease of maintenance, IDE-friendliness, suitability for so... | stackoverflow-qa |
# What is the best project structure for a Python application?
## Question
Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy?
Desirable features are ease of maintenance, IDE-friendliness, suitability for so... | stackoverflow-qa |
# What is the best project structure for a Python application?
## Question
Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy?
Desirable features are ease of maintenance, IDE-friendliness, suitability for so... | stackoverflow-qa |
# What is the best project structure for a Python application?
## Question
Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy?
Desirable features are ease of maintenance, IDE-friendliness, suitability for so... | stackoverflow-qa |
# What is the best project structure for a Python application?
## Question
Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy?
Desirable features are ease of maintenance, IDE-friendliness, suitability for so... | stackoverflow-qa |
# What is the best project structure for a Python application?
## Question
Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy?
Desirable features are ease of maintenance, IDE-friendliness, suitability for so... | stackoverflow-qa |
# What is the best project structure for a Python application?
## Question
Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy?
Desirable features are ease of maintenance, IDE-friendliness, suitability for so... | stackoverflow-qa |
# What is the best project structure for a Python application?
## Question
Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy?
Desirable features are ease of maintenance, IDE-friendliness, suitability for so... | stackoverflow-qa |
# What is the best project structure for a Python application?
## Question
Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy?
Desirable features are ease of maintenance, IDE-friendliness, suitability for so... | stackoverflow-qa |
# What are best practices for developing consistent libraries?
## Question
I am working on developing a pair of libraries to work with a REST API. Because I need to be able to use the API in very different settings I'm currently planning to have a version in PHP (for web applications) and a second version in Python (... | stackoverflow-qa |
# What are best practices for developing consistent libraries?
## Question
I am working on developing a pair of libraries to work with a REST API. Because I need to be able to use the API in very different settings I'm currently planning to have a version in PHP (for web applications) and a second version in Python (... | stackoverflow-qa |
# What are best practices for developing consistent libraries?
## Question
I am working on developing a pair of libraries to work with a REST API. Because I need to be able to use the API in very different settings I'm currently planning to have a version in PHP (for web applications) and a second version in Python (... | stackoverflow-qa |
# Microphone access in Python
## Question
Can I access a users microphone in Python?
Sorry I forgot not everyone is a mind reader:
Windows at minimum XP but Vista support would be VERY good.
## Answer
Best way to go about it would be to use the ctypes library and use WinMM from that. mixerOpen will open a microphon... | stackoverflow-qa |
# Microphone access in Python
## Question
Can I access a users microphone in Python?
Sorry I forgot not everyone is a mind reader:
Windows at minimum XP but Vista support would be VERY good.
## Answer
You might try SWMixer.
Tags: python, windows, microphone | stackoverflow-qa |
# Microphone access in Python
## Question
Can I access a users microphone in Python?
Sorry I forgot not everyone is a mind reader:
Windows at minimum XP but Vista support would be VERY good.
## Answer
I got the job done with pyaudio
It comes with a binary installer for windows and there's even an example on how to ... | stackoverflow-qa |
# What are good rules of thumb for Python imports?
## Question
I am a little confused by the multitude of ways in which you can import modules in Python.
import X
import X as Y
from A import B
I have been reading up about scoping and namespaces, but I would like some practical advice on what is the best strategy,... | stackoverflow-qa |
# What are good rules of thumb for Python imports?
## Question
I am a little confused by the multitude of ways in which you can import modules in Python.
import X
import X as Y
from A import B
I have been reading up about scoping and namespaces, but I would like some practical advice on what is the best strategy,... | stackoverflow-qa |
# What are good rules of thumb for Python imports?
## Question
I am a little confused by the multitude of ways in which you can import modules in Python.
import X
import X as Y
from A import B
I have been reading up about scoping and namespaces, but I would like some practical advice on what is the best strategy,... | stackoverflow-qa |
# What are good rules of thumb for Python imports?
## Question
I am a little confused by the multitude of ways in which you can import modules in Python.
import X
import X as Y
from A import B
I have been reading up about scoping and namespaces, but I would like some practical advice on what is the best strategy,... | stackoverflow-qa |
# What are good rules of thumb for Python imports?
## Question
I am a little confused by the multitude of ways in which you can import modules in Python.
import X
import X as Y
from A import B
I have been reading up about scoping and namespaces, but I would like some practical advice on what is the best strategy,... | stackoverflow-qa |
# What are good rules of thumb for Python imports?
## Question
I am a little confused by the multitude of ways in which you can import modules in Python.
import X
import X as Y
from A import B
I have been reading up about scoping and namespaces, but I would like some practical advice on what is the best strategy,... | stackoverflow-qa |
# What are good rules of thumb for Python imports?
## Question
I am a little confused by the multitude of ways in which you can import modules in Python.
import X
import X as Y
from A import B
I have been reading up about scoping and namespaces, but I would like some practical advice on what is the best strategy,... | stackoverflow-qa |
# What are good rules of thumb for Python imports?
## Question
I am a little confused by the multitude of ways in which you can import modules in Python.
import X
import X as Y
from A import B
I have been reading up about scoping and namespaces, but I would like some practical advice on what is the best strategy,... | stackoverflow-qa |
# Recommended data format for describing the rules of chess
## Question
I'm going to be writing a chess server and one or more clients for chess and I want to describe the rules of chess (e.g. allowable moves based on game state, rules for when a game is complete) in a programming language independant way. This is a b... | stackoverflow-qa |
# Recommended data format for describing the rules of chess
## Question
I'm going to be writing a chess server and one or more clients for chess and I want to describe the rules of chess (e.g. allowable moves based on game state, rules for when a game is complete) in a programming language independant way. This is a b... | stackoverflow-qa |
# Recommended data format for describing the rules of chess
## Question
I'm going to be writing a chess server and one or more clients for chess and I want to describe the rules of chess (e.g. allowable moves based on game state, rules for when a game is complete) in a programming language independant way. This is a b... | stackoverflow-qa |
# Recommended data format for describing the rules of chess
## Question
I'm going to be writing a chess server and one or more clients for chess and I want to describe the rules of chess (e.g. allowable moves based on game state, rules for when a game is complete) in a programming language independant way. This is a b... | stackoverflow-qa |
# Recommended data format for describing the rules of chess
## Question
I'm going to be writing a chess server and one or more clients for chess and I want to describe the rules of chess (e.g. allowable moves based on game state, rules for when a game is complete) in a programming language independant way. This is a b... | stackoverflow-qa |
# Recommended data format for describing the rules of chess
## Question
I'm going to be writing a chess server and one or more clients for chess and I want to describe the rules of chess (e.g. allowable moves based on game state, rules for when a game is complete) in a programming language independant way. This is a b... | stackoverflow-qa |
# Python Code Organization Question : Eggs + Packages + Buildout + Unit Tests + SVN
## Question
I have several python projects that share common modules. Until now, I've been ... ahem ... keeping multiple copies of the common code and synchronizing by hand. But I'd clearly prefer to do something else.
It looks to me ... | stackoverflow-qa |
# Python Code Organization Question : Eggs + Packages + Buildout + Unit Tests + SVN
## Question
I have several python projects that share common modules. Until now, I've been ... ahem ... keeping multiple copies of the common code and synchronizing by hand. But I'd clearly prefer to do something else.
It looks to me ... | stackoverflow-qa |
# Python Code Organization Question : Eggs + Packages + Buildout + Unit Tests + SVN
## Question
I have several python projects that share common modules. Until now, I've been ... ahem ... keeping multiple copies of the common code and synchronizing by hand. But I'd clearly prefer to do something else.
It looks to me ... | stackoverflow-qa |
# Python Code Organization Question : Eggs + Packages + Buildout + Unit Tests + SVN
## Question
I have several python projects that share common modules. Until now, I've been ... ahem ... keeping multiple copies of the common code and synchronizing by hand. But I'd clearly prefer to do something else.
It looks to me ... | stackoverflow-qa |
# Running a web app in Grails vs Django
## Question
I'm currently in the planning stage for a web application and I find myself trying to decide on using Grails or Django. From an operation perspective:
Which ecosystem is easier to maintain (migrations, backup, disaster recovery etc.)? If using grails it'll probab... | stackoverflow-qa |
# Running a web app in Grails vs Django
## Question
I'm currently in the planning stage for a web application and I find myself trying to decide on using Grails or Django. From an operation perspective:
Which ecosystem is easier to maintain (migrations, backup, disaster recovery etc.)? If using grails it'll probab... | stackoverflow-qa |
# Running a web app in Grails vs Django
## Question
I'm currently in the planning stage for a web application and I find myself trying to decide on using Grails or Django. From an operation perspective:
Which ecosystem is easier to maintain (migrations, backup, disaster recovery etc.)? If using grails it'll probab... | stackoverflow-qa |
# Running a web app in Grails vs Django
## Question
I'm currently in the planning stage for a web application and I find myself trying to decide on using Grails or Django. From an operation perspective:
Which ecosystem is easier to maintain (migrations, backup, disaster recovery etc.)? If using grails it'll probab... | stackoverflow-qa |
# Running compiled python (py2exe) as administrator in Vista
## Question
Is it possible to programaticly run compiled Python (comiled via py2exe) as administrator in Vista?
Some more clarification:
I have written a program that modifies the windows hosts file (c:\Windows\system32\drivers\etc\hosts) in Vista the progr... | stackoverflow-qa |
# Running compiled python (py2exe) as administrator in Vista
## Question
Is it possible to programaticly run compiled Python (comiled via py2exe) as administrator in Vista?
Some more clarification:
I have written a program that modifies the windows hosts file (c:\Windows\system32\drivers\etc\hosts) in Vista the progr... | stackoverflow-qa |
# Running compiled python (py2exe) as administrator in Vista
## Question
Is it possible to programaticly run compiled Python (comiled via py2exe) as administrator in Vista?
Some more clarification:
I have written a program that modifies the windows hosts file (c:\Windows\system32\drivers\etc\hosts) in Vista the progr... | stackoverflow-qa |
# Python Decimal
## Question
Does anyone know of a faster decimal implementation in python. As example below demonstrates, standard python decimal is ~100 times slower than float.
from timeit import Timer
def run(val, the_class):
test = the_class(1)
for c in xrange(10000):
d = the_class(val)
... | stackoverflow-qa |
# Python Decimal
## Question
Does anyone know of a faster decimal implementation in python. As example below demonstrates, standard python decimal is ~100 times slower than float.
from timeit import Timer
def run(val, the_class):
test = the_class(1)
for c in xrange(10000):
d = the_class(val)
... | stackoverflow-qa |
# Python Decimal
## Question
Does anyone know of a faster decimal implementation in python. As example below demonstrates, standard python decimal is ~100 times slower than float.
from timeit import Timer
def run(val, the_class):
test = the_class(1)
for c in xrange(10000):
d = the_class(val)
... | stackoverflow-qa |
# In production, Apache + mod_wsgi or Nginx + mod_wsgi?
## Question
What to use for a medium to large python WSGI application, Apache + mod_wsgi or Nginx + mod_wsgi?
Which combination will need more memory and CPU time?
Which one is faster?
Which is known for being more stable than the other?
I am also thinking to use... | stackoverflow-qa |
# In production, Apache + mod_wsgi or Nginx + mod_wsgi?
## Question
What to use for a medium to large python WSGI application, Apache + mod_wsgi or Nginx + mod_wsgi?
Which combination will need more memory and CPU time?
Which one is faster?
Which is known for being more stable than the other?
I am also thinking to use... | stackoverflow-qa |
# In production, Apache + mod_wsgi or Nginx + mod_wsgi?
## Question
What to use for a medium to large python WSGI application, Apache + mod_wsgi or Nginx + mod_wsgi?
Which combination will need more memory and CPU time?
Which one is faster?
Which is known for being more stable than the other?
I am also thinking to use... | stackoverflow-qa |
# In production, Apache + mod_wsgi or Nginx + mod_wsgi?
## Question
What to use for a medium to large python WSGI application, Apache + mod_wsgi or Nginx + mod_wsgi?
Which combination will need more memory and CPU time?
Which one is faster?
Which is known for being more stable than the other?
I am also thinking to use... | stackoverflow-qa |
# What is the time complexity of popping elements from list in Python?
## Question
I wonder what is the time complexity of pop method of list objects in Python (in CPython particulary). Also does the value of N for list.pop(N) affects the complexity?
## Answer
Pop() for the last element ought to be O(1) since you onl... | stackoverflow-qa |
# What is the time complexity of popping elements from list in Python?
## Question
I wonder what is the time complexity of pop method of list objects in Python (in CPython particulary). Also does the value of N for list.pop(N) affects the complexity?
## Answer
Yes, it is O(1) to pop the last element of a Python list,... | stackoverflow-qa |
# How to avoid computation every time a python module is reloaded
## Question
I have a python module that makes use of a huge dictionary global variable, currently I put the computation code in the top section, every first time import or reload of the module takes more then one minute which is totally unacceptable. Ho... | stackoverflow-qa |
# How to avoid computation every time a python module is reloaded
## Question
I have a python module that makes use of a huge dictionary global variable, currently I put the computation code in the top section, every first time import or reload of the module takes more then one minute which is totally unacceptable. Ho... | stackoverflow-qa |
# How to avoid computation every time a python module is reloaded
## Question
I have a python module that makes use of a huge dictionary global variable, currently I put the computation code in the top section, every first time import or reload of the module takes more then one minute which is totally unacceptable. Ho... | stackoverflow-qa |
# How to avoid computation every time a python module is reloaded
## Question
I have a python module that makes use of a huge dictionary global variable, currently I put the computation code in the top section, every first time import or reload of the module takes more then one minute which is totally unacceptable. Ho... | stackoverflow-qa |
# How to avoid computation every time a python module is reloaded
## Question
I have a python module that makes use of a huge dictionary global variable, currently I put the computation code in the top section, every first time import or reload of the module takes more then one minute which is totally unacceptable. Ho... | stackoverflow-qa |
# How to avoid computation every time a python module is reloaded
## Question
I have a python module that makes use of a huge dictionary global variable, currently I put the computation code in the top section, every first time import or reload of the module takes more then one minute which is totally unacceptable. Ho... | stackoverflow-qa |
# How to avoid computation every time a python module is reloaded
## Question
I have a python module that makes use of a huge dictionary global variable, currently I put the computation code in the top section, every first time import or reload of the module takes more then one minute which is totally unacceptable. Ho... | stackoverflow-qa |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.