Q_Id
int64
337
49.3M
CreationDate
stringlengths
23
23
Users Score
int64
-42
1.15k
Other
int64
0
1
Python Basics and Environment
int64
0
1
System Administration and DevOps
int64
0
1
Tags
stringlengths
6
105
A_Id
int64
518
72.5M
AnswerCount
int64
1
64
is_accepted
bool
2 classes
Web Development
int64
0
1
GUI and Desktop Applications
int64
0
1
Answer
stringlengths
6
11.6k
Available Count
int64
1
31
Q_Score
int64
0
6.79k
Data Science and Machine Learning
int64
0
1
Question
stringlengths
15
29k
Title
stringlengths
11
150
Score
float64
-1
1.2
Database and SQL
int64
0
1
Networking and APIs
int64
0
1
ViewCount
int64
8
6.81M
15,765,699
2013-04-02T13:41:00.000
2
0
1
0
linux,python-2.7,segmentation-fault,hashlib
15,769,594
1
true
0
0
hashlib uses libcrypto for hash algorithms if it can find libcrypto while building python. I suspect somehow it's ending up using a different libcrypto at runtime vs. build time.
1
1
0
Whenever I try to import hashlib in Python 2.7 I get a segmentation fault. I've installed openssl version 1.0.0, pyOpenssl version .10, and recompiled python with the ssl lines uncommented in Modules/Setup, pointing to the correct path for the libraries and include files for openssl. I've run ldd on all the libraries I...
Python 2.7 "import hashlib" segmentation fault
1.2
0
0
1,235
15,766,278
2013-04-02T14:08:00.000
4
0
1
0
python,python-multithreading
15,768,447
1
true
0
0
Three thoughts come to mind. Common to all is to include an index with the packet that is queued for processing. One thought then is to use the controller/workers/output framework in which the output thread de-queues the worker-processed data, assembles, and outputs it. The second thought is to employ a memory-mapp...
1
0
0
I have some python code to read a file and push data to a list. Then put this list to queue, use threading to process the list, say 20 items a time. After processing, I save the result into a new file. What was put in the new file was actually different order than the original file. For example, I have in input, ...
How to preserve file write order when using threading in python
1.2
0
0
2,519
15,770,850
2013-04-02T17:52:00.000
1
0
0
0
javascript,python,django
15,773,503
1
false
1
0
You're best bet is going to be to use Javascript. Have Javascript create the new field (or remove it) on button click. Let the user fill in the field as they need to. When they are ready to save you'll need to catch the submit (again using Javascript) and concatenate everything into the initial textarea field and th...
1
0
0
I would like to add "add another field" and "remove field" button in django admin which results in to add/remove a text field respectively. And all these field should be concatenated(separated via some character) and assigned into one model textfield. How could I achieve this?
django add another field via js with one model field
0.197375
0
0
100
15,772,351
2013-04-02T19:10:00.000
1
0
0
0
python,cx-oracle
46,728,202
3
false
0
0
In my case it was due to the fact that my server port was wrong: ./install_database_new.sh localhost:1511 XE full I changed the port to "1521" and I could connect.
1
6
0
I try to connect to a remote oracle server by cx_Oracle: db = cx_Oracle.connect('username', 'password', dsn_tns) but it says databaseError: ORA-12541 tns no listener
ocx_Oracle ORA-12541 tns no listener
0.066568
1
0
17,494
15,772,397
2013-04-02T19:12:00.000
0
0
1
0
python,visual-studio-2010,rdflib,ptvs
16,682,055
1
true
0
0
I found out that if you launch the program with Ctrl+F5 (instead of F5) it will work. Maybe python tools or rdflib have some problems with debugging in Visual Studio.
1
0
0
I want to use rdflib in python tools for Visual Studio. I installed both python tools and rdflib. When I write import rdflib in my project (in a file *.py) and launch it, it returns an error invalid literal for int() with base 10: 'value' and points to the line import rdflib Although I can open Tools->Python Tools->...
rdflib in python tools for Visual Studio
1.2
0
0
202
15,772,909
2013-04-02T19:40:00.000
1
1
0
1
python,z3
15,773,638
1
false
0
0
io is a core Python module. It was added in 2.6 and has been present in every subsequent version. Are you on a very old version of Python? If you're running Python version 2.5 or earlier (you can check with python --version in any commandline), you'll need to update Python to a newer version.
1
0
0
I am trying to use z3 in pydev, I add the path of z3py and libz3.dll to window/preferences/pydev/jython-interpreter, but i got the error as the following Traceback (most recent call last): File "C:\Users\linda\workspace\LearningPyDev\main.py", line 11, in import z3 File "C:\Users\linda\z3\python\z3.py", line 4...
error in import z3
0.197375
0
0
1,273
15,774,899
2013-04-02T21:38:00.000
3
0
0
0
python,postgresql,sqlalchemy,ddl,flask-sqlalchemy
15,775,816
1
true
0
0
(Copy from comment) Assuming sess is the session, you can do sess.execute(CreateTable(tenantX_tableY)) instead. EDIT: CreateTable is only one of the things being done when calling table.create(). Use table.create(sess.connection()) instead.
1
0
0
I'm using Sqlalchemy in a multitenant Flask application and need to create tables on the fly when a new tenant is added. I've been using Table.create to create individual tables within a new Postgres schema (along with search_path modifications) and this works quite well. The limitation I've found is that the Table.cre...
How do you create a table with Sqlalchemy within a transaction in Postgres?
1.2
1
0
1,872
15,775,010
2013-04-02T21:46:00.000
0
0
0
0
python
15,775,072
3
false
0
1
Your output you see is simply because you print out the object MinmaxNode, which must not have a __repr__ method set up. Your error of "local variable 'col' referenced before assignment" is because you define col conditionally in your for loop but use it as an argument in play_turn regardless of whether it's been assi...
1
0
0
When i run this program i get an error that MinimaxNode' object has no attribute 'value' ConnectFour is an other class that initializes the board and marks the moves, checks if someone won, etc. Utility just returns 2 points (it is still in progress) The problem arises that in MinimaxPlayer in child.get_minimax_value a...
Minimax For Connect four doesn't return a value
0
0
0
164
15,775,295
2013-04-02T22:07:00.000
2
0
1
0
python,performance,cython
15,905,349
2
true
0
0
I believe you can benefit by using math functions from libc as you are calling np.sqrt and np.floor on scalars. This has not only the Python call overhead but there are different code paths in the numpy ufuncs for scalars and arrays. So that involves at least a type switch.
1
3
0
I am doing my first steps with Cython, and I am wondering how to improve performance even more. Until now I got to half the usual (python only) execution time, but I think there must be more! I know cython -a and I already typed my variables. But there is still a lot in yellow in my function. Is this because cython doe...
How to improve Cython performance?
1.2
0
0
553
15,778,593
2013-04-03T03:57:00.000
0
0
0
0
wxpython
15,788,526
1
true
0
1
CSheet appears to just be a sub-class of Grid, so you could probably just use the Grid widget. Or you could go to wxPython's bug tracker on their website and submit this as a bug. They're usually pretty quick about patching stuff, especially in the 2.9 branch.
1
0
0
I want to add spreadsheet functionality to my wxpython application running on Windows. The CSheet module seems broken in the latest 2.9 version. It shows: TypeError: EndEdit() takes exactly 4 arguments (5 given) May I know if there is any suggestions to fix it or any other python module with good spreadsheet functional...
wxPython CSheet issue and replacement
1.2
0
0
203
15,780,590
2013-04-03T06:46:00.000
2
0
1
0
python
15,780,618
1
false
0
0
If you want both the keys and the values, you should use dict.items(), which renders the question meaningless. The answer is: Yes, they are usually in the same order, but no, you can't trust that. The reason is that keys() will list the keys in the internal order (which depends on hash values). values() will typically ...
1
0
0
Say I have a dict d = {'a': 1, 'b': 2}, and d.keys() returns ['a', 'b'], can I count on d.values() to be [1, 2]?
Do `dict.keys()` and `dict.values()` always match up in `Python`?
0.379949
0
0
261
15,784,977
2013-04-03T10:31:00.000
3
0
0
0
python,xml,openerp
15,785,043
1
true
1
0
No. That changes will not affect any xml file. Changes done directly from web-client will last until you update related module, those changes are not permanent. For permanent changes you have to change in xml file and update that module.
1
0
0
If we do some modification to our form views in Openerp 7 Developer mode (Ex : add onchange function and when it called some fields goes invisible) is this modification automatically added to relevant view.xml files ? I done such a thing.but my account_view.xml file not updated.but in database side ir_ui_view table sav...
OpenERP Developer Mode modification
1.2
0
0
1,422
15,788,591
2013-04-03T13:23:00.000
1
0
1
0
python,installation,automatic-updates
15,850,839
2
false
0
0
Have the "import X" call run a code in a wrapper library. The code the time of import would check the database for a new version of the library and download if it has changed. Then it can in turn import the downloaded library or import the existing library. There may be issues with this on frozen code so you might h...
1
6
0
I maintain an in-house Python package which is used by some not-really-technical people in the company. Being that their needs (or rather, their wants) change on an almost-daily basis, I have to update the library pretty often, and I create new installers for them too often for their liking. The lib provides a high-le...
Is it possible to upgrade a Python package on the fly?
0.099668
0
0
566
15,790,467
2013-04-03T14:41:00.000
0
0
0
0
python,group-by,timestamp,time-series
15,791,843
2
false
0
0
There are several ways to approach this, but you're effectively "binning" on the times. I would approach it in a few steps: You don't want to parse the time yourself with string manipulation, it will blow up in your face; trust me! Parse out the timestamp into a datetime object (google should give you a pretty good ans...
1
2
1
I did a code which generates random numbers below and i save them in a csv which look like below, I am trying to play around and learn the group by function. I would like for instance do the sum or average of those group by timestamp. I am new in Python, i cannot find anywhere to start though. Ulitmately i would like t...
Grouping data by frequency
0
0
0
584
15,791,623
2013-04-03T15:28:00.000
1
0
0
0
python,django,model-view-controller,post,controller
15,791,713
1
true
1
0
In general case you will want to have a separate controller for each 'type' of request. This helps in keeping the code simple, without having to deal with any 'special cases', and in general easier to reuse.
1
3
0
I am interested in the correct/standard/advised approach for an django web application I am currently developing. I have practical experience in programming, but I am worried about the efficiency of my implementation, since I don't have too much theoretical knowledge of MVC and related principles. I have several forms ...
mvc controller single responsibility principle and POST requests
1.2
0
0
303
15,792,073
2013-04-03T15:52:00.000
0
0
0
0
python,openstreetmap,shapefile,mapnik
16,271,420
1
false
0
0
Dynamic retrieval of data from shapefiles is not suggested for large applications. The best practice is to dump the shapefile in databases like postgres (shp2pgsql) & generated the map using mapnik & tile them using tilecache.
1
0
1
I manage to install mapnik for python and am able to render maps using a provided shp file. Is there a possibility to retrieve dynamically the shape file for the map I want to render (given coordinates) from python? or do I need to download the whole OSM files, and import them into my own database? thanks
openstreet maps: dynamically retrieve shp files in python
0
0
0
286
15,792,128
2013-04-03T15:54:00.000
2
1
0
0
python,imap,imaplib
15,875,488
2
false
0
0
If you really want to fetch the beginning of the first textual part of a message, you will have to parse the BODYSTRUCTURE. After you obtain the part ID of the desired textual part, use the BODY[number]<0.size> syntax. The suggestion given in the other answer will fail on multipart messages (like if you have a text/pla...
1
3
0
I have an email interface client, and I am using IMAP for my requests. I want to be able to show, in real-time, basic email data, for a list view. As in, for example, the GMail list view. For that, I need to do an IMAP request to obtain the subject of all emails, the date of all emails, etc. This works so far. The pro...
Obtain partial IMAP text part
0.197375
0
1
1,047
15,794,368
2013-04-03T17:45:00.000
2
0
1
0
python,datetime,object
15,794,489
3
false
0
0
Convert to seconds, divide by 300 and use the integer portion as your grouping.
1
0
0
Can i borrow someone's brain for this issue. I have got data and their relevant timestamps. I am interested in grouping them by 5min frequency however i can only start the grouping on 00:00 format. I mean 13:23:27 (hours) would need to be group with 13:25:00 data and then it will be 13:30:00, 13:35:00 etc Do you know...
Date grouping python
0.132549
0
0
116
15,795,038
2013-04-03T18:23:00.000
2
0
0
0
python,python-2.7,perforce
15,806,216
1
true
0
0
Several options come to mind. The simplest approach would be to always let your program use the same client and let it sync the file. You could let your program call p4 sync and see if you get a new version or not. Let it continue if you get a new version. This approach has the advantage that you don't need to remembe...
1
0
0
I'm writing a python app that connects to perforce on a daily basis. The app gets the contents of an excel file on perfoce, parses it, and copies some data to a database. The file is rather big, so I would like to keep track of which revision of the file the app last read on the database, this way i can check to see if...
How to get head revision number of a file, or the changelist number when it was checked in / changed
1.2
1
0
1,797
15,797,163
2013-04-03T20:13:00.000
5
0
0
0
python,pytables
19,470,951
2
true
0
0
Yes, you must create a new table and copy the original data. This is because Tables are a dense format. This gives it a huge performance benefits but one of the costs is that adding new columns is somewhat expensive.
1
5
0
I am searching for a persistent data storage solution that can handle heterogenous data stored on disk. PyTables seems like an obvious choice, but the only information I can find on how to append new columns is a tutorial example. The tutorial has the user create a new table with added column, copy the old table into...
Is the only way to add a column in PyTables to create a new table and copy?
1.2
1
0
2,350
15,798,489
2013-04-03T21:29:00.000
0
0
1
0
python,multithreading
29,107,650
1
false
0
0
Sorry for resurrecting an old question. My solution to this problem on linux - In the python thread create a temp file get process PID scan /proc/PID/task to get task-pids save the wchar: value in each /proc/PID/task/task-pid/io write a random number of chars to a temp file (remember the number of chars you wrote) re...
1
0
0
I have a python program with 4 threads and I would like to get the cpu and memory usage for one of the threads. I have used os.getpid() and then use top -H -p to get the information on the parent pid. If os.getpid() returns 3000 then top -H -p gives info on pid's 3000, 3001, 3002, 3003, and 3004. I assume that each inc...
Python Thread Info
0
0
0
159
15,801,243
2013-04-04T01:50:00.000
3
0
1
0
python,ubuntu,vim
15,804,284
2
true
0
0
You didn't tell us the platform you're on, but it basically boils down to: Installing the prerequisite packages needed for Python 3 and for compiling Vim Compile Vim with the configure --enable-python3interp option
1
9
0
I've been using vim for some time, and now in a need to use the python3 feature. If I type vim --version | grep python I get -python3 How can I do to enable it?
How to enable python3 in vim?
1.2
0
0
11,582
15,802,375
2013-04-04T04:10:00.000
0
0
1
0
python-2.7
15,880,894
1
true
0
0
After some research I did find the answer with Tkinter. I had my script run a while loop with a Tkinter dialog that asks for userInput. The script is saved with the .pyw so the user cannot exit out of the script and exiting out of the Tkinter dialog just makes it reappear again. I will not be posting the code here, bec...
1
0
0
Is it possible to keep a Python script running even when the user tries to exit out of it by clicking the x (exit) button? thus meaning that the only way to exit will be, suppose like have the quit() command within the script. The question sounds dumb, but I am CURIOUS!!! Thanks in advance.
keep a Python script running even when the user tries to exit out
1.2
0
0
114
15,802,651
2013-04-04T04:40:00.000
1
0
1
0
edit,ipython,qtconsole
15,833,277
2
true
0
1
you shoudl be able to do %edit filename.py and %run filename.py. The non blocking behavior is expected, and IIRC due to technical reason. Not unsurmountable but difficult. You could define your own magic if you wish, improvement are welcomed. Hope we can %edit macros soon, that would do well enough to make it work. ...
1
0
0
When using the magic function %edit from QtConsole with IPython, the call does not block, and does not execute the saved code. It does however save a temporary file... I think this is intended behavior due to GUI editors and uncertainty, and whatever that reason is for not being able to communicate with subprocess (pyZ...
Ipython QtConsole %edit
1.2
0
0
883
15,807,685
2013-04-04T09:40:00.000
0
0
1
0
python
15,808,290
4
false
0
0
Alas, no. Python doesn't have any strict warning modes (cf. Perl and Ruby). Besides, such lines are valid statements, so it wouldn't be fair to warn against them. You could write your own code checker to find lines like these though. Search for lines that are a single word without any punctuation, and that are a Python...
1
4
0
I want to call a method f(), but accidentally I just say f. Python3 mistakes this for a meaningless evaluation of a nonexisting variable, and therefore skips over my intended method call without any notice. Is there a way to override this default behavior and to get an error message? Either by forbidding dual use of an...
Python: are there ways to detect missing () in method call?
0
0
0
129
15,812,446
2013-04-04T13:19:00.000
1
0
1
0
python,programming-languages
15,813,021
4
false
0
0
Yes, it is possible. But it requires you to download Python from source, and change the source code and compile it. If I remember correctly from another discussion on the same topic, changing the grammar and regenerating some files is all it takes, except for when you are doing advanced stuff like meta-programming and ...
1
4
0
My end goal is to enable people that know the language Urdu and not English to be able to program in a Python environment. Urdu is written left to right. I imagine having Urdu versions of all python keywords and using Urdu characters to define variable/function/class names. Is this goal possible? If yes, then what all...
Programming in Python using a Non-English language for keywords and variables
0.049958
0
0
2,135
15,814,087
2013-04-04T14:28:00.000
0
0
1
0
python,bash,raspberry-pi,xbee
15,814,654
3
false
0
0
When you get a packet check it for validity before outputting it. One possibility is to check that each character in the packet is printable, that is, in the range of 32-127 decimal, before output. Or add checksums to the packets and reject any with bad checksums.
1
3
0
I am running a console application that takes data coming from various sensors around the house. Sometimes the transmission is interrupted and thus the packet does not make sense. When that happens, the contents of the packet is output to a terminal session. However, what has happened is that while outputting the erro...
Prevent terminal character set switch on data printing
0
0
0
127
15,815,364
2013-04-04T15:23:00.000
1
0
0
1
python,macos,py2app
15,874,127
1
false
0
0
Adding the CLI executable to the resources it the correct way to do it, but that doesn't work due to a bug in py2app (the file permissions aren't copied at the moment). The easiest workaround is to reset the file permissions after calling py2app.
1
0
0
I have a python script that I want to package as a Mac application bundle with py2app. That script calls a CLI executable. How do I embed that executable in the application bundle? I tried to edit setup.py in order to include it as a Resource but in that case, execution privileges are lost. Moreover the strip stage of ...
Embedding an executable within a py2app application
0.197375
0
0
536
15,817,272
2013-04-04T16:59:00.000
0
0
0
0
wxpython,wxwidgets
16,090,332
2
true
0
1
So i found the solution of the problem. It is because when I was plugging the different monitor - for some reason the DPI was changing. Adjusting the settings in the windows display control panel did the thing.
2
0
0
I have been developing a wx.python application. at some point i need to create a fullscreen, no taskbar, etc. wx.Frame which has exactly the size of the screen and display in it a bimap which has exactly the dimensions of the screen, so one pixel of the bitmap equals exactly one pixel of the screen. everything has...
weird scalling on displayport monitors in wx.python
1.2
0
0
110
15,817,272
2013-04-04T16:59:00.000
1
0
0
0
wxpython,wxwidgets
15,822,502
2
false
0
1
Correct EDID values does not necessarily mean that the system is running it in that display mode. Have you checked the system's display properties or screen resolution properties to ensure that the system is driving the display at its full resolution? Your symptoms sound to me like it is running at a lower resolution...
2
0
0
I have been developing a wx.python application. at some point i need to create a fullscreen, no taskbar, etc. wx.Frame which has exactly the size of the screen and display in it a bimap which has exactly the dimensions of the screen, so one pixel of the bitmap equals exactly one pixel of the screen. everything has...
weird scalling on displayport monitors in wx.python
0.099668
0
0
110
15,817,484
2013-04-04T17:10:00.000
0
0
1
0
python,oop
15,817,576
6
false
0
0
OOP is a tool, not a goal, you can make a decision whether to use it or not. If you use a Python module, you can achieve encapsulation without ever writing "class".
1
0
0
I am new to OOP and am writing a small tool in Python that checks Bitcoin prices using a JSON load from the web Bitcoin() class, it monitors the prices Monitor(), notifies the user when thresholds are met Notify() and uses a console-interface Interface() for now to do so. I have created a Bitcoin() class that can read ...
Should I still create a class, if it can only have one instance?
0
0
1
161
15,818,157
2013-04-04T17:47:00.000
0
0
0
1
python,google-app-engine,xmpp,xmpppy
15,822,431
1
false
1
0
I don't know but your two biggest limitations will be the inability to use native libraries, and the fact that GAE only supports HTTP requests, with no access to the underlying sockets. If your library uses native code, or relies on using sockets for communications, you won't be able to use it. If it's pure python and...
1
3
0
I'm trying to send messages between xmmp clients using gogle app engine as a server, for that reason I prefer to use xmpp library for python (xmpppy) instead the xmpp library of the google app engine API. Can I add the xmpp python library to my server? I mean can I use this library instead the xmpp library of google ap...
Can I add xmpp python library to my google app engine server
0
0
0
131
15,819,339
2013-04-04T18:50:00.000
0
0
1
0
python,nltk,stemming,porter-stemmer
15,819,519
2
false
0
0
The idea of stemming is to reduce different forms of the same word to a single "base" form. That is not what you are asking for, so probably no existing stemmer is (at least not by purpose) fullfilling your needs. So the obvious solution for your problem is: If you have your own custom rules, you have to implement them...
1
2
0
Given a list of words like this ['add', 'adds', 'adding', 'added', 'addition'], I want to stem all of them to the same word 'add'. That means stemming all different verb and noun forms of a word (but not its adjective and adverb forms) into one. I couldn't find any stemmer that does that. The closest one I found is P...
What other alternative are there to stemming?
0
0
0
1,664
15,821,121
2013-04-04T20:30:00.000
0
0
0
1
python,python-idle
69,122,871
5
false
0
0
Old question I know but maybe the OP's question was not answered? If you want Idle's File Open/Save/Save As menu items to interact with a particular folder, you need to set the CWD before starting Idle. So, assuming you have a folder on Windows "C:\Users<username>\Documents\python\my_project", then at a cmd prompt type...
2
33
0
So, I'm learning Python and would like to create a simple script to download a file from the internet and then write it to a file. However, I am using IDLE and have no idea what the working directory is in IDLE or how to change it. How can I do file system stuff in IDLE if I don't know the working directory or how to c...
What's the working directory when using IDLE?
0
0
0
63,312
15,821,121
2013-04-04T20:30:00.000
5
0
0
1
python,python-idle
15,821,197
5
false
0
0
This will depend on OS and how IDLE is executed. To change the (default) CWD in Windows, right click on the Short-cut Icon, go to "Properties" and change "Start In".
2
33
0
So, I'm learning Python and would like to create a simple script to download a file from the internet and then write it to a file. However, I am using IDLE and have no idea what the working directory is in IDLE or how to change it. How can I do file system stuff in IDLE if I don't know the working directory or how to c...
What's the working directory when using IDLE?
0.197375
0
0
63,312
15,822,786
2013-04-04T22:23:00.000
11
0
0
0
python,user-interface,pyqt,pyqt4
17,655,662
2
false
0
1
I can give you an example of why such a thing: when you inherited a project and the original developer didn't place the ui files in the repository (only left there the generated by pyuic4). True, that is a very particular example and that's also my reason why I'm trying to find something (is not a matter of one single ...
2
6
0
We already know that we can convert from ui to py easily with pyuic4. Is possible to convert .py (that only contains pyqt ui related stuff) code back to .ui.
Converting .py to .ui file
1
0
0
20,658
15,822,786
2013-04-04T22:23:00.000
1
0
0
0
python,user-interface,pyqt,pyqt4
15,822,891
2
true
0
1
Qt/PyQt doesn't come with a tool for that, and AFAIK nobody's written one. And it's hard to imagine why you'd need it. Just keep the .ui file around, and never edit the generated .py file (or even use the .ui file dynamically at runtime with uic), and you'll never need to reverse-convert. Meanwhile, if you've got some ...
2
6
0
We already know that we can convert from ui to py easily with pyuic4. Is possible to convert .py (that only contains pyqt ui related stuff) code back to .ui.
Converting .py to .ui file
1.2
0
0
20,658
15,826,598
2013-04-05T05:30:00.000
2
0
0
0
python,django,webserver
15,826,682
1
false
1
0
i am assuming you have django set up locally. if that is so, then you are using localhost. it is suppose to show the welcome page unless you configure on the url.py to redirect it to somewhere else. it would be useful if you showed us the url.py. if the welcome page or the url.py has not been altered, then i dont know ...
1
1
0
I have django set up on a server, but it will only return the default "Welcome to Django" page. I also have django set up on a local machine, and I use git to push the files to the server. Both the server and local machine are configured with apache/wsgi. On the local machine it will display the webapp as intended, but...
Django stuck on default page
0.379949
0
0
656
15,828,294
2013-04-05T07:34:00.000
0
0
1
1
python
40,082,367
9
false
0
0
Locate that set up file which was used to install Python. Run it and choose repair. If that doesn't solve the problem. Go to c:\Python(x,y) and delete this folder completely by shift+Del. Run that set up file again and click on "Change" which will ultimately install the Python again. By default in my case option to add...
7
9
0
some months ago, I installed Python 2.7 on my laptop (my os is Windows 7). After, I decided to use Python xy 2.7.3 instead of 'pure' Python; so, as suggested, I removed Python 2.7 and tried to install Python xy 2.7.3. However, when I tried to run the .exe file for installation, a warning window appears telling me that...
Problems in fully uninstalling Python 2.7 from Windows 7
0
0
0
36,011
15,828,294
2013-04-05T07:34:00.000
6
0
1
1
python
15,856,720
9
false
0
0
I also had this issue as well. It was due to third party installs. Even though you have uninstalled python, it leaves all the third party libraries that were installed and I think Python(x,y) just detects the directory. To fix, uninstall Python 2.7 and then check to see if C:\Python27 still exists. If it does, go ...
7
9
0
some months ago, I installed Python 2.7 on my laptop (my os is Windows 7). After, I decided to use Python xy 2.7.3 instead of 'pure' Python; so, as suggested, I removed Python 2.7 and tried to install Python xy 2.7.3. However, when I tried to run the .exe file for installation, a warning window appears telling me that...
Problems in fully uninstalling Python 2.7 from Windows 7
1
0
0
36,011
15,828,294
2013-04-05T07:34:00.000
0
0
1
1
python
39,070,767
9
false
0
0
I installed Enthought before. When I wanted to install Python(x,y) instead, I met the problems above. After I had tried to uninstall Enthought and Python(x,y) from the Control Panel and then restart the PC, the problem still occured the next time I installed Python(x,y). I solved this problem by: deleting all the rel...
7
9
0
some months ago, I installed Python 2.7 on my laptop (my os is Windows 7). After, I decided to use Python xy 2.7.3 instead of 'pure' Python; so, as suggested, I removed Python 2.7 and tried to install Python xy 2.7.3. However, when I tried to run the .exe file for installation, a warning window appears telling me that...
Problems in fully uninstalling Python 2.7 from Windows 7
0
0
0
36,011
15,828,294
2013-04-05T07:34:00.000
0
0
1
1
python
49,225,972
9
false
0
0
I Repaired/Modified to install all the components for the Python version I wanted to uninstall. Once that was done, I clicked on Uninstall/Change and that uninstalled it for good.
7
9
0
some months ago, I installed Python 2.7 on my laptop (my os is Windows 7). After, I decided to use Python xy 2.7.3 instead of 'pure' Python; so, as suggested, I removed Python 2.7 and tried to install Python xy 2.7.3. However, when I tried to run the .exe file for installation, a warning window appears telling me that...
Problems in fully uninstalling Python 2.7 from Windows 7
0
0
0
36,011
15,828,294
2013-04-05T07:34:00.000
4
0
1
1
python
32,640,463
9
false
0
0
I faced this issue: I tried to uninstall the python and fresh install, reason my pip version issue was not getting resolved. So I deleted the python folder, removed python from system path, and when I tried to uninstall from "Uninstall a program" in control panel, it showed "Windows installation package" error window a...
7
9
0
some months ago, I installed Python 2.7 on my laptop (my os is Windows 7). After, I decided to use Python xy 2.7.3 instead of 'pure' Python; so, as suggested, I removed Python 2.7 and tried to install Python xy 2.7.3. However, when I tried to run the .exe file for installation, a warning window appears telling me that...
Problems in fully uninstalling Python 2.7 from Windows 7
0.088656
0
0
36,011
15,828,294
2013-04-05T07:34:00.000
1
0
1
1
python
38,963,877
9
false
0
0
I had python 2.7.12 and wanted to uninstall it for 2.7.9. I had the same problem as you and to fix it I tried to delete all of the local files and then uninstall however it still gave me the same error. So instead I decided to repair the python 2.7.12 and then uninstall which worked perfectly and completely got rid of ...
7
9
0
some months ago, I installed Python 2.7 on my laptop (my os is Windows 7). After, I decided to use Python xy 2.7.3 instead of 'pure' Python; so, as suggested, I removed Python 2.7 and tried to install Python xy 2.7.3. However, when I tried to run the .exe file for installation, a warning window appears telling me that...
Problems in fully uninstalling Python 2.7 from Windows 7
0.022219
0
0
36,011
15,828,294
2013-04-05T07:34:00.000
0
0
1
1
python
23,568,030
9
false
0
0
I had python 2.7 installed and enthought canopy. I wanted to switch to python(x,y) to access a full version of the OpenCV library. python(x,y) installation complained about python 2.7 already being installed after: 1)Using windows control panel 2)Removing all lingering python files 3)Removing the windows path as sugge...
7
9
0
some months ago, I installed Python 2.7 on my laptop (my os is Windows 7). After, I decided to use Python xy 2.7.3 instead of 'pure' Python; so, as suggested, I removed Python 2.7 and tried to install Python xy 2.7.3. However, when I tried to run the .exe file for installation, a warning window appears telling me that...
Problems in fully uninstalling Python 2.7 from Windows 7
0
0
0
36,011
15,828,765
2013-04-05T07:59:00.000
7
0
0
0
python,django,web-services
15,828,863
1
true
1
0
Well, it should be clear to you that the regex does not match the URL: it's looking for URLs in the form /user/hash/, whereas you have /user/?hash=hash. In any case, query parameters (those after the ?) do not get processed by urls.py, they are passed in request.GET. So your URLconf should just be r'^user/$.
1
5
0
I have a url like http://localhost/user/?hash={hash value generated} i need to configure urls.py so that any url of this form is recognized and does not give an error. I currently wrote urls.py as url(r'^user/(?P<hash>\w+)/$', 'Myapp.views.createnewpass'), and this is giving a 404 error for a valid hash. How can I...
Django: I want to recognize a hash url
1.2
0
0
1,875
15,832,445
2013-04-05T11:12:00.000
0
0
1
0
python,windows,installation,pandas
15,847,067
3
false
0
0
After you have installed python check to see if the appropriate path variables are set by typing the following at the command line: echo %PATH% if you do not see something like: C:\Python27;C:\Python27\Scripts on the output (probably with lots of other paths) then type this: set PATH=%PATH%;C:\\Python27\\;C:\\Python2...
2
4
1
Sorry if this has been answered somewhere already, I couldn't find the answer. I have installed python 2.7.3 onto a windows 7 computer. I then downloaded the pandas-0.10.1.win-amd64-py2.7.exe and tried to install it. I have gotten past the first window, but then it states "Python 2.7 is required, which was not found in...
Cannot seem to install pandas for python 2.7 on windows
0
0
0
3,609
15,832,445
2013-04-05T11:12:00.000
2
0
1
0
python,windows,installation,pandas
25,210,272
3
false
0
0
I faced the same issue. Here is what worked Changed to PATH to include C:\Python27;C:\Python27\Lib\site-packages\;C:\Python27\Scripts\; uninstall 64bit numpy and pandas install 32win 2.7 numpy and pandas I had to also install dateutil and pytz pandas and numpy work import work fine
2
4
1
Sorry if this has been answered somewhere already, I couldn't find the answer. I have installed python 2.7.3 onto a windows 7 computer. I then downloaded the pandas-0.10.1.win-amd64-py2.7.exe and tried to install it. I have gotten past the first window, but then it states "Python 2.7 is required, which was not found in...
Cannot seem to install pandas for python 2.7 on windows
0.132549
0
0
3,609
15,836,692
2013-04-05T14:37:00.000
-1
0
1
0
python,algorithm,runtime,multicore
15,836,886
5
false
0
0
Due to Global Interpreter Lock one Python process cannot take advantage of multiple cores. But if you can somehow parallelize your problem (which you should do anyway), then you can use multiprocessing to spawn as many Python processes as you have cores and process that data in each subprocess.
1
3
0
I have a python script that has to take many permutations of a large dataset, score each permutation, and retain only the highest scoring permutations. The dataset is so large that this script takes almost 3 days to run. When I check my system resources in windows, only 12% of my CPU is being used and only 4 out of 8 c...
How do I access all computer cores for computation in python script?
-0.039979
0
0
577
15,837,147
2013-04-05T14:57:00.000
1
0
0
0
python,django,webserver
15,837,323
2
false
1
0
Yes, query object has the method like this. It is simply: query.count()
1
0
0
I'm using Django to create a website for a project. The user fills out a form, then I run some queries with this data and display the results on another page. Currently it's a two page site. I want to warn the user if their query result data is very large. Say if a user ends up getting 1000 rows in the results table...
Textbox warning for large queries with Django
0.099668
0
0
85
15,837,810
2013-04-05T15:29:00.000
8
0
0
0
python,numpy,matplotlib
16,186,805
2
true
0
0
No. Looking at matplotlib.axes.Axes.hist and the direct use of numpy.histogram I'm fairly confident in saying that there is no smarter solution than using clip (other than extending the bins that you histogram with). I'd encourage you to look at the source of matplotlib.axes.Axes.hist (it's just Python code, though adm...
1
19
1
pyplot.hist() documentation specifies that when setting a range for a histogram "lower and upper outliers are ignored". Is it possible to make the first and last bins of a histogram include all outliers without changing the width of the bin? For example, let's say I want to look at the range 0-3 with 3 bins: 0-1, 1-2, ...
Making pyplot.hist() first and last bins include outliers
1.2
0
0
7,794
15,838,883
2013-04-05T16:24:00.000
2
0
1
0
python,performance
15,839,207
2
true
0
0
Short of using reload, a module will only be imported and executed once, the first time your program imports it. Further imports of the same module just bind the existing name in the scope where the import happens, so the read will only be done once. If you're asking whether the compilation step reads the file and embe...
2
0
0
If I have a python module that at the start of the time (not in a function or class) reads a value from a file, does that get executed every time? or does the pyc file read the value in a stores the value in the compiled file?
python: performance improvement for file reads?
1.2
0
0
56
15,838,883
2013-04-05T16:24:00.000
0
0
1
0
python,performance
15,838,893
2
false
0
0
Yes, this gets executed every time the module is loaded.
2
0
0
If I have a python module that at the start of the time (not in a function or class) reads a value from a file, does that get executed every time? or does the pyc file read the value in a stores the value in the compiled file?
python: performance improvement for file reads?
0
0
0
56
15,839,555
2013-04-05T17:05:00.000
88
1
1
0
python,python-internals,pyc
15,839,646
2
true
0
0
The .pyc files are created (and possibly overwritten) only when that python file is imported by some other script. If the import is called, Python checks to see if the .pyc file's internal timestamp is not older than the corresponding .py file. If it is, it loads the .pyc; if it isn't or if the .pyc does not yet exist...
1
99
0
I understand that ".pyc" files are compiled versions of the plain-text ".py" files, created at runtime to make programs run faster. However I have observed a few things: Upon modification of "py" files, program behavior changes. This indicates that the "py" files are compiled or at least go though some sort of hashing...
When are .pyc files refreshed?
1.2
0
0
54,648
15,840,158
2013-04-05T17:42:00.000
1
0
0
0
html,utf-8,python-2.7,beautifulsoup,html-entities
15,882,510
1
true
1
0
I missed part of the BeautifulSoup documentation. The default output formatters do the described behaviour: they turn html entities into the unicode characters. So, this behaviour can be changed by using a different output formatter. (D'oh) "You can change this behavior by providing a value for the formatter argument...
1
1
0
I have some html containing mml that I am generating from Word documents using MathType. I have a python script that uses BeautifulSoup to prettify it, but the problem is it takes something like &#x2220; and turns it into the actual byte sequence 0xE2 0x88 0xA0 which is the ∠ symbol. This is a problem because 0xE2 ...
Unwanted replacement of html entities by BeautifulSoup
1.2
0
0
418
15,841,217
2013-04-05T18:42:00.000
0
0
1
0
python,pdb
30,173,388
5
false
0
0
Using 'return' in pdb can pass pdb.set_trace() in the loop and jump to the last line of the current function.
1
5
0
For some quick Python debugging I'll occasionally throw in a import pdb;pdb.set_trace() line that will drop me into the debugger. Very handy. However, if I want to debug a loop, that may run many, many, many times, it loses its effectiveness somewhat. I could mash on continue many, many, many times, but is there a ...
How do I ignore a line when using the pdb?
0
0
0
2,594
15,841,294
2013-04-05T18:47:00.000
0
0
1
0
regex,python-2.7,str-replace
15,841,467
1
true
0
0
I figured it out :-) Just used .? instead of .*? .. Unnecessary * in there. Also, as Kenneth mentioned, can use \d+
1
0
0
I am using Python 2.7 here where have a String "portalColumn":"col-0","portlet": , and I am trying to replace the "col-0" with say "col-1" or "col-2".. So, I am trying to use the Python's s = re.sub("col-(.*?)", column, portletJsonString) It replaces the "col-0" to "col-10" when I pass "col-1" in the column variable.. ...
String Replace in Python - Using Re.sub - having additional unnecessary characters
1.2
0
0
161
15,841,895
2013-04-05T19:22:00.000
2
0
0
0
windows,user-interface,python-2.7,mouse
16,508,757
2
false
0
0
I found that pywinauto was exactly what I was looking for. I can click around and fill in fields in a GUI. The only difficult part was describing the buttons to pywinauto because it requires some special format, but thankfully thee is SWAPY which actually gives you copy-paste-able code that is a description of the butt...
1
2
0
I am disguising my real project by giving a similar project due to paranoia of getting fired. I have a task that is the following: I open a program that is a GUI. This GUI has 3 fields for numbers (age, height, weight) and 3 buttons (‘OK’, ‘print’, and ‘Clear All’). What this program does is the following. A user ente...
Is there an automatic 'mouse clicking' library that can interact with a GUI?
0.197375
0
0
401
15,842,991
2013-04-05T20:31:00.000
3
0
1
0
ipython
15,844,856
1
true
0
0
IPython already logs your input - it's stored in history.sqlite in your profile folder (run ipython locate profile to see where that is). To turn on output logging as well, edit ipython_config.py and search for 'db_log_output'. This captures output resulting from the displayhook (with the Out [n]: prompt), not printed ...
1
2
0
I want to have last 500Mb worth of ipython input and output saved to a file The saving described above should be able to get around instances when I have to kill ipython. For example, saving based on a timer I want to have this file reloaded (not re-executed) at startup. The file then gets updated in a rolling fashion ...
ipython rolling log
1.2
0
0
1,141
15,845,929
2013-04-06T01:08:00.000
0
0
1
0
python,pycharm
20,754,680
3
false
0
0
Maybe this can help: Run->Edit Configurations, Replace all Py3 to Py2 I use PyCharm 3.0.1
2
14
0
PyCharm is a good IDE, but its code hinting is not so intelligent. For example, when I use it to write Python2 code (the setting of my interpreter path can tell PyCharm this), I type prin, which I want PyCharm to give me a hint of print, however, the first prompt is print(), which is a Python3 style of function print. ...
How to set the Python 2 Preference in PyCharm?
0
0
0
29,173
15,845,929
2013-04-06T01:08:00.000
13
0
1
0
python,pycharm
15,846,659
3
false
0
0
Perhaps, you should select python 2.x interpreter for the project (File Menu - Settings - Project - Project Interpreter).
2
14
0
PyCharm is a good IDE, but its code hinting is not so intelligent. For example, when I use it to write Python2 code (the setting of my interpreter path can tell PyCharm this), I type prin, which I want PyCharm to give me a hint of print, however, the first prompt is print(), which is a Python3 style of function print. ...
How to set the Python 2 Preference in PyCharm?
1
0
0
29,173
15,846,893
2013-04-06T04:04:00.000
0
0
1
0
.net,ironpython
28,318,467
2
false
0
0
To install clr, you have to install pythonnet library. You can install pythonnet using pip install pythonnet
1
2
0
I wanted to give IronPython a try since I want to learn more about both Python and the .Net underlay. I installed last version (2.7.3) and trying to import clr, on my first line, I can't run and throws the error "No module named CLR". I googled but didn't find anything on that matter. The IronPython install is pretty m...
Importing CLR using IronPython
0
0
0
10,628
15,847,652
2013-04-06T06:06:00.000
1
0
0
0
python,django,django-models,package
15,847,738
3
false
1
0
models.py file is used to define the structure of database. So you should leave it for defining your database entries. You can make an app named generals and put general.py in that app, and from there you can use it by calling it in any app.
2
0
0
I plan to build my project in Django framework. However, I noticed that all Django packages have models.py file. Now, let say I have a set of general purpose functions that I share between several apps in the project and I plan to put these functions definitions in a separate package (or app for that matter?). So, shou...
django package organization
0.066568
0
0
273
15,847,652
2013-04-06T06:06:00.000
1
0
0
0
python,django,django-models,package
15,847,782
3
false
1
0
I usually create a utils.py file under my main app that is created from the django-admin.py when starting the project.
2
0
0
I plan to build my project in Django framework. However, I noticed that all Django packages have models.py file. Now, let say I have a set of general purpose functions that I share between several apps in the project and I plan to put these functions definitions in a separate package (or app for that matter?). So, shou...
django package organization
0.066568
0
0
273
15,852,455
2013-04-06T15:03:00.000
0
0
1
0
python,cygwin,scipy,enthought
15,865,743
2
false
0
0
Just put the directory with enthought python before the directory with Cygwin's python in your path. If both are in the same directory, use ln to create a symbolic link, store it in another directory, and place it higher in your path. The previous answer has instructions to add it to your path.
1
0
0
I need scipy on cygwin, so I figured the quickest way to make it work would have been installing enthought python. However, I then realized I have to make cygwin aware of enthought before I can use it, e.g. so that calling Python from the cygwin shell I get the enthought python (with scipy) rather than the cygwin one. ...
How can I make cygwin aware of enthought python?
0
0
0
701
15,855,468
2013-04-06T20:06:00.000
-1
0
0
0
python,django,e-commerce,django-oscar
22,601,474
4
false
1
0
You have to add atleast one product class /admin/catalogue/productclass/
1
5
0
I'm a beginner in Python and Django. I have installed django-oscar. Then I Configured it and started the server, it works. Now, I don't understand how to add a product? At the dashboard there is a button Create new product. But in order to add new product it asks to select product class and I can not find any product c...
Django Oscar. How to add product?
-0.049958
0
0
6,316
15,860,676
2013-04-07T09:04:00.000
0
0
1
0
python,html,django
15,902,133
1
false
1
0
You can send variables to the server using methods POST or GET. Perhaps you can get the right answer if you elaborate more or showing us some of your code.
1
0
0
Hey guys how do I get a variable name from HTML back into my python. So I have this variable {{file}} in my html which I need to pass back into the python file in order the function to work.
How do I get a variable name from HTML back into my python
0
0
0
87
15,860,801
2013-04-07T09:15:00.000
2
0
1
0
python-3.x
15,860,828
1
false
0
0
If it's giving you a syntax error then I would suggest you haven't done everything correctly. That's my answer by the way, the rest below is just extra help. It's incredibly unlikely you found a bug in Python's if statement when it's been tested by millions of people on the planet, millions of times a day. Far more lik...
1
0
0
I am currently using Python version 3.3.0. But it shows me syntax error in else, elif though I did everything correct.
Which version of Python is preferable for Windows 7 (32-Bit)?
0.379949
0
0
9,043
15,861,383
2013-04-07T10:32:00.000
2
0
1
0
python,pyside,pycharm
15,861,520
1
true
0
0
PyCharm itself does not use either Qt or python-qt, and does not ship with either of those. Developing your own projects using python-qt in PyCharm might possible; however, python-qt is designed to be embedded into C++ applications, and PyCharm does not include any C++ support.
1
0
0
Can I use python-qt with pycharm or is it already shipped or built into pycharm? If I use python-qt with pyside when developing in pycharm, will I get any benefit?
Do I get any benefit if I use python-qt with pycharm?
1.2
0
0
375
15,864,762
2013-04-07T16:30:00.000
0
0
0
0
python,pyqt,pyqt4,resource-files
47,707,774
5
false
0
1
you could try with pyside as well like: --- pyside-rcc -o input.qrc output.py
2
15
0
I'm having trouble importing a resource file. I'm using pyqt4 with monkey studio and I am trying to import a png image. When I run the program I get an import error like ImportError: No module named icon_rc I know that I have to compile it using pyrcc4 but I don't understand how to do this can anybody help please. I...
PYQT4 - How do I compile and import a qrc file into my program?
0
0
0
49,757
15,864,762
2013-04-07T16:30:00.000
5
0
0
0
python,pyqt,pyqt4,resource-files
44,592,514
5
false
0
1
In Pyqt5 this command can be used Pyrcc5 input_file.qrc -o Out_file.py We need to convert that qrc file into python file and then it can be imported to your code
2
15
0
I'm having trouble importing a resource file. I'm using pyqt4 with monkey studio and I am trying to import a png image. When I run the program I get an import error like ImportError: No module named icon_rc I know that I have to compile it using pyrcc4 but I don't understand how to do this can anybody help please. I...
PYQT4 - How do I compile and import a qrc file into my program?
0.197375
0
0
49,757
15,868,108
2013-04-07T21:34:00.000
0
0
0
0
python,machine-learning,weka,rapidminer,feature-selection
15,887,123
3
false
0
0
Feature selection algorithms assigns weights to different features based on their impact in the classification. In my best knowledge the features types does not make difference when computing different weights. I suggest to convert string features to numerical based on their ASCII codes or any other techniques. Then yo...
3
3
1
Hi I have big dataset which has both strings and numerical values ex. User name (str) , handset(str), number of requests(int), number of downloads(int) ,....... I have around 200 such columns. Is there a way/algorithm which can handle both strings and integers during feature selection ? Or how should I approach this ...
Feature Selection in dataset containing both string and numerical values?
0
0
0
1,683
15,868,108
2013-04-07T21:34:00.000
0
0
0
0
python,machine-learning,weka,rapidminer,feature-selection
17,920,216
3
false
0
0
I've used Weka Feature Selection and although the attribute evaluator methods I've tried can't handle string attributes you can temporary remove them in the Preprocess > Filter > Unsupervised > Attribute > RemoveType, then perform the feature selection and, later, include strings again to do the classification.
3
3
1
Hi I have big dataset which has both strings and numerical values ex. User name (str) , handset(str), number of requests(int), number of downloads(int) ,....... I have around 200 such columns. Is there a way/algorithm which can handle both strings and integers during feature selection ? Or how should I approach this ...
Feature Selection in dataset containing both string and numerical values?
0
0
0
1,683
15,868,108
2013-04-07T21:34:00.000
0
0
0
0
python,machine-learning,weka,rapidminer,feature-selection
16,003,658
3
false
0
0
There are a set of operators you could use in the Attribute Weighting group within RapidMiner. For example, Weight By Correlation or Weight By Information Gain. These will assess how much weight to give an attribute based on its relevance to the label (in this case the download flag). The resulting weights can then be ...
3
3
1
Hi I have big dataset which has both strings and numerical values ex. User name (str) , handset(str), number of requests(int), number of downloads(int) ,....... I have around 200 such columns. Is there a way/algorithm which can handle both strings and integers during feature selection ? Or how should I approach this ...
Feature Selection in dataset containing both string and numerical values?
0
0
0
1,683
15,868,512
2013-04-07T22:17:00.000
-13
0
1
0
python,arrays,list,numpy
33,619,968
6
false
0
0
if variable b has a list then you can simply do the below: create a new variable "a" as: a=[] then assign the list to "a" as: a=b now "a" has all the components of list "b" in array. so you have successfully converted list to array.
1
110
0
I have a list in python and I want to convert it to an array to be able to use ravel() function.
List to array conversion to use ravel() function
-1
0
0
641,261
15,869,919
2013-04-08T01:28:00.000
1
0
0
0
python,limit,scikit-learn,prediction,random-forest
15,892,422
2
false
0
0
Once trained, you can access these via the "estimators_" attribute of the random forest object.
1
0
1
I've trained a Random Forest (regressor in this case) model using scikit learn (python), and I'would like to plot the error rate on a validation set based on the numeber of estimators used. In other words, there's a way to predict using only a portion of the estimators in your RandomForestRegressor? Using predict(X) wi...
Random Forest - Predict using less estimators
0.099668
0
0
1,415
15,870,130
2013-04-08T01:58:00.000
1
0
0
1
python,django,heroku,celery,django-celery
15,870,589
2
true
1
0
It depends on how much accuracy you need. Do you want users to select the time down to the minute? second? or will allowing them to select the hour they wish to be emailed be enough. If on the hour is accurate enough, then use a task that polls for users to mail every hour. If your users need the mail to go out accurat...
1
0
0
I am trying to set up some scheduled tasks for a Django app with celery, hosted on heroku. Aside from not know how everything should be configured, what is the best way to approach this? Let's say users can opt to receive a daily email at a time of their choosing. Should I have a scheduled job that run every, say 5 mi...
How to queue up scheduled actions
1.2
0
0
169
15,873,307
2013-04-08T07:14:00.000
1
0
0
0
python,wxpython
15,888,610
2
false
0
1
I personally think that SetItems(listOfItems) is the quickest way of doing it and it works for several other widget types as well, such as ComboBox. The answer that Thomas mentions forces the developer to clear the widget and then Append individual items OR use AppendItems to add a list of items. Either way, that's a 2...
1
0
0
I was wondering how I fill a wxChoice with content at runtime. When creating the GUI I do not have the information of the content since it depends on the users what directory to choose. What am I doing? The user will have to select a directory from a wx.DirDialog. The event handler refers to a function that will search...
Fill wx.Choice at runtime
0.099668
0
0
477
15,876,260
2013-04-08T09:57:00.000
0
0
0
0
python,moinmoin
16,134,695
2
false
0
0
read HelpOnAccessControlLists wiki page. you can set ACLs at the top of the page content.
2
0
0
We are using MoinMoin as a wiki for our applications. We would like to open are set of pages to the public access. How would I do that ? Can I set a public access on some pages in the configuration file ?
MoinMoin ACL on certain pages
0
0
0
174
15,876,260
2013-04-08T09:57:00.000
0
0
0
0
python,moinmoin
16,283,975
2
true
0
0
In order to set a page 'read only for un-authentificated users' : edit the configuration file wikiconfig.py with acl_rights_before = u"AnAdminAccount:read,write,delete,revert,admin" acl_rights_default = u"AnAdminAccount:read,write,delete,revert,admin" Add on top of the wiki page that you would like to open for the pu...
2
0
0
We are using MoinMoin as a wiki for our applications. We would like to open are set of pages to the public access. How would I do that ? Can I set a public access on some pages in the configuration file ?
MoinMoin ACL on certain pages
1.2
0
0
174
15,879,315
2013-04-08T12:41:00.000
-2
0
0
0
python,arrays,numpy,multidimensional-array,numpy-ndarray
52,104,659
5
false
0
0
I think with np.array() you can only create C like though you mention the order, when you check using np.isfortran() it says false. but with np.ndarrray() when you specify the order it creates based on the order provided.
2
340
1
What is the difference between ndarray and array in Numpy? And where can I find the implementations in the numpy source code?
What is the difference between ndarray and array in numpy?
-0.07983
0
0
148,479
15,879,315
2013-04-08T12:41:00.000
66
0
0
0
python,arrays,numpy,multidimensional-array,numpy-ndarray
15,879,428
5
false
0
0
numpy.array is a function that returns a numpy.ndarray. There is no object type numpy.array.
2
340
1
What is the difference between ndarray and array in Numpy? And where can I find the implementations in the numpy source code?
What is the difference between ndarray and array in numpy?
1
0
0
148,479
15,879,911
2013-04-08T13:08:00.000
1
0
0
0
python,django,templates
15,879,987
1
true
1
0
You save the output of Person.objects.count() in a variable and pass it on to your template from the corresponding view.
1
2
0
Let's say I have a "Person" model. How can I display the number of persons in my system in a template? In standard code, I would do: Person.objects.count(). But how to do this in a template?
Access Model.objects methods from Django templates
1.2
0
0
1,519
15,883,110
2013-04-08T15:28:00.000
0
0
1
0
python,arguments
15,883,448
4
false
0
0
No, there is not more or less a "standard" approach to this.
1
0
0
This has probably been asked before, but I don't know how to look up the answer, because I'm not sure what's a good way to phrase the question. The topic is function arguments that can semantically be expressed in many different ways. For example, to give a file to a function, you could either give the file directly, o...
Flexible Arguments in Python
0
0
0
1,455
15,885,089
2013-04-08T17:16:00.000
2
0
1
0
python,nltk
15,885,324
1
false
0
0
Hm, I imagine you could train a SVM or neural network on character n-grams...but you'd need pretty darn long ones. The problem is that this would probably have a high rate of false negatives (throwing out what you wanted) because you can have drastically different rates of character clusters in various languages. Take...
1
1
0
I'm doing some machine extraction of sometimes-garbled PDF text, which often ends up with words incorrectly split up by spaces, or chunks of words put in incorrect order, resulting in pure gibberish. I'd like a tool that can scan through and recognize these chunks of pure gibberish while skipping non-dictionary words t...
Algorithm or tool in python to distinguish between gibberish/errors and foreign words/names?
0.379949
0
0
1,125
15,885,733
2013-04-08T17:57:00.000
2
0
1
0
python,datetime
15,885,821
2
false
0
0
As the name implies, a datetime includes information about both the date and time, while a date is only a date. This is why subtracting two datetimes is allowed and returns a timedelta (the time difference between two instants), but subtracting a datetime and a date is not — since date refers to a whole day, it is uncl...
2
1
0
I have the following error, can someone please explain the difference between datetime.datetime and datetime.date? TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'datetime.date'
python datetime operation
0.197375
0
0
282
15,885,733
2013-04-08T17:57:00.000
1
0
1
0
python,datetime
15,885,999
2
false
0
0
date is just a date (year, month, day), while datetime also includes a time (year, month, day, hour, minutes, seconds, milliseconds). You can't compare the two directly, because you need to explicitly specify how to deal with the time part. Do you ignore the time part completely, or do you select some arbitrary time to...
2
1
0
I have the following error, can someone please explain the difference between datetime.datetime and datetime.date? TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'datetime.date'
python datetime operation
0.099668
0
0
282
15,886,859
2013-04-08T19:01:00.000
0
0
1
0
python
15,887,278
3
false
0
0
You can use pickle.dump(c, file_obj) if you already have the file object. Alternatively, file_obj.write(pickle.dumps(c)), though the first is preferred. If you need this to be done safely, you should write this out to a temporary file, and then move it to the desired location. That way you can avoid corruption of the f...
1
0
0
Is there a direct way to write a Counter declared as c=Counter() to the file. Currently I am using one pair at a time, writing them to the file. Is the a pythonic way to do it.
Writing a counter to a file
0
0
0
992
15,887,206
2013-04-08T19:23:00.000
0
0
0
1
python-3.x,subprocess,celery
15,971,837
1
true
0
0
celery doesn't yet work perfectly with python3.3 on windows it seems. I ran the exact same setup on linux fedora and got it to work. This problem should be fixed in future development of the package so be patient.
1
0
0
Currently i'm working on a project where I need to use Python 3.3 and celery. I've been following the first steps tutorial, but i keep getting errors due to problems with librarys like _subprocess. Does annyone have some more information on this. I also tried replacing the _subprocess with _winapi, with more errors as ...
Using celery in python 3.3 on windows machine
1.2
0
0
129
15,887,916
2013-04-08T20:03:00.000
2
0
0
0
python,browser,scripting,client-side
15,887,967
3
false
1
0
Internet Explorer has support for client-side VBScript, but nobody really uses it. Javascript is an implementation of ECMAScript, by Brendan Eich at Netscape. It became the de-facto standard. However, most languages have libraries written that can traverse an html document in the server side. In Python a common one is ...
1
0
0
Is Javascript the only language that can utilise the DOM API? Is there a DOM wrapper for Python?
Clientside Scripting Language
0.132549
0
1
541
15,888,186
2013-04-08T20:19:00.000
1
0
0
1
python-2.7,python-3.x,python-idle
17,015,420
11
false
0
0
I had exactly the same issue :"IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." I found the answer from this stackoverflow site. I created a file named string.py and that classhed with the normal python files. I removed the strin...
11
10
0
Resolved April 15, 2013. In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firew...
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
0.01818
0
0
72,468
15,888,186
2013-04-08T20:19:00.000
3
0
0
1
python-2.7,python-3.x,python-idle
17,843,247
11
false
0
0
Adding to existing answers - it is actually possible to have firewall block IDLE when not running with -n flag. I haven't used IDLE for a few months and decided to try if it works properly with newly installed python3.3 (on Linux Mint 13 x86). In between I made iptables setup much more aggressive and apparently it bloc...
11
10
0
Resolved April 15, 2013. In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firew...
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
0.054491
0
0
72,468
15,888,186
2013-04-08T20:19:00.000
1
0
0
1
python-2.7,python-3.x,python-idle
20,869,245
11
false
0
0
I had the same error message. Error not seen after I added all the *.exe filea to be found in the Python install directory to the Windows firewall exception list.
11
10
0
Resolved April 15, 2013. In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firew...
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
0.01818
0
0
72,468
15,888,186
2013-04-08T20:19:00.000
5
0
0
1
python-2.7,python-3.x,python-idle
21,956,824
11
false
0
0
Look for files on your main python folder that you may create in names like "threading.py", "tkinter.py" and other names that overlapps with your Lib folder and move/delete them
11
10
0
Resolved April 15, 2013. In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firew...
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
0.090659
0
0
72,468
15,888,186
2013-04-08T20:19:00.000
1
0
0
1
python-2.7,python-3.x,python-idle
22,885,631
11
false
0
0
I finally got it to work when I disabled ALL firewalls and antivirus, because some antivirus ALSO have firewall control. Ex. avast
11
10
0
Resolved April 15, 2013. In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firew...
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
0.01818
0
0
72,468
15,888,186
2013-04-08T20:19:00.000
1
0
0
1
python-2.7,python-3.x,python-idle
31,248,725
11
false
0
0
Using Windows 7 64 installation of Python 2.7.10 Shell I solved the above problem by opening the program as an administrator.
11
10
0
Resolved April 15, 2013. In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firew...
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
0.01818
0
0
72,468
15,888,186
2013-04-08T20:19:00.000
0
0
0
1
python-2.7,python-3.x,python-idle
37,479,563
11
false
0
0
i have the Same issue on os win7 64Bit and Python 3.1 and find a workaround because i have a Project with many .py files and just one gave this error. - Workaround is to copy a working file and copy the contents from not working file to working file. (i used Another editor as idle. The Problem with that workaround is.....
11
10
0
Resolved April 15, 2013. In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firew...
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
0
0
0
72,468
15,888,186
2013-04-08T20:19:00.000
0
0
0
1
python-2.7,python-3.x,python-idle
42,023,097
11
false
0
0
I came across this problem too. There are two things you can do You may already have a process running call pythonw.exe which prevents IDLE from being starting. End that task and try running IDLE again Use pythonwin or python command line
11
10
0
Resolved April 15, 2013. In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firew...
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
0
0
0
72,468
15,888,186
2013-04-08T20:19:00.000
1
0
0
1
python-2.7,python-3.x,python-idle
27,731,044
11
false
0
0
Remove copy.py in your folder if you happen to have one
11
10
0
Resolved April 15, 2013. In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firew...
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
0.01818
0
0
72,468
15,888,186
2013-04-08T20:19:00.000
14
0
0
1
python-2.7,python-3.x,python-idle
16,003,884
11
false
0
0
I had this same problem today. I found another stack overflow post where someone had a tkinter.py file in the same directory as python, and they fixed it by removing that tkinter.py file. When I looked in my python directory, I realized I had created a script called random.py and put it there. I suspect that it confl...
11
10
0
Resolved April 15, 2013. In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firew...
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
1
0
0
72,468