text stringlengths 200 200k | source stringclasses 2
values |
|---|---|
# overloading __init__ in python
## Question
Let's say I have a class that has a member called data which is a list.
I want to be able to initialize the class with, for example, a filename (which contains data to initialize the list) or with an actual list.
What's your technique for doing this?
Do you just check ... | stackoverflow-qa |
# overloading __init__ in python
## Question
Let's say I have a class that has a member called data which is a list.
I want to be able to initialize the class with, for example, a filename (which contains data to initialize the list) or with an actual list.
What's your technique for doing this?
Do you just check ... | stackoverflow-qa |
# overloading __init__ in python
## Question
Let's say I have a class that has a member called data which is a list.
I want to be able to initialize the class with, for example, a filename (which contains data to initialize the list) or with an actual list.
What's your technique for doing this?
Do you just check ... | stackoverflow-qa |
# What limitations have closures in Python compared to language X closures?
## Question
Where X is any programming language (C#, Javascript, Lisp, Perl, Ruby, Scheme, etc) which supports some flavour of closures.
Some limitations are mentioned in the Closures in Python (compared to Ruby's closures), but the article... | stackoverflow-qa |
# What limitations have closures in Python compared to language X closures?
## Question
Where X is any programming language (C#, Javascript, Lisp, Perl, Ruby, Scheme, etc) which supports some flavour of closures.
Some limitations are mentioned in the Closures in Python (compared to Ruby's closures), but the article... | stackoverflow-qa |
# What limitations have closures in Python compared to language X closures?
## Question
Where X is any programming language (C#, Javascript, Lisp, Perl, Ruby, Scheme, etc) which supports some flavour of closures.
Some limitations are mentioned in the Closures in Python (compared to Ruby's closures), but the article... | stackoverflow-qa |
# What limitations have closures in Python compared to language X closures?
## Question
Where X is any programming language (C#, Javascript, Lisp, Perl, Ruby, Scheme, etc) which supports some flavour of closures.
Some limitations are mentioned in the Closures in Python (compared to Ruby's closures), but the article... | stackoverflow-qa |
# What limitations have closures in Python compared to language X closures?
## Question
Where X is any programming language (C#, Javascript, Lisp, Perl, Ruby, Scheme, etc) which supports some flavour of closures.
Some limitations are mentioned in the Closures in Python (compared to Ruby's closures), but the article... | stackoverflow-qa |
# What limitations have closures in Python compared to language X closures?
## Question
Where X is any programming language (C#, Javascript, Lisp, Perl, Ruby, Scheme, etc) which supports some flavour of closures.
Some limitations are mentioned in the Closures in Python (compared to Ruby's closures), but the article... | stackoverflow-qa |
# Socket programming for mobile phones in Python
## Question
I've written code for communication between my phone and comp thru TCP sockets. When I type out the code line by line in the interactive console it works fine. However, when i try running the script directly through filebrowser.py it just wont work. I'm usin... | stackoverflow-qa |
# How do I dump an entire Python process for later debugging inspection?
## Question
I have a Python application in a strange state. I don't want to do live debugging of the process. Can I dump it to a file and examine its state later? I know I've restored corefiles of C programs in gdb later, but I don't know how ... | stackoverflow-qa |
# How do I dump an entire Python process for later debugging inspection?
## Question
I have a Python application in a strange state. I don't want to do live debugging of the process. Can I dump it to a file and examine its state later? I know I've restored corefiles of C programs in gdb later, but I don't know how ... | stackoverflow-qa |
# How do I get the key value of a db.ReferenceProperty without a database hit?
## Question
Is there a way to get the key (or id) value of a db.ReferenceProperty, without dereferencing the actual entity it points to? I have been digging around - it looks like the key is stored as the property name preceeded with an _,... | stackoverflow-qa |
# How do I get the key value of a db.ReferenceProperty without a database hit?
## Question
Is there a way to get the key (or id) value of a db.ReferenceProperty, without dereferencing the actual entity it points to? I have been digging around - it looks like the key is stored as the property name preceeded with an _,... | stackoverflow-qa |
# Python: How to make a cross-module variable?
## Question
The __debug__ variable is handy in part because it affects every module. If I want to create another variable that works the same way, how would I do it?
The variable (let's be original and call it 'foo') doesn't have to be truly global, in the sense that if ... | stackoverflow-qa |
# Python: How to make a cross-module variable?
## Question
The __debug__ variable is handy in part because it affects every module. If I want to create another variable that works the same way, how would I do it?
The variable (let's be original and call it 'foo') doesn't have to be truly global, in the sense that if ... | stackoverflow-qa |
# Python: How to make a cross-module variable?
## Question
The __debug__ variable is handy in part because it affects every module. If I want to create another variable that works the same way, how would I do it?
The variable (let's be original and call it 'foo') doesn't have to be truly global, in the sense that if ... | stackoverflow-qa |
# Python: How to make a cross-module variable?
## Question
The __debug__ variable is handy in part because it affects every module. If I want to create another variable that works the same way, how would I do it?
The variable (let's be original and call it 'foo') doesn't have to be truly global, in the sense that if ... | stackoverflow-qa |
# Python: How to make a cross-module variable?
## Question
The __debug__ variable is handy in part because it affects every module. If I want to create another variable that works the same way, how would I do it?
The variable (let's be original and call it 'foo') doesn't have to be truly global, in the sense that if ... | stackoverflow-qa |
# Python: How to make a cross-module variable?
## Question
The __debug__ variable is handy in part because it affects every module. If I want to create another variable that works the same way, how would I do it?
The variable (let's be original and call it 'foo') doesn't have to be truly global, in the sense that if ... | stackoverflow-qa |
# Python: How to make a cross-module variable?
## Question
The __debug__ variable is handy in part because it affects every module. If I want to create another variable that works the same way, how would I do it?
The variable (let's be original and call it 'foo') doesn't have to be truly global, in the sense that if ... | stackoverflow-qa |
# Python: How to make a cross-module variable?
## Question
The __debug__ variable is handy in part because it affects every module. If I want to create another variable that works the same way, how would I do it?
The variable (let's be original and call it 'foo') doesn't have to be truly global, in the sense that if ... | stackoverflow-qa |
# How do I upgrade python 2.5.2 to python 2.6rc2 on ubuntu linux 8.04?
## Question
I'd like to how to upgrade the default python installation(2.5.2) supplied with ubuntu 8.04 to python 2.6rc2. I'd like to make 2.6 the default python version on the system and migrate all the other useful installed python libraries inst... | stackoverflow-qa |
# How do I upgrade python 2.5.2 to python 2.6rc2 on ubuntu linux 8.04?
## Question
I'd like to how to upgrade the default python installation(2.5.2) supplied with ubuntu 8.04 to python 2.6rc2. I'd like to make 2.6 the default python version on the system and migrate all the other useful installed python libraries inst... | stackoverflow-qa |
# How do I upgrade python 2.5.2 to python 2.6rc2 on ubuntu linux 8.04?
## Question
I'd like to how to upgrade the default python installation(2.5.2) supplied with ubuntu 8.04 to python 2.6rc2. I'd like to make 2.6 the default python version on the system and migrate all the other useful installed python libraries inst... | stackoverflow-qa |
# How do I upgrade python 2.5.2 to python 2.6rc2 on ubuntu linux 8.04?
## Question
I'd like to how to upgrade the default python installation(2.5.2) supplied with ubuntu 8.04 to python 2.6rc2. I'd like to make 2.6 the default python version on the system and migrate all the other useful installed python libraries inst... | stackoverflow-qa |
# Does Python have a bitfield type?
## Question
I need a compact representation of an array of booleans, does Python have a builtin bitfield type or will I need to find an alternate solution?
## Answer
NumPy has a array interface module that you can use to make a bitfield.
Tags: python, bit-fields, bitarray | stackoverflow-qa |
# Does Python have a bitfield type?
## Question
I need a compact representation of an array of booleans, does Python have a builtin bitfield type or will I need to find an alternate solution?
## Answer
The BitVector package may be what you need. It's not built in to my python installation, but easy to track down on t... | stackoverflow-qa |
# Does Python have a bitfield type?
## Question
I need a compact representation of an array of booleans, does Python have a builtin bitfield type or will I need to find an alternate solution?
## Answer
Bitarray was the best answer I found, when I recently had a similar need. It's a C extension (so much faster than B... | stackoverflow-qa |
# Does Python have a bitfield type?
## Question
I need a compact representation of an array of booleans, does Python have a builtin bitfield type or will I need to find an alternate solution?
## Answer
If your bitfield is short, you can probably use the struct module. Otherwise I'd recommend some sort of a wrapper ar... | stackoverflow-qa |
# Does Python have a bitfield type?
## Question
I need a compact representation of an array of booleans, does Python have a builtin bitfield type or will I need to find an alternate solution?
## Answer
I use the binary bit-wise operators !, &, |, ^, >>, and <<. They work really well and are implemented directly in t... | stackoverflow-qa |
# Does Python have a bitfield type?
## Question
I need a compact representation of an array of booleans, does Python have a builtin bitfield type or will I need to find an alternate solution?
## Answer
Represent each of your values as a power of two:
testA = 2**0
testB = 2**1
testC = 2**3
Then to set a value true:... | stackoverflow-qa |
# Does Python have a bitfield type?
## Question
I need a compact representation of an array of booleans, does Python have a builtin bitfield type or will I need to find an alternate solution?
## Answer
You should take a look at the bitstring module, which has recently reached version 2.0.
The binary data is compactly... | stackoverflow-qa |
# Does Python have a bitfield type?
## Question
I need a compact representation of an array of booleans, does Python have a builtin bitfield type or will I need to find an alternate solution?
## Answer
If you want to use ints (or long ints) to represent as arrays of bools (or as sets of integers), take a look at htt... | stackoverflow-qa |
# Does Python have a bitfield type?
## Question
I need a compact representation of an array of booleans, does Python have a builtin bitfield type or will I need to find an alternate solution?
## Answer
If you mainly want to be able to name your bit fields and easily manipulate them, e.g. to work with flags represente... | stackoverflow-qa |
# Drag and drop onto Python script in Windows Explorer
## Question
I would like to drag and drop my data file onto a Python script and have it process the file and generate output. The Python script accepts the name of the data file as a command-line parameter, but Windows Explorer doesn't allow the script to be a dro... | stackoverflow-qa |
# Drag and drop onto Python script in Windows Explorer
## Question
I would like to drag and drop my data file onto a Python script and have it process the file and generate output. The Python script accepts the name of the data file as a command-line parameter, but Windows Explorer doesn't allow the script to be a dro... | stackoverflow-qa |
# Drag and drop onto Python script in Windows Explorer
## Question
I would like to drag and drop my data file onto a Python script and have it process the file and generate output. The Python script accepts the name of the data file as a command-line parameter, but Windows Explorer doesn't allow the script to be a dro... | stackoverflow-qa |
# OCSP libraries for python / java / c?
## Question
Going back to my previous question on OCSP, does anybody know of "reliable" OCSP libraries for Python, Java and C?
I need "client" OCSP functionality, as I'll be checking the status of Certs against an OCSP responder, so responder functionality is not that importan... | stackoverflow-qa |
# OCSP libraries for python / java / c?
## Question
Going back to my previous question on OCSP, does anybody know of "reliable" OCSP libraries for Python, Java and C?
I need "client" OCSP functionality, as I'll be checking the status of Certs against an OCSP responder, so responder functionality is not that importan... | stackoverflow-qa |
# OCSP libraries for python / java / c?
## Question
Going back to my previous question on OCSP, does anybody know of "reliable" OCSP libraries for Python, Java and C?
I need "client" OCSP functionality, as I'll be checking the status of Certs against an OCSP responder, so responder functionality is not that importan... | stackoverflow-qa |
# Crypto/X509 certificate parsing libraries for Python
## Question
Any recommended crypto libraries for Python. I know I've asked something similar in x509 certificate parsing libraries for Java, but I should've split the question in two.
What I need is the ability to parse X.509 Certificates to extract the informati... | stackoverflow-qa |
# Crypto/X509 certificate parsing libraries for Python
## Question
Any recommended crypto libraries for Python. I know I've asked something similar in x509 certificate parsing libraries for Java, but I should've split the question in two.
What I need is the ability to parse X.509 Certificates to extract the informati... | stackoverflow-qa |
# Crypto/X509 certificate parsing libraries for Python
## Question
Any recommended crypto libraries for Python. I know I've asked something similar in x509 certificate parsing libraries for Java, but I should've split the question in two.
What I need is the ability to parse X.509 Certificates to extract the informati... | stackoverflow-qa |
# Has anyone found a good set of python plugins for vim -- specifically module completion?
## Question
I'm looking for a suite of plugins that can help me finally switch over to vim full-time.
Right now I'm using Komodo with some good success, but their vim bindings have enough little errors that I'm tired of it.
Wh... | stackoverflow-qa |
# Has anyone found a good set of python plugins for vim -- specifically module completion?
## Question
I'm looking for a suite of plugins that can help me finally switch over to vim full-time.
Right now I'm using Komodo with some good success, but their vim bindings have enough little errors that I'm tired of it.
Wh... | stackoverflow-qa |
# Has anyone found a good set of python plugins for vim -- specifically module completion?
## Question
I'm looking for a suite of plugins that can help me finally switch over to vim full-time.
Right now I'm using Komodo with some good success, but their vim bindings have enough little errors that I'm tired of it.
Wh... | stackoverflow-qa |
# Has anyone found a good set of python plugins for vim -- specifically module completion?
## Question
I'm looking for a suite of plugins that can help me finally switch over to vim full-time.
Right now I'm using Komodo with some good success, but their vim bindings have enough little errors that I'm tired of it.
Wh... | stackoverflow-qa |
# Has anyone found a good set of python plugins for vim -- specifically module completion?
## Question
I'm looking for a suite of plugins that can help me finally switch over to vim full-time.
Right now I'm using Komodo with some good success, but their vim bindings have enough little errors that I'm tired of it.
Wh... | stackoverflow-qa |
# Has anyone found a good set of python plugins for vim -- specifically module completion?
## Question
I'm looking for a suite of plugins that can help me finally switch over to vim full-time.
Right now I'm using Komodo with some good success, but their vim bindings have enough little errors that I'm tired of it.
Wh... | stackoverflow-qa |
# Has anyone found a good set of python plugins for vim -- specifically module completion?
## Question
I'm looking for a suite of plugins that can help me finally switch over to vim full-time.
Right now I'm using Komodo with some good success, but their vim bindings have enough little errors that I'm tired of it.
Wh... | stackoverflow-qa |
# Significant figures in the decimal module
## Question
So I've decided to try to solve my physics homework by writing some python scripts to solve problems for me. One problem that I'm running into is that significant figures don't always seem to come out properly. For example this handles significant figures prope... | stackoverflow-qa |
# Significant figures in the decimal module
## Question
So I've decided to try to solve my physics homework by writing some python scripts to solve problems for me. One problem that I'm running into is that significant figures don't always seem to come out properly. For example this handles significant figures prope... | stackoverflow-qa |
# Significant figures in the decimal module
## Question
So I've decided to try to solve my physics homework by writing some python scripts to solve problems for me. One problem that I'm running into is that significant figures don't always seem to come out properly. For example this handles significant figures prope... | stackoverflow-qa |
# Python PostgreSQL modules. Which is best?
## Question
I've seen a number of postgresql modules for python like pygresql, pypgsql, psyco. Most of them are Python DB API 2.0 compliant, some are not being actively developed anymore.
Which module do you recommend? Why?
## Answer
psycopg2 seems to be the most popular. ... | stackoverflow-qa |
# Python PostgreSQL modules. Which is best?
## Question
I've seen a number of postgresql modules for python like pygresql, pypgsql, psyco. Most of them are Python DB API 2.0 compliant, some are not being actively developed anymore.
Which module do you recommend? Why?
## Answer
Psycopg1 is known for better performance... | stackoverflow-qa |
# Python PostgreSQL modules. Which is best?
## Question
I've seen a number of postgresql modules for python like pygresql, pypgsql, psyco. Most of them are Python DB API 2.0 compliant, some are not being actively developed anymore.
Which module do you recommend? Why?
## Answer
I suggest Psycopg over Psycopg2 since th... | stackoverflow-qa |
# Something like Explorer's icon grid view in a Python GUI
## Question
I am making a Python gui project that needs to duplicate the look of a Windows gui environment (ie Explorer). I have my own custom icons to draw but they should be selectable by the same methods as usual; click, ctrl-click, drag box etc. Are any ... | stackoverflow-qa |
# Something like Explorer's icon grid view in a Python GUI
## Question
I am making a Python gui project that needs to duplicate the look of a Windows gui environment (ie Explorer). I have my own custom icons to draw but they should be selectable by the same methods as usual; click, ctrl-click, drag box etc. Are any ... | stackoverflow-qa |
# Something like Explorer's icon grid view in a Python GUI
## Question
I am making a Python gui project that needs to duplicate the look of a Windows gui environment (ie Explorer). I have my own custom icons to draw but they should be selectable by the same methods as usual; click, ctrl-click, drag box etc. Are any ... | stackoverflow-qa |
# Calling C/C++ from python?
## Question
What would be the quickest way to construct a python binding to a C or C++ library?
(using windows if this matters)
## Answer
The quickest way to do this is using SWIG.
Example from SWIG tutorial:
/* File : example.c */
int fact(int n) {
if (n <= 1) return 1;
else r... | stackoverflow-qa |
# Calling C/C++ from python?
## Question
What would be the quickest way to construct a python binding to a C or C++ library?
(using windows if this matters)
## Answer
Iâve never used it but Iâve heard good things about ctypes. If youâre trying to use it with C++, be sure to evade name mangling via extern "C". ... | stackoverflow-qa |
# Calling C/C++ from python?
## Question
What would be the quickest way to construct a python binding to a C or C++ library?
(using windows if this matters)
## Answer
This paper, claiming python to be all a scientist needs, basically says: first prototype everything in Python. Then when you need to speed a part up, ... | stackoverflow-qa |
# Calling C/C++ from python?
## Question
What would be the quickest way to construct a python binding to a C or C++ library?
(using windows if this matters)
## Answer
One of the official Python documents contains details on extending Python using C/C++.
Even without the use of SWIG, itâs quite straightforward and ... | stackoverflow-qa |
# Calling C/C++ from python?
## Question
What would be the quickest way to construct a python binding to a C or C++ library?
(using windows if this matters)
## Answer
Check out pyrex or cython. They're python-like languages for interfacing between C/C++ and python.
Tags: c++, python, c | stackoverflow-qa |
# Calling C/C++ from python?
## Question
What would be the quickest way to construct a python binding to a C or C++ library?
(using windows if this matters)
## Answer
You should have a look at Boost.Python, here is the short introdution taken from their website:
The Boost Python Library is a framework for interf... | stackoverflow-qa |
# Calling C/C++ from python?
## Question
What would be the quickest way to construct a python binding to a C or C++ library?
(using windows if this matters)
## Answer
I like ctypes a lot, swig always tended to give me problems. Also ctypes has the advantage that you don't need to satisfy any compile time dependency ... | stackoverflow-qa |
# Calling C/C++ from python?
## Question
What would be the quickest way to construct a python binding to a C or C++ library?
(using windows if this matters)
## Answer
I think cffi for python can be an option.
The goal is to call C code from Python. You should be able to do so
without learning a 3rd language: e... | stackoverflow-qa |
# Calling C/C++ from python?
## Question
What would be the quickest way to construct a python binding to a C or C++ library?
(using windows if this matters)
## Answer
I started my journey in the python <-> C++ binding from this page, with the objective of linking high level data types (multidimensional STL vectors w... | stackoverflow-qa |
# Calling C/C++ from python?
## Question
What would be the quickest way to construct a python binding to a C or C++ library?
(using windows if this matters)
## Answer
First you should decide what is your particular purpose. The official Python documentation on extending and embedding the Python interpreter was menti... | stackoverflow-qa |
# Calling C/C++ from python?
## Question
What would be the quickest way to construct a python binding to a C or C++ library?
(using windows if this matters)
## Answer
The question is how to call a C function from Python, if I understood correctly. Then the best bet are Ctypes (BTW portable across all variants of Pyt... | stackoverflow-qa |
# Calling C/C++ from python?
## Question
What would be the quickest way to construct a python binding to a C or C++ library?
(using windows if this matters)
## Answer
Cython is definitely the way to go, unless you anticipate writing Java wrappers, in which case SWIG may be preferable.
I recommend using the runcyt... | stackoverflow-qa |
# Calling C/C++ from python?
## Question
What would be the quickest way to construct a python binding to a C or C++ library?
(using windows if this matters)
## Answer
There is also pybind11, which is like a lightweight version of Boost and compatible with all modern C++ compilers :
https://pybind11.readthedocs.io/... | stackoverflow-qa |
# Text difference algorithm
## Question
I need an algorithm that can compare two text files and highlight their difference and ( even better!) can compute their difference in a meaningful way (like two similar files should have a similarity score higher than two dissimilar files, with the word "similar" defined in th... | stackoverflow-qa |
# Text difference algorithm
## Question
I need an algorithm that can compare two text files and highlight their difference and ( even better!) can compute their difference in a meaningful way (like two similar files should have a similarity score higher than two dissimilar files, with the word "similar" defined in th... | stackoverflow-qa |
# Text difference algorithm
## Question
I need an algorithm that can compare two text files and highlight their difference and ( even better!) can compute their difference in a meaningful way (like two similar files should have a similarity score higher than two dissimilar files, with the word "similar" defined in th... | stackoverflow-qa |
# Text difference algorithm
## Question
I need an algorithm that can compare two text files and highlight their difference and ( even better!) can compute their difference in a meaningful way (like two similar files should have a similarity score higher than two dissimilar files, with the word "similar" defined in th... | stackoverflow-qa |
# Text difference algorithm
## Question
I need an algorithm that can compare two text files and highlight their difference and ( even better!) can compute their difference in a meaningful way (like two similar files should have a similarity score higher than two dissimilar files, with the word "similar" defined in th... | stackoverflow-qa |
# Text difference algorithm
## Question
I need an algorithm that can compare two text files and highlight their difference and ( even better!) can compute their difference in a meaningful way (like two similar files should have a similarity score higher than two dissimilar files, with the word "similar" defined in th... | stackoverflow-qa |
# Text difference algorithm
## Question
I need an algorithm that can compare two text files and highlight their difference and ( even better!) can compute their difference in a meaningful way (like two similar files should have a similarity score higher than two dissimilar files, with the word "similar" defined in th... | stackoverflow-qa |
# Text difference algorithm
## Question
I need an algorithm that can compare two text files and highlight their difference and ( even better!) can compute their difference in a meaningful way (like two similar files should have a similarity score higher than two dissimilar files, with the word "similar" defined in th... | stackoverflow-qa |
# Text difference algorithm
## Question
I need an algorithm that can compare two text files and highlight their difference and ( even better!) can compute their difference in a meaningful way (like two similar files should have a similarity score higher than two dissimilar files, with the word "similar" defined in th... | stackoverflow-qa |
# How do I successfully pass a function reference to Djangoâs reverse() function?
## Question
Iâve got a brand new Django project. Iâve added one minimal view function to views.py, and one URL pattern to urls.py, passing the view by function reference instead of a string:
# urls.py
# -------
# coding=utf-8
fr... | stackoverflow-qa |
# How do I successfully pass a function reference to Djangoâs reverse() function?
## Question
Iâve got a brand new Django project. Iâve added one minimal view function to views.py, and one URL pattern to urls.py, passing the view by function reference instead of a string:
# urls.py
# -------
# coding=utf-8
fr... | stackoverflow-qa |
# I'm using Python regexes in a criminally inefficient manner
## Question
My goal here is to create a very simple template language. At the moment, I'm working on replacing a variable with a value, like this:
This input:
<%"TITLE"="This Is A Test Variable"%>The Web <%"TITLE"%>
Should produce this output:
Th... | stackoverflow-qa |
# I'm using Python regexes in a criminally inefficient manner
## Question
My goal here is to create a very simple template language. At the moment, I'm working on replacing a variable with a value, like this:
This input:
<%"TITLE"="This Is A Test Variable"%>The Web <%"TITLE"%>
Should produce this output:
Th... | stackoverflow-qa |
# I'm using Python regexes in a criminally inefficient manner
## Question
My goal here is to create a very simple template language. At the moment, I'm working on replacing a variable with a value, like this:
This input:
<%"TITLE"="This Is A Test Variable"%>The Web <%"TITLE"%>
Should produce this output:
Th... | stackoverflow-qa |
# I'm using Python regexes in a criminally inefficient manner
## Question
My goal here is to create a very simple template language. At the moment, I'm working on replacing a variable with a value, like this:
This input:
<%"TITLE"="This Is A Test Variable"%>The Web <%"TITLE"%>
Should produce this output:
Th... | stackoverflow-qa |
# I'm using Python regexes in a criminally inefficient manner
## Question
My goal here is to create a very simple template language. At the moment, I'm working on replacing a variable with a value, like this:
This input:
<%"TITLE"="This Is A Test Variable"%>The Web <%"TITLE"%>
Should produce this output:
Th... | stackoverflow-qa |
# I'm using Python regexes in a criminally inefficient manner
## Question
My goal here is to create a very simple template language. At the moment, I'm working on replacing a variable with a value, like this:
This input:
<%"TITLE"="This Is A Test Variable"%>The Web <%"TITLE"%>
Should produce this output:
Th... | stackoverflow-qa |
# I'm using Python regexes in a criminally inefficient manner
## Question
My goal here is to create a very simple template language. At the moment, I'm working on replacing a variable with a value, like this:
This input:
<%"TITLE"="This Is A Test Variable"%>The Web <%"TITLE"%>
Should produce this output:
Th... | stackoverflow-qa |
# I'm using Python regexes in a criminally inefficient manner
## Question
My goal here is to create a very simple template language. At the moment, I'm working on replacing a variable with a value, like this:
This input:
<%"TITLE"="This Is A Test Variable"%>The Web <%"TITLE"%>
Should produce this output:
Th... | stackoverflow-qa |
# In Django, where is the best place to put short snippets of HTML-formatted data?
## Question
This question is related to (but perhaps not quite the same as):
http://stackoverflow.com/questions/61451/does-django-have-html-helpers
My problem is this: In Django, I am constantly reproducing the basic formatting for lo... | stackoverflow-qa |
# In Django, where is the best place to put short snippets of HTML-formatted data?
## Question
This question is related to (but perhaps not quite the same as):
http://stackoverflow.com/questions/61451/does-django-have-html-helpers
My problem is this: In Django, I am constantly reproducing the basic formatting for lo... | stackoverflow-qa |
# In Django, where is the best place to put short snippets of HTML-formatted data?
## Question
This question is related to (but perhaps not quite the same as):
http://stackoverflow.com/questions/61451/does-django-have-html-helpers
My problem is this: In Django, I am constantly reproducing the basic formatting for lo... | stackoverflow-qa |
# Difflib.SequenceMatcher isjunk optional parameter query: how to ignore whitespaces, tabs, empty lines?
## Question
I am trying to use Difflib.SequenceMatcher to compute the similarities between two files. These two files are almost identical except that one contains some extra whitespaces, empty lines and other does... | stackoverflow-qa |
# Difflib.SequenceMatcher isjunk optional parameter query: how to ignore whitespaces, tabs, empty lines?
## Question
I am trying to use Difflib.SequenceMatcher to compute the similarities between two files. These two files are almost identical except that one contains some extra whitespaces, empty lines and other does... | stackoverflow-qa |
# Difflib.SequenceMatcher isjunk optional parameter query: how to ignore whitespaces, tabs, empty lines?
## Question
I am trying to use Difflib.SequenceMatcher to compute the similarities between two files. These two files are almost identical except that one contains some extra whitespaces, empty lines and other does... | stackoverflow-qa |
# Difflib.SequenceMatcher isjunk optional parameter query: how to ignore whitespaces, tabs, empty lines?
## Question
I am trying to use Difflib.SequenceMatcher to compute the similarities between two files. These two files are almost identical except that one contains some extra whitespaces, empty lines and other does... | stackoverflow-qa |
# How does one do the equivalent of "import * from module" with Python's __import__ function?
## Question
Given a string with a module name, how do you import everything in the module as if you had called:
from module import *
i.e. given string S="module", how does one get the equivalent of the following:
__import... | stackoverflow-qa |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.