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 can find that might use libssl or libcrypto, and they're all pointing to the same versions of the files. gdb returns: 0x0000003d1d0f670 in EVP_PKEY_CTX_dup () from /usr/lib64/libcrypto.so.1.0.0 Any ideas what might be going on, and how to repair it?
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-mapped file for output, and use the index to calculate the offset to write into the file (assumes fixed-length writes probably). The third is to use the index to put processed data in a new list, and when the list is completed write the items out at the end rather than on the fly.
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, 1 a 2 b 3 c 4 a 5 d But the output looks like: 2 aa 1 ba 4 aa 5 da 3 ca Is there any way to preserve the original order? Here is my code: import threading,Queue,time,sys class eSS(threading.Thread): def __init__(self,queue): threading.Thread.__init__(self) self.queue = queue self.lock = threading.Lock() def ess(self,email,code,suggested,comment,reason,dlx_score): #do something def run(self): while True: info = self.queue.get() infolist = info.split('\t') email = infolist[1] code = infolist[2] suggested = infolist[3] comment = infolist[4] reason = infolist[5] dlx_score = (0 if infolist[6] == 'NULL' else int(infolist[6])) g.write(info + '\t' + self.ess(email,code,suggested,comment,reason,dlx_score) +'\r\n') self.queue.task_done() if __name__ == "__main__": queue = Queue.Queue() filename = sys.argv[1] #Define number of threads threads = 20 f = open(filename,'r') g = open(filename+'.eSS','w') lines = f.read().splitlines() f.close() start = time.time() for i in range(threads): t = eSS(queue) t.setDaemon(True) t.start() for line in lines: queue.put(line) queue.join() print time.time()-start g.close()
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 then let it submit to the server where Django should handle it. You'll also have to then have Javascript run on page load to check the textarea and split out the different sections of your textarea. More or less that is how you are going to have go about it. If you're wanting to have someone write it for you then that would be a whole other discussion. (I know it's easy to come along and say "why do that, that's not the best way". I often run into constraints where the best way isn't going to work, so I try not to knock others not knowing their constraints.)
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->Execute Project in Python Interactive , and execute import rdflib there with no errors. But when I close that window, I still can't use the library to code in *.py file. How can I use rdflib from Visual Studio, how can I avoid that error?
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 45, in from z3printer import * File "C:\Users\linda\z3\python\z3printer.py", line 8, in import sys, io, z3 ImportError: No module named io What is the io module anyway? Is it possible to run z3 in pydev?
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.create method blocks if there is anything pending in the current transaction. I have to commit the transaction right before the .create call or it will block. It doesn't appear to be blocked in Sqlalchemy because you can't Ctrl-C it. You have to kill the process. So, I'm assuming it's something further down in Postgres. I've read in other answers that CREATE TABLE is transactional and can be rolled back, so I'm presuming this should be working. I've tried starting a new transaction with the current engine and using that for the table create (vs. the current Flask one) but that hasn't helped either. Does anybody know how to get this to work without an early commit (and risking partial dangling data)? This is Python 2.7, Postgres 9.1 and Sqlalchemy 0.8.0b2.
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 assigned. You should check that col has been defined after running your for loop and before calling it.
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 as it puts an error that MinimaxNode' object has no attribute 'value'
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 does not recognise numpy or is there something else I am missing?
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 functionality ? I tried some but most of them are built on top of CSheet. Thanks.
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 list the values by returning the value for each key, and the key again will be in the internal order. So yes, they will match. For Python built in dict class, they will match: If items(), keys(), values(), iteritems(), iterkeys(), and itervalues() are called with no intervening modifications to the dictionary, the lists will directly correspond. But that is an implementation detail, not of your platform, but of the mapping class. So if your mapping is anything else than the built in dict class, you can no longer be sure that this is the case. And with Pythons "duck typing" you shouldn't assume that you are using the dict class. But as mentioned above the question is pointless, you never need to trust it.
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 saved with that record.please advice me to find that where is my missing point.? EDITED : actually my account_view.xml cannot change.but when i'm change some changes to other view.xml files, they shows result when i restart the server & upgrade the modules. but only when i change this account_view.xml file its not gives a result.but when i do some changes to account view through "Developer mode" they affected. help me to seek what is the issue with that ? (seems not using my account_view.xml) i tried to some simple changes also like menu item text change.they also not affected.but when i do for other module's view.xml they affected
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 have to explicitly eval the new module. Edit: This does not necessarily need to be done in another module. It could just be a function call.
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-level access to a custom in-house database. At this point, I know that I could send the lib version along with the query request, and show the user a message with the result that they need to install an update. However, being that these people seem to think that taking a few seconds to click on an .exe file and clicking through the "next" buttons on the installer takes too long, I'm being asked to see if there's a way to automatically update the library when they do the "import X" call. I have never come across this kind of request, and I'm thinking that if this was possible that most popular libraries would offer this option. But I've been wrong before, and often. Has anyone successfully done this before?
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 answer). Once you have that, you can do lots of fun stuff like compare two times. Now that you have the datetime objects, you can start to "bin" them. I'm going to assume the records are in order. Start with the first record's time of "03/04/2013 13:37:20" and create a new datetime object at "03/04/2013 13:37:00" [hint: set seconds=0 on the datetime object you read in]. This is the start of your first "bin". Now add one minute to your start datetime [hint: endDT = startDT + timedelta(seconds=60)], that's the end of your first bin. Now start going through your records checking if the record is less than your endDT, if it is, add it to a list for that bin. If the record is greater than your endDT, you're in the next bin. To start the new bin, add one minute to your endDT and create a new list to hold those items and keep chugging along in your loop. Once you go through the loop, you can run max/min/avg on the lists. Ideally, you'll store the lists in a dictionary that looks like {datetimeObject : [34, 23, 45, 23]}. It'll make printing and sorting easy. This isn't the most efficient/flexible/cool way to do it, but I think it's probably the most helpful to start with.
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 to do the same but for 1min or 5min (every 5min starting from 00:00:00, not enough data in my example below but that would do something like 13:35:00 to 13:40:00 and the next one 13:40:00 included to 13:45:00 excluded, etc), i think i could figure out the 1min in extracting the minute part from the timestamp but the 5min seems complex. Not asking for a copy paste of a code, but i have no idea where to start to be honest. Level Timestamp 99 03/04/2013 13:37:20 98 03/04/2013 13:37:20 98 03/04/2013 13:37:20 99 03/04/2013 13:37:20 105 03/04/2013 13:37:20 104 03/04/2013 13:37:20 102 03/04/2013 13:37:21 102 03/04/2013 13:37:21 103 03/04/2013 13:37:22 82 03/04/2013 13:37:23 83 03/04/2013 13:37:23 82 03/04/2013 13:37:23 83 03/04/2013 13:37:23 54 03/04/2013 13:37:24 55 03/04/2013 13:37:24 54 03/04/2013 13:37:24 55 03/04/2013 13:37:24 56 03/04/2013 13:37:25 57 03/04/2013 13:37:25
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 that must fetch various amounts of information from my database (via AJAX POST requests), all related to a single action the user would take (for example: to buy a house, the system would need information about the house, the client, the previous owner, the method of payment, etc.). Because of this, the POST requests would be very frequent in one page. My question is: should I have one controller responsible for each different "type" of POST request (one controller for the "house" requests, one for the "client", etc.), or is it ok to have one "sale data fetcher" controller that handles all related POST requests checks via one of the parameters of each request and communicate with the model accordingly? I apologize if am not using the question system correctly, this is my first question here. EDIT: total lapse in my question!!! Yes the App is in PYTHON, I did use PHP for a previous Project. Thanks in advance! stack overflow has been a lifesaver so many times.
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/plain and text/html, which is most common format today.
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 problem is, I want to also show the first characters of the body text. If I use the BODYSTRUCTURE call to obtain the index of the text/HTML part it takes too long (for emails with thousands of characters it might take well over a second per email, while using only the subject/date/etc calls takes about 0.02 seconds max. I tried using the BODY[INDEX]<0.XYZ> bytes where XYZ is the number of the first bytes we want to obtain, but to my dismay, it takes as long as using the BODY[INDEX] call. Sometimes even more. Is there another way to obtain the first text characters, but in a quick manner? If I want to list 300 emails on my interface I cannot afford to spend 1 second per email just to obtain the first text characters. I'm using Python with imaplib for this, even though probably not relevant.
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 how i can distinguish this rounding? At the moment i am able to group by 5min but it starts from the first timestamp which could be 13:18:47 so the next one is giving me is 13:24:00 which is wrong as per my definition i would like to see 13:20:00 Hope that make sense...
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 remember any states/version from the previous run of your program. If you don't like using a fixed client you could let your program always check the current head revision of the file in question: p4 fstat //depot/path/yourfile |grep headRev | sed 's/.*headRev \(.*\)/\1/' You could store that version for the next run of your program in some temp file and compare versions each time. If you run your program at fixed times (e.g. via cron) you could check the last modification time (either with p4 filelog or with p4 fstat) and if the time is between the time of the last run and the current time then you need to process the file. This option is a bit intricate since you need to parse those different time formats.
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 the revision number is higher and avoid reading the file if it has not changed. I could make do with getting the revision number, or the changelist number when the file was last checked in / changed. Or if you have any other suggestion on how to accomplish my goal of avoiding doing an unnecessary read of the file. I'm using python 2.7 and the perforce-python API
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 the new table, and finally delete the old table. This seems like a huge pain. Is this how it has to be done? If so, what are better alternatives for storing mixed data on disk that can accommodate new columns with relative ease? I have looked at sqlite3 as well and the column options seem rather limited there, too.
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) rescan the /proc/PID/task/task-pid/io files eliminate task-pids that dont have the right increase in wchar rinse and repeat as often as required to end up with 1 (or possibly 0) task-pid
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 increment is the next thread but is this always the case? Is there a better way of getting this information for one thread? I am running python 2.7 on linux. Thanks
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, because I do not want my code to lead to bad things.
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. For that too, PR are welcomed. I guess as a workaround/option you can %load macro which would put macro on input n+1 , edit it and redefine it, that might be a good extension for a cell magic %%macro macroname
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 (pyZMQ?). What do you suggest as the best way to mix %edit/%run magics? I would not mind calling two different commands (one to edit, and one after I have saved and execution is safe). But those commands need a way to synchronize this target file location, or someone to persist storage, and probably need some crude form of predicatably generating filenames such that you can edit more than one file at a time, and execute in arbitrarily. Session persistence is not a must. Would writing my own magic do any good? Hope we can %edit macros soon, that would do well enough to make it work.
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 identifier (not a keyword such as break)
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 identifier as a method and as a variable, or by forbidding a meaningless statement consisting just of an identifier?
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 things.
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 will need to be done? I can already see one issue where the standard library functions would still be in English. Update: Whether this should be done or not is certainly a very interesting debate topic, which I'd love to talk about. However, is it actually possible and how? I love Python and I know a lot of intelligent people that might never be taught English properly, only Urdu, hence the thought.
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 erroneous packet, it has contained characters that changed character set of the current terminal window, rendering any text (apart from numbers) as unreadable gibberish. What would be the best way to filter the erroneous packets before their display while retaining most of the special characters? What exactly are sequences that can change behaviour of the terminal? I would also like to add that apart from scrambled output, the application still works as it should.
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 py2app raises an error. I wonder if there is a specific setup.py option that could copy the executable in Content/MacOS instead of Content/Resources.
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 been working fine (on dvi/vga/hdmi monitors) up to the time when i pluged in displayport monitor. the monitor is detected by wxwidgets to be lower resolution than it actually is, so the bitmap goes off the screen. EDID still detects valid resolution so it is for sure wxwidgets related issue. when i use wx.DisplaySize - it returns lower resolution than is actually set. i also tried to create the bitmap according to the wx.DisplaySize() output but then, as expected, when i try to light up one pixel, its neighbours are changed too. (some sort of scalling occurs). similar issue occurs when i plug a projector. have any of you had simmilar symptomes? how to deal with it?
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 and the display is stretching it to fill the full screen.
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 been working fine (on dvi/vga/hdmi monitors) up to the time when i pluged in displayport monitor. the monitor is detected by wxwidgets to be lower resolution than it actually is, so the bitmap goes off the screen. EDID still detects valid resolution so it is for sure wxwidgets related issue. when i use wx.DisplaySize - it returns lower resolution than is actually set. i also tried to create the bitmap according to the wx.DisplaySize() output but then, as expected, when i try to light up one pixel, its neighbours are changed too. (some sort of scalling occurs). similar issue occurs when i plug a projector. have any of you had simmilar symptomes? how to deal with it?
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 the prices and volumes from the JSON load. The __init__ definition connects to the web using socket. Since every instance of this class would result in a new socket, I would only need/want one instance of this class running. Is a class still the best way to approach this? What is the best way to get other classes and instances to interact with my Bitcoin() instance? Should I global a Bitcoin() instance? Pass the instance as an argument to every class that needs it?
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 can work with an HTTP based transport, you should be ok.
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 app engine?
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. You don't tell much about your requirement. Depending on your needs, you have to start from scratch. If porter stemmter comes close to your needs, but not in some special cases, you could hand code some overrides and use an existing stemmer for the other cases.
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 PorterStemmer, but it stems the above list to ['add', 'add', 'ad', 'ad', 'addit'] I'm not very experienced with stemming techniques. So, I want to ask if there's any available stemmer that does what I explains above? If not, do you have any suggestion on how to achieve that? Many thanks,
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 cd C:\Users\<username>\Documents\python\my_project and then start Idle
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 change it?
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 change it?
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 ui file). In a more generic way I can imagine that this would had happen to the previous developer in case of a disk fail. Yes, I'm completely agreed that such a tool is not a normal thing to be provided like pyuic4...
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 random PyQt4 code that generates a GUI that wasn't even created by pyuic4, there's no guarantee that any .ui could possibly generate the code. (In fact, most of the PyQt samples you'll find online don't do things the same way pyuic4 would, and most likely any other code generator will similarly not do things the same way pyuic4 does.)
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 what else it would change to besides the default welcome page.
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 on deployment to the server, it shows nothing but the default page. Restarting apache on the server and even an error in the django project have not made a difference. Any ideas?
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 path and making that version of Python the default on my system was unchecked which can be figured out by seeing the red cross mark in one of the installation screen. Click on it if you want set up to make it default Python version and also click on the option to indicate you want the path to be added in windows environment variable. No need to touch registry as previous ones will be overwritten again. In my case it worked. I was getting error like: Fatal Python error: Py_Initialize: unable to load the file system codec LookupError: no codec search functions registered: can't find encoding Besides that un-installation was failing from control panel. So above steps solved all of my problem. Hope it helps.
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 Python 2.7 is already installed on my computer. I tried to install a different version of Python xy (2.6) and everything went fine; however, I'd really prefer to use the latest version of Python xy. Actually, I can't figure out what went wrong whie uninstalling Python 2.7; does someone have any clue? I can tell you that I followed the 'normal' procedure for programm uninstalltion; control panel -> Programs -> Remove Program Thanks in advance Stefano
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 ahead and delete and then try installing Python(x,y). That is what worked for me.
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 Python 2.7 is already installed on my computer. I tried to install a different version of Python xy (2.6) and everything went fine; however, I'd really prefer to use the latest version of Python xy. Actually, I can't figure out what went wrong whie uninstalling Python 2.7; does someone have any clue? I can tell you that I followed the 'normal' procedure for programm uninstalltion; control panel -> Programs -> Remove Program Thanks in advance Stefano
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 relevant files in C:/User/UserName/AppData/ about Python, including the third party softwares like Enthought; deleting the Path in user and system Environment; =====the two steps were failed if I didn't do the third step.===== deleting the register keys as @Daniel said. (include all the relevant keys with the prefix py if you installed the third party software about Python. ) HKEY_LOCAL_MACHINE\Software\Python\ HKEY_CURRENT_USER\Software\Python
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 Python 2.7 is already installed on my computer. I tried to install a different version of Python xy (2.6) and everything went fine; however, I'd really prefer to use the latest version of Python xy. Actually, I can't figure out what went wrong whie uninstalling Python 2.7; does someone have any clue? I can tell you that I followed the 'normal' procedure for programm uninstalltion; control panel -> Programs -> Remove Program Thanks in advance Stefano
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 Python 2.7 is already installed on my computer. I tried to install a different version of Python xy (2.6) and everything went fine; however, I'd really prefer to use the latest version of Python xy. Actually, I can't figure out what went wrong whie uninstalling Python 2.7; does someone have any clue? I can tell you that I followed the 'normal' procedure for programm uninstalltion; control panel -> Programs -> Remove Program Thanks in advance Stefano
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 and could not clean uninstall. Solution what i found was: In the "Uninstall a program" select python and click repair. And then uninstall the python, it worked for me. Hope this helps and save some time. PS: I am pretty new to python, and any help correcting me would be appreciated.
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 Python 2.7 is already installed on my computer. I tried to install a different version of Python xy (2.6) and everything went fine; however, I'd really prefer to use the latest version of Python xy. Actually, I can't figure out what went wrong whie uninstalling Python 2.7; does someone have any clue? I can tell you that I followed the 'normal' procedure for programm uninstalltion; control panel -> Programs -> Remove Program Thanks in advance Stefano
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 the error.
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 Python 2.7 is already installed on my computer. I tried to install a different version of Python xy (2.6) and everything went fine; however, I'd really prefer to use the latest version of Python xy. Actually, I can't figure out what went wrong whie uninstalling Python 2.7; does someone have any clue? I can tell you that I followed the 'normal' procedure for programm uninstalltion; control panel -> Programs -> Remove Program Thanks in advance Stefano
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 suggested above Not until I removed all registry entries related to python/enthough did python(x,y) install without issue.
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 Python 2.7 is already installed on my computer. I tried to install a different version of Python xy (2.6) and everything went fine; however, I'd really prefer to use the latest version of Python xy. Actually, I can't figure out what went wrong whie uninstalling Python 2.7; does someone have any clue? I can tell you that I followed the 'normal' procedure for programm uninstalltion; control panel -> Programs -> Remove Program Thanks in advance Stefano
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 correct this error? Thanks in advance!
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:\\Python27\Scripts Then try installing the 32-bit pandas executable.
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 the registry". I then get the option to put the path in to find python, but I cannot get it to work. How would I fix this? Sorry for the silly question. Thanks. ~Kututo
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 the registry". I then get the option to put the path in to find python, but I cannot get it to work. How would I fix this? Sorry for the silly question. Thanks. ~Kututo
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 cores are working at all. Even if I put the python.exe process at highest priority, this doesn't change. My assumption is that dedicating more CPU usage to running the script could make it run faster, but my ultimate goal is to reduce the runtime by at least half. Is there a python module or some code that could help me do this? As an aside, does this sound like a problem that could benefit from a smarter algorithm? Thank you in advance!
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, I want to warn the user that queries of this size might take a long time to load. I imagine that between the form page and the results page, I could make a popup textbox that displays the warning. I could have this box show if the query object size is greater than 1000. Does Django have a method for me implementing this? How can I get this textbox to appear before the result page template is shown?
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 admittedly hist is slightly more complex than most of the Axes methods) - it is the best way to verify this kind of question.
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, 2-3 (let's ignore cases of exact equality for simplicity). I would like the first bin to include all values from minus infinity to 1, and the last bin to include all values from 2 to infinity. However, if I explicitly set these bins to span that range, they will be very wide. I would like them to have the same width. The behavior I am looking for is like the behavior of hist() in Matlab. Obviously I can numpy.clip() the data and plot that, which will give me what I want. But I am interested if there is a builtin solution for this.
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 embeds it in the .pyc, then no. The code isn't run at all at compilation time.
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, Python compiles the .py file into a .pyc and loads it. What do you mean by "stricter checking"?
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 process or compare time stamps in order to tell whether or not they should be re-compiled. Upon deleting all ".pyc" files (rm *.pyc) sometimes program behavior will change. Which would indicate that they are not being compiled on update of ".py"s. Questions: How do they decide when to be compiled? Is there a way to ensure that they have stricter checking during development?
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 to prettify(), encode(), or decode()...." So if I pass in the formatter="html" Beautiful Soup will convert Unicode characters to HTML entities whenever possible! Yay! Thank you Beautiful Soup! (And they have such great documentation. Pity I didn't read the whole thing sooner. :$)
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 0x88 0xA0 won't display as ∠ in the browser. Instead the browser interprets it as a series of latin characters. This is happening with all the math entities as well, such as Δ ∠ − +... etc. I looked through the BeautifulSoup documentation and I can see how to turn entities into the byte sequences, but I'm not using that command; all I'm using is prettify(). And I didn't see a way in the BeautifulSoup documentation to not turn entities into byte sequences. Does anyone know if there's a setting in BeautifulSoup to tell it not to change entities to byte sequences? I hope so because it seems kind of dumb to have to undo the damage after prettify runs :) Thanks in advance for your help!
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 way to remove/ignore that hard-coded breakpoint so I can let it finish? I could set a global flag and run it conditionally, but then I'd lose the 'standalone-ness' of the one-line breakpoint, also requiring another flag for each pdb.set_trace().
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.. and portletJsonString is my string in which I want to replace. So I see this after the re.sub call : "portalColumn":"col-10","portlet" What is the correct way to replace my string guys? It keeps the 0 intact. Thanks for any help.
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 button. So pywinauto and SWAPY for the win!
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 enters 3 numbers into 3 separate fields, clicks ‘OK’, and the program spits out the number of people in America that fit that description. My boss has asked me to make sure that the program is working correctly. He said do the following ‘go through each possible combination, click ok, then click print. Collect all the printed out numbers, and make sure they add up to 350,000,000 (the entire population of America). This is basically what I will be doing for the next few months: * Click ‘Clear All’ * Enter Age: 1 (month) * Enter Height: 1 (cm) * Enter Weight: 1 (Ounce) * Click ‘Ok’ * Click ‘Print’ Start next loop: * Click ‘Clear All’ * Enter Age: 1 month * Enter Height: 1 cm * Enter Weight: 2 Ounce * Click ‘Ok’ * Click ‘Print’ I have to do each possible combination. My question is: Is there some kind of python library which I can use to basically say ‘select this field by clicking here, enter number X, then select this field, enter number Y, then select his field, enter number Z, then click on this area of the screen (the area will signify the ‘OK’ button), then click this area (the area over the ‘Print’ button). Then click ‘clear all’ and enter X, Y, and Z+1. Ideally, I would want to go through every possible loop while I am away from the computer.
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 output. To look at history from a previous session, you can use %hist ~1/1-10 (lines 1-10 of the session before the current one). It also works with magic commands like %rerun, %recall and %save. If you want it recorded to a text file, have a look at the %logstart magic.
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 How can I achieve this?
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. Is there any setting in PyCharm that I can tell it not to give me Python3 prompt when I am writing Python2 code (and not to give me Python2 prompt when I am writing Python3 code)? My PyCharm version is 2.7.1
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. Is there any setting in PyCharm that I can tell it not to give me Python3 prompt when I am writing Python2 code (and not to give me Python2 prompt when I am writing Python3 code)? My PyCharm version is 2.7.1
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 much straight forward, like all windows apps commonly are, so I can't find what did I miss here. Any clues?
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, should I create an app "general" and copy-paste these functions into the models.py file? Or can I just create a general.py file in the "general" app directory and leave models.py empty? What is the "Django" way to do that? Thanks.
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, should I create an app "general" and copy-paste these functions into the models.py file? Or can I just create a general.py file in the "general" app directory and leave models.py empty? What is the "Django" way to do that? Thanks.
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 do I do that? I can guess my question is easy, but I'm just learning about all of this and so please be patient :-)
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 class in the given dropdown options. Provide me a demo example of how to add product in django-oscar.
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 likely is that there's a problem in your use of it, which has been tested by, well, just you :-) Post your code, that's the only way to be sure. It's possible that you're relying on Python2 code in your Python3 environment but I don't think the if construct changed so it's doubtful. It's possible your indentation is incorrect. It's possible you may be missing a :. There are a hundred things you could be doing wrong but, unfortunately, we can't tell without the code. By the way, the best version of Python to use is the latest stable release for your OS of choice, in either the Python2 or Python3 stream (depending on whether you need the older one). That's (at the time of this answer) 2.7.4 and 3.3.1.
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. It would be very helpful to have an answer that fully explains how to compile the resource file so I can import it.
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. It would be very helpful to have an answer that fully explains how to compile the resource file so I can import it.
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 you can use the existing feature selection algorithm in rapid miner.
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 issue. thanks
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 issue. thanks
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 used with the Select by Weights operator to eliminate those that are not needed. This approach considers attributes by themselves. You could also build a classification model and use the forward selection operators to add more and more attributes and monitor performance. This approach will consider the relationships between attributes.
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 issue. thanks
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) will give you the predictions based on the mean of every single tree results. There is a way to limit the usage of the trees? Or eventually, get each single output for each single tree in the forest?
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 accurate to the second, then set a task for each user timed to complete on that second. Everything in between comes down to personal choice. What are you more comfortable doing, and even more importantly: what produces the simplest code with the fewest failure modes?
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 minutes. Looks up every user who wants to be emailed at that time and then fire off the emails? OR Schedule a task for each user, when they set their preference. (Not sure how I would actually implement this yet)
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-step process compared with just using SetItems()
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 for files of certain type and the results will be returned as a list of strings. The list of strings should be used to fill/update the wx.Choice widget but I do not how to do this at runtime. Does anybody has a solution for this problem? Cheers Thomas
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 public : #acl MyUserName:read,write,admin,revert,delete All:read
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, or you could give a string, which is the path to the file. To specify a number, you might allow an integer as an argument, or maybe you might allow a string (the numeral), or you might even allow a string such as "one". Another example might be a function that takes a list (of numbers, say), but as a convenience, it will convert a number into a list containing one element: that number. Is there a more or less standard approach in Python to allowing this sort of flexibility? It certainly complicates the code for a program if you're not certain what types the arguments are, so my guess would be to try factor out the convenience functions into just one place, instead of scattered everywhere, but I don't really know how best to do that kind of factoring.
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 Polish, for example (it's my only second language in easy-to-type Latin characters). Skrzywdy would be a highly unlikely series of letters in English, but is easily pronouncable in Polish. A better technique might be to use language detection to detect languages used in a document above a certain probability, and then check the dictionaries for those languages... This won't help for (for instance) a Linguistics textbook where a large variety of snippets of various languages are frequently used. ** EDIT ** Idea 2: You say this is Bibliographic information. Meta-information like its position in the text or any font information your OCR software is returning to you is almost certainly more important than the series of characters you see showing up. If it's in the title, or near the position where author goes, or in Italics, it's worth considering as foreign...
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 that are likely to be proper names or simply words in a foreign language. Not sure if this is even possible, but if it is I imagine something like this could be done using NLTK. I'm just wondering if this has been done before to save me the trouble of reinventing the wheel.
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 unclear to what part of that day you want to calculate the distance to. To fix the error, you must specify which point in the day your refers to. For example, to have it refer to the midnight at the beginning of the date, replace dt - d with dt - datetime.datetime(d.year, d.month, d.day).
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 compare with when necessary (usually midnight)? This choice depends on which is the most appropriate to your situation, and really, only you can determine that. In more concrete terms, you must either promote the date to a datetime, or demote the datetime to a date. Given dt as the datetime, and d as the date, the latter is a little easier (and generally makes more sense - you can just call dt.date()), but the former is also not difficult (datetime.datetime(d.year, d.month, d.day)). In your code, it would either look like dt.date() - d or dt - datetime.datetime(d.year, d.month, d.day). And note, that this will return a datetime.timedelta object, which is another slightly different animal - it doesn't represent a specific point in time, only the difference between two points (i.e, you couldn't use it as a date on a calendar).
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 file if the process dies mid-write.
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 result. I'm open for anny suggestions. anny help on the mather would be appriciated. ps: I'm working on a windows machine. I'm using RabbitMq as broker
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 called Beautiful Soup.
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 string.py and everything works now. Thanks folks.
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 firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly. Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times. And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect. Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained. Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't. Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
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 blocked idle-python3.3 from connecting to the Python RPC server. Sometimes it is just what the message says.
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 firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly. Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times. And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect. Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained. Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't. Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
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 firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly. Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times. And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect. Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained. Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't. Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
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 firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly. Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times. And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect. Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained. Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't. Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
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 firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly. Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times. And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect. Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained. Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't. Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
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 firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly. Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times. And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect. Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained. Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't. Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
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... of you rename the file it doenst work. attention just rename the not working file doesnt work for me. just that copy paste. – john
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 firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly. Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times. And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect. Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained. Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't. Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
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 firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly. Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times. And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect. Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained. Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't. Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
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 firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly. Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times. And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect. Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained. Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't. Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
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 conflicted with the normal random module in python. When I removed this file, python started working again. So I would suggest you look in your main python directory and see if there are any .py files that you could move to different places.
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 firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly. Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times. And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect. Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained. Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't. Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
1
0
0
72,468