text
stringlengths
200
200k
source
stringclasses
2 values
# Counting array elements in Python ## Question How can I count the number of elements in an array, because contrary to logic array.count(string) does not count all the elements in the array, it just searches for the number of occurrences of string. ## Answer If you have a multi-dimensional array, len() might not giv...
stackoverflow-qa
# How do I capture an mp3 stream with python ## Question What's the best way of capturing an mp3 stream coming off of http and saving it to disk with python? Thus far I've tried target = open(target_path, "w") conn = urllib.urlopen(stream_url) while True: target.write(conn.read(buf_size)) This gives me data bu...
stackoverflow-qa
# How do I capture an mp3 stream with python ## Question What's the best way of capturing an mp3 stream coming off of http and saving it to disk with python? Thus far I've tried target = open(target_path, "w") conn = urllib.urlopen(stream_url) while True: target.write(conn.read(buf_size)) This gives me data bu...
stackoverflow-qa
# How to make a python, command-line program autocomplete arbitrary things NOT interpreter ## Question I am aware of how to setup autocompletion of python objects in the python interpreter (on unix). Google shows many hits for explanations on how to do this. Unfortunately, there are so many references to that it i...
stackoverflow-qa
# How to make a python, command-line program autocomplete arbitrary things NOT interpreter ## Question I am aware of how to setup autocompletion of python objects in the python interpreter (on unix). Google shows many hits for explanations on how to do this. Unfortunately, there are so many references to that it i...
stackoverflow-qa
# How to make a python, command-line program autocomplete arbitrary things NOT interpreter ## Question I am aware of how to setup autocompletion of python objects in the python interpreter (on unix). Google shows many hits for explanations on how to do this. Unfortunately, there are so many references to that it i...
stackoverflow-qa
# How to make a python, command-line program autocomplete arbitrary things NOT interpreter ## Question I am aware of how to setup autocompletion of python objects in the python interpreter (on unix). Google shows many hits for explanations on how to do this. Unfortunately, there are so many references to that it i...
stackoverflow-qa
# How to make a python, command-line program autocomplete arbitrary things NOT interpreter ## Question I am aware of how to setup autocompletion of python objects in the python interpreter (on unix). Google shows many hits for explanations on how to do this. Unfortunately, there are so many references to that it i...
stackoverflow-qa
# How to make a python, command-line program autocomplete arbitrary things NOT interpreter ## Question I am aware of how to setup autocompletion of python objects in the python interpreter (on unix). Google shows many hits for explanations on how to do this. Unfortunately, there are so many references to that it i...
stackoverflow-qa
# Reading/Writing MS Word files in Python ## Question Is it possible to read and write Word (2003 and 2007) files in Python without using a COM object? I know that I can: f = open('c:\file.doc', "w") f.write(text) f.close() but Word will read it as an HTML file not a native .doc file. ## Answer doc (Word 2003 in t...
stackoverflow-qa
# Reading/Writing MS Word files in Python ## Question Is it possible to read and write Word (2003 and 2007) files in Python without using a COM object? I know that I can: f = open('c:\file.doc', "w") f.write(text) f.close() but Word will read it as an HTML file not a native .doc file. ## Answer I'd look into IronP...
stackoverflow-qa
# Reading/Writing MS Word files in Python ## Question Is it possible to read and write Word (2003 and 2007) files in Python without using a COM object? I know that I can: f = open('c:\file.doc', "w") f.write(text) f.close() but Word will read it as an HTML file not a native .doc file. ## Answer See python-docx, it...
stackoverflow-qa
# Reading/Writing MS Word files in Python ## Question Is it possible to read and write Word (2003 and 2007) files in Python without using a COM object? I know that I can: f = open('c:\file.doc', "w") f.write(text) f.close() but Word will read it as an HTML file not a native .doc file. ## Answer If you only what to...
stackoverflow-qa
# Django admin interface inlines placement ## Question I want to be able to place an inline inbetween two different fields in a fieldset. You can already do this with foreignkeys, I figured that inlining the class I wanted and defining it to get extra forms would do the trick, but apparently I get a: "class x" has...
stackoverflow-qa
# How can I, in python, iterate over multiple 2d lists at once, cleanly? ## Question If I'm making a simple grid based game, for example, I might have a few 2d lists. One might be for terrain, another might be for objects, etc. Unfortunately, when I need to iterate over the lists and have the contents of a square in o...
stackoverflow-qa
# How can I, in python, iterate over multiple 2d lists at once, cleanly? ## Question If I'm making a simple grid based game, for example, I might have a few 2d lists. One might be for terrain, another might be for objects, etc. Unfortunately, when I need to iterate over the lists and have the contents of a square in o...
stackoverflow-qa
# How can I, in python, iterate over multiple 2d lists at once, cleanly? ## Question If I'm making a simple grid based game, for example, I might have a few 2d lists. One might be for terrain, another might be for objects, etc. Unfortunately, when I need to iterate over the lists and have the contents of a square in o...
stackoverflow-qa
# How can I, in python, iterate over multiple 2d lists at once, cleanly? ## Question If I'm making a simple grid based game, for example, I might have a few 2d lists. One might be for terrain, another might be for objects, etc. Unfortunately, when I need to iterate over the lists and have the contents of a square in o...
stackoverflow-qa
# How can I, in python, iterate over multiple 2d lists at once, cleanly? ## Question If I'm making a simple grid based game, for example, I might have a few 2d lists. One might be for terrain, another might be for objects, etc. Unfortunately, when I need to iterate over the lists and have the contents of a square in o...
stackoverflow-qa
# How can I, in python, iterate over multiple 2d lists at once, cleanly? ## Question If I'm making a simple grid based game, for example, I might have a few 2d lists. One might be for terrain, another might be for objects, etc. Unfortunately, when I need to iterate over the lists and have the contents of a square in o...
stackoverflow-qa
# How can I, in python, iterate over multiple 2d lists at once, cleanly? ## Question If I'm making a simple grid based game, for example, I might have a few 2d lists. One might be for terrain, another might be for objects, etc. Unfortunately, when I need to iterate over the lists and have the contents of a square in o...
stackoverflow-qa
# How can I, in python, iterate over multiple 2d lists at once, cleanly? ## Question If I'm making a simple grid based game, for example, I might have a few 2d lists. One might be for terrain, another might be for objects, etc. Unfortunately, when I need to iterate over the lists and have the contents of a square in o...
stackoverflow-qa
# How to use Python to login to a webpage and retrieve cookies for later usage? ## Question I want to download and parse webpage using python, but to access it I need a couple of cookies set. Therefore I need to login over https to the webpage first. The login moment involves sending two POST params (username, passwor...
stackoverflow-qa
# How to use Python to login to a webpage and retrieve cookies for later usage? ## Question I want to download and parse webpage using python, but to access it I need a couple of cookies set. Therefore I need to login over https to the webpage first. The login moment involves sending two POST params (username, passwor...
stackoverflow-qa
# How to break out of multiple loops in Python? ## Question Given the following code (that doesn't work): while True: #snip: print out current state while True: ok = get_input("Is this ok? (y/n)") if ok == "y" or ok == "Y": break 2 #this doesn't work :( if ok == "n" or ok == "N": break...
stackoverflow-qa
# How to break out of multiple loops in Python? ## Question Given the following code (that doesn't work): while True: #snip: print out current state while True: ok = get_input("Is this ok? (y/n)") if ok == "y" or ok == "Y": break 2 #this doesn't work :( if ok == "n" or ok == "N": break...
stackoverflow-qa
# How to break out of multiple loops in Python? ## Question Given the following code (that doesn't work): while True: #snip: print out current state while True: ok = get_input("Is this ok? (y/n)") if ok == "y" or ok == "Y": break 2 #this doesn't work :( if ok == "n" or ok == "N": break...
stackoverflow-qa
# How to break out of multiple loops in Python? ## Question Given the following code (that doesn't work): while True: #snip: print out current state while True: ok = get_input("Is this ok? (y/n)") if ok == "y" or ok == "Y": break 2 #this doesn't work :( if ok == "n" or ok == "N": break...
stackoverflow-qa
# How to break out of multiple loops in Python? ## Question Given the following code (that doesn't work): while True: #snip: print out current state while True: ok = get_input("Is this ok? (y/n)") if ok == "y" or ok == "Y": break 2 #this doesn't work :( if ok == "n" or ok == "N": break...
stackoverflow-qa
# How to break out of multiple loops in Python? ## Question Given the following code (that doesn't work): while True: #snip: print out current state while True: ok = get_input("Is this ok? (y/n)") if ok == "y" or ok == "Y": break 2 #this doesn't work :( if ok == "n" or ok == "N": break...
stackoverflow-qa
# How to break out of multiple loops in Python? ## Question Given the following code (that doesn't work): while True: #snip: print out current state while True: ok = get_input("Is this ok? (y/n)") if ok == "y" or ok == "Y": break 2 #this doesn't work :( if ok == "n" or ok == "N": break...
stackoverflow-qa
# How to break out of multiple loops in Python? ## Question Given the following code (that doesn't work): while True: #snip: print out current state while True: ok = get_input("Is this ok? (y/n)") if ok == "y" or ok == "Y": break 2 #this doesn't work :( if ok == "n" or ok == "N": break...
stackoverflow-qa
# How to break out of multiple loops in Python? ## Question Given the following code (that doesn't work): while True: #snip: print out current state while True: ok = get_input("Is this ok? (y/n)") if ok == "y" or ok == "Y": break 2 #this doesn't work :( if ok == "n" or ok == "N": break...
stackoverflow-qa
# How to break out of multiple loops in Python? ## Question Given the following code (that doesn't work): while True: #snip: print out current state while True: ok = get_input("Is this ok? (y/n)") if ok == "y" or ok == "Y": break 2 #this doesn't work :( if ok == "n" or ok == "N": break...
stackoverflow-qa
# How to break out of multiple loops in Python? ## Question Given the following code (that doesn't work): while True: #snip: print out current state while True: ok = get_input("Is this ok? (y/n)") if ok == "y" or ok == "Y": break 2 #this doesn't work :( if ok == "n" or ok == "N": break...
stackoverflow-qa
# How to break out of multiple loops in Python? ## Question Given the following code (that doesn't work): while True: #snip: print out current state while True: ok = get_input("Is this ok? (y/n)") if ok == "y" or ok == "Y": break 2 #this doesn't work :( if ok == "n" or ok == "N": break...
stackoverflow-qa
# Google App Engine and 404 error ## Question I've setup a static website on GAE using hints found elsewhere, but can't figure out how to return a 404 error. My app.yaml file looks like - url: (.*)/ static_files: static\1/index.html upload: static/index.html - url: / static_dir: static with all the static ht...
stackoverflow-qa
# Google App Engine and 404 error ## Question I've setup a static website on GAE using hints found elsewhere, but can't figure out how to return a 404 error. My app.yaml file looks like - url: (.*)/ static_files: static\1/index.html upload: static/index.html - url: / static_dir: static with all the static ht...
stackoverflow-qa
# Google App Engine and 404 error ## Question I've setup a static website on GAE using hints found elsewhere, but can't figure out how to return a 404 error. My app.yaml file looks like - url: (.*)/ static_files: static\1/index.html upload: static/index.html - url: / static_dir: static with all the static ht...
stackoverflow-qa
# Google App Engine and 404 error ## Question I've setup a static website on GAE using hints found elsewhere, but can't figure out how to return a 404 error. My app.yaml file looks like - url: (.*)/ static_files: static\1/index.html upload: static/index.html - url: / static_dir: static with all the static ht...
stackoverflow-qa
# Google App Engine and 404 error ## Question I've setup a static website on GAE using hints found elsewhere, but can't figure out how to return a 404 error. My app.yaml file looks like - url: (.*)/ static_files: static\1/index.html upload: static/index.html - url: / static_dir: static with all the static ht...
stackoverflow-qa
# Google App Engine and 404 error ## Question I've setup a static website on GAE using hints found elsewhere, but can't figure out how to return a 404 error. My app.yaml file looks like - url: (.*)/ static_files: static\1/index.html upload: static/index.html - url: / static_dir: static with all the static ht...
stackoverflow-qa
# Google App Engine and 404 error ## Question I've setup a static website on GAE using hints found elsewhere, but can't figure out how to return a 404 error. My app.yaml file looks like - url: (.*)/ static_files: static\1/index.html upload: static/index.html - url: / static_dir: static with all the static ht...
stackoverflow-qa
# What property returns the regular expression used when re.compile was called? ## Question def foo (): x = re.compile('^abc') foo2(x) def foo2(x): # How do I get x to return '^abc'? logging.info('x is ' + x.???) ## Answer pattern Tags: python, regex
stackoverflow-qa
# How can I quantify difference between two images? ## Question Here's what I would like to do: I'm taking pictures with a webcam at regular intervals. Sort of like a time lapse thing. However, if nothing has really changed, that is, the picture pretty much looks the same, I don't want to store the latest snapshot....
stackoverflow-qa
# How can I quantify difference between two images? ## Question Here's what I would like to do: I'm taking pictures with a webcam at regular intervals. Sort of like a time lapse thing. However, if nothing has really changed, that is, the picture pretty much looks the same, I don't want to store the latest snapshot....
stackoverflow-qa
# How can I quantify difference between two images? ## Question Here's what I would like to do: I'm taking pictures with a webcam at regular intervals. Sort of like a time lapse thing. However, if nothing has really changed, that is, the picture pretty much looks the same, I don't want to store the latest snapshot....
stackoverflow-qa
# How can I quantify difference between two images? ## Question Here's what I would like to do: I'm taking pictures with a webcam at regular intervals. Sort of like a time lapse thing. However, if nothing has really changed, that is, the picture pretty much looks the same, I don't want to store the latest snapshot....
stackoverflow-qa
# How can I quantify difference between two images? ## Question Here's what I would like to do: I'm taking pictures with a webcam at regular intervals. Sort of like a time lapse thing. However, if nothing has really changed, that is, the picture pretty much looks the same, I don't want to store the latest snapshot....
stackoverflow-qa
# How can I quantify difference between two images? ## Question Here's what I would like to do: I'm taking pictures with a webcam at regular intervals. Sort of like a time lapse thing. However, if nothing has really changed, that is, the picture pretty much looks the same, I don't want to store the latest snapshot....
stackoverflow-qa
# How can I quantify difference between two images? ## Question Here's what I would like to do: I'm taking pictures with a webcam at regular intervals. Sort of like a time lapse thing. However, if nothing has really changed, that is, the picture pretty much looks the same, I don't want to store the latest snapshot....
stackoverflow-qa
# How can I quantify difference between two images? ## Question Here's what I would like to do: I'm taking pictures with a webcam at regular intervals. Sort of like a time lapse thing. However, if nothing has really changed, that is, the picture pretty much looks the same, I don't want to store the latest snapshot....
stackoverflow-qa
# How can I quantify difference between two images? ## Question Here's what I would like to do: I'm taking pictures with a webcam at regular intervals. Sort of like a time lapse thing. However, if nothing has really changed, that is, the picture pretty much looks the same, I don't want to store the latest snapshot....
stackoverflow-qa
# How can I quantify difference between two images? ## Question Here's what I would like to do: I'm taking pictures with a webcam at regular intervals. Sort of like a time lapse thing. However, if nothing has really changed, that is, the picture pretty much looks the same, I don't want to store the latest snapshot....
stackoverflow-qa
# How can I quantify difference between two images? ## Question Here's what I would like to do: I'm taking pictures with a webcam at regular intervals. Sort of like a time lapse thing. However, if nothing has really changed, that is, the picture pretty much looks the same, I don't want to store the latest snapshot....
stackoverflow-qa
# How can I quantify difference between two images? ## Question Here's what I would like to do: I'm taking pictures with a webcam at regular intervals. Sort of like a time lapse thing. However, if nothing has really changed, that is, the picture pretty much looks the same, I don't want to store the latest snapshot....
stackoverflow-qa
# How can I quantify difference between two images? ## Question Here's what I would like to do: I'm taking pictures with a webcam at regular intervals. Sort of like a time lapse thing. However, if nothing has really changed, that is, the picture pretty much looks the same, I don't want to store the latest snapshot....
stackoverflow-qa
# How can I quantify difference between two images? ## Question Here's what I would like to do: I'm taking pictures with a webcam at regular intervals. Sort of like a time lapse thing. However, if nothing has really changed, that is, the picture pretty much looks the same, I don't want to store the latest snapshot....
stackoverflow-qa
# Daemon Threads Explanation ## Question In the Python documentation it says: A thread can be flagged as a "daemon thread". The significance of this flag is that the entire Python program exits when only daemon threads are left. The initial value is inherited from the creating thread. Does anyone have a clea...
stackoverflow-qa
# Daemon Threads Explanation ## Question In the Python documentation it says: A thread can be flagged as a "daemon thread". The significance of this flag is that the entire Python program exits when only daemon threads are left. The initial value is inherited from the creating thread. Does anyone have a clea...
stackoverflow-qa
# Daemon Threads Explanation ## Question In the Python documentation it says: A thread can be flagged as a "daemon thread". The significance of this flag is that the entire Python program exits when only daemon threads are left. The initial value is inherited from the creating thread. Does anyone have a clea...
stackoverflow-qa
# Daemon Threads Explanation ## Question In the Python documentation it says: A thread can be flagged as a "daemon thread". The significance of this flag is that the entire Python program exits when only daemon threads are left. The initial value is inherited from the creating thread. Does anyone have a clea...
stackoverflow-qa
# Daemon Threads Explanation ## Question In the Python documentation it says: A thread can be flagged as a "daemon thread". The significance of this flag is that the entire Python program exits when only daemon threads are left. The initial value is inherited from the creating thread. Does anyone have a clea...
stackoverflow-qa
# Daemon Threads Explanation ## Question In the Python documentation it says: A thread can be flagged as a "daemon thread". The significance of this flag is that the entire Python program exits when only daemon threads are left. The initial value is inherited from the creating thread. Does anyone have a clea...
stackoverflow-qa
# IDLE does't start in python 3.0 ## Question If I have no connection to internet, does that mean I can't start IDLE (which comes with python 3.0)? ## Answer IDLE displays a warning message about firewall programs because it connects to the interpreter over the loopback interface, but that interface is always "connec...
stackoverflow-qa
# Read colors of image with Python (GAE) ## Question How can I read the colors of an image with python using google app engine? Example: I like to build a function to determine the most striking colors of an image to set a harmonic background color for it. ## Answer The Images API does not (currently) contain pixel-...
stackoverflow-qa
# Read colors of image with Python (GAE) ## Question How can I read the colors of an image with python using google app engine? Example: I like to build a function to determine the most striking colors of an image to set a harmonic background color for it. ## Answer For PNG you can use PyPNG module - lightweight pur...
stackoverflow-qa
# Getting the pattern back from a compiled re? ## Question Assume I have created a compiled re: x = re.compile('^\d+$') Is there a way to extract the pattern string (^\d+$) back from the x? ## Answer You can get it back with x.pattern from the Python documentation on Regular Expression Objects Tags: python, re...
stackoverflow-qa
# How to get a complete list of object's methods and attributes? ## Question dir(re.compile(pattern)) does not return pattern as one of the lists's elements. Namely it returns: ['__copy__', '__deepcopy__', 'findall', 'finditer', 'match', 'scanner', 'search', 'split', 'sub', 'subn'] According to the manual, it is...
stackoverflow-qa
# How to get a complete list of object's methods and attributes? ## Question dir(re.compile(pattern)) does not return pattern as one of the lists's elements. Namely it returns: ['__copy__', '__deepcopy__', 'findall', 'finditer', 'match', 'scanner', 'search', 'split', 'sub', 'subn'] According to the manual, it is...
stackoverflow-qa
# How to get a complete list of object's methods and attributes? ## Question dir(re.compile(pattern)) does not return pattern as one of the lists's elements. Namely it returns: ['__copy__', '__deepcopy__', 'findall', 'finditer', 'match', 'scanner', 'search', 'split', 'sub', 'subn'] According to the manual, it is...
stackoverflow-qa
# Python Webframework Confusion ## Question Could someone please explain to me how the current python webframworks fit together? The three I've heard of are CherryPy, TurboGears and Pylons. However I'm confused because TurboGears seems to use CherryPy as the 'Controller' (although isn't CherryPy a framework in in it'...
stackoverflow-qa
# Python Webframework Confusion ## Question Could someone please explain to me how the current python webframworks fit together? The three I've heard of are CherryPy, TurboGears and Pylons. However I'm confused because TurboGears seems to use CherryPy as the 'Controller' (although isn't CherryPy a framework in in it'...
stackoverflow-qa
# Python Webframework Confusion ## Question Could someone please explain to me how the current python webframworks fit together? The three I've heard of are CherryPy, TurboGears and Pylons. However I'm confused because TurboGears seems to use CherryPy as the 'Controller' (although isn't CherryPy a framework in in it'...
stackoverflow-qa
# Python Webframework Confusion ## Question Could someone please explain to me how the current python webframworks fit together? The three I've heard of are CherryPy, TurboGears and Pylons. However I'm confused because TurboGears seems to use CherryPy as the 'Controller' (although isn't CherryPy a framework in in it'...
stackoverflow-qa
# How to convert a file to utf-8 in Python? ## Question I need to convert a bunch of files to utf-8 in Python, and I have trouble with the "converting the file" part. I'd like to do the equivalent of: iconv -t utf-8 $file > converted/$file # this is shell code Thanks! ## Answer You can use the codecs module, like...
stackoverflow-qa
# How to convert a file to utf-8 in Python? ## Question I need to convert a bunch of files to utf-8 in Python, and I have trouble with the "converting the file" part. I'd like to do the equivalent of: iconv -t utf-8 $file > converted/$file # this is shell code Thanks! ## Answer This worked for me in a small test:...
stackoverflow-qa
# How to convert a file to utf-8 in Python? ## Question I need to convert a bunch of files to utf-8 in Python, and I have trouble with the "converting the file" part. I'd like to do the equivalent of: iconv -t utf-8 $file > converted/$file # this is shell code Thanks! ## Answer Thanks for the replies, it works! ...
stackoverflow-qa
# Converting XML to JSON using Python? ## Question I've seen a fair share of ungainly XML->JSON code on the web, and having interacted with Stack's users for a bit, I'm convinced that this crowd can help more than the first few pages of Google results can. So, we're parsing a weather feed, and we need to populate wea...
stackoverflow-qa
# Converting XML to JSON using Python? ## Question I've seen a fair share of ungainly XML->JSON code on the web, and having interacted with Stack's users for a bit, I'm convinced that this crowd can help more than the first few pages of Google results can. So, we're parsing a weather feed, and we need to populate wea...
stackoverflow-qa
# Converting XML to JSON using Python? ## Question I've seen a fair share of ungainly XML->JSON code on the web, and having interacted with Stack's users for a bit, I'm convinced that this crowd can help more than the first few pages of Google results can. So, we're parsing a weather feed, and we need to populate wea...
stackoverflow-qa
# Converting XML to JSON using Python? ## Question I've seen a fair share of ungainly XML->JSON code on the web, and having interacted with Stack's users for a bit, I'm convinced that this crowd can help more than the first few pages of Google results can. So, we're parsing a weather feed, and we need to populate wea...
stackoverflow-qa
# Converting XML to JSON using Python? ## Question I've seen a fair share of ungainly XML->JSON code on the web, and having interacted with Stack's users for a bit, I'm convinced that this crowd can help more than the first few pages of Google results can. So, we're parsing a weather feed, and we need to populate wea...
stackoverflow-qa
# Converting XML to JSON using Python? ## Question I've seen a fair share of ungainly XML->JSON code on the web, and having interacted with Stack's users for a bit, I'm convinced that this crowd can help more than the first few pages of Google results can. So, we're parsing a weather feed, and we need to populate wea...
stackoverflow-qa
# Converting XML to JSON using Python? ## Question I've seen a fair share of ungainly XML->JSON code on the web, and having interacted with Stack's users for a bit, I'm convinced that this crowd can help more than the first few pages of Google results can. So, we're parsing a weather feed, and we need to populate wea...
stackoverflow-qa
# Converting XML to JSON using Python? ## Question I've seen a fair share of ungainly XML->JSON code on the web, and having interacted with Stack's users for a bit, I'm convinced that this crowd can help more than the first few pages of Google results can. So, we're parsing a weather feed, and we need to populate wea...
stackoverflow-qa
# Converting XML to JSON using Python? ## Question I've seen a fair share of ungainly XML->JSON code on the web, and having interacted with Stack's users for a bit, I'm convinced that this crowd can help more than the first few pages of Google results can. So, we're parsing a weather feed, and we need to populate wea...
stackoverflow-qa
# Converting XML to JSON using Python? ## Question I've seen a fair share of ungainly XML->JSON code on the web, and having interacted with Stack's users for a bit, I'm convinced that this crowd can help more than the first few pages of Google results can. So, we're parsing a weather feed, and we need to populate wea...
stackoverflow-qa
# Converting XML to JSON using Python? ## Question I've seen a fair share of ungainly XML->JSON code on the web, and having interacted with Stack's users for a bit, I'm convinced that this crowd can help more than the first few pages of Google results can. So, we're parsing a weather feed, and we need to populate wea...
stackoverflow-qa
# How do you get output parameters from a stored procedure in Python? ## Question I've googled around a bit, but maybe I didn't put the correct magik incantation into the search box. Does anyone know how to get output parameters from a stored procedure in Python? I'm using pymssql to call a stored procedure, and I'm...
stackoverflow-qa
# How do you get output parameters from a stored procedure in Python? ## Question I've googled around a bit, but maybe I didn't put the correct magik incantation into the search box. Does anyone know how to get output parameters from a stored procedure in Python? I'm using pymssql to call a stored procedure, and I'm...
stackoverflow-qa
# How do you get output parameters from a stored procedure in Python? ## Question I've googled around a bit, but maybe I didn't put the correct magik incantation into the search box. Does anyone know how to get output parameters from a stored procedure in Python? I'm using pymssql to call a stored procedure, and I'm...
stackoverflow-qa
# How do you get output parameters from a stored procedure in Python? ## Question I've googled around a bit, but maybe I didn't put the correct magik incantation into the search box. Does anyone know how to get output parameters from a stored procedure in Python? I'm using pymssql to call a stored procedure, and I'm...
stackoverflow-qa
# How do you get output parameters from a stored procedure in Python? ## Question I've googled around a bit, but maybe I didn't put the correct magik incantation into the search box. Does anyone know how to get output parameters from a stored procedure in Python? I'm using pymssql to call a stored procedure, and I'm...
stackoverflow-qa
# Configuring python ## Question I am new to python and struggling to find how to control the amount of memory a python process can take? I am running python on a Cento OS machine with more than 2 GB of main memory size. Python is taking up only 128mb of this and I want to allocate it more. I tried to search all over ...
stackoverflow-qa
# Configuring python ## Question I am new to python and struggling to find how to control the amount of memory a python process can take? I am running python on a Cento OS machine with more than 2 GB of main memory size. Python is taking up only 128mb of this and I want to allocate it more. I tried to search all over ...
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 You can use the "dir()" function to do this....
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 def dump(obj): for attr in dir(obj): 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 dir has been mentioned, but that'll only giv...
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 You are really mixing together two different...
stackoverflow-qa