text
stringlengths
200
200k
source
stringclasses
2 values
# Issue with Regular expressions in python ## Question Ok, so i'm working on a regular expression to search out all the header information in a site. I've compiled the regular expression: regex = re.compile(r''' <h[0-9]>\s? (<a[ ]href="[A-Za-z0-9.]*">)?\s? [A-Za-z0-9.,:'"=/?;\s]*\s? [A-Za-z0-9.,:'"=/...
stackoverflow-qa
# Issue with Regular expressions in python ## Question Ok, so i'm working on a regular expression to search out all the header information in a site. I've compiled the regular expression: regex = re.compile(r''' <h[0-9]>\s? (<a[ ]href="[A-Za-z0-9.]*">)?\s? [A-Za-z0-9.,:'"=/?;\s]*\s? [A-Za-z0-9.,:'"=/...
stackoverflow-qa
# Issue with Regular expressions in python ## Question Ok, so i'm working on a regular expression to search out all the header information in a site. I've compiled the regular expression: regex = re.compile(r''' <h[0-9]>\s? (<a[ ]href="[A-Za-z0-9.]*">)?\s? [A-Za-z0-9.,:'"=/?;\s]*\s? [A-Za-z0-9.,:'"=/...
stackoverflow-qa
# Issue with Regular expressions in python ## Question Ok, so i'm working on a regular expression to search out all the header information in a site. I've compiled the regular expression: regex = re.compile(r''' <h[0-9]>\s? (<a[ ]href="[A-Za-z0-9.]*">)?\s? [A-Za-z0-9.,:'"=/?;\s]*\s? [A-Za-z0-9.,:'"=/...
stackoverflow-qa
# Issue with Regular expressions in python ## Question Ok, so i'm working on a regular expression to search out all the header information in a site. I've compiled the regular expression: regex = re.compile(r''' <h[0-9]>\s? (<a[ ]href="[A-Za-z0-9.]*">)?\s? [A-Za-z0-9.,:'"=/?;\s]*\s? [A-Za-z0-9.,:'"=/...
stackoverflow-qa
# Issue with Regular expressions in python ## Question Ok, so i'm working on a regular expression to search out all the header information in a site. I've compiled the regular expression: regex = re.compile(r''' <h[0-9]>\s? (<a[ ]href="[A-Za-z0-9.]*">)?\s? [A-Za-z0-9.,:'"=/?;\s]*\s? [A-Za-z0-9.,:'"=/...
stackoverflow-qa
# How do you load an embedded icon from an exe file with PyWin32? ## Question I have an exe file generated with py2exe. In the setup.py I specify an icon to be embedded in the exe: windows=[{'script': 'my_script.py','icon_resources': [(0, 'my_icon.ico')], ... I tried loading the icon using: hinst = win32api.GetMod...
stackoverflow-qa
# How do you load an embedded icon from an exe file with PyWin32? ## Question I have an exe file generated with py2exe. In the setup.py I specify an icon to be embedded in the exe: windows=[{'script': 'my_script.py','icon_resources': [(0, 'my_icon.ico')], ... I tried loading the icon using: hinst = win32api.GetMod...
stackoverflow-qa
# How do you load an embedded icon from an exe file with PyWin32? ## Question I have an exe file generated with py2exe. In the setup.py I specify an icon to be embedded in the exe: windows=[{'script': 'my_script.py','icon_resources': [(0, 'my_icon.ico')], ... I tried loading the icon using: hinst = win32api.GetMod...
stackoverflow-qa
# I need to write code in python for comparing text of two documents using fingerprint techniques ## Question I need to write code in python language for comparing the text of document using fingerprint techniques. I do not know to take fingerprint of a document or to generate fingerprint of a document. I'm asking if ...
stackoverflow-qa
# I need to write code in python for comparing text of two documents using fingerprint techniques ## Question I need to write code in python language for comparing the text of document using fingerprint techniques. I do not know to take fingerprint of a document or to generate fingerprint of a document. I'm asking if ...
stackoverflow-qa
# Will everything in the standard library treat strings as unicode in Python 3.0? ## Question I'm a little confused about how the standard library will behave now that Python (from 3.0) is unicode-based. Will modules such as CGI and urllib use unicode strings or will they use the new 'bytes' type and just provide enco...
stackoverflow-qa
# Will everything in the standard library treat strings as unicode in Python 3.0? ## Question I'm a little confused about how the standard library will behave now that Python (from 3.0) is unicode-based. Will modules such as CGI and urllib use unicode strings or will they use the new 'bytes' type and just provide enco...
stackoverflow-qa
# Will everything in the standard library treat strings as unicode in Python 3.0? ## Question I'm a little confused about how the standard library will behave now that Python (from 3.0) is unicode-based. Will modules such as CGI and urllib use unicode strings or will they use the new 'bytes' type and just provide enco...
stackoverflow-qa
# NI CVI with Python ## Question I'd like to integrate a Python IDLE-esque command prompt interface into an existing NI-CVI (LabWindows) application. I've tried to follow the Python.org discussions but seem to get lost in the details. Is there a resource out there for dummies like me? ## Answer Here is a python sam...
stackoverflow-qa
# Is there a pretty printer for python data? ## Question Working with python interactively, it's sometimes necessary to display a result which is some arbitrarily complex data structure (like lists with embedded lists, etc.) The default way to display them is just one massive linear dump which just wraps over and over...
stackoverflow-qa
# Is there a pretty printer for python data? ## Question Working with python interactively, it's sometimes necessary to display a result which is some arbitrarily complex data structure (like lists with embedded lists, etc.) The default way to display them is just one massive linear dump which just wraps over and over...
stackoverflow-qa
# Is there a pretty printer for python data? ## Question Working with python interactively, it's sometimes necessary to display a result which is some arbitrarily complex data structure (like lists with embedded lists, etc.) The default way to display them is just one massive linear dump which just wraps over and over...
stackoverflow-qa
# Is there a pretty printer for python data? ## Question Working with python interactively, it's sometimes necessary to display a result which is some arbitrarily complex data structure (like lists with embedded lists, etc.) The default way to display them is just one massive linear dump which just wraps over and over...
stackoverflow-qa
# Google App Engine: how can I programmatically access the properties of my Model class? ## Question I have a model class: class Person(db.Model): first_name = db.StringProperty(required=True) last_name = db.StringProperty(required=True) I have an instance of this class in p, and string s contains the value 'fi...
stackoverflow-qa
# Google App Engine: how can I programmatically access the properties of my Model class? ## Question I have a model class: class Person(db.Model): first_name = db.StringProperty(required=True) last_name = db.StringProperty(required=True) I have an instance of this class in p, and string s contains the value 'fi...
stackoverflow-qa
# Google App Engine: how can I programmatically access the properties of my Model class? ## Question I have a model class: class Person(db.Model): first_name = db.StringProperty(required=True) last_name = db.StringProperty(required=True) I have an instance of this class in p, and string s contains the value 'fi...
stackoverflow-qa
# Google App Engine: how can I programmatically access the properties of my Model class? ## Question I have a model class: class Person(db.Model): first_name = db.StringProperty(required=True) last_name = db.StringProperty(required=True) I have an instance of this class in p, and string s contains the value 'fi...
stackoverflow-qa
# Python, beyond the basics ## Question I've gotten to grips with the basics of Python and I've got a small holiday which I want to use some of to learn a little more Python. The problem is that I have no idea what to learn or where to start. I'm primarily web development but in this case I don't know how much differe...
stackoverflow-qa
# Python, beyond the basics ## Question I've gotten to grips with the basics of Python and I've got a small holiday which I want to use some of to learn a little more Python. The problem is that I have no idea what to learn or where to start. I'm primarily web development but in this case I don't know how much differe...
stackoverflow-qa
# Python, beyond the basics ## Question I've gotten to grips with the basics of Python and I've got a small holiday which I want to use some of to learn a little more Python. The problem is that I have no idea what to learn or where to start. I'm primarily web development but in this case I don't know how much differe...
stackoverflow-qa
# Python, beyond the basics ## Question I've gotten to grips with the basics of Python and I've got a small holiday which I want to use some of to learn a little more Python. The problem is that I have no idea what to learn or where to start. I'm primarily web development but in this case I don't know how much differe...
stackoverflow-qa
# Python, beyond the basics ## Question I've gotten to grips with the basics of Python and I've got a small holiday which I want to use some of to learn a little more Python. The problem is that I have no idea what to learn or where to start. I'm primarily web development but in this case I don't know how much differe...
stackoverflow-qa
# Python, beyond the basics ## Question I've gotten to grips with the basics of Python and I've got a small holiday which I want to use some of to learn a little more Python. The problem is that I have no idea what to learn or where to start. I'm primarily web development but in this case I don't know how much differe...
stackoverflow-qa
# Python, beyond the basics ## Question I've gotten to grips with the basics of Python and I've got a small holiday which I want to use some of to learn a little more Python. The problem is that I have no idea what to learn or where to start. I'm primarily web development but in this case I don't know how much differe...
stackoverflow-qa
# Python, beyond the basics ## Question I've gotten to grips with the basics of Python and I've got a small holiday which I want to use some of to learn a little more Python. The problem is that I have no idea what to learn or where to start. I'm primarily web development but in this case I don't know how much differe...
stackoverflow-qa
# Python, beyond the basics ## Question I've gotten to grips with the basics of Python and I've got a small holiday which I want to use some of to learn a little more Python. The problem is that I have no idea what to learn or where to start. I'm primarily web development but in this case I don't know how much differe...
stackoverflow-qa
# Python, beyond the basics ## Question I've gotten to grips with the basics of Python and I've got a small holiday which I want to use some of to learn a little more Python. The problem is that I have no idea what to learn or where to start. I'm primarily web development but in this case I don't know how much differe...
stackoverflow-qa
# Stripping non printable characters from a string in python ## Question I use to run $s =~ s/[^[:print:]]//g; on Perl to get rid of non printable characters. In Python there's no POSIX regex classes, and I can't write [:print:] having it mean what I want. I know of no way in Python to detect if a character is pr...
stackoverflow-qa
# Stripping non printable characters from a string in python ## Question I use to run $s =~ s/[^[:print:]]//g; on Perl to get rid of non printable characters. In Python there's no POSIX regex classes, and I can't write [:print:] having it mean what I want. I know of no way in Python to detect if a character is pr...
stackoverflow-qa
# Stripping non printable characters from a string in python ## Question I use to run $s =~ s/[^[:print:]]//g; on Perl to get rid of non printable characters. In Python there's no POSIX regex classes, and I can't write [:print:] having it mean what I want. I know of no way in Python to detect if a character is pr...
stackoverflow-qa
# Stripping non printable characters from a string in python ## Question I use to run $s =~ s/[^[:print:]]//g; on Perl to get rid of non printable characters. In Python there's no POSIX regex classes, and I can't write [:print:] having it mean what I want. I know of no way in Python to detect if a character is pr...
stackoverflow-qa
# Stripping non printable characters from a string in python ## Question I use to run $s =~ s/[^[:print:]]//g; on Perl to get rid of non printable characters. In Python there's no POSIX regex classes, and I can't write [:print:] having it mean what I want. I know of no way in Python to detect if a character is pr...
stackoverflow-qa
# Python module functions used in unexpected ways ## Question Based on "Split a string by spaces in Python", which uses shlex.split to split a string with quotes smartly, I would be interested in hearing about other common tasks solved by non-obvious standard library functions. If this turns into Module of The Week...
stackoverflow-qa
# Python module functions used in unexpected ways ## Question Based on "Split a string by spaces in Python", which uses shlex.split to split a string with quotes smartly, I would be interested in hearing about other common tasks solved by non-obvious standard library functions. If this turns into Module of The Week...
stackoverflow-qa
# Python module functions used in unexpected ways ## Question Based on "Split a string by spaces in Python", which uses shlex.split to split a string with quotes smartly, I would be interested in hearing about other common tasks solved by non-obvious standard library functions. If this turns into Module of The Week...
stackoverflow-qa
# Python module functions used in unexpected ways ## Question Based on "Split a string by spaces in Python", which uses shlex.split to split a string with quotes smartly, I would be interested in hearing about other common tasks solved by non-obvious standard library functions. If this turns into Module of The Week...
stackoverflow-qa
# Python module functions used in unexpected ways ## Question Based on "Split a string by spaces in Python", which uses shlex.split to split a string with quotes smartly, I would be interested in hearing about other common tasks solved by non-obvious standard library functions. If this turns into Module of The Week...
stackoverflow-qa
# Python module functions used in unexpected ways ## Question Based on "Split a string by spaces in Python", which uses shlex.split to split a string with quotes smartly, I would be interested in hearing about other common tasks solved by non-obvious standard library functions. If this turns into Module of The Week...
stackoverflow-qa
# Python module functions used in unexpected ways ## Question Based on "Split a string by spaces in Python", which uses shlex.split to split a string with quotes smartly, I would be interested in hearing about other common tasks solved by non-obvious standard library functions. If this turns into Module of The Week...
stackoverflow-qa
# Python module functions used in unexpected ways ## Question Based on "Split a string by spaces in Python", which uses shlex.split to split a string with quotes smartly, I would be interested in hearing about other common tasks solved by non-obvious standard library functions. If this turns into Module of The Week...
stackoverflow-qa
# Python module functions used in unexpected ways ## Question Based on "Split a string by spaces in Python", which uses shlex.split to split a string with quotes smartly, I would be interested in hearing about other common tasks solved by non-obvious standard library functions. If this turns into Module of The Week...
stackoverflow-qa
# Python module functions used in unexpected ways ## Question Based on "Split a string by spaces in Python", which uses shlex.split to split a string with quotes smartly, I would be interested in hearing about other common tasks solved by non-obvious standard library functions. If this turns into Module of The Week...
stackoverflow-qa
# How can I highlight text in Scintilla? ## Question I am writing an editor using Scintilla. I am already using a lexer to do automatic syntax highlighting but now I would like to mark search results. If I want to mark only one hit I can set the selection there, however, I would like to mark (e.g. with yellow backgro...
stackoverflow-qa
# How can I highlight text in Scintilla? ## Question I am writing an editor using Scintilla. I am already using a lexer to do automatic syntax highlighting but now I would like to mark search results. If I want to mark only one hit I can set the selection there, however, I would like to mark (e.g. with yellow backgro...
stackoverflow-qa
# How can I highlight text in Scintilla? ## Question I am writing an editor using Scintilla. I am already using a lexer to do automatic syntax highlighting but now I would like to mark search results. If I want to mark only one hit I can set the selection there, however, I would like to mark (e.g. with yellow backgro...
stackoverflow-qa
# Python sockets suddenly timing out? ## Question I came back today to an old script I had for logging into Gmail via SSL. The script worked fine last time I ran it (several months ago) but now it dies immediately with: <urlopen error The read operation timed out> If I set the timeout (no matter how long), it dies ...
stackoverflow-qa
# time.sleep -- sleeps thread or process? ## Question In Python for the *nix, does time.sleep() block the thread or the process? ## Answer Just the thread. Tags: python, multithreading, time, sleep, python-internals
stackoverflow-qa
# time.sleep -- sleeps thread or process? ## Question In Python for the *nix, does time.sleep() block the thread or the process? ## Answer It will just sleep the thread except in the case where your application has only a single thread, in which case it will sleep the thread and effectively the process as well. The ...
stackoverflow-qa
# time.sleep -- sleeps thread or process? ## Question In Python for the *nix, does time.sleep() block the thread or the process? ## Answer The thread will block, but the process is still alive. In a single threaded application, this means everything is blocked while you sleep. In a multithreaded application, only t...
stackoverflow-qa
# time.sleep -- sleeps thread or process? ## Question In Python for the *nix, does time.sleep() block the thread or the process? ## Answer It blocks the thread. If you look in Modules/timemodule.c in the Python source, you'll see that in the call to floatsleep(), the substantive part of the sleep operation is wrappe...
stackoverflow-qa
# time.sleep -- sleeps thread or process? ## Question In Python for the *nix, does time.sleep() block the thread or the process? ## Answer Only the thread unless your process has a single thread. Tags: python, multithreading, time, sleep, python-internals
stackoverflow-qa
# What's the easiest non-memory intensive way to output XML from Python? ## Question Basically, something similar to System.Xml.XmlWriter - A streaming XML Writer that doesn't incur much of a memory overhead. So that rules out xml.dom and xml.dom.minidom. Suggestions? ## Answer I think I have your poison : http://so...
stackoverflow-qa
# What's the easiest non-memory intensive way to output XML from Python? ## Question Basically, something similar to System.Xml.XmlWriter - A streaming XML Writer that doesn't incur much of a memory overhead. So that rules out xml.dom and xml.dom.minidom. Suggestions? ## Answer I think you'll find XMLGenerator from x...
stackoverflow-qa
# How do I persist to disk a temporary file using Python? ## Question I am attempting to use the 'tempfile' module for manipulating and creating text files. Once the file is ready I want to save it to disk. I thought it would be as simple as using 'shutil.copy'. However, I get a 'permission denied' IOError: >>> impor...
stackoverflow-qa
# How do I persist to disk a temporary file using Python? ## Question I am attempting to use the 'tempfile' module for manipulating and creating text files. Once the file is ready I want to save it to disk. I thought it would be as simple as using 'shutil.copy'. However, I get a 'permission denied' IOError: >>> impor...
stackoverflow-qa
# How do I persist to disk a temporary file using Python? ## Question I am attempting to use the 'tempfile' module for manipulating and creating text files. Once the file is ready I want to save it to disk. I thought it would be as simple as using 'shutil.copy'. However, I get a 'permission denied' IOError: >>> impor...
stackoverflow-qa
# How do I persist to disk a temporary file using Python? ## Question I am attempting to use the 'tempfile' module for manipulating and creating text files. Once the file is ready I want to save it to disk. I thought it would be as simple as using 'shutil.copy'. However, I get a 'permission denied' IOError: >>> impor...
stackoverflow-qa
# Distributed python ## Question What is the best python framework to create distributed applications? For example to build a P2P app. ## Answer You could download the source of BitTorrent for starters and see how they did it. http://download.bittorrent.com/dl/ Tags: python, distributed
stackoverflow-qa
# Distributed python ## Question What is the best python framework to create distributed applications? For example to build a P2P app. ## Answer If it's something where you're going to need tons of threads and need better concurrent performance, check out Stackless Python. Otherwise you could just use the SOAP or XML...
stackoverflow-qa
# Distributed python ## Question What is the best python framework to create distributed applications? For example to build a P2P app. ## Answer You could checkout pyprocessing which will be included in the standard library as of 2.6. It allows you to run tasks on multiple processes using an API similar to threading....
stackoverflow-qa
# Distributed python ## Question What is the best python framework to create distributed applications? For example to build a P2P app. ## Answer I think you mean "Networked Apps"? Distributed means an app that can split its workload among multiple worker clients over the network. You probably want. Twisted Tags: p...
stackoverflow-qa
# Distributed python ## Question What is the best python framework to create distributed applications? For example to build a P2P app. ## Answer You probably want Twisted. There is a P2P framework for Twisted called "Vertex". While not actively maintained, it does allow you to tunnel through NATs and make connectio...
stackoverflow-qa
# How do I read selected files from a remote Zip archive over HTTP using Python? ## Question I need to read selected files, matching on the file name, from a remote zip archive using Python. I don't want to save the full zip to a temporary file (it's not that large, so I can handle everything in memory). I've already...
stackoverflow-qa
# How do I read selected files from a remote Zip archive over HTTP using Python? ## Question I need to read selected files, matching on the file name, from a remote zip archive using Python. I don't want to save the full zip to a temporary file (it's not that large, so I can handle everything in memory). I've already...
stackoverflow-qa
# How do I read selected files from a remote Zip archive over HTTP using Python? ## Question I need to read selected files, matching on the file name, from a remote zip archive using Python. I don't want to save the full zip to a temporary file (it's not that large, so I can handle everything in memory). I've already...
stackoverflow-qa
# How do I read selected files from a remote Zip archive over HTTP using Python? ## Question I need to read selected files, matching on the file name, from a remote zip archive using Python. I don't want to save the full zip to a temporary file (it's not that large, so I can handle everything in memory). I've already...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer xrange r...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer range cr...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer range ge...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer xrange u...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer Do spend...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer It is fo...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer range cr...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer xrange o...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer range cr...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer Remember...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer When tes...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer On a req...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer I am sho...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer What? ra...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer Some of ...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer The diff...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer range():...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer Read the...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer xrange()...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer In pytho...
stackoverflow-qa
# What is the difference between range and xrange functions in Python 2.X? ## Question Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): ## Answer range(x,...
stackoverflow-qa
# Python implementation of Parsec? ## Question I recently wrote a parser in Python using Ply (it's a python reimplementation of yacc). When I was almost done with the parser I discovered that the grammar I need to parse requires me to do some look up during parsing to inform the lexer. Without doing a look up to inf...
stackoverflow-qa
# Python implementation of Parsec? ## Question I recently wrote a parser in Python using Ply (it's a python reimplementation of yacc). When I was almost done with the parser I discovered that the grammar I need to parse requires me to do some look up during parsing to inform the lexer. Without doing a look up to inf...
stackoverflow-qa
# Python implementation of Parsec? ## Question I recently wrote a parser in Python using Ply (it's a python reimplementation of yacc). When I was almost done with the parser I discovered that the grammar I need to parse requires me to do some look up during parsing to inform the lexer. Without doing a look up to inf...
stackoverflow-qa
# Python implementation of Parsec? ## Question I recently wrote a parser in Python using Ply (it's a python reimplementation of yacc). When I was almost done with the parser I discovered that the grammar I need to parse requires me to do some look up during parsing to inform the lexer. Without doing a look up to inf...
stackoverflow-qa
# Python implementation of Parsec? ## Question I recently wrote a parser in Python using Ply (it's a python reimplementation of yacc). When I was almost done with the parser I discovered that the grammar I need to parse requires me to do some look up during parsing to inform the lexer. Without doing a look up to inf...
stackoverflow-qa
# Does an application-wide exception handler make sense? ## Question Long story short, I have a substantial Python application that, among other things, does outcalls to "losetup", "mount", etc. on Linux. Essentially consuming system resources that must be released when complete. If my application crashes, I want to...
stackoverflow-qa
# Does an application-wide exception handler make sense? ## Question Long story short, I have a substantial Python application that, among other things, does outcalls to "losetup", "mount", etc. on Linux. Essentially consuming system resources that must be released when complete. If my application crashes, I want to...
stackoverflow-qa