title stringlengths 10 172 | question_id int64 469 40.1M | question_body stringlengths 22 48.2k | question_score int64 -44 5.52k | question_date stringlengths 20 20 | answer_id int64 497 40.1M | answer_body stringlengths 18 33.9k | answer_score int64 -38 8.38k | answer_date stringlengths 20 20 | tags listlengths 1 5 |
|---|---|---|---|---|---|---|---|---|---|
Scripts to documents (Matlab's publish functionality in python) | 877,145 | <p>Matlab has this great tool called <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/publish.html">publish</a>. This tool converts a regular matlab script with minimal formatting stuff into structured, nice looking reports (HTML, LateX, RTF). It is capable of ... | 5 | 2009-05-18T10:51:44Z | 877,309 | <p>There's <a href="http://gael-varoquaux.info/computers/pyreport/">pyreport</a>. It captures the "captures its output, compiling it to a pretty report in a pdf or an html file". With this, you can write scripts that print out your source, getting a nice report in the end.</p>
| 5 | 2009-05-18T11:43:07Z | [
"python",
"matlab",
"reporting",
"report"
] |
python dict.add_by_value(dict_2)? | 877,295 | <p>The problem:</p>
<pre><code>>>> a = dict(a=1,b=2 )
>>> b = dict( b=3,c=2)
>>> c = ???
c = {'a': 1, 'b': 5, 'c': 2}
</code></pre>
<p>So, the idea is two add to dictionaries by int/float values in the shortest form.
Here's one solution that I've devised, but I don't like it, cause ... | 9 | 2009-05-18T11:40:11Z | 877,348 | <p>I think one line of code is already pretty short :)</p>
<p>I may become "half a line", it you use <a href="http://docs.python.org/library/collections.html#collections.defaultdict" rel="nofollow">defaultdict</a> and remove some unnecessary list and set creations:</p>
<pre><code>from collections import defaultdict
... | 4 | 2009-05-18T11:55:33Z | [
"python",
"code-golf",
"dictionary"
] |
python dict.add_by_value(dict_2)? | 877,295 | <p>The problem:</p>
<pre><code>>>> a = dict(a=1,b=2 )
>>> b = dict( b=3,c=2)
>>> c = ???
c = {'a': 1, 'b': 5, 'c': 2}
</code></pre>
<p>So, the idea is two add to dictionaries by int/float values in the shortest form.
Here's one solution that I've devised, but I don't like it, cause ... | 9 | 2009-05-18T11:40:11Z | 877,363 | <p>In my first impression, I will write:</p>
<pre><code>>>> c = a.copy()
>>> for k in b: c[k] = c.get(k, 0) + b[k]
</code></pre>
| 5 | 2009-05-18T11:58:41Z | [
"python",
"code-golf",
"dictionary"
] |
python dict.add_by_value(dict_2)? | 877,295 | <p>The problem:</p>
<pre><code>>>> a = dict(a=1,b=2 )
>>> b = dict( b=3,c=2)
>>> c = ???
c = {'a': 1, 'b': 5, 'c': 2}
</code></pre>
<p>So, the idea is two add to dictionaries by int/float values in the shortest form.
Here's one solution that I've devised, but I don't like it, cause ... | 9 | 2009-05-18T11:40:11Z | 877,395 | <p>If you want short code, you're there.</p>
<p>If you want clean code, inherit from Ber's <code>defaultdict</code> and overload <code>__add__</code>:</p>
<pre><code>from collections import defaultdict
class summable(defaultdict):
def __add__(self, rhs):
new = summable()
for i in (self.keys() + r... | 5 | 2009-05-18T12:05:28Z | [
"python",
"code-golf",
"dictionary"
] |
python dict.add_by_value(dict_2)? | 877,295 | <p>The problem:</p>
<pre><code>>>> a = dict(a=1,b=2 )
>>> b = dict( b=3,c=2)
>>> c = ???
c = {'a': 1, 'b': 5, 'c': 2}
</code></pre>
<p>So, the idea is two add to dictionaries by int/float values in the shortest form.
Here's one solution that I've devised, but I don't like it, cause ... | 9 | 2009-05-18T11:40:11Z | 878,168 | <p>solving not in terms of "length" but performance, I'd do the following:</p>
<pre><code>>>> from collections import defaultdict
>>> def d_sum(a, b):
d = defaultdict(int, a)
for k, v in b.items():
d[k] += v
return dict(d)
>>> a = {'a': 1, 'b': 2}
>>... | 8 | 2009-05-18T15:00:51Z | [
"python",
"code-golf",
"dictionary"
] |
python dict.add_by_value(dict_2)? | 877,295 | <p>The problem:</p>
<pre><code>>>> a = dict(a=1,b=2 )
>>> b = dict( b=3,c=2)
>>> c = ???
c = {'a': 1, 'b': 5, 'c': 2}
</code></pre>
<p>So, the idea is two add to dictionaries by int/float values in the shortest form.
Here's one solution that I've devised, but I don't like it, cause ... | 9 | 2009-05-18T11:40:11Z | 878,746 | <pre><code>def GenerateSum():
for k in set(a).union(b):
yield k, a.get(k, 0) + b.get(k, 0)
e = dict(GenerateSum())
print e
</code></pre>
<p>or, with a one liner:</p>
<pre><code> print dict((k, a.get(k,0) + b.get(k,0)) for k in set(a).union(b))
</code></pre>
| 1 | 2009-05-18T17:05:09Z | [
"python",
"code-golf",
"dictionary"
] |
python dict.add_by_value(dict_2)? | 877,295 | <p>The problem:</p>
<pre><code>>>> a = dict(a=1,b=2 )
>>> b = dict( b=3,c=2)
>>> c = ???
c = {'a': 1, 'b': 5, 'c': 2}
</code></pre>
<p>So, the idea is two add to dictionaries by int/float values in the shortest form.
Here's one solution that I've devised, but I don't like it, cause ... | 9 | 2009-05-18T11:40:11Z | 1,009,430 | <p>The first thing I think of is a bit more efficient and (IMO) a bit more elegant, but still too much typing. Actually, it's about equivalent to kcwu's.</p>
<pre><code>c = reduce(lambda(d, k): [d.update({k: d.get(k, 0) + b[k]}), d][1], b, a.copy())
</code></pre>
<p>It's really a shame that <code>dict.update</code> ... | 3 | 2009-06-17T20:44:17Z | [
"python",
"code-golf",
"dictionary"
] |
python dict.add_by_value(dict_2)? | 877,295 | <p>The problem:</p>
<pre><code>>>> a = dict(a=1,b=2 )
>>> b = dict( b=3,c=2)
>>> c = ???
c = {'a': 1, 'b': 5, 'c': 2}
</code></pre>
<p>So, the idea is two add to dictionaries by int/float values in the shortest form.
Here's one solution that I've devised, but I don't like it, cause ... | 9 | 2009-05-18T11:40:11Z | 1,027,258 | <h3>Comment for <a href="http://stackoverflow.com/questions/877295/python-dict-addbyvaluedict2/877395#877395">@John Pirie's answer</a>:</h3>
<p>Here's implementation that doesn't use <code>(self.keys() + rhs.keys())</code>:</p>
<pre><code>from collections import defaultdict
class sumdict(defaultdict):
def __add_... | 2 | 2009-06-22T13:37:11Z | [
"python",
"code-golf",
"dictionary"
] |
python dict.add_by_value(dict_2)? | 877,295 | <p>The problem:</p>
<pre><code>>>> a = dict(a=1,b=2 )
>>> b = dict( b=3,c=2)
>>> c = ???
c = {'a': 1, 'b': 5, 'c': 2}
</code></pre>
<p>So, the idea is two add to dictionaries by int/float values in the shortest form.
Here's one solution that I've devised, but I don't like it, cause ... | 9 | 2009-05-18T11:40:11Z | 11,837,857 | <p>Easiest to just use a <code>Counter</code></p>
<pre><code>>>> from collections import Counter
>>> a = dict(a=1,b=2 )
>>> b = dict( b=3,c=2)
>>> Counter(a)+Counter(b)
Counter({'b': 5, 'c': 2, 'a': 1})
>>> dict(Counter({'b': 5, 'c': 2, 'a': 1}))
{'a': 1, 'c': 2, 'b':... | 7 | 2012-08-07T00:42:22Z | [
"python",
"code-golf",
"dictionary"
] |
try... except... except... : how to avoid repeating code | 877,440 | <ul>
<li>I'd like to avoid writting <code>errorCount += 1</code> in more than one place.</li>
<li>I'm looking for a better way than</li>
</ul>
<pre>
success = False
try:
...
else:
success = True
finally:
if success:
storage.store.commit()
else:
st... | 3 | 2009-05-18T12:14:41Z | 877,456 | <p>You could simply wrap up your exception implementation inside an exception specific container class, that way you could also avoid all these explicit print calls (which may come in handy once you change your interface, e.g. when supporting a GUI), instead you would have a method like error(msg), which in turn could ... | 2 | 2009-05-18T12:18:30Z | [
"python",
"try-catch",
"dry"
] |
try... except... except... : how to avoid repeating code | 877,440 | <ul>
<li>I'd like to avoid writting <code>errorCount += 1</code> in more than one place.</li>
<li>I'm looking for a better way than</li>
</ul>
<pre>
success = False
try:
...
else:
success = True
finally:
if success:
storage.store.commit()
else:
st... | 3 | 2009-05-18T12:14:41Z | 877,462 | <p>If you like cumulate the errors why you don't cumulate the errors? If you put the error messages on a list the size of the list gives the information you need. You can even postprocess something. You can decide easy if an error occured and print is called only at a single place</p>
| 0 | 2009-05-18T12:19:37Z | [
"python",
"try-catch",
"dry"
] |
try... except... except... : how to avoid repeating code | 877,440 | <ul>
<li>I'd like to avoid writting <code>errorCount += 1</code> in more than one place.</li>
<li>I'm looking for a better way than</li>
</ul>
<pre>
success = False
try:
...
else:
success = True
finally:
if success:
storage.store.commit()
else:
st... | 3 | 2009-05-18T12:14:41Z | 877,467 | <p>Well, according to this page, part 7.4:</p>
<p><a href="http://docs.python.org/reference/compound%5Fstmts.html" rel="nofollow">http://docs.python.org/reference/compound_stmts.html</a></p>
<p>This is possible with python ver. >= 2.6. I mean try..except..finally construction.</p>
| 0 | 2009-05-18T12:21:18Z | [
"python",
"try-catch",
"dry"
] |
try... except... except... : how to avoid repeating code | 877,440 | <ul>
<li>I'd like to avoid writting <code>errorCount += 1</code> in more than one place.</li>
<li>I'm looking for a better way than</li>
</ul>
<pre>
success = False
try:
...
else:
success = True
finally:
if success:
storage.store.commit()
else:
st... | 3 | 2009-05-18T12:14:41Z | 877,483 | <p>My suggestion would to write an <code>logError()</code> method that increments <code>errorCount</code> (make it a member variable) and prints the error. Since your exception code is similar, you could also shorten your code by doing this:</p>
<pre><code>try:
# something
except (CustomerNotFoundError, ProductNot... | 3 | 2009-05-18T12:25:37Z | [
"python",
"try-catch",
"dry"
] |
try... except... except... : how to avoid repeating code | 877,440 | <ul>
<li>I'd like to avoid writting <code>errorCount += 1</code> in more than one place.</li>
<li>I'm looking for a better way than</li>
</ul>
<pre>
success = False
try:
...
else:
success = True
finally:
if success:
storage.store.commit()
else:
st... | 3 | 2009-05-18T12:14:41Z | 877,485 | <p>This look like a possible application of Python's new <code>with</code> statement. It allows to to unwind operations and release resources securely no matter what outcome a block of code had.</p>
<p>Read about it in <a href="http://www.python.org/dev/peps/pep-0343/" rel="nofollow">PEP 343</a></p>
| 8 | 2009-05-18T12:25:52Z | [
"python",
"try-catch",
"dry"
] |
What's the simplest way to extend a numpy array in 2 dimensions? | 877,479 | <p>I have a 2d array that looks like this:</p>
<pre><code>XX
xx
</code></pre>
<p>What's the most efficient way to add an extra row and column:</p>
<pre><code>xxy
xxy
yyy
</code></pre>
<p>For bonus points, I'd like to also be able to knock out single rows and columns, so for example in the matrix below I'd like to b... | 31 | 2009-05-18T12:24:11Z | 877,564 | <p>The shortest in terms of lines of code i can think of is for the first question.</p>
<pre><code>>>> import numpy as np
>>> p = np.array([[1,2],[3,4]])
>>> p = np.append(p, [[5,6]], 0)
>>> p = np.append(p, [[7],[8],[9]],1)
>>> p
array([[1, 2, 7],
[3, 4, 8],
[5, 6,... | 35 | 2009-05-18T12:47:07Z | [
"python",
"arrays",
"math",
"numpy"
] |
What's the simplest way to extend a numpy array in 2 dimensions? | 877,479 | <p>I have a 2d array that looks like this:</p>
<pre><code>XX
xx
</code></pre>
<p>What's the most efficient way to add an extra row and column:</p>
<pre><code>xxy
xxy
yyy
</code></pre>
<p>For bonus points, I'd like to also be able to knock out single rows and columns, so for example in the matrix below I'd like to b... | 31 | 2009-05-18T12:24:11Z | 5,650,582 | <p><strong>A useful alternative answer to the first question, using the examples from</strong> tomeedeeâs <strong>answer, would be to use numpyâs</strong> vstack <strong>and</strong> column_stack <strong>methods:</strong></p>
<p>Given a matrix p,</p>
<pre><code>>>> import numpy as np
>>> p = np.... | 31 | 2011-04-13T14:04:28Z | [
"python",
"arrays",
"math",
"numpy"
] |
What's the simplest way to extend a numpy array in 2 dimensions? | 877,479 | <p>I have a 2d array that looks like this:</p>
<pre><code>XX
xx
</code></pre>
<p>What's the most efficient way to add an extra row and column:</p>
<pre><code>xxy
xxy
yyy
</code></pre>
<p>For bonus points, I'd like to also be able to knock out single rows and columns, so for example in the matrix below I'd like to b... | 31 | 2009-05-18T12:24:11Z | 7,096,433 | <p>Answer to the first question:</p>
<p>Use numpy.append.</p>
<p><a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.append.html#numpy.append" rel="nofollow">http://docs.scipy.org/doc/numpy/reference/generated/numpy.append.html#numpy.append</a></p>
<p>Answer to the second question:</p>
<p>Use numpy.d... | 2 | 2011-08-17T16:41:26Z | [
"python",
"arrays",
"math",
"numpy"
] |
What's the simplest way to extend a numpy array in 2 dimensions? | 877,479 | <p>I have a 2d array that looks like this:</p>
<pre><code>XX
xx
</code></pre>
<p>What's the most efficient way to add an extra row and column:</p>
<pre><code>xxy
xxy
yyy
</code></pre>
<p>For bonus points, I'd like to also be able to knock out single rows and columns, so for example in the matrix below I'd like to b... | 31 | 2009-05-18T12:24:11Z | 14,139,115 | <p>I find it much easier to "extend" via assigning in a bigger matrix. E.g.</p>
<pre><code>import numpy as np
p = np.array([[1,2], [3,4]])
g = np.array(range(20))
g.shape = (4,5)
g[0:2, 0:2] = p
</code></pre>
<p>Here are the arrays:</p>
<p><code>p</code></p>
<pre><code> array([[1, 2],
[3, 4]])
</code></pre... | 4 | 2013-01-03T12:37:50Z | [
"python",
"arrays",
"math",
"numpy"
] |
What's the simplest way to extend a numpy array in 2 dimensions? | 877,479 | <p>I have a 2d array that looks like this:</p>
<pre><code>XX
xx
</code></pre>
<p>What's the most efficient way to add an extra row and column:</p>
<pre><code>xxy
xxy
yyy
</code></pre>
<p>For bonus points, I'd like to also be able to knock out single rows and columns, so for example in the matrix below I'd like to b... | 31 | 2009-05-18T12:24:11Z | 17,301,073 | <p>maybe you need this.</p>
<pre><code>>>> x = np.array([11,22])
>>> y = np.array([18,7,6])
>>> z = np.array([1,3,5])
>>> np.concatenate((x,y,z))
array([11, 22, 18, 7, 6, 1, 3, 5])
</code></pre>
| 0 | 2013-06-25T15:11:56Z | [
"python",
"arrays",
"math",
"numpy"
] |
What's the simplest way to extend a numpy array in 2 dimensions? | 877,479 | <p>I have a 2d array that looks like this:</p>
<pre><code>XX
xx
</code></pre>
<p>What's the most efficient way to add an extra row and column:</p>
<pre><code>xxy
xxy
yyy
</code></pre>
<p>For bonus points, I'd like to also be able to knock out single rows and columns, so for example in the matrix below I'd like to b... | 31 | 2009-05-18T12:24:11Z | 18,207,897 | <p>Another elegant solution to the <strong>first question</strong> may be the <code>insert</code> command:</p>
<pre><code>p = np.array([[1,2],[3,4]])
p = np.insert(p, 2, values=0, axis=1) # insert values before column 2
</code></pre>
<p>Leads to:</p>
<pre><code>array([[1, 2, 0],
[3, 4, 0]])
</code></pre>
<p>... | 6 | 2013-08-13T11:29:16Z | [
"python",
"arrays",
"math",
"numpy"
] |
What's the simplest way to extend a numpy array in 2 dimensions? | 877,479 | <p>I have a 2d array that looks like this:</p>
<pre><code>XX
xx
</code></pre>
<p>What's the most efficient way to add an extra row and column:</p>
<pre><code>xxy
xxy
yyy
</code></pre>
<p>For bonus points, I'd like to also be able to knock out single rows and columns, so for example in the matrix below I'd like to b... | 31 | 2009-05-18T12:24:11Z | 32,546,514 | <p>You can use: </p>
<pre><code>>>> np.concatenate([array1, array2, ...])
</code></pre>
<p>e.g.</p>
<pre><code>>>> import numpy as np
>>> a = [[1, 2, 3],[10, 20, 30]]
>>> b = [[100,200,300]]
>>> a = np.array(a) # not necessary, but numpy objects prefered to built-in
>... | 1 | 2015-09-13T05:08:32Z | [
"python",
"arrays",
"math",
"numpy"
] |
Fastest way to convert a Numpy array into a sparse dictionary? | 877,578 | <p>I'm interested in converting a numpy array into a sparse dictionary as quickly as possible. Let me elaborate:</p>
<p>Given the array:</p>
<pre><code>numpy.array([12,0,0,0,3,0,0,1])
</code></pre>
<p>I wish to produce the dictionary:</p>
<pre><code>{0:12, 4:3, 7:1}
</code></pre>
<p>As you can see, we are simply c... | 4 | 2009-05-18T12:52:21Z | 878,138 | <p>I wonder if chief time cost is resizing the dict as it grows.</p>
<p>Would be nice if dict had a method (or instantiation option) to specify a start size; so if we knew it was going to be big, python could save time and just do one big mem alloc up front, rather than what I assume are additional allocs as we grow.<... | 2 | 2009-05-18T14:53:36Z | [
"python",
"performance",
"numpy"
] |
Fastest way to convert a Numpy array into a sparse dictionary? | 877,578 | <p>I'm interested in converting a numpy array into a sparse dictionary as quickly as possible. Let me elaborate:</p>
<p>Given the array:</p>
<pre><code>numpy.array([12,0,0,0,3,0,0,1])
</code></pre>
<p>I wish to produce the dictionary:</p>
<pre><code>{0:12, 4:3, 7:1}
</code></pre>
<p>As you can see, we are simply c... | 4 | 2009-05-18T12:52:21Z | 1,048,340 | <p>Tried this?</p>
<p>from numpy import where</p>
<p>i = where(vector > 0)[0]</p>
| 0 | 2009-06-26T10:15:58Z | [
"python",
"performance",
"numpy"
] |
Fastest way to convert a Numpy array into a sparse dictionary? | 877,578 | <p>I'm interested in converting a numpy array into a sparse dictionary as quickly as possible. Let me elaborate:</p>
<p>Given the array:</p>
<pre><code>numpy.array([12,0,0,0,3,0,0,1])
</code></pre>
<p>I wish to produce the dictionary:</p>
<pre><code>{0:12, 4:3, 7:1}
</code></pre>
<p>As you can see, we are simply c... | 4 | 2009-05-18T12:52:21Z | 6,198,963 | <p>use the sparse matrix in scipy as bridge:</p>
<pre><code>from scipy.sparse import *
import numpy
a=numpy.array([12,0,0,0,3,0,0,1])
m=csr_matrix(a)
d={}
for i in m.nonzero()[1]:
d[i]=m[0,i]
print d
</code></pre>
| 1 | 2011-06-01T09:24:59Z | [
"python",
"performance",
"numpy"
] |
Fastest way to convert a Numpy array into a sparse dictionary? | 877,578 | <p>I'm interested in converting a numpy array into a sparse dictionary as quickly as possible. Let me elaborate:</p>
<p>Given the array:</p>
<pre><code>numpy.array([12,0,0,0,3,0,0,1])
</code></pre>
<p>I wish to produce the dictionary:</p>
<pre><code>{0:12, 4:3, 7:1}
</code></pre>
<p>As you can see, we are simply c... | 4 | 2009-05-18T12:52:21Z | 26,672,912 | <pre><code>>>> a=np.array([12,0,0,0,3,0,0,1])
>>> {i:a[i] for i in np.nonzero(a)[0]}
{0: 12, 4: 3, 7: 1}
</code></pre>
| 2 | 2014-10-31T10:52:45Z | [
"python",
"performance",
"numpy"
] |
Fastest way to convert a Numpy array into a sparse dictionary? | 877,578 | <p>I'm interested in converting a numpy array into a sparse dictionary as quickly as possible. Let me elaborate:</p>
<p>Given the array:</p>
<pre><code>numpy.array([12,0,0,0,3,0,0,1])
</code></pre>
<p>I wish to produce the dictionary:</p>
<pre><code>{0:12, 4:3, 7:1}
</code></pre>
<p>As you can see, we are simply c... | 4 | 2009-05-18T12:52:21Z | 26,682,853 | <p>The following seems to be a significant improvement:</p>
<pre><code>i = np.flatnonzero(vector)
dict.fromkeys(i.tolist(), vector[i].tolist())
</code></pre>
<p>Timing:</p>
<pre><code>import numpy as np
from itertools import izip
vector = np.random.poisson(0.1, size=10000)
%timeit f = np.flatnonzero(vector); dict(... | 0 | 2014-10-31T20:24:31Z | [
"python",
"performance",
"numpy"
] |
How should I return interesting values from a with-statement? | 877,709 | <p>Is there a better way than using globals to get interesting values from a context manager?</p>
<pre><code>@contextmanager
def transaction():
global successCount
global errorCount
try:
yield
except:
storage.store.rollback()
errorCount += 1
else:
storage.store.commi... | 2 | 2009-05-18T13:20:15Z | 877,747 | <p>See <a href="http://docs.python.org/reference/datamodel.html#context-managers" rel="nofollow">http://docs.python.org/reference/datamodel.html#context-managers</a></p>
<p>Create a class which holds the success and error counts, and which implements the <code>__enter__</code> and <code>__exit__</code> methods.</p>
| 6 | 2009-05-18T13:31:38Z | [
"python",
"with-statement",
"contextmanager"
] |
How should I return interesting values from a with-statement? | 877,709 | <p>Is there a better way than using globals to get interesting values from a context manager?</p>
<pre><code>@contextmanager
def transaction():
global successCount
global errorCount
try:
yield
except:
storage.store.rollback()
errorCount += 1
else:
storage.store.commi... | 2 | 2009-05-18T13:20:15Z | 877,837 | <p>I still think you should be creating a class to hold you error/success counts, as I said in you <a href="http://stackoverflow.com/questions/877440/try-except-except-how-to-avoid-repeating-code">last question</a>. I'm guessing you have your own class, so just add something like this to it:</p>
<pre><code>class tran... | 2 | 2009-05-18T13:49:53Z | [
"python",
"with-statement",
"contextmanager"
] |
How should I return interesting values from a with-statement? | 877,709 | <p>Is there a better way than using globals to get interesting values from a context manager?</p>
<pre><code>@contextmanager
def transaction():
global successCount
global errorCount
try:
yield
except:
storage.store.rollback()
errorCount += 1
else:
storage.store.commi... | 2 | 2009-05-18T13:20:15Z | 877,999 | <p>"tuple as an argument to the context manager</p>
<p>makes the function more specific to a problem /less reusable"</p>
<p>False.</p>
<p>This makes the context manager retain state.</p>
<p>If you don't implement anything more than this, it will be reusable.</p>
<p>However, you can't actually use a tuple because i... | -1 | 2009-05-18T14:21:02Z | [
"python",
"with-statement",
"contextmanager"
] |
Resumable File Upload | 878,143 | <p>I am in the design phase of a file upload service that allows users to upload very large zip files to our server as well as updates our database with the data. Since the files are large (About 300mb) we want to allow the user to limit the amount of bandwidth they want to use for uploading. They should also be able... | 5 | 2009-05-18T14:56:04Z | 878,154 | <p>What's wrong with FTP? The protocol supports reusability and there are lots and lots of clients.</p>
| 4 | 2009-05-18T14:58:31Z | [
"c#",
"java",
"python",
"design"
] |
Resumable File Upload | 878,143 | <p>I am in the design phase of a file upload service that allows users to upload very large zip files to our server as well as updates our database with the data. Since the files are large (About 300mb) we want to allow the user to limit the amount of bandwidth they want to use for uploading. They should also be able... | 5 | 2009-05-18T14:56:04Z | 878,160 | <p>On client side, flash; On server side, whatever (it wouldn't make any difference).</p>
<p>No existing technologies (except for using FTP or something).</p>
| 0 | 2009-05-18T14:59:35Z | [
"c#",
"java",
"python",
"design"
] |
Resumable File Upload | 878,143 | <p>I am in the design phase of a file upload service that allows users to upload very large zip files to our server as well as updates our database with the data. Since the files are large (About 300mb) we want to allow the user to limit the amount of bandwidth they want to use for uploading. They should also be able... | 5 | 2009-05-18T14:56:04Z | 878,250 | <p>There are quite a few upload controls for this you should be able to Google. There are a few on this <a href="http://thin-slice-upload.qarchive.org/" rel="nofollow">download page</a>.</p>
<p>Another work around is to have your clients install a Firefox FTP plugin or write a Firefox plugin yourself but FTP is by far... | 4 | 2009-05-18T15:16:20Z | [
"c#",
"java",
"python",
"design"
] |
Resumable File Upload | 878,143 | <p>I am in the design phase of a file upload service that allows users to upload very large zip files to our server as well as updates our database with the data. Since the files are large (About 300mb) we want to allow the user to limit the amount of bandwidth they want to use for uploading. They should also be able... | 5 | 2009-05-18T14:56:04Z | 7,661,871 | <p>I found 2 more possibilities</p>
<ul>
<li><p><strong>Microsoft Background Intelligent Transfer Service (BITS)</strong>:</p>
<p><strong>Has</strong>: up and download, large files, encrypted (vis https), resumable (even auto resuming as long as the user is logged in), manual pause and resume, authentication (via htt... | 0 | 2011-10-05T13:16:44Z | [
"c#",
"java",
"python",
"design"
] |
Resumable File Upload | 878,143 | <p>I am in the design phase of a file upload service that allows users to upload very large zip files to our server as well as updates our database with the data. Since the files are large (About 300mb) we want to allow the user to limit the amount of bandwidth they want to use for uploading. They should also be able... | 5 | 2009-05-18T14:56:04Z | 18,015,229 | <p>There's an example of using HTML5 to create a resumable large file upload, might be helpful.</p>
<p><a href="http://net.tutsplus.com/tutorials/javascript-ajax/how-to-create-a-resumable-video-uploade-in-node-js/" rel="nofollow">http://net.tutsplus.com/tutorials/javascript-ajax/how-to-create-a-resumable-video-uploade... | 0 | 2013-08-02T10:58:38Z | [
"c#",
"java",
"python",
"design"
] |
Resumable File Upload | 878,143 | <p>I am in the design phase of a file upload service that allows users to upload very large zip files to our server as well as updates our database with the data. Since the files are large (About 300mb) we want to allow the user to limit the amount of bandwidth they want to use for uploading. They should also be able... | 5 | 2009-05-18T14:56:04Z | 30,990,243 | <p>I'm surprised no one has mentioned torrent files. They can also be packaged into a script that then triggers something to execute.</p>
| 0 | 2015-06-22T21:35:53Z | [
"c#",
"java",
"python",
"design"
] |
PyImport_Import vs import | 878,439 | <p>I've tried to replace </p>
<pre><code>PyRun_SimpleString("import Pootle");
</code></pre>
<p>with</p>
<pre><code>PyObject *obj = PyString_FromString("Pootle");
PyImport_Import(obj);
Py_DECREF(obj);
</code></pre>
<p>after initialising the module Pootle in some C code. The first seems to make the name <code>Pootle<... | 1 | 2009-05-18T15:56:27Z | 878,790 | <p>All the <code>PyImport_Import</code> call does is return a reference to the module -- it doesn't make such a reference available to other parts of the program. So, if you want <code>PyRun_SimpleString</code> to see your new imported module, you need to add it manually.</p>
<p><code>PyRun_SimpleString</code> works a... | 3 | 2009-05-18T17:11:32Z | [
"python",
"c",
"import"
] |
What is the Python equivalent to JDBC DatabaseMetaData? | 878,737 | <p>What is the Python equivalent to <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/sql/DatabaseMetaData.html" rel="nofollow">DatabaseMetaData</a></p>
| 3 | 2009-05-18T17:03:24Z | 878,858 | <p>If your willing to use ODBC for data access then you could use pyodbc, <a href="http://code.google.com/p/pyodbc/wiki/Features" rel="nofollow">http://code.google.com/p/pyodbc/wiki/Features</a>. Pyodbc allows you to call functions like SQLTables, which is equivalent to the JDBC getTables function. The JDBC and ODBC ... | 0 | 2009-05-18T17:28:03Z | [
"python",
"jdbc",
"database-metadata"
] |
What is the Python equivalent to JDBC DatabaseMetaData? | 878,737 | <p>What is the Python equivalent to <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/sql/DatabaseMetaData.html" rel="nofollow">DatabaseMetaData</a></p>
| 3 | 2009-05-18T17:03:24Z | 879,008 | <p>This is not a python-specific answer; in fact I don't know if Python data drivers have this sort of thing. But maybe this info will help. </p>
<p>The ANSI SQL-92 and SQL-99 Standard requires the <a href="http://en.wikipedia.org/wiki/Information%5FSchema">INFORMATION_SCHEMA schema</a>, which stores information rega... | 6 | 2009-05-18T17:59:08Z | [
"python",
"jdbc",
"database-metadata"
] |
Why return NotImplemented instead of raising NotImplementedError | 878,943 | <p>Python has a singleton called <a href="https://docs.python.org/2/library/constants.html#NotImplemented"><code>NotImplemented</code></a>. </p>
<p>Why would someone want to ever return <code>NotImplemented</code> instead of raising the <a href="https://docs.python.org/2/library/exceptions.html#exceptions.NotImplemen... | 134 | 2009-05-18T17:43:40Z | 878,985 | <p>My guess would be performance. In a situation like rich comparisons, where you could be doing lots of operations in a short time, setting up and handling lots of exceptions could take a lot longer than simply returning a <code>NotImplemented</code> value.</p>
| 9 | 2009-05-18T17:54:03Z | [
"python"
] |
Why return NotImplemented instead of raising NotImplementedError | 878,943 | <p>Python has a singleton called <a href="https://docs.python.org/2/library/constants.html#NotImplemented"><code>NotImplemented</code></a>. </p>
<p>Why would someone want to ever return <code>NotImplemented</code> instead of raising the <a href="https://docs.python.org/2/library/exceptions.html#exceptions.NotImplemen... | 134 | 2009-05-18T17:43:40Z | 879,003 | <p>There are functions that raise Exceptions and functions that do not, <code>return NotImplemented</code> could be for the latter.... it really depends on the programmer/design. That's why they are both there for use.</p>
| -2 | 2009-05-18T17:58:00Z | [
"python"
] |
Why return NotImplemented instead of raising NotImplementedError | 878,943 | <p>Python has a singleton called <a href="https://docs.python.org/2/library/constants.html#NotImplemented"><code>NotImplemented</code></a>. </p>
<p>Why would someone want to ever return <code>NotImplemented</code> instead of raising the <a href="https://docs.python.org/2/library/exceptions.html#exceptions.NotImplemen... | 134 | 2009-05-18T17:43:40Z | 879,005 | <p>It's because <code>__lt__()</code> and related comparison methods are quite commonly used indirectly in list sorts and such. Sometimes the algorithm will choose to try another way or pick a default winner. Raising an exception would break out of the sort unless caught, whereas <code>NotImplemented</code> doesn't get... | 149 | 2009-05-18T17:58:32Z | [
"python"
] |
Windows cmd encoding change causes Python crash | 878,972 | <p>First I change Windows CMD encoding to utf-8 and run Python interpreter:</p>
<pre><code>chcp 65001
python
</code></pre>
<p>Then I try to print a unicode sting inside it and when i do this Python crashes in a peculiar way (I just get a cmd prompt in the same window). </p>
<pre><code>>>> import sys
>>... | 38 | 2009-05-18T17:52:10Z | 879,058 | <p>This is because "code page" of cmd is different to "mbcs" of system. Although you changed the "code page", python (actually, windows) still think your "mbcs" doesn't change.</p>
| 2 | 2009-05-18T18:12:57Z | [
"python",
"windows",
"unicode",
"encoding",
"cmd"
] |
Windows cmd encoding change causes Python crash | 878,972 | <p>First I change Windows CMD encoding to utf-8 and run Python interpreter:</p>
<pre><code>chcp 65001
python
</code></pre>
<p>Then I try to print a unicode sting inside it and when i do this Python crashes in a peculiar way (I just get a cmd prompt in the same window). </p>
<pre><code>>>> import sys
>>... | 38 | 2009-05-18T17:52:10Z | 879,087 | <p>Do you want Python to encode to UTF-8?</p>
<pre><code>>>>print u'ëèæîð'.encode('utf-8')
ëèæîð
</code></pre>
<p>Python will not recognize cp65001 as UTF-8. </p>
| 1 | 2009-05-18T18:21:09Z | [
"python",
"windows",
"unicode",
"encoding",
"cmd"
] |
Windows cmd encoding change causes Python crash | 878,972 | <p>First I change Windows CMD encoding to utf-8 and run Python interpreter:</p>
<pre><code>chcp 65001
python
</code></pre>
<p>Then I try to print a unicode sting inside it and when i do this Python crashes in a peculiar way (I just get a cmd prompt in the same window). </p>
<pre><code>>>> import sys
>>... | 38 | 2009-05-18T17:52:10Z | 879,125 | <p>A few comments: you probably misspelled <code>encodig</code> and <code>.code</code>. Here is my run of your example.</p>
<pre><code>C:\>chcp 65001
Active code page: 65001
C:\>\python25\python
...
>>> import sys
>>> sys.stdin.encoding
'cp65001'
>>> s=u'\u0065\u0066'
>>> s
u... | 1 | 2009-05-18T18:29:59Z | [
"python",
"windows",
"unicode",
"encoding",
"cmd"
] |
Windows cmd encoding change causes Python crash | 878,972 | <p>First I change Windows CMD encoding to utf-8 and run Python interpreter:</p>
<pre><code>chcp 65001
python
</code></pre>
<p>Then I try to print a unicode sting inside it and when i do this Python crashes in a peculiar way (I just get a cmd prompt in the same window). </p>
<pre><code>>>> import sys
>>... | 38 | 2009-05-18T17:52:10Z | 1,432,462 | <p>I had this annoying issue, too, and I hated not being able to run my unicode-aware scripts same in MS Windows as in linux. So, I managed to come up with a workaround.</p>
<p>Take this script (say, <code>uniconsole.py</code> in your site-packages or whatever):</p>
<pre><code>import sys, os
if sys.platform == "win3... | 2 | 2009-09-16T11:42:40Z | [
"python",
"windows",
"unicode",
"encoding",
"cmd"
] |
Windows cmd encoding change causes Python crash | 878,972 | <p>First I change Windows CMD encoding to utf-8 and run Python interpreter:</p>
<pre><code>chcp 65001
python
</code></pre>
<p>Then I try to print a unicode sting inside it and when i do this Python crashes in a peculiar way (I just get a cmd prompt in the same window). </p>
<pre><code>>>> import sys
>>... | 38 | 2009-05-18T17:52:10Z | 3,259,271 | <p>Here's how to alias <code>cp65001</code> to UTF-8 without changing <code>encodings\aliases.py</code>:</p>
<pre><code>import codecs
codecs.register(lambda name: codecs.lookup('utf-8') if name == 'cp65001' else None)
</code></pre>
<p>(IMHO, don't pay any attention to the silliness about <code>cp65001</code> not bein... | 67 | 2010-07-15T19:35:10Z | [
"python",
"windows",
"unicode",
"encoding",
"cmd"
] |
Windows cmd encoding change causes Python crash | 878,972 | <p>First I change Windows CMD encoding to utf-8 and run Python interpreter:</p>
<pre><code>chcp 65001
python
</code></pre>
<p>Then I try to print a unicode sting inside it and when i do this Python crashes in a peculiar way (I just get a cmd prompt in the same window). </p>
<pre><code>>>> import sys
>>... | 38 | 2009-05-18T17:52:10Z | 12,834,315 | <p>Set <strong>PYTHONIOENCODING</strong> system variable:</p>
<pre><code>> chcp 65001
> set PYTHONIOENCODING=utf-8
> python example.py
Encoding is utf-8
</code></pre>
<p>Source of example.py is simple:</p>
<pre><code>import sys
print "Encoding is", sys.stdin.encoding
</code></pre>
| 24 | 2012-10-11T07:26:37Z | [
"python",
"windows",
"unicode",
"encoding",
"cmd"
] |
How to install python-dateutil on Windows? | 879,156 | <p>I'm trying to convert some date/times to UTC, which I thought would be dead simple in Python - batteries included, right? Well, it would be simple except that Python (2.6) doesn't include any tzinfo classes. No problem, a quick search turns up <a href="http://pypi.python.org/pypi/python-dateutil">python-dateutil</a>... | 43 | 2009-05-18T18:38:53Z | 879,204 | <p>Looks like the setup.py uses easy_install (i.e. <code>setuptools</code>). Just install the <a href="http://pypi.python.org/pypi/setuptools/0.6c9">setuptools</a> package and you will be all set.</p>
<p>To install setuptools in Python 2.6, see the answer to <a href="http://stackoverflow.com/questions/309412/how-to-se... | 6 | 2009-05-18T18:49:41Z | [
"python",
"install",
"python-dateutil"
] |
How to install python-dateutil on Windows? | 879,156 | <p>I'm trying to convert some date/times to UTC, which I thought would be dead simple in Python - batteries included, right? Well, it would be simple except that Python (2.6) doesn't include any tzinfo classes. No problem, a quick search turns up <a href="http://pypi.python.org/pypi/python-dateutil">python-dateutil</a>... | 43 | 2009-05-18T18:38:53Z | 879,879 | <p>Why didn't someone tell me I was being a total noob? All I had to do was copy the <code>dateutil</code> directory to someplace in my Python path, and it was good to go.</p>
| 17 | 2009-05-18T21:15:02Z | [
"python",
"install",
"python-dateutil"
] |
How to install python-dateutil on Windows? | 879,156 | <p>I'm trying to convert some date/times to UTC, which I thought would be dead simple in Python - batteries included, right? Well, it would be simple except that Python (2.6) doesn't include any tzinfo classes. No problem, a quick search turns up <a href="http://pypi.python.org/pypi/python-dateutil">python-dateutil</a>... | 43 | 2009-05-18T18:38:53Z | 2,717,096 | <p>Using <code>setup</code> from <code>distutils.core</code> instead of <code>setuptools</code> in setup.py worked for me, too:</p>
<pre><code>#from setuptools import setup
from distutils.core import setup
</code></pre>
| 2 | 2010-04-26T21:38:36Z | [
"python",
"install",
"python-dateutil"
] |
How to install python-dateutil on Windows? | 879,156 | <p>I'm trying to convert some date/times to UTC, which I thought would be dead simple in Python - batteries included, right? Well, it would be simple except that Python (2.6) doesn't include any tzinfo classes. No problem, a quick search turns up <a href="http://pypi.python.org/pypi/python-dateutil">python-dateutil</a>... | 43 | 2009-05-18T18:38:53Z | 7,186,957 | <p>If dateutil is missing install it via:</p>
<pre><code>pip install python-dateutil
</code></pre>
<p>Or on Ubuntu:</p>
<pre><code>sudo apt-get install python-dateutil
</code></pre>
| 54 | 2011-08-25T08:05:27Z | [
"python",
"install",
"python-dateutil"
] |
How to install python-dateutil on Windows? | 879,156 | <p>I'm trying to convert some date/times to UTC, which I thought would be dead simple in Python - batteries included, right? Well, it would be simple except that Python (2.6) doesn't include any tzinfo classes. No problem, a quick search turns up <a href="http://pypi.python.org/pypi/python-dateutil">python-dateutil</a>... | 43 | 2009-05-18T18:38:53Z | 19,030,443 | <p>Install from the "Unofficial Windows Binaries for Python Extension Packages"</p>
<p><a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-dateutil">http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-dateutil</a></p>
<p>Pretty much has every package you would need.</p>
| 5 | 2013-09-26T14:02:29Z | [
"python",
"install",
"python-dateutil"
] |
How to install python-dateutil on Windows? | 879,156 | <p>I'm trying to convert some date/times to UTC, which I thought would be dead simple in Python - batteries included, right? Well, it would be simple except that Python (2.6) doesn't include any tzinfo classes. No problem, a quick search turns up <a href="http://pypi.python.org/pypi/python-dateutil">python-dateutil</a>... | 43 | 2009-05-18T18:38:53Z | 21,032,978 | <p>Just run command prompt as administrator and type this in.</p>
<pre><code>easy_install python-dateutil
</code></pre>
| 0 | 2014-01-09T22:58:42Z | [
"python",
"install",
"python-dateutil"
] |
How to install python-dateutil on Windows? | 879,156 | <p>I'm trying to convert some date/times to UTC, which I thought would be dead simple in Python - batteries included, right? Well, it would be simple except that Python (2.6) doesn't include any tzinfo classes. No problem, a quick search turns up <a href="http://pypi.python.org/pypi/python-dateutil">python-dateutil</a>... | 43 | 2009-05-18T18:38:53Z | 26,626,787 | <p>You could also change your PYTHONPATH:</p>
<pre><code>$ python -c 'import dateutil'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named dateutil
$
$ PYTHONPATH="/usr/lib/python2.6/site-packages/python_dateutil-1.5-py2.6.egg":"${PYTHONPATH}"
$ e... | 0 | 2014-10-29T09:32:38Z | [
"python",
"install",
"python-dateutil"
] |
How to install python-dateutil on Windows? | 879,156 | <p>I'm trying to convert some date/times to UTC, which I thought would be dead simple in Python - batteries included, right? Well, it would be simple except that Python (2.6) doesn't include any tzinfo classes. No problem, a quick search turns up <a href="http://pypi.python.org/pypi/python-dateutil">python-dateutil</a>... | 43 | 2009-05-18T18:38:53Z | 29,878,438 | <p>First confirm that you have in C:/python##/Lib/Site-packages/ a folder dateutil, perhaps you download it, you should already have pip,matplotlib, six##,,confirm you have installed dateutil by--- go to the cmd, cd /python, you should have a folder /Scripts. cd to Scripts, then type --pip install python-dateutil --
--... | 0 | 2015-04-26T13:46:30Z | [
"python",
"install",
"python-dateutil"
] |
How to install python-dateutil on Windows? | 879,156 | <p>I'm trying to convert some date/times to UTC, which I thought would be dead simple in Python - batteries included, right? Well, it would be simple except that Python (2.6) doesn't include any tzinfo classes. No problem, a quick search turns up <a href="http://pypi.python.org/pypi/python-dateutil">python-dateutil</a>... | 43 | 2009-05-18T18:38:53Z | 32,178,715 | <p>If you are offline and have untared the package, you can use command prompt. </p>
<p>Navigate to the untared folder and run:</p>
<pre><code>python setup.py install
</code></pre>
| 1 | 2015-08-24T09:24:24Z | [
"python",
"install",
"python-dateutil"
] |
How to install python-dateutil on Windows? | 879,156 | <p>I'm trying to convert some date/times to UTC, which I thought would be dead simple in Python - batteries included, right? Well, it would be simple except that Python (2.6) doesn't include any tzinfo classes. No problem, a quick search turns up <a href="http://pypi.python.org/pypi/python-dateutil">python-dateutil</a>... | 43 | 2009-05-18T18:38:53Z | 34,170,126 | <p>It is a little tricky for people who is not used to command prompt. All you have
to do is open the directory where python is installed (C:\Python27 by default) and open the command prompt there (shift + right click and select open command window here) and then type :</p>
<p><strong>python -m pip install python-date... | 3 | 2015-12-09T03:12:43Z | [
"python",
"install",
"python-dateutil"
] |
How to ignore deprecation warnings in Python | 879,173 | <p>I keep getting this :</p>
<pre><code>DeprecationWarning: integer argument expected, got float
</code></pre>
<p>How do I make this message go away? Is there a way to avoid warnings in Python?</p>
| 73 | 2009-05-18T18:42:44Z | 879,202 | <p>Pass the correct arguments? :P</p>
<p>On the more serious note, you can pass the argument -Wi::DeprecationWarning on the command line to the interpreter to ignore the deprecation warnings.</p>
| 6 | 2009-05-18T18:49:35Z | [
"python",
"warnings",
"deprecated",
"ignore"
] |
How to ignore deprecation warnings in Python | 879,173 | <p>I keep getting this :</p>
<pre><code>DeprecationWarning: integer argument expected, got float
</code></pre>
<p>How do I make this message go away? Is there a way to avoid warnings in Python?</p>
| 73 | 2009-05-18T18:42:44Z | 879,203 | <p>Convert the argument to int. It's as simple as</p>
<pre><code>int(argument)
</code></pre>
| 5 | 2009-05-18T18:49:38Z | [
"python",
"warnings",
"deprecated",
"ignore"
] |
How to ignore deprecation warnings in Python | 879,173 | <p>I keep getting this :</p>
<pre><code>DeprecationWarning: integer argument expected, got float
</code></pre>
<p>How do I make this message go away? Is there a way to avoid warnings in Python?</p>
| 73 | 2009-05-18T18:42:44Z | 879,208 | <p>I <a href="http://www.google.nl/search?q=python+silence+Deprecationwarning">Googled</a> and <a href="https://docs.python.org/3/library/warnings.html">found</a>:</p>
<pre><code> #!/usr/bin/env python -W ignore::DeprecationWarning
</code></pre>
<p>If you're on Windows: pass <code>-W ignore::DeprecationWarning</code>... | 71 | 2009-05-18T18:50:07Z | [
"python",
"warnings",
"deprecated",
"ignore"
] |
How to ignore deprecation warnings in Python | 879,173 | <p>I keep getting this :</p>
<pre><code>DeprecationWarning: integer argument expected, got float
</code></pre>
<p>How do I make this message go away? Is there a way to avoid warnings in Python?</p>
| 73 | 2009-05-18T18:42:44Z | 879,226 | <p>Not to beat you up about it but you are being warned that what you are doing will likely stop working when you next upgrade python. Convert to int and be done with it.</p>
<p>BTW. You can also write your own warnings handler. Just assign a function that does nothing.
<a href="http://stackoverflow.com/questions/8589... | 2 | 2009-05-18T18:55:05Z | [
"python",
"warnings",
"deprecated",
"ignore"
] |
How to ignore deprecation warnings in Python | 879,173 | <p>I keep getting this :</p>
<pre><code>DeprecationWarning: integer argument expected, got float
</code></pre>
<p>How do I make this message go away? Is there a way to avoid warnings in Python?</p>
| 73 | 2009-05-18T18:42:44Z | 879,249 | <p>You should just fix your code but just in case,</p>
<pre><code>import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
</code></pre>
| 83 | 2009-05-18T19:01:48Z | [
"python",
"warnings",
"deprecated",
"ignore"
] |
How to ignore deprecation warnings in Python | 879,173 | <p>I keep getting this :</p>
<pre><code>DeprecationWarning: integer argument expected, got float
</code></pre>
<p>How do I make this message go away? Is there a way to avoid warnings in Python?</p>
| 73 | 2009-05-18T18:42:44Z | 1,640,777 | <p>I had these:</p>
<blockquote>
<p>/home/eddyp/virtualenv/lib/python2.6/site-packages/Twisted-8.2.0-py2.6-linux-x86_64.egg/twisted/persisted/sob.py:12:
DeprecationWarning: the md5 module is
deprecated; use hashlib instead<br />
import os, md5, sys</p>
<p>/home/eddyp/virtualenv/lib/python2.6/site-packages... | 108 | 2009-10-28T23:24:01Z | [
"python",
"warnings",
"deprecated",
"ignore"
] |
How to ignore deprecation warnings in Python | 879,173 | <p>I keep getting this :</p>
<pre><code>DeprecationWarning: integer argument expected, got float
</code></pre>
<p>How do I make this message go away? Is there a way to avoid warnings in Python?</p>
| 73 | 2009-05-18T18:42:44Z | 2,381,422 | <p>I found the cleanest way to do this (especially on windows) is by adding the following to C:\Python26\Lib\site-packages\sitecustomize.py:</p>
<pre><code>import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
</code></pre>
<p>Note that I had to create this file. Of course, change the path t... | 19 | 2010-03-04T17:35:36Z | [
"python",
"warnings",
"deprecated",
"ignore"
] |
Serializing a Python Object to XML (Apple .plist) | 879,212 | <p>I need to read and serialize objects from and to XML, Apple's .plist format in particular. What's the most intelligent way to do it in Python? Are there any ready-made solutions?</p>
| 3 | 2009-05-18T18:51:32Z | 879,222 | <p>Check out <a href="http://docs.python.org/dev/library/plistlib.html" rel="nofollow">plistlib</a>.</p>
| 7 | 2009-05-18T18:54:30Z | [
"python",
"xml",
"plist"
] |
Serializing a Python Object to XML (Apple .plist) | 879,212 | <p>I need to read and serialize objects from and to XML, Apple's .plist format in particular. What's the most intelligent way to do it in Python? Are there any ready-made solutions?</p>
| 3 | 2009-05-18T18:51:32Z | 1,261,238 | <p>Assuming you are on a Mac, you can use PyObjC.</p>
<p>Here is an example of reading from a plist, from <a href="http://mwpdf.shownets.net:8080/MacIT%20Conference/IT831%5Fnkersten%5Fcadams.pdf" rel="nofollow">Using Python For System Administration</a>, slide 27.</p>
<pre><code>from Cocoa import NSDictionary
myfile... | 2 | 2009-08-11T15:45:50Z | [
"python",
"xml",
"plist"
] |
Python learning environment | 879,218 | <p>I'm looking to get up to speed on Python, is it worth working locally via the ActivePython interface, then progressing to a website that supports one of the standard frameworks (Django or Pylons) OR utilize the Google Apps environment? I want to stay as interactive as possible - making feedback/learning easier.</p>... | 3 | 2009-05-18T18:53:42Z | 879,227 | <p>Not sure what you mean.</p>
<p>For development</p>
<p>First choice: idle -- you already have it.</p>
<p>Second choice: Komodo Edit -- very easy to use, but not as directly interactive as idle.</p>
<p>For deploying applications, that depends on your application. If you're building desktop applications or web app... | 2 | 2009-05-18T18:55:32Z | [
"python"
] |
Python learning environment | 879,218 | <p>I'm looking to get up to speed on Python, is it worth working locally via the ActivePython interface, then progressing to a website that supports one of the standard frameworks (Django or Pylons) OR utilize the Google Apps environment? I want to stay as interactive as possible - making feedback/learning easier.</p>... | 3 | 2009-05-18T18:53:42Z | 879,231 | <p>I would just start locally. Django and Pylons add another layer of complexity to the edit/feedback loop.</p>
<p>Unless your primary focus is to make python websites, just stick with an editor and the console.</p>
| 2 | 2009-05-18T18:56:08Z | [
"python"
] |
Python learning environment | 879,218 | <p>I'm looking to get up to speed on Python, is it worth working locally via the ActivePython interface, then progressing to a website that supports one of the standard frameworks (Django or Pylons) OR utilize the Google Apps environment? I want to stay as interactive as possible - making feedback/learning easier.</p>... | 3 | 2009-05-18T18:53:42Z | 879,236 | <p>Go with the Python interpreter. Take one of the tutorials that many people on SO <a href="http://stackoverflow.com/search?q=python%2Btutorial">recommend</a> and you're on your way. Once you're comfortable with the language, have a look at a framework like Django, but not sooner.</p>
| 6 | 2009-05-18T18:57:24Z | [
"python"
] |
Python learning environment | 879,218 | <p>I'm looking to get up to speed on Python, is it worth working locally via the ActivePython interface, then progressing to a website that supports one of the standard frameworks (Django or Pylons) OR utilize the Google Apps environment? I want to stay as interactive as possible - making feedback/learning easier.</p>... | 3 | 2009-05-18T18:53:42Z | 879,240 | <p>I learned using the <a href="http://docs.python.org/tutorial/" rel="nofollow">docs</a> and IDLE (with shell). Go to Django well after you fully understand Python.</p>
| 2 | 2009-05-18T18:57:41Z | [
"python"
] |
Python learning environment | 879,218 | <p>I'm looking to get up to speed on Python, is it worth working locally via the ActivePython interface, then progressing to a website that supports one of the standard frameworks (Django or Pylons) OR utilize the Google Apps environment? I want to stay as interactive as possible - making feedback/learning easier.</p>... | 3 | 2009-05-18T18:53:42Z | 879,830 | <p>ipython and your favorite text editor. spend an hour with these screencasts and you'll be comfy with it in no time.</p>
<p><a href="http://showmedo.com/videotutorials/series?name=CnluURUTV" rel="nofollow">http://showmedo.com/videotutorials/series?name=CnluURUTV</a></p>
| 1 | 2009-05-18T21:04:48Z | [
"python"
] |
logging with filters | 879,732 | <p>I'm using Logging (import logging) to log messages.</p>
<p>Within 1 single module, I am logging messages at the debug level (my_logger.debug('msg')); </p>
<p>Some of these debug messages come from function_a() and others from function_b();
I'd like to be able to enable/disable logging based on whether they come f... | 16 | 2009-05-18T20:43:48Z | 879,765 | <p>Do not use global. It's an accident waiting to happen.</p>
<p>You can give your loggers any "."-separated names that are meaningful to you.</p>
<p>You can control them as a hierarchy. If you have loggers named <code>a.b.c</code> and
<code>a.b.d</code>, you can check the logging level for <code>a.b</code> and al... | 12 | 2009-05-18T20:49:26Z | [
"python",
"logging"
] |
logging with filters | 879,732 | <p>I'm using Logging (import logging) to log messages.</p>
<p>Within 1 single module, I am logging messages at the debug level (my_logger.debug('msg')); </p>
<p>Some of these debug messages come from function_a() and others from function_b();
I'd like to be able to enable/disable logging based on whether they come f... | 16 | 2009-05-18T20:43:48Z | 879,937 | <p>Just implement a subclass of <code>logging.Filter</code>: <a href="http://docs.python.org/library/logging.html#filter-objects">http://docs.python.org/library/logging.html#filter-objects</a>. It will have one method, <code>filter(record)</code>, that examines the log record and returns True to log it or False to disc... | 25 | 2009-05-18T21:27:07Z | [
"python",
"logging"
] |
How do you know when looking at the list of attributes and methods listed in a dir which are attributes and which are methods? | 880,160 | <p>I am working through trying to learn to program in Python and am focused on getting a better handle on how to use Standard and other modules. The dir function seems really powerful in the interpreter but I wonder if I am missing something because of my lack of OOP background. Using S.Lotts book I decided to use hi... | 4 | 2009-05-18T22:42:38Z | 880,218 | <blockquote>
<p>which tells me strictly speaking that all methods are attributes. but I can't call a method without the () so it seems to me that the hasattr() is misleading.</p>
</blockquote>
<p>Why is it misleading? If <code>obj.ban()</code> is a method, then <code>obj.ban</code> is the corresponding attribute. Yo... | 2 | 2009-05-18T23:07:30Z | [
"python",
"attributes",
"methods",
"python-datamodel"
] |
How do you know when looking at the list of attributes and methods listed in a dir which are attributes and which are methods? | 880,160 | <p>I am working through trying to learn to program in Python and am focused on getting a better handle on how to use Standard and other modules. The dir function seems really powerful in the interpreter but I wonder if I am missing something because of my lack of OOP background. Using S.Lotts book I decided to use hi... | 4 | 2009-05-18T22:42:38Z | 880,222 | <p>Ideally, when using a complicated library like BeautifulSoup, you should consult its documentation to see what methods each class provides. However, in the rare case where you don't have easily accessible documentation, you can check for the presence of methods using the following. </p>
<p>All methods, which themse... | 1 | 2009-05-18T23:08:30Z | [
"python",
"attributes",
"methods",
"python-datamodel"
] |
How do you know when looking at the list of attributes and methods listed in a dir which are attributes and which are methods? | 880,160 | <p>I am working through trying to learn to program in Python and am focused on getting a better handle on how to use Standard and other modules. The dir function seems really powerful in the interpreter but I wonder if I am missing something because of my lack of OOP background. Using S.Lotts book I decided to use hi... | 4 | 2009-05-18T22:42:38Z | 880,224 | <p>There is a built in method called callable. You can apply it to any object and it will return True/False depending on if it can be called. e.g.</p>
<pre><code>>>> def foo():
... print "This is the only function now"
...
>>> localDictionary = dir()
>>> for item in localDictionary:
... ... | 1 | 2009-05-18T23:09:17Z | [
"python",
"attributes",
"methods",
"python-datamodel"
] |
How do you know when looking at the list of attributes and methods listed in a dir which are attributes and which are methods? | 880,160 | <p>I am working through trying to learn to program in Python and am focused on getting a better handle on how to use Standard and other modules. The dir function seems really powerful in the interpreter but I wonder if I am missing something because of my lack of OOP background. Using S.Lotts book I decided to use hi... | 4 | 2009-05-18T22:42:38Z | 880,240 | <p>Instead of: "<code>print hasattr(d1,each)</code>", try: "<code>print each, type(getattr(d1,each))</code>". You should find the results informative. </p>
<p>Also, in place of <code>dir()</code> try <code>help()</code>, which I think you're really looking for.</p>
| 7 | 2009-05-18T23:16:17Z | [
"python",
"attributes",
"methods",
"python-datamodel"
] |
How do you know when looking at the list of attributes and methods listed in a dir which are attributes and which are methods? | 880,160 | <p>I am working through trying to learn to program in Python and am focused on getting a better handle on how to use Standard and other modules. The dir function seems really powerful in the interpreter but I wonder if I am missing something because of my lack of OOP background. Using S.Lotts book I decided to use hi... | 4 | 2009-05-18T22:42:38Z | 880,969 | <p>Consider using the standard library's <code>inspect</code> module -- it's often the handiest approach to introspection, packaging up substantial chunks of functionality (you could implement that from scratch, but reusing well-tested, well-designed code is a good thing). See <a href="http://docs.python.org/library/i... | 4 | 2009-05-19T04:25:07Z | [
"python",
"attributes",
"methods",
"python-datamodel"
] |
How do you know when looking at the list of attributes and methods listed in a dir which are attributes and which are methods? | 880,160 | <p>I am working through trying to learn to program in Python and am focused on getting a better handle on how to use Standard and other modules. The dir function seems really powerful in the interpreter but I wonder if I am missing something because of my lack of OOP background. Using S.Lotts book I decided to use hi... | 4 | 2009-05-18T22:42:38Z | 884,385 | <p>This <code>info</code> module inspired from Dive into Python serves the purpose. </p>
<pre><code>def info(obj, spacing=20, collapse=1, variables=False):
'''Print methods and their doc Strings
Takes any object'''
if variables:
methodList = [method for method in dir(obj)]
else:
methodList = [method... | 2 | 2009-05-19T18:40:25Z | [
"python",
"attributes",
"methods",
"python-datamodel"
] |
How to strip html/javascript from text input in django | 880,188 | <p>What is the easiest way to strip all html/javascript from a string?</p>
| 51 | 2009-05-18T22:53:47Z | 880,212 | <p>The <a href="http://docs.djangoproject.com/en/dev/ref/templates/builtins/#striptags">striptags</a> template filter.</p>
<pre><code>{{ value|striptags }}
</code></pre>
| 34 | 2009-05-18T23:04:13Z | [
"python",
"django"
] |
How to strip html/javascript from text input in django | 880,188 | <p>What is the easiest way to strip all html/javascript from a string?</p>
| 51 | 2009-05-18T22:53:47Z | 880,238 | <p>If you want to strip tags in the python, you can use:</p>
<pre><code>from django.utils.html import strip_tags
strip_tags(string_value)
</code></pre>
<p>EDIT: If you are using strip_tags, than you should update your django. Because security researchers found a way in order to bypass strip_tags . Further informatio... | 112 | 2009-05-18T23:15:37Z | [
"python",
"django"
] |
How to strip html/javascript from text input in django | 880,188 | <p>What is the easiest way to strip all html/javascript from a string?</p>
| 51 | 2009-05-18T22:53:47Z | 6,649,408 | <p>nice snippet, if you want to hold some tags and strip the rest:</p>
<p><a href="http://djangosnippets.org/snippets/295/" rel="nofollow">http://djangosnippets.org/snippets/295/</a></p>
| -2 | 2011-07-11T11:27:48Z | [
"python",
"django"
] |
Can modules have properties the same way that objects can? | 880,530 | <p>With python properties, I can make it such that </p>
<pre><code>obj.y
</code></pre>
<p>calls a function rather than just returning a value.</p>
<p>Is there a way to do this with modules? I have a case where I want</p>
<pre><code>module.y
</code></pre>
<p>to call a function, rather than just returning the valu... | 54 | 2009-05-19T01:03:31Z | 880,550 | <p>Only instances of new-style classes can have properties. You can make Python believe such an instance is a module by stashing it in <code>sys.modules[thename] = theinstance</code>. So, for example, your m.py module file could be:</p>
<pre><code>import sys
class _M(object):
def __init__(self):
self.c = 0
d... | 43 | 2009-05-19T01:09:42Z | [
"python",
"properties",
"python-module"
] |
Can modules have properties the same way that objects can? | 880,530 | <p>With python properties, I can make it such that </p>
<pre><code>obj.y
</code></pre>
<p>calls a function rather than just returning a value.</p>
<p>Is there a way to do this with modules? I have a case where I want</p>
<pre><code>module.y
</code></pre>
<p>to call a function, rather than just returning the valu... | 54 | 2009-05-19T01:03:31Z | 880,751 | <p>I would do this in order to properly inherit all the attributes of a module, and be correctly identified by isinstance()</p>
<pre><code>import types
class MyModule(types.ModuleType):
@property
def y(self):
return 5
>>> a=MyModule("test")
>>> a
<module 'test' (built-in)>
&g... | 34 | 2009-05-19T02:40:12Z | [
"python",
"properties",
"python-module"
] |
Can modules have properties the same way that objects can? | 880,530 | <p>With python properties, I can make it such that </p>
<pre><code>obj.y
</code></pre>
<p>calls a function rather than just returning a value.</p>
<p>Is there a way to do this with modules? I have a case where I want</p>
<pre><code>module.y
</code></pre>
<p>to call a function, rather than just returning the valu... | 54 | 2009-05-19T01:03:31Z | 34,829,743 | <p>A typical use case is: enriching a (huge) existing module with some (few) dynamic attributes - without turning all module stuff into a class layout.
Unfortunately a most simple module class patch like <code>sys.modules[__name__].__class__ = MyPropertyModule</code> fails with <code>TypeError: __class__ assignment: on... | 0 | 2016-01-16T17:13:19Z | [
"python",
"properties",
"python-module"
] |
cxxTestgen.py throw a syntax error | 880,639 | <p>I've follow the tutorial on <a href="http://cxxtest.com/index.php?title=Visual_Studio_integration" rel="nofollow">cxxtest Visual Studio Integration</a> and I've looked on google but found nothing.</p>
<p>When I try to lunch a basic test with cxxtest and visual studio I get this error :</p>
<pre><code>1>Generati... | 0 | 2009-05-19T01:50:55Z | 880,666 | <p>Try running the <code>cxxtestgen.py</code> on command line. Does it print the usage page?</p>
| 0 | 2009-05-19T01:58:42Z | [
"c++",
"python",
"visual-studio",
"unit-testing"
] |
cxxTestgen.py throw a syntax error | 880,639 | <p>I've follow the tutorial on <a href="http://cxxtest.com/index.php?title=Visual_Studio_integration" rel="nofollow">cxxtest Visual Studio Integration</a> and I've looked on google but found nothing.</p>
<p>When I try to lunch a basic test with cxxtest and visual studio I get this error :</p>
<pre><code>1>Generati... | 0 | 2009-05-19T01:50:55Z | 880,857 | <p>You appear to be using Python 3.0 on a body of code which is not ready for python 3.0 - your best bet is to downgrade to python 2.6 until cxxtestgen.py works with python 3.0.</p>
<p>See <a href="http://docs.python.org/3.0/whatsnew/3.0.html#print-is-a-function" rel="nofollow">http://docs.python.org/3.0/whatsnew/3.0.... | 3 | 2009-05-19T03:38:35Z | [
"c++",
"python",
"visual-studio",
"unit-testing"
] |
cxxTestgen.py throw a syntax error | 880,639 | <p>I've follow the tutorial on <a href="http://cxxtest.com/index.php?title=Visual_Studio_integration" rel="nofollow">cxxtest Visual Studio Integration</a> and I've looked on google but found nothing.</p>
<p>When I try to lunch a basic test with cxxtest and visual studio I get this error :</p>
<pre><code>1>Generati... | 0 | 2009-05-19T01:50:55Z | 8,950,829 | <p>The previous comments correctly note that CxxTest 3.x did not support Python 3.x. However, CxxTest 4.0 has recently been released, and it supports Python 3.1 and 3.2.</p>
<p>See the CxxTest Home Page: <a href="http://cxxtest.com" rel="nofollow">cxxtest website</a></p>
| 1 | 2012-01-21T05:07:48Z | [
"c++",
"python",
"visual-studio",
"unit-testing"
] |
Should I implement the mixed use of BeautifulSoup and REGEXs or rely solely on BS | 880,687 | <p>I have some data I need to extract from a collection of html files. I am not sure if the data resides in a div element, a table element or a combined element (where the div tag is an element of a table. I have seen all three cases. My files are large-as big as 2 mb and I have tens of thousands of them. So far I ... | 0 | 2009-05-19T02:06:57Z | 880,698 | <p>Have you tried <code>lxml</code>? BeautifulSoup is good but not super-fast, and I believe <code>lxml</code> can offer the same quality but often better performance.</p>
| 3 | 2009-05-19T02:11:37Z | [
"python",
"regex",
"beautifulsoup"
] |
Should I implement the mixed use of BeautifulSoup and REGEXs or rely solely on BS | 880,687 | <p>I have some data I need to extract from a collection of html files. I am not sure if the data resides in a div element, a table element or a combined element (where the div tag is an element of a table. I have seen all three cases. My files are large-as big as 2 mb and I have tens of thousands of them. So far I ... | 0 | 2009-05-19T02:06:57Z | 880,758 | <p>BeautifulSoup uses regex internally (it's what separates it from other XML parsers) so you'll likely find yourself just repeating what it does. If you want a faster option then use try/catch to attempt an lxml or etree parse first then try BeautifulSoup and/or tidylib to parse broken HTML if the parser fails.</p>
<... | 3 | 2009-05-19T02:42:28Z | [
"python",
"regex",
"beautifulsoup"
] |
Should I implement the mixed use of BeautifulSoup and REGEXs or rely solely on BS | 880,687 | <p>I have some data I need to extract from a collection of html files. I am not sure if the data resides in a div element, a table element or a combined element (where the div tag is an element of a table. I have seen all three cases. My files are large-as big as 2 mb and I have tens of thousands of them. So far I ... | 0 | 2009-05-19T02:06:57Z | 880,763 | <p>I don't quite understand what you are trying to do. But I do know that you don't need to enclose your div string with < html> tags. BS will parse that just fine.</p>
| 1 | 2009-05-19T02:47:00Z | [
"python",
"regex",
"beautifulsoup"
] |
Should I implement the mixed use of BeautifulSoup and REGEXs or rely solely on BS | 880,687 | <p>I have some data I need to extract from a collection of html files. I am not sure if the data resides in a div element, a table element or a combined element (where the div tag is an element of a table. I have seen all three cases. My files are large-as big as 2 mb and I have tens of thousands of them. So far I ... | 0 | 2009-05-19T02:06:57Z | 880,821 | <p>I've found that even if lxml is faster than BeautifulSoup, for documents that size it's usually best to try to reduce the size to a few kB via regex (or direct stripping) and load that into BS, as you are doing now.</p>
| 1 | 2009-05-19T03:26:33Z | [
"python",
"regex",
"beautifulsoup"
] |
Applications of Python | 880,917 | <p>What are some applications for Python that <strong>relative amateur programmers</strong> can get into?
For example, Ruby has Rails for building web applications. What are some cool applications of Python?</p>
<p>Thanks.</p>
| 2 | 2009-05-19T04:03:09Z | 880,926 | <p>You can build web applications in Python. See the <a href="http://www.djangoproject.com/" rel="nofollow">Django framework</a>.</p>
<p>Besides that, <a href="http://www.python.org/about/apps/" rel="nofollow">here's</a> a nice list.</p>
<p>Not particularly relevant, but interesting, is the fact that NASA uses Python... | 5 | 2009-05-19T04:06:24Z | [
"python"
] |
Applications of Python | 880,917 | <p>What are some applications for Python that <strong>relative amateur programmers</strong> can get into?
For example, Ruby has Rails for building web applications. What are some cool applications of Python?</p>
<p>Thanks.</p>
| 2 | 2009-05-19T04:03:09Z | 880,935 | <p>"cool" is a state of mind. Hence cool applications depends on your definition of cool. A Ant colony simulation is cool, if you want to implement the theory.</p>
<p>Python, with its own and 3rd party libraries (batteries) has been applied in possibly all domains of day to day programming. My advise is, decide on th... | 5 | 2009-05-19T04:09:35Z | [
"python"
] |
Applications of Python | 880,917 | <p>What are some applications for Python that <strong>relative amateur programmers</strong> can get into?
For example, Ruby has Rails for building web applications. What are some cool applications of Python?</p>
<p>Thanks.</p>
| 2 | 2009-05-19T04:03:09Z | 880,938 | <p>Python is a general purpose programming language much like Ruby. It can be used for systems programming, embedded programming, desktop programming, and web programming. In short, it has about as much potential for "cool" projects as any other general purpose language.</p>
| 0 | 2009-05-19T04:11:34Z | [
"python"
] |
Applications of Python | 880,917 | <p>What are some applications for Python that <strong>relative amateur programmers</strong> can get into?
For example, Ruby has Rails for building web applications. What are some cool applications of Python?</p>
<p>Thanks.</p>
| 2 | 2009-05-19T04:03:09Z | 880,940 | <p>Google App Engine has excellent support for developing -- and especially for deploying -- web applications in Python (with several possible frameworks, of which Django may be the most suitable one for "relative amateurs"). Apart from web apps, Blender lets you use Python for 3D graphics, Poser for apps involving mo... | 15 | 2009-05-19T04:11:47Z | [
"python"
] |
Applications of Python | 880,917 | <p>What are some applications for Python that <strong>relative amateur programmers</strong> can get into?
For example, Ruby has Rails for building web applications. What are some cool applications of Python?</p>
<p>Thanks.</p>
| 2 | 2009-05-19T04:03:09Z | 880,965 | <p>I like:</p>
<ul>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a>, for web development</li>
<li><a href="http://www.riverbankcomputing.co.uk/software/pyqt/intro" rel="nofollow">PyQt4</a> for GUI programming</li>
<li><a href="http://www.pygame.org/news.html" rel="nofollow">pygame</a> for games, ... | 0 | 2009-05-19T04:22:35Z | [
"python"
] |
Applications of Python | 880,917 | <p>What are some applications for Python that <strong>relative amateur programmers</strong> can get into?
For example, Ruby has Rails for building web applications. What are some cool applications of Python?</p>
<p>Thanks.</p>
| 2 | 2009-05-19T04:03:09Z | 880,974 | <p>I wasn't a programming amateur at the time, but using <a href="http://pygame.org" rel="nofollow">pygame</a> was my first intro to Python.</p>
| 3 | 2009-05-19T04:27:59Z | [
"python"
] |
Applications of Python | 880,917 | <p>What are some applications for Python that <strong>relative amateur programmers</strong> can get into?
For example, Ruby has Rails for building web applications. What are some cool applications of Python?</p>
<p>Thanks.</p>
| 2 | 2009-05-19T04:03:09Z | 880,993 | <p>One of the first bits of Python programming I ever did was to hack on the <a href="http://www.nicotine-plus.org/" rel="nofollow">nicotine</a> client for the Soulseek peer-to-peer network to add a '/g [query]' chat command to open the default browser and search Google.</p>
| 0 | 2009-05-19T04:42:25Z | [
"python"
] |
Applications of Python | 880,917 | <p>What are some applications for Python that <strong>relative amateur programmers</strong> can get into?
For example, Ruby has Rails for building web applications. What are some cool applications of Python?</p>
<p>Thanks.</p>
| 2 | 2009-05-19T04:03:09Z | 881,038 | <p>Probably not the most general purpose example, but I learned Python when AutoDesk Maya adopted it as a secondary programming language to complement MEL (Maya Expression Language). By comparison, it was a god-sent.</p>
| 0 | 2009-05-19T05:04:39Z | [
"python"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.