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 list |
|---|---|---|---|---|---|---|---|---|---|
Basic Financial Library for Python | 2,259,379 | <p>I am looking for a financial library for Python that will enable me to do a discounted cash flow analysis. I have looked around and found the QuantLib, which is overkill for what I want to do. I just need a small library that I can use to input a series of cash flows and have it output a net present value and inte... | 8 | 2010-02-13T22:40:24Z | 2,259,450 | <p>If you really only want to compute net present value (== an inner product of vectors for cashflows and discount factors) and internal rate of return (== a simple iterative root search for one variable) then you can just code it up. </p>
<p>I use <a href="http://www.r-project.org" rel="nofollow">R</a> much more than... | 3 | 2010-02-13T23:02:19Z | [
"python",
"finance"
] |
Basic Financial Library for Python | 2,259,379 | <p>I am looking for a financial library for Python that will enable me to do a discounted cash flow analysis. I have looked around and found the QuantLib, which is overkill for what I want to do. I just need a small library that I can use to input a series of cash flows and have it output a net present value and inte... | 8 | 2010-02-13T22:40:24Z | 3,562,561 | <p>Just for completeness, since I'm late:
numpy has some functions for (very) basic financial calculations. numpy, scipy could also be used, to do the calculations from the basic formulas as in R.</p>
<p>net present value of cashflow</p>
<pre><code>>>> cashflow = 2*np.ones(6)
>>> cashflow[-1] +=100... | 12 | 2010-08-25T02:57:51Z | [
"python",
"finance"
] |
How should I display a constantly updating timer using PyGTK? | 2,259,386 | <p>I am writing a timer program in Python using PyGTK. It is precise to the hundredths place. Right now, I am using a constantly updated label. This is a problem, because if I resize the window while the timer is running, Pango more often than not throws some crazy error and my program terminates. It's not always the s... | 1 | 2010-02-13T22:41:59Z | 2,259,437 | <p>Updating a label should work perfectly reliably, so I suspect you're doing something else wrong. Are you using threads? What does your code look like? How small can you condense your program (by removing functionality, not by obfuscating the code), without making the problem go away?</p>
| 2 | 2010-02-13T22:59:01Z | [
"python",
"gtk",
"pygtk",
"pango"
] |
How should I display a constantly updating timer using PyGTK? | 2,259,386 | <p>I am writing a timer program in Python using PyGTK. It is precise to the hundredths place. Right now, I am using a constantly updated label. This is a problem, because if I resize the window while the timer is running, Pango more often than not throws some crazy error and my program terminates. It's not always the s... | 1 | 2010-02-13T22:41:59Z | 2,259,902 | <p>I figured out the problem. It was indeed a problem with the threads. I never would've guessed that myself. The trick is to use gobject.timeout_add() to create a timer instead of a threaded loop. Here is some information about gobject.timeout_add():</p>
<blockquote>
<p><a href="http://nkour.blogspot.com/2005/06/si... | 2 | 2010-02-14T02:15:42Z | [
"python",
"gtk",
"pygtk",
"pango"
] |
load python code at runtime | 2,259,427 | <p>I would like to load a <code>.py</code> file at runtime. This <code>.py</code> file is basically a config file with the following format:</p>
<pre><code>var1=value
var2=value
predicate_function=func line : <return true or false>
</code></pre>
<p>Once this file is loaded, I would like to be able to acc... | 14 | 2010-02-13T22:57:06Z | 2,259,451 | <p>If you want to have a configuration file that will only be edited by the user when the program isn't running, just import it as a normal python file</p>
<p>ie.</p>
<p>main.py:</p>
<pre><code>import config
print config.var1
</code></pre>
<p>config.py:</p>
<pre><code>var="var12"
var2 = 100.5
</code></pre>
| 1 | 2010-02-13T23:02:44Z | [
"python",
"runtime",
"python-import"
] |
load python code at runtime | 2,259,427 | <p>I would like to load a <code>.py</code> file at runtime. This <code>.py</code> file is basically a config file with the following format:</p>
<pre><code>var1=value
var2=value
predicate_function=func line : <return true or false>
</code></pre>
<p>Once this file is loaded, I would like to be able to acc... | 14 | 2010-02-13T22:57:06Z | 2,259,462 | <p>In Python <code>2.*</code>, <a href="http://docs.python.org/library/functions.html?highlight=execfile#execfile" rel="nofollow">execfile</a> works (I recommend passing a specific dictionary and accessing the variables from there -- as the note in the docs says, <code>execfile</code> can't affect the calling function'... | 2 | 2010-02-13T23:05:31Z | [
"python",
"runtime",
"python-import"
] |
load python code at runtime | 2,259,427 | <p>I would like to load a <code>.py</code> file at runtime. This <code>.py</code> file is basically a config file with the following format:</p>
<pre><code>var1=value
var2=value
predicate_function=func line : <return true or false>
</code></pre>
<p>Once this file is loaded, I would like to be able to acc... | 14 | 2010-02-13T22:57:06Z | 2,259,618 | <p>To access another Python module, you <em>import it</em>. <code>execfile</code> has been mentioned by a couple people, but it is messy and dangerous. <code>execfile</code> clutters your namespace, possibly even messing up the code you are running. When you want to access another Python source file, use the <code>impo... | 7 | 2010-02-14T00:00:42Z | [
"python",
"runtime",
"python-import"
] |
load python code at runtime | 2,259,427 | <p>I would like to load a <code>.py</code> file at runtime. This <code>.py</code> file is basically a config file with the following format:</p>
<pre><code>var1=value
var2=value
predicate_function=func line : <return true or false>
</code></pre>
<p>Once this file is loaded, I would like to be able to acc... | 14 | 2010-02-13T22:57:06Z | 2,260,611 | <p>If the imported module is on the regular search path, you can use <a href="http://docs.python.org/library/functions.html?highlight=__import__#__import__"><code>__import__</code></a>.</p>
<p>If you need to load the module from an arbitrary path in the filesystem, use <a href="http://docs.python.org/library/imp.html?... | 7 | 2010-02-14T09:18:46Z | [
"python",
"runtime",
"python-import"
] |
load python code at runtime | 2,259,427 | <p>I would like to load a <code>.py</code> file at runtime. This <code>.py</code> file is basically a config file with the following format:</p>
<pre><code>var1=value
var2=value
predicate_function=func line : <return true or false>
</code></pre>
<p>Once this file is loaded, I would like to be able to acc... | 14 | 2010-02-13T22:57:06Z | 2,260,630 | <p>You just need to be able to dynamically specify the imports and then dynamically get at the variables.</p>
<p>Let's say your config file is bar.py and looks like this:</p>
<pre><code>x = 3
y = 4
def f(x): return (x<4)
</code></pre>
<p>Then your code should look like this:</p>
<pre><code>import sys
# somehow ... | 9 | 2010-02-14T09:24:21Z | [
"python",
"runtime",
"python-import"
] |
load python code at runtime | 2,259,427 | <p>I would like to load a <code>.py</code> file at runtime. This <code>.py</code> file is basically a config file with the following format:</p>
<pre><code>var1=value
var2=value
predicate_function=func line : <return true or false>
</code></pre>
<p>Once this file is loaded, I would like to be able to acc... | 14 | 2010-02-13T22:57:06Z | 2,260,677 | <p>As written in the <a href="http://docs.python.org/library/functions.html#__import__">python official documentation</a>, if you just want to import a module by name, you can look it up in the <code>sys.modules</code> dictionary after using <code>__import__</code>.</p>
<p>Supposing your configuration is in <code>mypr... | 11 | 2010-02-14T09:47:18Z | [
"python",
"runtime",
"python-import"
] |
load python code at runtime | 2,259,427 | <p>I would like to load a <code>.py</code> file at runtime. This <code>.py</code> file is basically a config file with the following format:</p>
<pre><code>var1=value
var2=value
predicate_function=func line : <return true or false>
</code></pre>
<p>Once this file is loaded, I would like to be able to acc... | 14 | 2010-02-13T22:57:06Z | 4,903,941 | <p>try the imp module : <a href="http://docs.python.org/library/imp.html" rel="nofollow">http://docs.python.org/library/imp.html</a></p>
| 0 | 2011-02-04T23:29:56Z | [
"python",
"runtime",
"python-import"
] |
load python code at runtime | 2,259,427 | <p>I would like to load a <code>.py</code> file at runtime. This <code>.py</code> file is basically a config file with the following format:</p>
<pre><code>var1=value
var2=value
predicate_function=func line : <return true or false>
</code></pre>
<p>Once this file is loaded, I would like to be able to acc... | 14 | 2010-02-13T22:57:06Z | 22,948,700 | <p>I'm kinda late to the party, but I want to present an alternative answer nonetheless.</p>
<p>If you want to import code without affecting the global module namespace, you can create an anonymous module (using <code>types.ModuleType</code>) and load arbitrary code in it (using <code>compile</code> and <code>exec</co... | 2 | 2014-04-08T21:37:56Z | [
"python",
"runtime",
"python-import"
] |
load python code at runtime | 2,259,427 | <p>I would like to load a <code>.py</code> file at runtime. This <code>.py</code> file is basically a config file with the following format:</p>
<pre><code>var1=value
var2=value
predicate_function=func line : <return true or false>
</code></pre>
<p>Once this file is loaded, I would like to be able to acc... | 14 | 2010-02-13T22:57:06Z | 39,819,908 | <p>Since the Python version hasn't been clearly mentioned, it is worth pointing out that the <strong>imp</strong> module has been deprecated in newer Python versions in favor of the <a href="https://docs.python.org/3/library/importlib.html" rel="nofollow"><strong>importlib</strong></a> module. <a href="https://thomassi... | 0 | 2016-10-02T17:52:30Z | [
"python",
"runtime",
"python-import"
] |
How to know the path of the running script in Python? | 2,259,503 | <p>My script.py creates a temporary file in the same dir as the script.</p>
<p>When running it:</p>
<pre><code>python script.py
</code></pre>
<p>it works just file</p>
<p>but it doesn't work when you run:</p>
<pre><code>python /path/to/script.py
</code></pre>
<p>That's because I'm using a relative path to my temp... | 3 | 2010-02-13T23:18:24Z | 2,259,514 | <p>You can use the <a href="http://docs.python.org/library/os.html#os.getcwd" rel="nofollow">os.getcwd()</a> method to know the current working directory.</p>
<p><code>Return a string representing the current working directory. Availability: Unix, Windows.</code></p>
<p>You can use the <a href="http://docs.python.org... | 0 | 2010-02-13T23:21:26Z | [
"python",
"path"
] |
How to know the path of the running script in Python? | 2,259,503 | <p>My script.py creates a temporary file in the same dir as the script.</p>
<p>When running it:</p>
<pre><code>python script.py
</code></pre>
<p>it works just file</p>
<p>but it doesn't work when you run:</p>
<pre><code>python /path/to/script.py
</code></pre>
<p>That's because I'm using a relative path to my temp... | 3 | 2010-02-13T23:18:24Z | 2,259,516 | <p>Per the great <a href="http://www.faqs.org/docs/diveintopython/regression_path.html">Dive Into Python</a>:</p>
<pre><code>import sys, os
print 'sys.argv[0] =', sys.argv[0] 1
pathname = os.path.dirname(sys.argv[0]) 2
print 'path =', pathname
print 'full path =', os.path.abspath(pathname)
</code><... | 7 | 2010-02-13T23:22:01Z | [
"python",
"path"
] |
How to know the path of the running script in Python? | 2,259,503 | <p>My script.py creates a temporary file in the same dir as the script.</p>
<p>When running it:</p>
<pre><code>python script.py
</code></pre>
<p>it works just file</p>
<p>but it doesn't work when you run:</p>
<pre><code>python /path/to/script.py
</code></pre>
<p>That's because I'm using a relative path to my temp... | 3 | 2010-02-13T23:18:24Z | 2,259,533 | <p>The two current answers reflect the ambiguity of your question.</p>
<p>When you've run <code>python /path/to/script.py</code>, where do you want your tempfile? In the current directory (<code>./tempfile.txt</code>) or in <code>/path/to/tempfile.txt</code>?</p>
<p>If the former, you can simply use the relative pat... | 7 | 2010-02-13T23:27:12Z | [
"python",
"path"
] |
Problem using cPickle | 2,259,636 | <p>Could you helpme to make this exmaple work?</p>
<p>I'd like to load a serialized dict if it exists, modify it and dump it again. I think I have a problem with the mode I'm using to open the file but I don't know the correct way.</p>
<pre><code>import os
import cPickle as pickle
if os.path.isfile('file.txt'):
... | 1 | 2010-02-14T00:09:51Z | 2,259,640 | <p><code>'rwb'</code> is not correct file open mode for <code>open()</code>. Try <code>'r+b'</code>.</p>
<p>And after you have read from file, you have cursor positioned at the end of file, so <code>pickle.dump(cache, cache_file)</code> will append to the file (which is probably not what you want). Try <code>cache_fil... | 5 | 2010-02-14T00:11:54Z | [
"python",
"pickle"
] |
Problem using cPickle | 2,259,636 | <p>Could you helpme to make this exmaple work?</p>
<p>I'd like to load a serialized dict if it exists, modify it and dump it again. I think I have a problem with the mode I'm using to open the file but I don't know the correct way.</p>
<pre><code>import os
import cPickle as pickle
if os.path.isfile('file.txt'):
... | 1 | 2010-02-14T00:09:51Z | 2,259,658 | <p>You have opened the file for reading and writing - i.e. random access. When you initially read the file you leave the file index position at the end of the file, so when you later write the data back you are appending to the same file.</p>
<p>You should open the file in read mode, read the data, close it, then reo... | 1 | 2010-02-14T00:18:48Z | [
"python",
"pickle"
] |
Problem using cPickle | 2,259,636 | <p>Could you helpme to make this exmaple work?</p>
<p>I'd like to load a serialized dict if it exists, modify it and dump it again. I think I have a problem with the mode I'm using to open the file but I don't know the correct way.</p>
<pre><code>import os
import cPickle as pickle
if os.path.isfile('file.txt'):
... | 1 | 2010-02-14T00:09:51Z | 2,259,659 | <p>For each load, you need to open(with mode='rb'), load, and close the file handle.<br>
For each dump, you need to open(with mode='wb'), dump, and close the file handle. </p>
| 4 | 2010-02-14T00:19:07Z | [
"python",
"pickle"
] |
Regex try and match until hitting end tag in python | 2,259,694 | <p>I'm looking for a bit of help with a regex in python and google is failing me. Basically I'm searching some html and there is a certain type of table I'm searching for, specifically any table that includes a background tag in it (i.e. BGCOLOR). Some tables have this tag and some do not. Could someone help me out ... | 0 | 2010-02-14T00:35:13Z | 2,259,701 | <p>Don't use a regular expression to parse HTML. Use <a href="http://codespeak.net/lxml/" rel="nofollow"><code>lxml</code></a> or <a href="http://www.crummy.com/software/BeautifulSoup/" rel="nofollow"><code>BeautifulSoup</code></a>.</p>
| 4 | 2010-02-14T00:36:46Z | [
"python",
"regex",
"parsing"
] |
Regex try and match until hitting end tag in python | 2,259,694 | <p>I'm looking for a bit of help with a regex in python and google is failing me. Basically I'm searching some html and there is a certain type of table I'm searching for, specifically any table that includes a background tag in it (i.e. BGCOLOR). Some tables have this tag and some do not. Could someone help me out ... | 0 | 2010-02-14T00:35:13Z | 2,259,704 | <p>Don't use regular expressions to parse HTML -- use an HTML parser, such as <a href="http://www.crummy.com/software/BeautifulSoup/" rel="nofollow">BeautifulSoup</a>.</p>
<p>Specifically, your situation is basically one of having to deal with "nested parentheses" (where an open "parens" is an opening <code><table&... | 3 | 2010-02-14T00:37:17Z | [
"python",
"regex",
"parsing"
] |
Regex try and match until hitting end tag in python | 2,259,694 | <p>I'm looking for a bit of help with a regex in python and google is failing me. Basically I'm searching some html and there is a certain type of table I'm searching for, specifically any table that includes a background tag in it (i.e. BGCOLOR). Some tables have this tag and some do not. Could someone help me out ... | 0 | 2010-02-14T00:35:13Z | 2,259,825 | <p>if your task is just this simple, here's a way. split on <code><TABLE></code> then iterate the items and find the required pattern you want.</p>
<pre><code>myhtml="""
<TABLE>
<B>Item 1.</B>
</TABLE>
some text1
some text2
some text3
<TABLE>
blah
BGCOLOR
blah
</TABLE>
som... | 0 | 2010-02-14T01:30:59Z | [
"python",
"regex",
"parsing"
] |
Regex try and match until hitting end tag in python | 2,259,694 | <p>I'm looking for a bit of help with a regex in python and google is failing me. Basically I'm searching some html and there is a certain type of table I'm searching for, specifically any table that includes a background tag in it (i.e. BGCOLOR). Some tables have this tag and some do not. Could someone help me out ... | 0 | 2010-02-14T00:35:13Z | 2,260,365 | <p>Here's the code that ended up working for me. It finds the correct table and adds more tagging around it so that it is identified from the group with open and close tags of 'realTable'.</p>
<pre><code>soup = BeautifulSoup(''.join(text))
for p in soup.findAll('table'):
pattern = '.*BGCOLOR.*'
if (re.match(p... | 0 | 2010-02-14T06:50:39Z | [
"python",
"regex",
"parsing"
] |
Request-Aware Code in Google App Engine -- os.environ? | 2,259,727 | <p>In GAE, you can say <a href="http://code.google.com/appengine/docs/python/users/functions.html#get_current_user" rel="nofollow"><code>users.get_current_user()</code></a> to get the currently logged-in user implicit to the current request. This works even if multiple requests are being processed simultaneously -- the... | 2 | 2010-02-14T00:45:26Z | 2,259,766 | <p>As <a href="http://code.google.com/appengine/docs/python/overview.html" rel="nofollow">the docs</a> say, </p>
<blockquote>
<p>A Python web app interacts with the
App Engine web server using the CGI
protocol.</p>
</blockquote>
<p>This basically means exactly one request is being served at one time within any ... | 3 | 2010-02-14T00:59:25Z | [
"python",
"google-app-engine",
"request"
] |
How to make Django template engine to render in memory templates? | 2,259,743 | <p>I am storing my templates in the database and I don't have any path to provide for the <code>template.render</code> method.</p>
<p>Is there any exposed method which accepts the template as a string?</p>
<p>Is there any workaround?</p>
| 8 | 2010-02-14T00:52:02Z | 2,259,754 | <p><a href="http://docs.djangoproject.com/en/dev/ref/templates/api/#using-the-template-system">Instantiate <code>Template</code></a> with the string to use as a template.</p>
| 12 | 2010-02-14T00:57:18Z | [
"python",
"django",
"google-app-engine",
"templates",
"django-templates"
] |
How to make Django template engine to render in memory templates? | 2,259,743 | <p>I am storing my templates in the database and I don't have any path to provide for the <code>template.render</code> method.</p>
<p>Is there any exposed method which accepts the template as a string?</p>
<p>Is there any workaround?</p>
| 8 | 2010-02-14T00:52:02Z | 7,909,701 | <pre><code>from django.template.loader import get_template_from_string
tpl = Template(get_template_from_string("My name is {{ my_name }}."))
</code></pre>
| 4 | 2011-10-26T22:27:57Z | [
"python",
"django",
"google-app-engine",
"templates",
"django-templates"
] |
How to make Django template engine to render in memory templates? | 2,259,743 | <p>I am storing my templates in the database and I don't have any path to provide for the <code>template.render</code> method.</p>
<p>Is there any exposed method which accepts the template as a string?</p>
<p>Is there any workaround?</p>
| 8 | 2010-02-14T00:52:02Z | 25,007,609 | <p>Based on the <a href="https://docs.djangoproject.com/en/dev/ref/templates/api/#overview">the docs</a> for using the template system:</p>
<pre><code>from django.template import Template, Context
t = Template("My name is {{ my_name }}.")
c = Context({"my_name": "Adrian"})
t.render(c)
</code></pre>
| 11 | 2014-07-29T03:00:26Z | [
"python",
"django",
"google-app-engine",
"templates",
"django-templates"
] |
Should I use the same url to login admins and other registred users in Django? | 2,259,747 | <p>I am quite new to Django, so it may be a stupid question, but, nevertheless:</p>
<p>I need Django admin part to edit contents on the site, and also I want to have authentification, that will allow registred users to leave comments.</p>
<p>I have the following idea of implementation it: have 2 different tables(admi... | 2 | 2010-02-14T00:53:04Z | 2,259,785 | <p>"have 2 different tables(admins and other registred users)"</p>
<p>Bad idea. Django <code>auth</code> module has one user table. You can easily assign users to groups. Some groups have admin access to anything. Other groups can only leave comments. Read up on the <code>auth</code> module before you do anythin... | 4 | 2010-02-14T01:12:26Z | [
"python",
"django",
"authentication",
"architecture",
"admin"
] |
Django/Python: < comes up as < when I import it from the model object | 2,259,844 | <p><strong>Revised question:</strong></p>
<p>In my dbms, I'm storing the literal <code><<<firefox-image>>></code>, I confirmed in Navicat and Mysql CLI that its <code><<<firefox-image>>></code>. When I use the Python shell and try to grab the same article entry, the outer <code><... | 0 | 2010-02-14T01:40:02Z | 2,260,152 | <p>I can't duplicate that symptom; the fact that you have only two less-than and greater-thans on each side makes me wonder if your inline syntax is wrong? Are there definitely three on either side in your content area?</p>
<p>Otherwise, I think I'd need to see more of the relevant code.</p>
| 1 | 2010-02-14T04:39:07Z | [
"python",
"django",
"unicode"
] |
Django/Python: < comes up as < when I import it from the model object | 2,259,844 | <p><strong>Revised question:</strong></p>
<p>In my dbms, I'm storing the literal <code><<<firefox-image>>></code>, I confirmed in Navicat and Mysql CLI that its <code><<<firefox-image>>></code>. When I use the Python shell and try to grab the same article entry, the outer <code><... | 0 | 2010-02-14T01:40:02Z | 2,260,291 | <p>I'm a dumbass - I forgot to invoke <code>render_uploads</code> before storing it.</p>
<pre><code>return markdown(render_uploads(markup))
</code></pre>
| 2 | 2010-02-14T06:07:58Z | [
"python",
"django",
"unicode"
] |
PyQt MenuBar Mac OSX Snow Leopard | 2,259,886 | <p>I am attempting to add an item to the application menu-bar of a simple PyQt example. However, the following code does not seem to alter the menu-bar at all. The only item in the menu is "Python". Below is the bulk of the code, minus imports and instantiation. </p>
<pre><code>class MainWindow(QtGui.QMainWindow):
... | 4 | 2010-02-14T02:07:35Z | 2,259,974 | <p>I don't have PyQt installed on this machine to test this out, but I think on a Mac the <code>QMainWindow.menuBar()</code> function does not return the application wide menu bar.</p>
<p>You might try creating a menubar like:</p>
<pre><code>menubar = QtGui.MenuBar()
</code></pre>
<p>I'm basing this on the docs for ... | 3 | 2010-02-14T02:52:52Z | [
"python",
"osx",
"osx-snow-leopard",
"pyqt",
"menubar"
] |
PyQt MenuBar Mac OSX Snow Leopard | 2,259,886 | <p>I am attempting to add an item to the application menu-bar of a simple PyQt example. However, the following code does not seem to alter the menu-bar at all. The only item in the menu is "Python". Below is the bulk of the code, minus imports and instantiation. </p>
<pre><code>class MainWindow(QtGui.QMainWindow):
... | 4 | 2010-02-14T02:07:35Z | 12,684,649 | <p>Correct. On MAC OS we need to use menubar like this:</p>
<pre><code>self.menubar = QtGui.QMenuBar()
</code></pre>
<p>And not like this:</p>
<pre><code>self.menubar = QtGui.QMenuBar(MainWindow)
</code></pre>
<p>(without the <code>MainWindow</code> parameter)</p>
<p>I suggest the best solution is using <code>... | 1 | 2012-10-02T04:43:33Z | [
"python",
"osx",
"osx-snow-leopard",
"pyqt",
"menubar"
] |
PyQt MenuBar Mac OSX Snow Leopard | 2,259,886 | <p>I am attempting to add an item to the application menu-bar of a simple PyQt example. However, the following code does not seem to alter the menu-bar at all. The only item in the menu is "Python". Below is the bulk of the code, minus imports and instantiation. </p>
<pre><code>class MainWindow(QtGui.QMainWindow):
... | 4 | 2010-02-14T02:07:35Z | 21,922,291 | <p>I know this question is old but, since I was stuck with the same problem, I found that because I was creating an action to quit the application and this action is reserved on OSX to the Application Menu, the File menu did not appear. As I created a new action on the same menu, it became available.
This worked by us... | 6 | 2014-02-20T23:51:55Z | [
"python",
"osx",
"osx-snow-leopard",
"pyqt",
"menubar"
] |
PyQt MenuBar Mac OSX Snow Leopard | 2,259,886 | <p>I am attempting to add an item to the application menu-bar of a simple PyQt example. However, the following code does not seem to alter the menu-bar at all. The only item in the menu is "Python". Below is the bulk of the code, minus imports and instantiation. </p>
<pre><code>class MainWindow(QtGui.QMainWindow):
... | 4 | 2010-02-14T02:07:35Z | 31,028,472 | <p>When using PyQt on a mac, the system will intercept certain commands contain the word 'Quit' or 'Exit' and remove them from your menubar because they exist elsewhere. if a menubar header has no items, it will not display, making it appear as if you haven't modified the menubar. </p>
<pre><code>#exit = QtGui.QAction... | 1 | 2015-06-24T13:50:26Z | [
"python",
"osx",
"osx-snow-leopard",
"pyqt",
"menubar"
] |
How can I preserve or identify a caller's stack frame? | 2,260,029 | <p>My brain feels slow today. </p>
<p>I'm writing pre/post/invariants in Python using decorators. Currently, I need each call to specify the locals and globals for context, and this feels ugly. Is there a way to get the locals and globals from the decorator application level even though it's an arbitrary depth.<... | 0 | 2010-02-14T03:14:23Z | 2,260,082 | <p>If you can access <code>self.total_sold</code>, you can access <code>self.tax_rate</code> (which is the same thing as <code>Item.tax_rate</code> unless you stomp on it -- so you just don't stomp of it, keep the tax rate as a pristine class variable, and access it through <code>self.</code>!-). That would be <em>muc... | 2 | 2010-02-14T03:50:57Z | [
"python",
"stack",
"decorator"
] |
TinyMCE popup windows not working in Django development server | 2,260,061 | <p>TinyMCE is working just fine, all except for the popup windows. They come up blank, and after a little bit of Google searching, apparently it has something to do with cross domain errors with Firefox and Django. I tried using document.domain, but I have a feeling that it doesn't work when you're using the Django dev... | 1 | 2010-02-14T03:31:46Z | 2,303,607 | <p>Instead of using 127.0.0.1:8000, if I use localhost:8000, everything seems to work perfectly. I'm not sure why. Maybe it's because localhost:8000 is a domain and 127.0.0.1:800 is not.</p>
| 0 | 2010-02-20T20:29:32Z | [
"python",
"django",
"tinymce",
"django-tinymce"
] |
TinyMCE popup windows not working in Django development server | 2,260,061 | <p>TinyMCE is working just fine, all except for the popup windows. They come up blank, and after a little bit of Google searching, apparently it has something to do with cross domain errors with Firefox and Django. I tried using document.domain, but I have a feeling that it doesn't work when you're using the Django dev... | 1 | 2010-02-14T03:31:46Z | 2,304,841 | <p>There's nothing wrong with 127.0.0.1 as a domain. The problem is that it's different to your media domain <code>localhost</code>, although they both point to the same thing.</p>
<p>TinyMCE doesn't like different domains for the media, which is why having a relative <code>MEDIA_URL</code> would work. Using the URL <... | 1 | 2010-02-21T05:05:36Z | [
"python",
"django",
"tinymce",
"django-tinymce"
] |
Create chart/statistics for selected mysql table through python | 2,260,072 | <p>I'd like to start by asking for your opinion on how I should tackle this task, instead of simply how to structure my code. </p>
<p>Here is what I'm trying to do: I have a lot of data loaded into a mysql table for a large number of unique names + dates (i.e., where the date is a separate field). My goal is to be abl... | 2 | 2010-02-14T03:42:57Z | 2,260,530 | <p>Your problem can be broken down into two main pieces: analyzing the data, and presenting it. I assume that you already know how to do the data analysis part, and you're wondering how to present it.</p>
<p>This seems like a problem that's particularly well suited to a web app. Is there a reason why you would want to... | 0 | 2010-02-14T08:35:04Z | [
"python",
"mysql",
"excel-2007",
"mysql-python"
] |
Create chart/statistics for selected mysql table through python | 2,260,072 | <p>I'd like to start by asking for your opinion on how I should tackle this task, instead of simply how to structure my code. </p>
<p>Here is what I'm trying to do: I have a lot of data loaded into a mysql table for a large number of unique names + dates (i.e., where the date is a separate field). My goal is to be abl... | 2 | 2010-02-14T03:42:57Z | 4,633,840 | <p>Analyze of such data (name,date) could be seen as issuing ad-hoc SQL queries to get timeseries information.</p>
<p>You will 'sample' your information by a date/time frame (day/week/month/year or more detailled by hour/minute) depending of how large is your dataset.</p>
<p>I often use such query where the date fiel... | 1 | 2011-01-08T12:26:31Z | [
"python",
"mysql",
"excel-2007",
"mysql-python"
] |
Simple Python Regex Find pattern | 2,260,105 | <p>I have a sentence. I want to find all occurrences of a word that start with a specific character in that sentence. I am very new to programming and Python, but from the little I know, this sounds like a Regex question.</p>
<p>What is the pattern match code that will let me find all words that match my pattern?</p... | 8 | 2010-02-14T04:08:53Z | 2,260,110 | <pre><code>import re
s = "Your sentence that contains the word ROAD"
s = re.sub(r'\bROAD', 'RD.', s)
print s
</code></pre>
<p>Read: <a href="http://diveintopython3.org/regular-expressions.html" rel="nofollow">http://diveintopython3.org/regular-expressions.html</a></p>
| 1 | 2010-02-14T04:11:03Z | [
"python",
"regex"
] |
Simple Python Regex Find pattern | 2,260,105 | <p>I have a sentence. I want to find all occurrences of a word that start with a specific character in that sentence. I am very new to programming and Python, but from the little I know, this sounds like a Regex question.</p>
<p>What is the pattern match code that will let me find all words that match my pattern?</p... | 8 | 2010-02-14T04:08:53Z | 2,260,113 | <pre><code>>>> sentence="a quick brown fox for you"
>>> pattern="fo"
>>> for word in sentence.split():
... if word.startswith(pattern):
... print word
...
fox
for
</code></pre>
<p>Split the sentence on spaces, use a loop to search for the pattern and print them out.</p>
| 1 | 2010-02-14T04:12:34Z | [
"python",
"regex"
] |
Simple Python Regex Find pattern | 2,260,105 | <p>I have a sentence. I want to find all occurrences of a word that start with a specific character in that sentence. I am very new to programming and Python, but from the little I know, this sounds like a Regex question.</p>
<p>What is the pattern match code that will let me find all words that match my pattern?</p... | 8 | 2010-02-14T04:08:53Z | 2,260,115 | <p>I second the Dive Into Python recommendation. But it's basically:</p>
<pre><code>m = re.findall(r'\bf.*?\b', 'a fast and friendly dog')
print(m)
</code></pre>
<p>\b means word boundary, and .*? ensures we store the whole word, but back off to avoid going too far (technically, ? is called a lazy operator).</p>
| 1 | 2010-02-14T04:12:39Z | [
"python",
"regex"
] |
Simple Python Regex Find pattern | 2,260,105 | <p>I have a sentence. I want to find all occurrences of a word that start with a specific character in that sentence. I am very new to programming and Python, but from the little I know, this sounds like a Regex question.</p>
<p>What is the pattern match code that will let me find all words that match my pattern?</p... | 8 | 2010-02-14T04:08:53Z | 2,260,116 | <p>You could do (doesn't use <code>re</code> though):</p>
<pre><code>matching_words = [x for x in sentence.split() if x.startswith(CHAR_TO_FIND)]
</code></pre>
<p>Regular expressions work too (see the other answers) but I think this solution will be a little more readable, and as a beginner learning Python, you'll fi... | 1 | 2010-02-14T04:12:59Z | [
"python",
"regex"
] |
Simple Python Regex Find pattern | 2,260,105 | <p>I have a sentence. I want to find all occurrences of a word that start with a specific character in that sentence. I am very new to programming and Python, but from the little I know, this sounds like a Regex question.</p>
<p>What is the pattern match code that will let me find all words that match my pattern?</p... | 8 | 2010-02-14T04:08:53Z | 2,260,117 | <pre><code>import re
print re.findall(r'\bv\w+', thesentence)
</code></pre>
<p>will print every word in the sentence that starts with <code>'v'</code>, for example.</p>
<p>Using the <code>split</code> method of strings, as another answer suggests, would not identify <em>words</em>, but space-separated chunks that may... | 12 | 2010-02-14T04:13:10Z | [
"python",
"regex"
] |
wxPython - PaintDC not refreshing | 2,260,142 | <p><code></p>
<pre><code>import wx
class TestDraw(wx.Panel):
def __init__(self,parent=None,id=-1):
wx.Panel.__init__(self,parent,id)
self.SetBackgroundColour("#FFFFFF")
self.Bind(wx.EVT_PAINT,self.onPaint)
def onPaint(self, event):
event.Skip()
dc=wx.PaintDC(self)
... | 0 | 2010-02-14T04:33:22Z | 2,260,194 | <p>You can bind a method to handle <code>wx.EVT_SIZE</code> or the panel and invalidate it there. Alternatively simply use the <a href="http://www.wxpython.org/docs/api/wx.Window-class.html" rel="nofollow"><code>wx.FULL_REPAINT_ON_RESIZE</code></a> for the panel. </p>
| 2 | 2010-02-14T05:00:34Z | [
"python",
"user-interface",
"graphics",
"wxpython"
] |
wxPython - PaintDC not refreshing | 2,260,142 | <p><code></p>
<pre><code>import wx
class TestDraw(wx.Panel):
def __init__(self,parent=None,id=-1):
wx.Panel.__init__(self,parent,id)
self.SetBackgroundColour("#FFFFFF")
self.Bind(wx.EVT_PAINT,self.onPaint)
def onPaint(self, event):
event.Skip()
dc=wx.PaintDC(self)
... | 0 | 2010-02-14T04:33:22Z | 2,260,198 | <p>The documentation for a <a href="http://www.wxpython.org/docs/api/wx.SizeEvent-class.html" rel="nofollow">SizeEvent</a> claims that there may be some complications when drawing depends on the dimensions of the window. I do not know exactly what is going on behind the scenes. I followed the suggestion on the link and... | 0 | 2010-02-14T05:01:40Z | [
"python",
"user-interface",
"graphics",
"wxpython"
] |
python mapping with strings | 2,260,148 | <p>I implemented a version of the str_replace function available in php using python. Here is my original code that didn't work</p>
<pre><code>def replacer(items,str,repl):
return "".join(map(lambda x:repl if x in items else x,str))
test = "hello world"
print test
test = replacer(test,['e','l','o'],'?')
print tes... | 2 | 2010-02-14T04:35:33Z | 2,260,154 | <p>You're passing it in backwards in the first one. It should be should be </p>
<pre><code>test = replacer(['e','l','o'], test, '?')
</code></pre>
| 1 | 2010-02-14T04:40:09Z | [
"python",
"string",
"map",
"lambda"
] |
python mapping with strings | 2,260,148 | <p>I implemented a version of the str_replace function available in php using python. Here is my original code that didn't work</p>
<pre><code>def replacer(items,str,repl):
return "".join(map(lambda x:repl if x in items else x,str))
test = "hello world"
print test
test = replacer(test,['e','l','o'],'?')
print tes... | 2 | 2010-02-14T04:35:33Z | 2,260,156 | <p>The ordering of the arguments to <code>replacer</code> is what makes the difference between the two. If you changed the argument ordering in the first version it'd behave like the second version.</p>
| 4 | 2010-02-14T04:40:53Z | [
"python",
"string",
"map",
"lambda"
] |
python mapping with strings | 2,260,148 | <p>I implemented a version of the str_replace function available in php using python. Here is my original code that didn't work</p>
<pre><code>def replacer(items,str,repl):
return "".join(map(lambda x:repl if x in items else x,str))
test = "hello world"
print test
test = replacer(test,['e','l','o'],'?')
print tes... | 2 | 2010-02-14T04:35:33Z | 2,260,160 | <p>Don't use built-in names such as <code>str</code> for your own identifiers, that's just asking for trouble and has <strong>no</strong> benefit whatsoever.</p>
<p>Apart from that, your first version is looping on <code>str</code>, the <strong>second</strong> argument -- the list <code>['e', 'l', 'o']</code> -- so <s... | 3 | 2010-02-14T04:42:09Z | [
"python",
"string",
"map",
"lambda"
] |
How to clear the Entry widget after a button is pressed in Tkinter? | 2,260,235 | <p>I'm trying to clear the <code>Entry</code> widget after the user presses a button using Tkinter. </p>
<p>I tried using <code>ent.delete(0, END)</code>, but I got an error saying that strings don't have the attribute <em>delete</em>.</p>
<p>Here is my code, where I'm getting error on <code>real.delete(0, END)</code... | 11 | 2010-02-14T05:35:45Z | 2,260,281 | <p>I'm unclear about your question. From <a href="http://effbot.org/tkinterbook/entry.htm#patterns" rel="nofollow">http://effbot.org/tkinterbook/entry.htm#patterns</a>, it
seems you just need to do an assignment after you called the delete.
To add entry text to the widget, use the insert method. To replace the current... | 2 | 2010-02-14T06:03:00Z | [
"python",
"user-interface",
"widget",
"tkinter"
] |
How to clear the Entry widget after a button is pressed in Tkinter? | 2,260,235 | <p>I'm trying to clear the <code>Entry</code> widget after the user presses a button using Tkinter. </p>
<p>I tried using <code>ent.delete(0, END)</code>, but I got an error saying that strings don't have the attribute <em>delete</em>.</p>
<p>Here is my code, where I'm getting error on <code>real.delete(0, END)</code... | 11 | 2010-02-14T05:35:45Z | 2,260,355 | <p>After poking around a bit through the <a href="http://www.pythonware.com/library/tkinter/introduction/">Introduction to Tkinter</a>, I came up with the code below, which doesn't do anything except display a text field and clear it when the <code>"Clear text"</code> button is pushed:</p>
<pre><code>import tkinter as... | 13 | 2010-02-14T06:42:33Z | [
"python",
"user-interface",
"widget",
"tkinter"
] |
How to clear the Entry widget after a button is pressed in Tkinter? | 2,260,235 | <p>I'm trying to clear the <code>Entry</code> widget after the user presses a button using Tkinter. </p>
<p>I tried using <code>ent.delete(0, END)</code>, but I got an error saying that strings don't have the attribute <em>delete</em>.</p>
<p>Here is my code, where I'm getting error on <code>real.delete(0, END)</code... | 11 | 2010-02-14T05:35:45Z | 2,262,084 | <p><code>real</code> gets the value <code>ent.get()</code> which is just a string. It has no idea where it came from, and no way to affect the widget.</p>
<p>Instead of <code>real.delete()</code>, call <code>.delete()</code> on the entry widget itself:</p>
<pre><code>def res(ent, real, secret):
if secret == eval... | 3 | 2010-02-14T17:51:12Z | [
"python",
"user-interface",
"widget",
"tkinter"
] |
How to clear the Entry widget after a button is pressed in Tkinter? | 2,260,235 | <p>I'm trying to clear the <code>Entry</code> widget after the user presses a button using Tkinter. </p>
<p>I tried using <code>ent.delete(0, END)</code>, but I got an error saying that strings don't have the attribute <em>delete</em>.</p>
<p>Here is my code, where I'm getting error on <code>real.delete(0, END)</code... | 11 | 2010-02-14T05:35:45Z | 2,262,140 | <p><code>ent.delete(0, END)</code> is the correct answer, assuming that <code>ent</code> is a proper reference to the entry widget. If you get the error you say you do, you have an error in your code. You will need to show us the code if you are unable to spot the error yourself.</p>
| 3 | 2010-02-14T18:04:35Z | [
"python",
"user-interface",
"widget",
"tkinter"
] |
How to clear the Entry widget after a button is pressed in Tkinter? | 2,260,235 | <p>I'm trying to clear the <code>Entry</code> widget after the user presses a button using Tkinter. </p>
<p>I tried using <code>ent.delete(0, END)</code>, but I got an error saying that strings don't have the attribute <em>delete</em>.</p>
<p>Here is my code, where I'm getting error on <code>real.delete(0, END)</code... | 11 | 2010-02-14T05:35:45Z | 21,120,299 | <p>Try with this:</p>
<pre><code>import os
os.system('clear')
</code></pre>
| -5 | 2014-01-14T17:43:34Z | [
"python",
"user-interface",
"widget",
"tkinter"
] |
How to clear the Entry widget after a button is pressed in Tkinter? | 2,260,235 | <p>I'm trying to clear the <code>Entry</code> widget after the user presses a button using Tkinter. </p>
<p>I tried using <code>ent.delete(0, END)</code>, but I got an error saying that strings don't have the attribute <em>delete</em>.</p>
<p>Here is my code, where I'm getting error on <code>real.delete(0, END)</code... | 11 | 2010-02-14T05:35:45Z | 38,112,048 | <p>First of all, make sure the Text is enabled, then delete your tags, and then the content.</p>
<pre><code>myText.config(state=NORMAL)
myText.tag_delete ("myTags")
myText.delete(1.0, END)
</code></pre>
<p>When the Text is "DISABLE", the delete does not work because the Text field is in read-only mode.</p>
| 0 | 2016-06-30T00:14:07Z | [
"python",
"user-interface",
"widget",
"tkinter"
] |
Deleting the most recently received email via Python script? | 2,260,316 | <p>I use Gmail and an application that notifies me if I've received a new email, containing its title in a tooltip. (GmailNotifier with Miranda-IM) Most of the emails I receive are ones I don't want to read, and it's annoying having to login to Gmail on a slow connection just to delete said email. I believe plugin is c... | 2 | 2010-02-14T06:22:17Z | 2,260,366 | <pre><code>import poplib
#connect to server
mailserver = poplib.POP3_SSL('pop.gmail.com')
mailserver.user('recent:YOURUSERNAME') #use 'recent mode'
mailserver.pass_('YOURPASSWORD') #consider not storing in plaintext!
#newest email has the highest message number
numMessages = len(mailserver.list()[1])
#confirm this i... | 2 | 2010-02-14T06:50:39Z | [
"python",
"email",
"imap",
"pop3"
] |
How can I write a Nokia application with pyqt? | 2,260,434 | <p>I have seen questions on my Facebook group about 'Can I write Nokia apps with pyqt', but no one has answered. I am curious, can it be done?</p>
| 1 | 2010-02-14T07:34:17Z | 2,260,447 | <p>The short answer is yes.</p>
<p>You might like to look at <a href="http://wiki.forum.nokia.com/index.php/Getting_started_with_PyQt_for_Maemo" rel="nofollow">http://wiki.forum.nokia.com/index.php/Getting_started_with_PyQt_for_Maemo</a>, </p>
<p>Because of issues with PyQT being available only for GPL applications w... | 3 | 2010-02-14T07:40:30Z | [
"python",
"pyqt",
"nokia"
] |
How to switch to a python subprocess created by IPython (on OS X)? | 2,260,614 | <p>When I use IPython along with the <code>-wthread</code> option, it spawns a python subprocess, which appears as a Mac OS X application.</p>
<p>My problem is that when I send commands to that application (for example plotting with <code>matplotlib</code>), the window is updated behind all my other windows. I would l... | 1 | 2010-02-14T09:19:57Z | 2,261,024 | <p><strong>Could be either:</strong></p>
<ol>
<li><p>Making a new python script that tracks grandchild processes of another script might be tricky. The IPython documentation has an example to monitor spawned processes by pid; <a href="http://projects.scipy.org/ipython/ipython/browser/ipython/trunk/IPython/Extensions/j... | 1 | 2010-02-14T12:27:14Z | [
"python",
"osx",
"wxpython",
"ipython"
] |
How to switch to a python subprocess created by IPython (on OS X)? | 2,260,614 | <p>When I use IPython along with the <code>-wthread</code> option, it spawns a python subprocess, which appears as a Mac OS X application.</p>
<p>My problem is that when I send commands to that application (for example plotting with <code>matplotlib</code>), the window is updated behind all my other windows. I would l... | 1 | 2010-02-14T09:19:57Z | 2,297,587 | <p>Here is my full solution, with an IPython magic function.</p>
<p>Install <a href="http://appscript.sourceforge.net/py-appscript/index.html" rel="nofollow">appscript</a> (see <a href="http://stackoverflow.com/questions/2260614/how-to-switch-to-a-python-subprocess-created-by-ipython-on-os-x">this question</a> about s... | 1 | 2010-02-19T15:54:19Z | [
"python",
"osx",
"wxpython",
"ipython"
] |
Python: Creating Excel worksheets with charts | 2,260,678 | <p>Is there any module for creating Excel charts with embedded charts in Python? <a href="http://stackoverflow.com/questions/553019/python-excel-making-reports">The modules mentioned in this question</a> don't seem to have that capability.</p>
<p>I prefer a generic module that would work under Ubuntu, not a Windows-de... | 3 | 2010-02-14T09:47:53Z | 2,260,712 | <p>On Windows, you'd need to use pywin32 and COM. On a *x box, you may find that a combination of Iron Python, Mono, and an Excel-manipulation library written for .NET may do the job. In either case, good luck.</p>
| 5 | 2010-02-14T10:09:26Z | [
"python",
"excel",
"charts"
] |
Python: Creating Excel worksheets with charts | 2,260,678 | <p>Is there any module for creating Excel charts with embedded charts in Python? <a href="http://stackoverflow.com/questions/553019/python-excel-making-reports">The modules mentioned in this question</a> don't seem to have that capability.</p>
<p>I prefer a generic module that would work under Ubuntu, not a Windows-de... | 3 | 2010-02-14T09:47:53Z | 5,335,214 | <p>It's a little bit convoluted (and/or evil), but something like this will work cross-platform (including under Linux) using <a href="http://jpype.sourceforge.net/" rel="nofollow">JPype</a> to wrap the <a href="http://www.smartxls.com/indexj.htm" rel="nofollow" title="SmartXLS">SmartXLS</a> Excel Java library.</p>
<p... | 3 | 2011-03-17T05:24:46Z | [
"python",
"excel",
"charts"
] |
Python: Creating Excel worksheets with charts | 2,260,678 | <p>Is there any module for creating Excel charts with embedded charts in Python? <a href="http://stackoverflow.com/questions/553019/python-excel-making-reports">The modules mentioned in this question</a> don't seem to have that capability.</p>
<p>I prefer a generic module that would work under Ubuntu, not a Windows-de... | 3 | 2010-02-14T09:47:53Z | 22,356,344 | <p>I recently found <a href="http://xlsxwriter.readthedocs.org/" rel="nofollow">xlsxwriter</a>. It's the most capable xlsx python module I've found and works with charts and graphs. It also doesn't require any non standard python modules and works on any type of box. No need for windows or to have charting software ins... | 3 | 2014-03-12T15:32:08Z | [
"python",
"excel",
"charts"
] |
How to access the local Django webserver from outside world | 2,260,727 | <p>I followed the instructions <a href="http://magazine.redhat.com/2008/06/05/installingconfiguringcaching-django-on-your-linux-server/">here</a> to run Django using the built-in webserver and was able to successfully run it using <code>python manage.py runserver</code>. If I access 127.0.0.1:port locally from the web... | 110 | 2010-02-14T10:18:57Z | 2,260,745 | <p>You have to run the development server such that it <a href="https://docs.djangoproject.com/en/dev/ref/django-admin/#django-admin-option---addrport">listens on the interface</a> to your network.</p>
<p>E.g.</p>
<pre><code>python manage.py runserver 0.0.0.0:8000
</code></pre>
<p>listens on <strong>every</strong> i... | 191 | 2010-02-14T10:30:09Z | [
"python",
"django"
] |
How to access the local Django webserver from outside world | 2,260,727 | <p>I followed the instructions <a href="http://magazine.redhat.com/2008/06/05/installingconfiguringcaching-django-on-your-linux-server/">here</a> to run Django using the built-in webserver and was able to successfully run it using <code>python manage.py runserver</code>. If I access 127.0.0.1:port locally from the web... | 110 | 2010-02-14T10:18:57Z | 2,260,765 | <p>Pick one or more from:</p>
<ul>
<li>Your application isn't successfully listening on the intended IP:PORT
<ul>
<li>Because you haven't configured it successfully</li>
<li>Because the user doesn't have permission to</li>
</ul></li>
<li>Your application is listening successfully on the intended IP:PORT, but clients c... | 10 | 2010-02-14T10:40:10Z | [
"python",
"django"
] |
How to access the local Django webserver from outside world | 2,260,727 | <p>I followed the instructions <a href="http://magazine.redhat.com/2008/06/05/installingconfiguringcaching-django-on-your-linux-server/">here</a> to run Django using the built-in webserver and was able to successfully run it using <code>python manage.py runserver</code>. If I access 127.0.0.1:port locally from the web... | 110 | 2010-02-14T10:18:57Z | 35,614,955 | <p>I'm going to add this here: </p>
<ol>
<li><p><code>sudo python manage.py runserver 80</code></p></li>
<li><p>Go to your phone or computer and enter your computers internal IP (e.g <code>192.168.0.12</code>) into the browser.</p></li>
</ol>
<p>At this point you should be connected to the Django server.</p>
<p>This... | 0 | 2016-02-24T22:58:16Z | [
"python",
"django"
] |
GAE datastore viewer - editing lists | 2,260,804 | <p>Is it possible to somehow enable editing lists in GAE datastore viewer?
I'm using Python version of SDK.</p>
<p>Basically I want to avoid, as much as possible, writing own CRUD as it
wouldn't be necessary if only I could edit lists in datastore viewer..</p>
| 1 | 2010-02-14T10:54:26Z | 2,261,067 | <p>That's not built in to the datastore viewer, no. With the 1.3.1 release of the SDK, it is possible to add custom pages to the Admin console, but that wouldn't really save you from having to write the list editing page yourself.</p>
<p><a href="http://code.google.com/appengine/docs/python/config/appconfig.html#Admin... | 2 | 2010-02-14T12:39:56Z | [
"python",
"google-app-engine",
"google-cloud-datastore"
] |
Weird problem with input encoding in IPython | 2,260,815 | <p>I'm running python 2.6 with latest IPython on Windows XP SP3, and I have two questions. First one of my problems is, when under IPython, I cannot input Unicode strings directly, and, as a result, cannot open files with non-latin names. Let me demonstrate. Under usual python this works:</p>
<pre><code>>>> s... | 13 | 2010-02-14T10:58:37Z | 2,260,840 | <p>Yes. Typing Unicode at the console is always problematic and generally best avoided, but <a href="http://projects.scipy.org/ipython/ipython/ticket/239">IPython is particularly broke</a>. It converts characters you type on its console as if they were encoded in ISO-8859-1, regardless of the actual encoding you're giv... | 12 | 2010-02-14T11:11:48Z | [
"python",
"windows",
"filesystems",
"locale",
"ipython"
] |
Weird problem with input encoding in IPython | 2,260,815 | <p>I'm running python 2.6 with latest IPython on Windows XP SP3, and I have two questions. First one of my problems is, when under IPython, I cannot input Unicode strings directly, and, as a result, cannot open files with non-latin names. Let me demonstrate. Under usual python this works:</p>
<pre><code>>>> s... | 13 | 2010-02-14T10:58:37Z | 4,143,703 | <p>I had the same problem with Greek input, this <a href="http://bugs.launchpad.net/ipython/+bug/339642" rel="nofollow">patch from launchpad</a> works for me too.</p>
<p>Thanks.</p>
| 0 | 2010-11-10T10:55:49Z | [
"python",
"windows",
"filesystems",
"locale",
"ipython"
] |
Weird problem with input encoding in IPython | 2,260,815 | <p>I'm running python 2.6 with latest IPython on Windows XP SP3, and I have two questions. First one of my problems is, when under IPython, I cannot input Unicode strings directly, and, as a result, cannot open files with non-latin names. Let me demonstrate. Under usual python this works:</p>
<pre><code>>>> s... | 13 | 2010-02-14T10:58:37Z | 5,666,431 | <p>Perversely enough, this will work: </p>
<pre><code>fd = open('m:/ÐлокноÑ/home.tdl')
</code></pre>
<p>Or:</p>
<pre><code>fd = open('m:/ÐлокноÑ/home.tdl'.encode('utf-8'))
</code></pre>
<p>This gets around ipython's bug by inputting the string as a raw UTF-8 encoded byte-string. ipython doesn't try an... | 0 | 2011-04-14T16:28:26Z | [
"python",
"windows",
"filesystems",
"locale",
"ipython"
] |
How can I resize the root window in Tkinter? | 2,261,011 | <pre><code>from Tkinter import *
import socket, sys
from PIL import Image, ImageTk
root = Tk()
root.title("Whois Tool")
root.resizable(0, 0)
text = Text()
text1 = Text()
image = Image.open("hacker2.png")
photo = ImageTk.PhotoImage(image)
label = Label(root, image=photo)
label.pack()
text1.config(width=15, height=... | 8 | 2010-02-14T12:20:04Z | 2,261,082 | <p>For a 500x500 window you would use</p>
<pre><code>root.geometry("500x500")
</code></pre>
<p>As for image resizing, I do not believe Tkinter supports it. You would have to use a library such as <a href="http://www.pythonware.com/products/pil/">PIL</a> to resize the image to the window resolution. -<em><a href="http... | 20 | 2010-02-14T12:44:47Z | [
"python",
"tkinter"
] |
Python: How to make multiple HTTP POST queries in one moment? | 2,261,035 | <p>How to make multiple HTTP POST queries in one moment using Python? </p>
<p>Using an external library with an example can be a good solution.</p>
| 1 | 2010-02-14T12:31:38Z | 2,261,053 | <p>External lib? Maybe an internal one would do the trick...</p>
<p><a href="http://docs.python.org/library/httplib.html#examples" rel="nofollow">http://docs.python.org/library/httplib.html#examples</a></p>
<p>specifically: </p>
<pre><code>params = urllib.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0})
</code></pre>
... | 1 | 2010-02-14T12:37:09Z | [
"python",
"http",
"concurrency"
] |
Python: How to make multiple HTTP POST queries in one moment? | 2,261,035 | <p>How to make multiple HTTP POST queries in one moment using Python? </p>
<p>Using an external library with an example can be a good solution.</p>
| 1 | 2010-02-14T12:31:38Z | 2,261,246 | <p>You should consider using <a href="http://docs.python.org/library/threading.html" rel="nofollow"><code>threading</code></a> (or maybe <a href="http://docs.python.org/dev/library/multiprocessing.html" rel="nofollow"><code>multiprocessing</code></a>, but here the <a href="http://en.wikipedia.org/wiki/Global_Interprete... | 0 | 2010-02-14T13:46:17Z | [
"python",
"http",
"concurrency"
] |
How can I put 2 buttons next to each other? | 2,261,191 | <pre><code>b = Button(root, text="Enter", width=10, height=2, command=button1)
b.config()
b.pack(side=LEFT)
c = Button(root, text="Clear", width=10, height=2, command=clear)
c.pack(side=LEFT)
scrollbar = Scrollbar(root)
scrollbar.pack(side=RIGHT, fill=Y)
text.config(width=35, height=15)
text.pack(side=RIGHT, fill=Y)... | 2 | 2010-02-14T13:29:41Z | 2,261,282 | <p>There are typically two solutions to this type of problem. Neither is better than the other in all circumstances, or in this particular example. Both solutions are perfectly acceptable.</p>
<p>Solution 1: use two containers (typically, frames). One to hold horizontal items, one to hold vertical items. In this case ... | 5 | 2010-02-14T13:55:22Z | [
"python",
"tkinter",
"button"
] |
PyRo and python | 2,261,317 | <p>I use PyRo in my python programm. And I have a problem. class B: In callFromProxy print 0, but in callfun print right value = 10. Why? How to fix?</p>
<pre><code>class A(Pyro.core.ObjBase):
# set link to item class B
def set(self, real_B):
self.item_B = real_B
# call function callfun in item_B
def callfun(se... | 0 | 2010-02-14T14:06:12Z | 2,261,429 | <p>I believe (and correct me if I'm wrong) PyRo uses asynchronous calls, at least by default.</p>
<p>So when you call <code>callFromProxy</code>, <code>printvalue</code> might get executed before <code>callfun</code> on <code>itemB</code>, because it takes time to call <code>A.callfun</code> and <code>B.callfun</code>... | 1 | 2010-02-14T14:40:59Z | [
"python",
"pyro"
] |
AMQP C++ implementation | 2,261,347 | <p>We are writing C++ code which needs messaging. Is there a free/open-source and stable AMQP server available that has equally stable C++ client library with it. We also need to provide Python interface of our code to users (idea is to do maximum stuff in C++ and expose the API in Python).</p>
<p>What can be best way... | 8 | 2010-02-14T14:13:37Z | 2,261,372 | <p>AMQP can be quite complex to understand -- I suggest Using <a href="http://code.google.com/p/protobuf/" rel="nofollow">Protocol Buffers</a> to code your communication layer, it generates both python and C++. if your needs are too complicated I would suggest <a href="http://www.zeroc.com/ice.html" rel="nofollow">ICE<... | 1 | 2010-02-14T14:22:46Z | [
"c++",
"python",
"amqp"
] |
AMQP C++ implementation | 2,261,347 | <p>We are writing C++ code which needs messaging. Is there a free/open-source and stable AMQP server available that has equally stable C++ client library with it. We also need to provide Python interface of our code to users (idea is to do maximum stuff in C++ and expose the API in Python).</p>
<p>What can be best way... | 8 | 2010-02-14T14:13:37Z | 2,261,453 | <p><a href="http://qpid.apache.org/" rel="nofollow">Apache QPid</a> seems to be relevant here. There's a C++ broker/client library <a href="http://qpid.apache.org/download.html" rel="nofollow">here</a>. </p>
<p>Note that since you're programming to a protocol (AMQP), <em>your broker/client don't have to be in the same... | 2 | 2010-02-14T14:47:14Z | [
"c++",
"python",
"amqp"
] |
AMQP C++ implementation | 2,261,347 | <p>We are writing C++ code which needs messaging. Is there a free/open-source and stable AMQP server available that has equally stable C++ client library with it. We also need to provide Python interface of our code to users (idea is to do maximum stuff in C++ and expose the API in Python).</p>
<p>What can be best way... | 8 | 2010-02-14T14:13:37Z | 2,274,646 | <p>For future reference, take a look at <a href="http://qpid.apache.org">Apache Qpid</a> - it has a C++ client library and is very good. The problem for your use-case is that Rabbit implements AMQP 0-8 and the Qpid C++ client talks AMQP 0-10.</p>
| 8 | 2010-02-16T16:56:18Z | [
"c++",
"python",
"amqp"
] |
AMQP C++ implementation | 2,261,347 | <p>We are writing C++ code which needs messaging. Is there a free/open-source and stable AMQP server available that has equally stable C++ client library with it. We also need to provide Python interface of our code to users (idea is to do maximum stuff in C++ and expose the API in Python).</p>
<p>What can be best way... | 8 | 2010-02-14T14:13:37Z | 12,282,924 | <p>I know this is a bit late, I'm kind of in the same position as the asker.</p>
<p>I'm looking at <a href="http://www.zeroc.com/icestorm/index.html" rel="nofollow">IceStorm</a> and Apache QPid per answers above.</p>
<p>Currently I have rabbit MQ but it's not so easy to integrate with C++.</p>
<p>I think if you have... | 0 | 2012-09-05T13:45:31Z | [
"c++",
"python",
"amqp"
] |
AMQP C++ implementation | 2,261,347 | <p>We are writing C++ code which needs messaging. Is there a free/open-source and stable AMQP server available that has equally stable C++ client library with it. We also need to provide Python interface of our code to users (idea is to do maximum stuff in C++ and expose the API in Python).</p>
<p>What can be best way... | 8 | 2010-02-14T14:13:37Z | 33,721,703 | <p>AMQP C++ wrapper <a href="https://github.com/akalend/amqpcpp" rel="nofollow">https://github.com/akalend/amqpcpp</a> on librabbit: <a href="https://github.com/alanxz/rabbitmq-c" rel="nofollow">https://github.com/alanxz/rabbitmq-c</a></p>
| 0 | 2015-11-15T16:00:06Z | [
"c++",
"python",
"amqp"
] |
Indicating that GET response is complete w/ Python AppEngine | 2,261,479 | <p>When I get a GET request from a user, I send them the response and then spend maybe a second logging stuff about that request. Is there a way to close the connection when I have the response ready, but continue doing that logging part, so that the user wouldn't have to wait for it to complete?</p>
| 2 | 2010-02-14T14:55:20Z | 2,261,513 | <p>From the <a href="http://code.google.com/appengine/docs/python/runtime.html#Responses" rel="nofollow">Google App Engine docs for the Response object</a>:</p>
<blockquote>
<p>App Engine <em>does not support sending
data to the user's browser before
exiting the handler</em>. Some web servers
use this techniqu... | 3 | 2010-02-14T15:11:37Z | [
"python",
"google-app-engine"
] |
Indicating that GET response is complete w/ Python AppEngine | 2,261,479 | <p>When I get a GET request from a user, I send them the response and then spend maybe a second logging stuff about that request. Is there a way to close the connection when I have the response ready, but continue doing that logging part, so that the user wouldn't have to wait for it to complete?</p>
| 2 | 2010-02-14T14:55:20Z | 2,265,476 | <p>You have two options:</p>
<ol>
<li>Use the <a href="http://code.google.com/appengine/docs/python/taskqueue/" rel="nofollow">Task Queue API</a>. Enqueueing a task should be fast, so long as you have less than 10k of data (which is the limit on a Task Queue payload).</li>
<li>Use the 'sneaky' trick described by Rafe ... | 0 | 2010-02-15T11:13:31Z | [
"python",
"google-app-engine"
] |
Python repr function problem | 2,261,593 | <p>I'm dealing with some text parsing in Python and for that purpose, it's good for me to apply repr() function on each string I'm gonna parse, but after the parsing, I need to convert some parsed substring back to the previous representation, because I want to print them and I'm not able to do this. I thought that str... | 2 | 2010-02-14T15:36:39Z | 2,261,602 | <p><code>str()</code> has no effect on objects that are already strings. You need to use <code>eval()</code> to undo a <code>repr()</code> where possible. Try using <a href="http://docs.python.org/library/ast.html#ast.literal_eval" rel="nofollow"><code>ast.literal_eval()</code></a> instead though.</p>
| 2 | 2010-02-14T15:39:28Z | [
"python",
"text",
"format"
] |
How to parse just the text from a Word Doc using Python? | 2,261,650 | <p>When you try opening a MS Word document or for that matter most Windows file formats, you will see gibberish as given below broken intermittently by the actual text. I need to extract the text that goes in and want to ignore the gibberish -- which is something like given below. How do I extract only the text that ma... | 0 | 2010-02-14T15:53:52Z | 2,261,753 | <blockquote>
<p>There is no generic why to extract
information from every file format.
You need to know the format to know
how to extract the information.</p>
</blockquote>
<p>Just wanted to state that first. So what you should look for is libraries and software that can convert/extract the information you wan... | 0 | 2010-02-14T16:20:41Z | [
"python",
"regex",
"ms-word",
"screen-scraping"
] |
How to parse just the text from a Word Doc using Python? | 2,261,650 | <p>When you try opening a MS Word document or for that matter most Windows file formats, you will see gibberish as given below broken intermittently by the actual text. I need to extract the text that goes in and want to ignore the gibberish -- which is something like given below. How do I extract only the text that ma... | 0 | 2010-02-14T15:53:52Z | 2,261,763 | <p>doc is a binary format, it's not a markup language or something.
Specs: <a href="http://www.microsoft.com/interop/docs/OfficeBinaryFormats.mspx" rel="nofollow">http://www.microsoft.com/interop/docs/OfficeBinaryFormats.mspx</a></p>
| 1 | 2010-02-14T16:23:58Z | [
"python",
"regex",
"ms-word",
"screen-scraping"
] |
How to parse just the text from a Word Doc using Python? | 2,261,650 | <p>When you try opening a MS Word document or for that matter most Windows file formats, you will see gibberish as given below broken intermittently by the actual text. I need to extract the text that goes in and want to ignore the gibberish -- which is something like given below. How do I extract only the text that ma... | 0 | 2010-02-14T15:53:52Z | 2,261,776 | <p>The tool that seems the most viable, particularly if you need an all python solution is <a href="http://www.decalage.info/en/python/olefileio" rel="nofollow">OleFileIO</a>.</p>
| 3 | 2010-02-14T16:26:46Z | [
"python",
"regex",
"ms-word",
"screen-scraping"
] |
How to parse just the text from a Word Doc using Python? | 2,261,650 | <p>When you try opening a MS Word document or for that matter most Windows file formats, you will see gibberish as given below broken intermittently by the actual text. I need to extract the text that goes in and want to ignore the gibberish -- which is something like given below. How do I extract only the text that ma... | 0 | 2010-02-14T15:53:52Z | 2,261,797 | <p>Word doc is a compressed format. You need to uncompress it first to get the real data (try open a doc file in a program like winrar, and you'll see it contains multiple files.</p>
<p>It even seems to be XML, so reading the format should not be that hard, although I'm not sure if you get all the data this way.</p>
| 0 | 2010-02-14T16:34:12Z | [
"python",
"regex",
"ms-word",
"screen-scraping"
] |
How to parse just the text from a Word Doc using Python? | 2,261,650 | <p>When you try opening a MS Word document or for that matter most Windows file formats, you will see gibberish as given below broken intermittently by the actual text. I need to extract the text that goes in and want to ignore the gibberish -- which is something like given below. How do I extract only the text that ma... | 0 | 2010-02-14T15:53:52Z | 2,262,328 | <p>I had a similar problem, needing to query hundreds of Word documents. I converted the Word files to text files and used normal text parsing tools. Worked well.</p>
| 0 | 2010-02-14T18:59:53Z | [
"python",
"regex",
"ms-word",
"screen-scraping"
] |
Python equivalent of C code from Bit Twiddling Hacks? | 2,261,671 | <p>I have a bit counting method that I am trying to make as fast as possible. I want to try the algorithm below from <a href="http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel" rel="nofollow">Bit Twiddling Hacks</a>, but I don't know C. What is 'type T' and what is the python equivalent of (T)~(T... | 3 | 2010-02-14T16:01:09Z | 2,262,234 | <p>T is a integer type, which I'm assuming is unsigned. Since this is C, it'll be fixed width, probably (but not necessarily) one of 8, 16, 32, 64 or 128. The fragment <code>(T)~(T)0</code> that appears repeatedly in that code sample just gives the value 2**N-1, where N is the width of the type T. I suspect that the... | 7 | 2010-02-14T18:29:17Z | [
"python",
"c"
] |
Python equivalent of C code from Bit Twiddling Hacks? | 2,261,671 | <p>I have a bit counting method that I am trying to make as fast as possible. I want to try the algorithm below from <a href="http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel" rel="nofollow">Bit Twiddling Hacks</a>, but I don't know C. What is 'type T' and what is the python equivalent of (T)~(T... | 3 | 2010-02-14T16:01:09Z | 2,263,059 | <p>What you copied is a template for generating code. It's not a good idea to transliterate that template into another language and expect it to run fast. Let's expand the template.</p>
<p>(T)~(T)0 means "as many 1-bits as fit in type T". The algorithm needs 4 masks which we will compute for the various T-sizes we mi... | 2 | 2010-02-14T22:22:15Z | [
"python",
"c"
] |
URL redirection problem | 2,261,823 | <p>i have the below url </p>
<p><a href="http://bit.ly/cDdh1c" rel="nofollow">http://bit.ly/cDdh1c</a></p>
<p>When you place the above url in a browser and hit enter it will redirect to the below url
<a href="http://www.kennystopproducts.info/Top/?hop=arnishad" rel="nofollow">http://www.kennystopproducts.info/Top/?... | 1 | 2010-02-14T16:40:27Z | 2,261,973 | <p>Your problem is that when you call urlsplit, your path variable only contains the path and is missing the query.</p>
<p>So, instead try:</p>
<pre><code>import httplib
import urlparse
def getUrl(url):
maxattempts = 10
turl = url
while (maxattempts > 0) :
host,path,query = ur... | 1 | 2010-02-14T17:22:53Z | [
"python",
"url",
"redirect",
"bit.ly"
] |
URL redirection problem | 2,261,823 | <p>i have the below url </p>
<p><a href="http://bit.ly/cDdh1c" rel="nofollow">http://bit.ly/cDdh1c</a></p>
<p>When you place the above url in a browser and hit enter it will redirect to the below url
<a href="http://www.kennystopproducts.info/Top/?hop=arnishad" rel="nofollow">http://www.kennystopproducts.info/Top/?... | 1 | 2010-02-14T16:40:27Z | 2,262,094 | <p>Your problem comes from this line :</p>
<pre><code>host,path = urlparse.urlsplit(turl)[1:3]
</code></pre>
<p>You're leaving out the query string. So on the example log you're providing, the second <code>HEAD</code> request you will do will be on <code>http://www.cbtrends.com/get-product.html</code> without the GET... | 1 | 2010-02-14T17:53:38Z | [
"python",
"url",
"redirect",
"bit.ly"
] |
List comprehension and functions | 2,261,826 | <p>I'm a little confusing when try something like this</p>
<pre><code>b = [lambda x:x**i for i in range(11)]
</code></pre>
<p>When I then try <code>b[1](2)</code> I have 1024 as a result that is wrong. But when I write so</p>
<pre><code>b = [(lambda i: lambda x:x**i)(i) for i in range(11)]
</code></pre>
<p>all is O... | 1 | 2010-02-14T16:40:50Z | 2,261,853 | <p>This is due to <a href="http://code.activestate.com/recipes/502271/" rel="nofollow">how closures in Python work</a>.</p>
<p>The loop changes the value in the scope that <em>all</em> the functions share. Move generation of the function into a separate scope, i.e. function.</p>
| 3 | 2010-02-14T16:45:49Z | [
"python",
"list",
"function",
"list-comprehension"
] |
List comprehension and functions | 2,261,826 | <p>I'm a little confusing when try something like this</p>
<pre><code>b = [lambda x:x**i for i in range(11)]
</code></pre>
<p>When I then try <code>b[1](2)</code> I have 1024 as a result that is wrong. But when I write so</p>
<pre><code>b = [(lambda i: lambda x:x**i)(i) for i in range(11)]
</code></pre>
<p>all is O... | 1 | 2010-02-14T16:40:50Z | 2,261,863 | <p>It's a game of scopes.</p>
<p>In the first code, the "i" name in the lambda is only a reference. The value behind that reference gets altered as the for loop executes.</p>
<p>In the second code, there are two different scopes.</p>
| 1 | 2010-02-14T16:48:33Z | [
"python",
"list",
"function",
"list-comprehension"
] |
boost::python Export Custom Exception | 2,261,858 | <p>I am currently writing a C++ extension for Python using Boost.Python. A function in this extension may generate an exception containing information about the error (beyond just a human-readable string describing what happened). I was hoping I could export this exception to Python so I could catch it and do somethi... | 19 | 2010-02-14T16:47:17Z | 2,262,650 | <p>The solution is to create your exception class like any normal C++ class</p>
<pre><code>class MyCPPException : public std::exception {...}
</code></pre>
<p>The trick is that all boost::python::class_ instances hold a reference to the object's type which is accessible through their ptr() function. You can get this... | 23 | 2010-02-14T20:33:58Z | [
"c++",
"python",
"exception",
"boost-python"
] |
boost::python Export Custom Exception | 2,261,858 | <p>I am currently writing a C++ extension for Python using Boost.Python. A function in this extension may generate an exception containing information about the error (beyond just a human-readable string describing what happened). I was hoping I could export this exception to Python so I could catch it and do somethi... | 19 | 2010-02-14T16:47:17Z | 9,630,047 | <p>The answer given by Jack Edmonds defines a Python "exception" class that does not inherit <code>Exception</code> (or any other built-in Python exception class). So although it can be caught with</p>
<pre><code>except my_cpp_extension.MyCPPException as e:
...
</code></pre>
<p>it can not be caught with the usual... | 4 | 2012-03-09T06:48:47Z | [
"c++",
"python",
"exception",
"boost-python"
] |
boost::python Export Custom Exception | 2,261,858 | <p>I am currently writing a C++ extension for Python using Boost.Python. A function in this extension may generate an exception containing information about the error (beyond just a human-readable string describing what happened). I was hoping I could export this exception to Python so I could catch it and do somethi... | 19 | 2010-02-14T16:47:17Z | 37,799,535 | <p>Thanks to variadic templates and generalized lambda capture, we can collapse <a href="http://stackoverflow.com/a/2262650/2069064">Jack Edmond's answer</a> into something much more manageable and hide all of the cruft from the user:</p>
<pre><code>template <class E, class... Policies, class... Args>
py::class_... | 0 | 2016-06-13T21:36:05Z | [
"c++",
"python",
"exception",
"boost-python"
] |
How to install Python ssl module on Windows? | 2,261,866 | <p>The Google App Engine Launcher tells me:</p>
<blockquote>
<p>WARNING appengine_rpc.py:399 ssl module not found.
Without the ssl module, the identity of the remote host cannot be verified, and
connections may NOT be secure. To fix this, please install the ssl module from
<a href="http://pypi.python.org/pypi/... | 19 | 2010-02-14T16:48:50Z | 2,261,977 | <p>Grab the <a href="http://gnuwin32.sourceforge.net/packages/openssl.htm">openssl</a> and <a href="http://gnuwin32.sourceforge.net/packages/libgw32c.htm">libgw32c</a> packages from the gnuwin32 project (download the "Developer files"!) and extract them where you installed gnuwin32 - or if you don't have gnuwin32 tools... | 15 | 2010-02-14T17:24:52Z | [
"python",
"google-app-engine",
"ssl",
"installation",
"python-2.5"
] |
How to install Python ssl module on Windows? | 2,261,866 | <p>The Google App Engine Launcher tells me:</p>
<blockquote>
<p>WARNING appengine_rpc.py:399 ssl module not found.
Without the ssl module, the identity of the remote host cannot be verified, and
connections may NOT be secure. To fix this, please install the ssl module from
<a href="http://pypi.python.org/pypi/... | 19 | 2010-02-14T16:48:50Z | 2,888,786 | <p>I had to use the following modification of AndiDog's approach:</p>
<pre><code>setup.py build -cmingw32
setup.py install --skip-build
</code></pre>
<p>Without the --skip-build option, the install would try to build again and complain about MSVC again:</p>
<pre><code>error: Python was built with Visual Studio 2003;... | 9 | 2010-05-22T16:06:08Z | [
"python",
"google-app-engine",
"ssl",
"installation",
"python-2.5"
] |
How to install Python ssl module on Windows? | 2,261,866 | <p>The Google App Engine Launcher tells me:</p>
<blockquote>
<p>WARNING appengine_rpc.py:399 ssl module not found.
Without the ssl module, the identity of the remote host cannot be verified, and
connections may NOT be secure. To fix this, please install the ssl module from
<a href="http://pypi.python.org/pypi/... | 19 | 2010-02-14T16:48:50Z | 6,905,397 | <p>I used AndiDog's and Saxon Druce answers which are 100% correct but might need some clarification for inexperienced users like me:</p>
<ol>
<li><p>This is for Windows users only.</p></li>
<li><p>Install python 2.5.2 32 bit - it was essential for me as i have x64 system and I first installed python 2.5.2 x64 and the... | 1 | 2011-08-01T22:50:07Z | [
"python",
"google-app-engine",
"ssl",
"installation",
"python-2.5"
] |
How to install Python ssl module on Windows? | 2,261,866 | <p>The Google App Engine Launcher tells me:</p>
<blockquote>
<p>WARNING appengine_rpc.py:399 ssl module not found.
Without the ssl module, the identity of the remote host cannot be verified, and
connections may NOT be secure. To fix this, please install the ssl module from
<a href="http://pypi.python.org/pypi/... | 19 | 2010-02-14T16:48:50Z | 8,539,050 | <p>Since TDM-GCC 4.6.1 was released in September 2011. TDM-GCC installer will download the lastest GCC version (4.6.1) even though the tdm-gcc-4.5.2.exe is used. GCC 4.6.1 will cause GCC build error "error: unrecognized command line option '-mno-cygwin'" This is because -mno-cygwin become deprecated in GCC 4.6.1. In... | 1 | 2011-12-16T19:16:37Z | [
"python",
"google-app-engine",
"ssl",
"installation",
"python-2.5"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.