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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11,439,682 |
2012-07-11T19:06:00.000
| 1 | 0 | 1 | 0 |
python,semaphore
| 12,600,687 | 3 | false | 0 | 0 |
You should definitely not try to peek into the counter value of the semaphore. Doing this breaks the abstraction of the semaphore. Moreover the value that you read may not even be the correct value because, one - there might be another thread that could change the value of the count before you can actually make use of the read value (depends on the scheduling policy); two - your read is not atomic. So hacking around might work but is not guaranteed to work all the time.
A better thing to do would be to use a counter variable in your program. But care should be taken to synchronize the access to this counter.
| 1 | 6 | 0 |
I have a bounded semaphore object that ensures my program doesn't download more than a certain number of files at a time. Each worker thread acquires the semaphore when it starts downloading and releases it when done.
I have another thread that would like to run code when nothing is being downloaded. I would like a method for locking until the semaphore is completely available. How can I do this in Python?
|
how to tell if a semaphore is full in python
| 0.066568 | 0 | 0 | 4,915 |
11,441,546 |
2012-07-11T21:11:00.000
| 3 | 0 | 1 | 1 |
python,virtualenv,apt-get
| 53,515,591 | 5 | false | 0 | 0 |
An alternative solution is to install globally, then followed by allowing the virtualenv to be able to see it.
As an example, let's say we want to install matplotlib for Python 3:
sudo apt update # Update first
sudo apt install python3-matplotlib # Install globally
sudo pip3 install -U virtualenv # Install virtualenv for Python 3 using pip3
virtualenv --system-site-packages -p python3 ./venv #the system-site-packages option allows venv to see all global packages including matplotlib
source ./venv/bin/activate #activate the venv to use matplotlib within the virtualenv
deactivate # don't exit until you're done using the virtualenv
| 1 | 30 | 0 |
It it's possible, of course.
For example - I can download python-dbus like this:
$ sudo apt-get download python-dbus
But what I should to do next, with this .deb package in my current virtualenv?
|
How I can make apt-get install to my virtualenv?
| 0.119427 | 0 | 0 | 30,665 |
11,442,080 |
2012-07-11T21:53:00.000
| 2 | 0 | 1 | 0 |
python,memory
| 11,512,250 | 1 | false | 0 | 0 |
You have an application which has a data structure that appears to require 16GB+ of RAM, right? If so, then limiting its RAM will cause the application to fail, will it not?
Is there a reason all of this data needs to be in RAM all at once? Likely, the application could be redesigned to take up less than 16GB of RAM at a time. For example, searching all file contents of all files on a computer does not require having all files open in RAM all at once, but only one at a time.
My point is that "limiting the RAM usage" isn't likely to be solvable any way other than redesigning the application.
| 1 | 4 | 0 |
I have a system with 16GB of memory. I run a python script for some data mining application and the process takes up the entire 16GB. I want to limit the python process to take up only a limited amount of memory.
Is it possible to do this? If yes, how?
Update:
The application retrieves hotel review data from a huge database and tries to build graphs among hotels and users for some analysis. The data structure to hold the data goes beyond 16GB.
|
Limit Python process memory usage
| 0.379949 | 0 | 0 | 2,718 |
11,442,944 |
2012-07-11T23:18:00.000
| 0 | 0 | 0 | 1 |
python,for-loop,subprocess
| 20,869,726 | 2 | false | 0 | 0 |
A common way to detect things that have stopped working is to have them emit a signal at roughly regular intervals and have another process monitor the signal. If the monitor sees that no signal has arrived after, say, twice the interval it can take action such as killing and restarting the process.
This general idea can be used not only for software but also for hardware. I have used it to restart embedded controllers by simply charging a capacitor from an a.c. coupled signal from an output bit. A simple detector monitors the capacitor and if the voltage ever falls below a threshold it just pulls the reset line low and at the same time holds the capacitor charged for long enough for the controller to restart.
The principle for software is similar; one way is for the process to simply touch a file at intervals. The monitor checks the file modification time at intervals and if it is too old kills and restarts the process.
In OP's case the subprocess could write a status code to a file to say how far it has got in its work.
| 2 | 2 | 0 |
I am running an os.system(cmd) in a for-loop. Since sometimes it hangs, I am trying to use process=subprocess.pOpen(cmd) in a for-loop. But I want to know the following:
If I do sleep(60) and then check if the process is still running by using process.poll(), how do I differentiate between process actually running even after 1 minute and process that hung?
If I kill the process which hung, will the for-loop still continue or will it exit?
Thanks!
|
python handling subprocess
| 0 | 0 | 0 | 144 |
11,442,944 |
2012-07-11T23:18:00.000
| 4 | 0 | 0 | 1 |
python,for-loop,subprocess
| 11,443,356 | 2 | true | 0 | 0 |
I don't know of any general way to tell whether a process is hung or working. If a process hangs due to a locking issue, then it might consume 0% CPU and you might be able to guess that it is hung and not working; but if it hangs with an infinite loop, the process might make the CPU 100% busy but not accomplish any useful work. And you might have a process communicating on the network, talking to a really slow host with long timeouts; that would not be hung but would consume 0% CPU while waiting.
I think that, in general, the only hope you have is to set up some sort of "watchdog" system, where your sub-process uses inter-process communication to periodically send a signal that means "I'm still alive".
If you can't modify the program you are running as a sub-process, then at least try to figure out why it hangs, and see if you can then figure out a way to guess that it has hung. Maybe it normally has a balanced mix of CPU and I/O, but when it hangs it goes in a tight infinite loop and the CPU usage goes to 100%; that would be your clue that it is time to kill it and restart. Or, maybe it writes to a log file every 30 seconds, and you can monitor the size of the file and restart it if the file doesn't grow. Or, maybe you can put the program in a "verbose" mode where it prints messages as it works (either to stdout or stderr) and you can watch those. Or, if the program works as a daemon, maybe you can actively query it and see if it is alive; for example, if it is a database, send a simple query and see if it succeeds.
So I can't give you a general answer, but I have some hope that you should be able to figure out a way to detect when your specific program hangs.
Finally, the best possible solution would be to figure out why it hangs, and fix the problem so it doesn't happen anymore. This may not be possible, but at least keep it in mind. You don't need to detect the program hanging if the program never hangs anymore!
P.S. I suggest you do a Google search for "how to monitor a process" and see if you get any useful ideas from that.
| 2 | 2 | 0 |
I am running an os.system(cmd) in a for-loop. Since sometimes it hangs, I am trying to use process=subprocess.pOpen(cmd) in a for-loop. But I want to know the following:
If I do sleep(60) and then check if the process is still running by using process.poll(), how do I differentiate between process actually running even after 1 minute and process that hung?
If I kill the process which hung, will the for-loop still continue or will it exit?
Thanks!
|
python handling subprocess
| 1.2 | 0 | 0 | 144 |
11,443,550 |
2012-07-12T00:35:00.000
| 2 | 0 | 1 | 0 |
c#,python.net
| 11,445,596 | 2 | true | 0 | 0 |
After some more poking around I found out two things:
Changing the build target to x86 solved the missing DLL error, however the application still cryptically crashed when calling PythonEngine.Initialize(). I was able to solve this by making sure that the initialization takes place before any other code is executed.
| 2 | 2 | 0 |
I'm using .net framework 4.5 but have had the same result with 4.0:
If I write a bare bones console application to initialize python.net, it works as expected.
If I try to do the same thing from a winforms application, I get "Unable to load DLL 'python27': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"
If I reference the functioning console application from the winforms application and call a method that initializes python.net, the same thing happens. Build settings are default for both projects.
I even went as far as putting python27 straight into the executable folder but the same error still occurs so I'm guessing this might be a 32 vs 64 bit issue even though both projects are configured for any cpu.
|
python.net: Unable to load python27.dll with winforms but console application works
| 1.2 | 0 | 0 | 2,456 |
11,443,550 |
2012-07-12T00:35:00.000
| 0 | 0 | 1 | 0 |
c#,python.net
| 55,565,415 | 2 | false | 0 | 0 |
I added reference to python.runtime.dll (which is located in xxx\Python36\Lib\site-packages) to solve the dll loading problem.
I changed the build target to x64 solved my PythonEngine.Initialize() problem. And @Bicubic solved his problem by changing to x86. So you just can not let the c# target to be AnyCPU. Try both.
I moved my xxx.py to the xxx\Python36 folder to solve the py.import("xxx") error.
I can have some fun now :)
Hope you guys good luck and have fun!
| 2 | 2 | 0 |
I'm using .net framework 4.5 but have had the same result with 4.0:
If I write a bare bones console application to initialize python.net, it works as expected.
If I try to do the same thing from a winforms application, I get "Unable to load DLL 'python27': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"
If I reference the functioning console application from the winforms application and call a method that initializes python.net, the same thing happens. Build settings are default for both projects.
I even went as far as putting python27 straight into the executable folder but the same error still occurs so I'm guessing this might be a 32 vs 64 bit issue even though both projects are configured for any cpu.
|
python.net: Unable to load python27.dll with winforms but console application works
| 0 | 0 | 0 | 2,456 |
11,444,173 |
2012-07-12T02:15:00.000
| 0 | 1 | 0 | 0 |
python,python-c-api
| 11,444,316 | 2 | false | 0 | 0 |
I found out the answer.
I was mistaken, and I thought there were doubles in Python, but there aren't.
I got it to work using a "PyFloat" object, and just converted the double like this:
"PyFloat_FromDouble([the double I wanted as a PyObject])"
| 1 | 1 | 0 |
So I'm writing a set of C++ classes that run Python scripts. I've gotten code working to run any script I want from a specified directory, and I can pass and return values just fine.
But the one issue I have is I can't seem to find out how to set Python doubles up.
For example, when I was using long values, I could use "PyLong_AsLong([whatever value I'm trying to convert to a long from a PyObject])" -- but is there a PyDouble_Something in the Python/C API I can use for that?
My google searching has so far turned up nothing.
|
doubles in embedded python
| 0 | 0 | 0 | 73 |
11,444,245 |
2012-07-12T02:26:00.000
| 6 | 0 | 1 | 1 |
python,windows,pyflakes
| 16,672,834 | 3 | false | 0 | 0 |
Maybe this question is a bit old, because running "pip install pyflakes" worked flawlessly on Windows to me...
| 1 | 4 | 0 |
Having trouble getting pyflakes to run on windows.
On Windows there is no apt install , so... what to do?
|
How can I get pyflakes to run on Windows?
| 1 | 0 | 0 | 5,388 |
11,445,143 |
2012-07-12T04:47:00.000
| 1 | 0 | 0 | 0 |
python,ios,django,apple-push-notifications
| 11,471,280 | 1 | false | 1 | 0 |
Never mind, I tried it again using an absolute file path, and it worked after I restarted Django.
| 1 | 1 | 0 |
I'm using Django to send iOS push notifications. To do that, I need to access a .pem certificate file currently stored on the server in my app directory along with views.py, models.py, admin.py, etc. When I try to send a push notification from a python shell on the server, everything works fine. But when I try to send a push notification by accessing a Django view, it doesn't send and gives me an SSLError. I think that this is because Django can't find the .pem certificate file.
In short, I'm wondering how a Django view function can read in another file on the server.
|
Django Access File on Server
| 0.197375 | 0 | 0 | 846 |
11,445,815 |
2012-07-12T06:01:00.000
| 0 | 0 | 0 | 0 |
python,django,localization,internationalization,timezone
| 11,445,895 | 2 | false | 1 | 0 |
Time zones is rather simple to implement. Simply use pytz and/or dateutil. Your question is quite broad, can you give an example of specific language issues you're facing?
| 1 | 3 | 0 |
This is quite different question. We have a django web application in an European language. Now we want same app in English language.
I guess if I just follow the django internalization/localization steps in reverse order, I will be able to make the app in English (The original code was written by someone else). But I think this is not an optimal way to do it.Is there any better way or ways?
PS. local timezone will be India for now. We plan to add other countries as well in coming days.
|
Django reverse internalization/localization
| 0 | 0 | 0 | 302 |
11,453,316 |
2012-07-12T13:50:00.000
| 6 | 0 | 1 | 0 |
python,buildout,egg
| 11,453,371 | 1 | true | 0 | 0 |
Very simple:
Parts are the building blocks of your buildout. Different parts run different tasks, based on the recipe that is declared for them and the settings configured in that part.
The parts subdirectory hold the bookkeeping information for each part. It depends on the recipe what is stored here. A CMMI recipe might install the result of the config/make/make install cycle here, for example.
Eggs are python package distributions. Buildout uses code from eggs to provide recipe implementations, and most buildouts specify eggs for parts to use in the applications and scripts being built.
It is perfectly legal to have a buildout that doesn't build anything that uses eggs itself. But for buildout to run the parts, eggs are going to be involved, under the hood.
The eggs subdirectory usually holds the eggs used for both recipes and anything that requires eggs to run.
| 1 | 3 | 0 |
There is 2 directories when you work with buildout: eggs and parts. Also there are declarations of eggs and parts in buildout.cfg. What is purpose of those elements of buildout system?
|
What is difference in buildout between eggs and parts?
| 1.2 | 0 | 0 | 151 |
11,453,698 |
2012-07-12T14:09:00.000
| 1 | 0 | 1 | 0 |
python,vpython
| 11,484,890 | 1 | false | 0 | 0 |
FYI: I resolved this myself by creating a composite object (a box and several text objects) within a frame, then spinning the frame.
| 1 | 0 | 0 |
I am new to Python/Vpython and would appreciate some guidance. What is the best means to create a vpython box (or 3D rectangle, etc..) with a unique text string on each face of the box such that when the box rotates, the text will rotate as well.
A simple way to envision this program would be similar to a dice roll, whereby the number of dots on the side changes as the dice rotates. Rather than dots, my cube ("dice") will have words instead of dots.
Vpython makes it quite simple to build the box, but there is no text attribute for a box. I've been tinkering about with extrusion, but doesn't seem to be the solution here. Any help would be much appreciated.
Thank you in advance!
|
Vpython 3D Box+Text combination
| 0.197375 | 0 | 0 | 414 |
11,455,969 |
2012-07-12T16:05:00.000
| 0 | 0 | 0 | 0 |
python,google-app-engine,text,properties
| 11,497,014 | 1 | false | 1 | 0 |
Have your computed property return an instance of db.Text instead of a String. As Wooble points out, though, there's absolutely no point in doing this: the computed property exists to aid indexing, and if you're not indexing the data, you may as well use a regular property and not store it in the datastore at all.
| 1 | 1 | 0 |
I am kind of new to GAE and I was trying to use @db.ComputedProperty to dynamically add field values
However I am getting the error message
Property xxxx is 721 bytes long; it must be 500 or less. Consider Text instead, which can store strings of any length.
It seems that @db.ComputedProperty defaults to StringProperty
Is there any way to change it to TextProperty?
|
Change db.ComputedProperty from StringProperty to TextProperty
| 0 | 0 | 0 | 156 |
11,458,969 |
2012-07-12T19:13:00.000
| 4 | 0 | 0 | 1 |
python,django,google-app-engine,webapp2
| 11,460,359 | 3 | false | 1 | 0 |
The short answer is you can probably go either way, there will be some pros/some cons, but I don't think either is pure win.
Here's some pros for using Django-nonrel as a newb:
The django docs are generally pretty good. So it helps you get up to speed on some best practices
CSRF protection
Form validation
sessions
auth
i8n tools
You spend less time putting various basic pieces together, django has quite a lot for you.
You can potentially save time on stuff like FB/Twitter auth, since there's third party django packages for that.
Tastypie is a good rest api package, though you probably don't need it with the new Endpoints
The django test framework is great, though the Django 1.4 live test framework (which is even greater) doesn't work for App Engine. I just discovered that yesterday and am trying (so far fruitlessly) to hack it to work.
django has a simple tool for dumping the DB to json. This is pretty useful for testing purposes, for loading/saving fixtures. You'll have to figure out a way to do this yourself otherwise.
cons:
Django-nonrel isn't the latest and greatest. For one, you won't have ndb benefits.
While django docs are great, django-nonrel docs are not, so you'll have to figure out the setup part. I've been meaning to do a writeup, but haven't had time.
Time spent learning django could just as well be spent learning something else, but I think django probably takes less time to learn than a few different pieces.
Some people have said django is overweight and takes much longer to load. django-nonrel includes all the django-contrib addins. I've removed many of those and have had no load time problems. (fingers crossed)
There's prob more people using webapp2+jinja, I don't see too many separate individuals chiming in on django-nonrel specific issues, though the ones that do have been very helpful. On the other hand, if you run into a generic django problem, there's a lot of django users.
One thing I can say though, is if you've written for django, it's hard to move away from it piecemeal. You'll have to have replaced all the pieces that you're using before you can get rid of it, otherwise, you'll still have to include most of the package.
An alternative to using django that I know of is gae-boilerplate. It tries to do the same thing but with various different pieces. It still needs a good testing framework though imo.
| 1 | 0 | 0 |
I started web development 2 weeks ago using GAE,WebApp2,Jinja2 and WTForms.
I read though several articles , discussions , watched lessons about web development with gae (udacity) and started a small project.
Now I am very inexperienced in web-development and I don't know which path i should choose.
.
.
The last few days I poked around with GAE and webapp2. It was very easy to use. But I have to say that i only used webapp2 has a request handler. (post / get)
For templates I took Jinja2 which was self explanatory too.
.
.
Now Steve from Reddit said that it's always better to use a lightweight framework instead of a very big framework because you have more control and you can scale a lot easier.
But I still want to investigate Django-nonrel. I know that Django is limited in GAE.
But to be honest I don't even know what Django does for me, (compared to WebApp2 with Jinja2)
Now to my questions:
Would you recommend a beginner to have a look into Django ? And if I am more experienced => replace some Django code.
Stick to WebApp2 + "some template engine" ?
.
.
PS: I don't ask which framework is the best, I just want some points for consideration.
|
Google App Engine - Choosing the right direction
| 0.26052 | 0 | 0 | 2,564 |
11,460,115 |
2012-07-12T20:28:00.000
| 5 | 0 | 0 | 0 |
python,nlp,nltk
| 11,462,417 | 1 | true | 0 | 0 |
NLTK classifiers can work with any key-value dictionary. I use {"word": True} for text classification, but you could also use {"contains(word)": 1} to achieve the same effect. You can also combine many features together, so you could have {"word": True, "something something": 1, "something else": "a"}. What matters most is that your features are consistent, so you always have the same kind of keys and a fixed set of possible values. Numeric values can be used, but the classifier isn't smart about them - it will treat numbers as discrete values, so that 99 and 100 are just as different as 1 and 100. If you want numbers to be handled in a smarter way, then I recommend using scikit-learn classifiers.
| 1 | 2 | 1 |
In NLTK, using a naive bayes classifier, I know from examples its very simply to use a "bag of words" approach and look for unigrams or bigrams or both. Could you do the same using two completely different sets of features?
For instance, could I use unigrams and length of the training set (I know this has been mentioned once on here)? But of more interest to me would be something like bigrams and "bigrams" or combinations of the POS that appear in the document?
Is this beyond the power of the basic NLTK classifier?
Thanks
Alex
|
NLTK multiple feature sets in one classifier?
| 1.2 | 0 | 0 | 1,502 |
11,460,864 |
2012-07-12T21:20:00.000
| 0 | 0 | 0 | 0 |
python,wxpython,wxwidgets
| 11,471,540 | 1 | true | 0 | 0 |
I think all you have to do is change the font size of the item. That's what it looks like in the wxPython demo anyway. You could ask on the wxPython users group though. The author of that widget is on there most of the time and is very helpful.
| 1 | 0 | 0 |
I gave my CustomTreeCtrl the TR_HAS_VARIABLE_ROW_HEIGHT style. But I am not sure where to go from there to change the height of the items inside the tree.
I cant really find anything on the API or online.
|
how to use CustomTreeCtrl with the TR_HAS_VARIABLE_ROW_HEIGHT style to change the items height?
| 1.2 | 0 | 1 | 138 |
11,462,291 |
2012-07-12T23:44:00.000
| 0 | 0 | 0 | 1 |
python,django,sqlite,google-app-engine,google-cloud-storage
| 11,498,320 | 3 | true | 1 | 0 |
No. SQLite requires native code libraries that aren't available on App Engine.
| 2 | 1 | 0 |
since it is not possible to access mysql remotely on GAE, without the google cloud sql,
could I put a sqlite3 file on google cloud storage and access it through the GAE with django.db.backends.sqlite3?
Thanks.
|
Google App Engine + Google Cloud Storage + Sqlite3 + Django/Python
| 1.2 | 1 | 0 | 2,078 |
11,462,291 |
2012-07-12T23:44:00.000
| 0 | 0 | 0 | 1 |
python,django,sqlite,google-app-engine,google-cloud-storage
| 11,463,047 | 3 | false | 1 | 0 |
Google Cloud SQL is meant for this, why don't you want to use it?
If you have every frontend instance load the DB file, you'll have a really hard time synchronizing them. It just doesn't make sense. Why would you want to do this?
| 2 | 1 | 0 |
since it is not possible to access mysql remotely on GAE, without the google cloud sql,
could I put a sqlite3 file on google cloud storage and access it through the GAE with django.db.backends.sqlite3?
Thanks.
|
Google App Engine + Google Cloud Storage + Sqlite3 + Django/Python
| 0 | 1 | 0 | 2,078 |
11,463,081 |
2012-07-13T01:50:00.000
| 1 | 0 | 1 | 0 |
python,nltk
| 11,468,347 | 1 | false | 0 | 0 |
What you're probably trying to do is read your own file using the nltk software. If you have a directory /home/me/corpusdir with files in ieer format, you should be able to open them with
myreader = nltk.corpus.reader.ieer.IEERCorpusReader(r'/home/me/corpusdir', '*.txt')
You can then call the same methods as on the real ieer corpus. Check out the documentation for CorpusReader and for the ieer module (which I've never used) for details.
If you really want to add your files to the existing corpus, you should either drop them into the nltk_data direcrory or (more complex but better in the long run) put a symlink from your corpus directory to the nltk ieer directory, so that your reader will treat the original ieer files as a subdirectory of your corpus.
| 1 | 0 | 0 |
I am to new to NLTK and Python. How do I add or upload our own file to nltk corpus? For example, how could I upload my own .TXT file to ieer corpus? Is it possible? Thanks.
|
How to add or upload file to nltk corpus?
| 0.197375 | 0 | 0 | 889 |
11,464,345 |
2012-07-13T04:55:00.000
| 0 | 0 | 1 | 0 |
python
| 11,464,623 | 3 | false | 0 | 0 |
value='A 0006 005C 0078 0030 0034 0046 0030 00'
value[1:-2-1]
You will get the result as
' 0006 005C 0078 0030 0034 0046 0030'
| 1 | 1 | 0 |
How to remove first and last using python
value=A 0006 005C 0078 0030 0034 0046 0030 00
|
How to remove first item and last item using python
| 0 | 0 | 0 | 1,128 |
11,464,608 |
2012-07-13T05:25:00.000
| 0 | 0 | 0 | 0 |
python,tkinter
| 11,473,405 | 3 | false | 0 | 1 |
I think this is due to the fact you've given the entry widget a specific width (or are accepting the default). Since the widget wants to be a particular size, it will cause the column to grow in order to fit the requested size of its children.
One solution is to set the size of the entry widget to 1. Then, because of the sticky settings for E and W, it will expand to exactly fit the column.
| 2 | 0 | 0 |
I am using the grid manager and have two frames side by side, and five columns with 1 button in each below the two frames in a second row, evenly spaced. All use "sticky" NSEW since I want them to scale proportionally if I enlarge the window.
When I add a text entry widget to the right frame, it distorts the buttons below them so they are larger than those to the left. I can't figure out how to prevent this distortion, or put another way, how to keep each column the same size.
Is there a reason why the text entry widget is not respective the row/col/weighting? Thanks in advance!
|
Tkinter - text widget distorting column sizes
| 0 | 0 | 0 | 2,171 |
11,464,608 |
2012-07-13T05:25:00.000
| 0 | 0 | 0 | 0 |
python,tkinter
| 11,470,343 | 3 | false | 0 | 1 |
In each frame you should set the "propagate" status to false, this will keep the frame from resizing based on what is inside. So if the frame uses grid() set grid_propagate(False) and so on.
| 2 | 0 | 0 |
I am using the grid manager and have two frames side by side, and five columns with 1 button in each below the two frames in a second row, evenly spaced. All use "sticky" NSEW since I want them to scale proportionally if I enlarge the window.
When I add a text entry widget to the right frame, it distorts the buttons below them so they are larger than those to the left. I can't figure out how to prevent this distortion, or put another way, how to keep each column the same size.
Is there a reason why the text entry widget is not respective the row/col/weighting? Thanks in advance!
|
Tkinter - text widget distorting column sizes
| 0 | 0 | 0 | 2,171 |
11,466,604 |
2012-07-13T08:13:00.000
| 0 | 0 | 0 | 0 |
python,tabular
| 11,466,876 | 3 | false | 0 | 0 |
While I really think you should code this up in python for the sake of learning python, if all you want is to get it done, try using Excel!
read in the table (I'd be surprised if Excel can't figure this out!)
delete the columns you're not interested in
export / saveas fixed width
| 1 | 4 | 0 |
I'm by no means a programmer but I stumbled over a really nasty fixed width ASCII table which might require me to become one :) (with some help from you guys I hope)
I did already ask Mr. Google for some advice and he pointed my in the direction of Python. So here I am - pretty lost :(
The offending table looks like this:
column1 column2 column3 column4 column5 column6 column7 ... columnN
data crap crap data crap crap data
data crap crap data crap crap data
data crap crap data crap crap
data crap crap crap
data crap crap data crap crap data
data crap crap data crap crap data
data crap crap crap crap data
data crap crap data crap data
data crap crap data crap crap data
data crap crap data crap crap data
As you can see the number of columns can vary and there are portions in the table which have no data and there are also columns which have data I"m not interested in.
My goal is to have a table at the end which looks like this:
column1 column4 column7 ... columnN
data data data
data data data
data data
data
data data data
data data data
data data
data data data
data data data
data data data
So, now all the columns I don't want are gone. That's basically my goal - a table which has only the columns I'm interested in. Do you think something like that can be done in Python?
|
Extracting only interesting columns from ASCII table
| 0 | 0 | 0 | 2,437 |
11,470,856 |
2012-07-13T12:49:00.000
| 2 | 0 | 0 | 0 |
python,rest,http-status-codes
| 11,470,884 | 1 | true | 0 | 0 |
Use an existing web framework such as Flask or Django. Doing this by yourself with sockets is way too much work, it's not worth it.
| 1 | 2 | 0 |
I want to make very simple application in Python which:
When REST calls PUT/DEL/GET are recived than response code is 200
When REST call create is recived than response code is 201
I tried with sockets but I don't know how to send 201.
|
Recive REST and Response http codes in Python
| 1.2 | 0 | 1 | 81 |
11,472,810 |
2012-07-13T14:45:00.000
| 2 | 0 | 1 | 0 |
python,setuptools
| 55,708,951 | 5 | false | 0 | 0 |
Another way to it is to use wildcards.
This does not apply to >= 0.5.0, < 0.7.0, but in case you decide that all maintenance releases should be supported (e.g. 0.5.0 to 0.5.x), you can use
== 0.5.*
e.g.
docutils == 0.3.*
| 1 | 61 | 0 |
I want to make a package to depend the particular version range e.g. >= 0.5.0, < 0.7.0. Is it possible in install_requires option, and if so how should it be?
|
How to specify version ranges in install_requires (setuptools, distribute)
| 0.07983 | 0 | 0 | 21,786 |
11,472,843 |
2012-07-13T14:47:00.000
| 2 | 0 | 0 | 1 |
python,windows,path,cmd
| 67,924,065 | 4 | false | 1 | 0 |
I also had the same issue...
I could fix it by re-associating *.py files with the python launcher.
Right click on a *.py file and open its properties.
Click on the Change button of the "Opens with..." section
Select More apps -> Look for another app on this PC.
Then browse to your windows folder (by default: "C:\Windows")
Select "py.exe"
| 1 | 27 | 0 |
How do I have to configure so that I don't have to type python script.py but simply script.py in CMD on Windows?
I added my python directory to %PATH% that contains python.exe but still scripts are not run correctly.
I tried it with django-admin.py Running django-admin.py startproject mysite gives me
Type 'django-admin.py help <subcommand>' for help on a specific subcommand. Using python in front of it processes the command correctly.
What's the problem here?
|
Set up Python on Windows to not type "python" in cmd
| 0.099668 | 0 | 0 | 17,143 |
11,475,796 |
2012-07-13T17:56:00.000
| 0 | 0 | 1 | 0 |
python
| 11,475,854 | 5 | false | 0 | 0 |
The lines and words in the big file need to somehow be sorted, in which case you can implement binary search. It does not seem like they are so the best you can do is linear search by checking to see if each word in the list is in a given line.
| 1 | 3 | 0 |
I am new python. I have a list of words and a very large file. I would like to delete the lines in the file that contain a word from the list of words.
The list of words is given as sorted and can be fed during initialization time. I am trying to find the best approach to solve this problem. I'm doing a linear search right now and it is taking too much time.
Any suggestions?
|
Searching a list of words from a large file in python
| 0 | 0 | 0 | 475 |
11,475,925 |
2012-07-13T18:06:00.000
| 5 | 0 | 0 | 0 |
python,ironpython
| 11,476,423 | 1 | true | 0 | 1 |
There are a few reason why IronPython is slow to startup.
First, if you didn't use the installer (which will ngen the assemblies), the JIT compiler has to convert the IronPython assemblies from MSIL bytecode to native code, and that takes time, as it's a lot of code. So use the installer on manually ngen the assemblies.
Second, the actual Python code is also JIT compiled, although not right away to reduce the penalty; startup time used to be much worse when all Python code was JITted. The .NET JIT isn't fast enough for my liking.
Finally, it's not a powerhouse of a laptop. That said, even on my SSD-equipped quad core it still takes a few seconds to get started.
IronPython's startup time has improved a lot, to the point where it's now really hard to optimize further - profiling is hard (small sample size) and there's no obvious wins. It's "uniformly slow code" now, unfortunately.
IronPython's strength right now lies in long-running processes where the JIT can get some big wins, and not in short ones where it's more of a hindrance.
| 1 | 2 | 0 |
I am launching IronPython 2.7.3 on Windows 7 and it is taking more than 15 seconds. Why is it so slow? And how to fix it? The computer is a Samsung NP300E5A(Celeron B800,2gb) notebook.
|
IronPython launching very slowly
| 1.2 | 0 | 0 | 345 |
11,476,379 |
2012-07-13T18:39:00.000
| 0 | 0 | 1 | 0 |
python,types
| 11,476,411 | 7 | false | 0 | 0 |
7.0 is "better", no need for the cast to float, it will do it automatically.
float() is best saved for casting a non-float to a float.
| 4 | 9 | 0 |
I'm curious which form is more efficient, is correct style, etc. I feel like the ".0" approach is much quicker; I'm not sure why the "float" approach is equally appreciated (if it is).
|
Is it less computationally intensive to use 7.0 or float(7) in Python?
| 0 | 0 | 0 | 795 |
11,476,379 |
2012-07-13T18:39:00.000
| 1 | 0 | 1 | 0 |
python,types
| 11,476,416 | 7 | false | 0 | 0 |
Float literals can be written as 7.0, that is fine as they are automatically of type float.
If you intend to convert an integer or string to float then the float() function is appropriate but that function does not need to be called to write a float literal.
| 4 | 9 | 0 |
I'm curious which form is more efficient, is correct style, etc. I feel like the ".0" approach is much quicker; I'm not sure why the "float" approach is equally appreciated (if it is).
|
Is it less computationally intensive to use 7.0 or float(7) in Python?
| 0.028564 | 0 | 0 | 795 |
11,476,379 |
2012-07-13T18:39:00.000
| 0 | 0 | 1 | 0 |
python,types
| 11,476,594 | 7 | false | 0 | 0 |
7.0 should be faster. float(7) creates an integer, then call the float() function to convert the integer to a float, so calling float(7) implicates function call overhead as well as any error checking the float() function might do.
For most practical purposes, of course, the difference in speed is unlikely to matter much (unless you're in a deep loop where your code is being called hundreds of millions of times), but there's something inelegant about invoking a conversion function when the interpreter has a built in syntax for constructing floats.
Use float() when you have something that isn't a float (like a string or an integer) that you want to convert.
| 4 | 9 | 0 |
I'm curious which form is more efficient, is correct style, etc. I feel like the ".0" approach is much quicker; I'm not sure why the "float" approach is equally appreciated (if it is).
|
Is it less computationally intensive to use 7.0 or float(7) in Python?
| 0 | 0 | 0 | 795 |
11,476,379 |
2012-07-13T18:39:00.000
| 0 | 0 | 1 | 0 |
python,types
| 11,476,424 | 7 | false | 0 | 0 |
Using float(0) is much more explicit when re-reading your code at a later date, causing less confusion later if you accidentally drop the ".0".
| 4 | 9 | 0 |
I'm curious which form is more efficient, is correct style, etc. I feel like the ".0" approach is much quicker; I'm not sure why the "float" approach is equally appreciated (if it is).
|
Is it less computationally intensive to use 7.0 or float(7) in Python?
| 0 | 0 | 0 | 795 |
11,477,067 |
2012-07-13T19:26:00.000
| 5 | 0 | 0 | 0 |
python,django,security,brute-force
| 11,477,465 | 3 | false | 1 | 0 |
You can:
Keep track of the failed login attempts and block the attacker after 3 attempts.
If you don't want to block then you can log it and present a CAPTCHA to make it more difficult in future attempts.
You can also increase the time between login attempts after eached failed attempt. For example, 10 seconds, 30 seconds, 1 minute, 5 minutes, et cetera. This will spoil the fun pretty quickly for the attacker.
Of course, choose a secure password as that will keep the attacker guessing.
| 1 | 30 | 0 |
Are there generally accepted tactics for protecting Django applications against this kind of attack?
|
Throttling brute force login attacks in Django
| 0.321513 | 0 | 0 | 18,059 |
11,477,308 |
2012-07-13T19:43:00.000
| 0 | 0 | 0 | 0 |
python,user-interface,pyqt4
| 11,477,562 | 1 | false | 0 | 1 |
QLabel is used to display texts while QTextEdit is mostly used to get one-line inputs of the user. e.g a form field to indicate that a name must be typed into the input area, QLabel is used as Name : and the QTextEdit is where the user will type in.
But i think you should first check out layouts and placing methods on PyQt (Qt mostly) and then try create simple GUIs by hand so that'll make you learn basics and all other great tools of Qt, easily.
There is also tool called Qt Designer which is very handy to creat GUIs for PyQt ( & Qt) programs by drag & drop tools.
| 1 | 0 | 0 |
I am trying to make a GUI interface using PyQt4. I want to be able to send text from my python program and have it be displayed on a window created by PyQt4.
I've been able to input data via a push button, but I would like to be able to write it from my python program. I can create a window using the self.setGeometry command, and I am fairly sure that the functions I need for writing blocks of text are in the QTextEdit Module (not QLabel, because that's for 1-line sections of text). The problem is that there are so many functions to use, and I'm new to PyQT (and Python in general, actually) so I don't understand the structure very well yet. Any help in the right direction would be appreciated!
|
Displaying text in a window with PyQT4
| 0 | 0 | 0 | 3,600 |
11,478,690 |
2012-07-13T21:33:00.000
| 0 | 0 | 0 | 0 |
python,streaming,usb,emulation
| 11,478,774 | 1 | false | 0 | 0 |
This isn't possible without special hardware because USB doesn't support peer-to-peer networks. You might do better with Firewire (IEEE-1394), which can at least be used for TCP/IP with appropriate drivers.
| 1 | 0 | 0 |
I would like to know if the following is possible:
I want to connect my computer to either another computer, or a some consumer electronics (like a ps3 or xbox or something), via a double sided USB cable. I want to run a program on the first computer that will run a constant data stream through the USB cable, to trick the second computer into believing it is a usb flash drive, and it can read data from it. The first computer can change the data stream accordingly to the files that are supposed to be on the emulated flash drive.
Essentially, I want to use a program on a computer to mimic USB hardware in another device.
I don't know if I am wording this is a proper way or not, but is this possible?
Diagram:
| My Computer running this program | >-----emulated USB data stream-----> | Target |
|
Streaming data over USB in python / mimic usb drive with python?
| 0 | 0 | 1 | 988 |
11,479,025 |
2012-07-13T22:10:00.000
| 2 | 0 | 1 | 0 |
shell,user-interface,python-idle
| 13,106,149 | 1 | false | 0 | 0 |
I ran in to this today. Basically there was already an older version installed and installing over it (I think it was 2.7.2) with 2.7.3 64 bit broke it bad.
At first the CLI python would work but IDLE refused to launch without even an error. Uninstalling/reinstalling did nothing several times, and the problems got weirder as it couldn't find the msi's it had just downloaded, etc. Then I noticed that it wasn't deleting everything in the Python27 folder.
Manually deleting the folder wasn't enough and I found that it was storing another folder under App Data\Roaming (Windows 7). Removing this one finally allowed the re-installation to work (and show up as a newly installed program instead of acting like it had always been there by not highlighting it).
I was about to give up on the 64 bit version and try the 32 but it seems like the Python uninstaller/installer aren't cleaning everything up properly file wise (if it were registry entries I'd still be digging).
| 1 | 0 | 0 |
Have been running Python 2.7.2 for several months, was using the 32-bit version on my 64-bit computer.
Today ran the installer for 2.7.3, 64-bit. Now I cannot get idle to start. I see answers here for Python in program files, I am running Win7, and I believe the correct location for this machine is in C:\, not in program files. At least that is where I had 2.7.2 and it worked.
So trying
C:\Python27\Lib\idlelib\idle.py
or
C:\Python27\Lib\idlelib\idle.pyw
neither of those would open Idle. With the .py one a console window flashes open for a split second and disappears. On the .pyw one, nothing at all happens as far as I can see. And the pyw one says right on the screen in File Type: "no console"
The old shortcut in the Start menu, under properties says 'target: python 2.7.2', but I don't see a way to change the target.
Also tried opening from Powershell, command line, Python command line, run. None of those worked.
When I downloaded 2.7.3, it said it was overwriting the files in Python27.
Now uninstall offers two programs to uninstall: 2.7.3 and 2.7.2 , but as far as I can tell there is a single Python program on disk and that one thinks it is 2.7.3. I started to uninstall and try a fresh install, but thought I'd ask first rather than risk further screwing up my machine. Thanks in advance for any help. I did read and try to use all the answers in similar questions here on the site.
|
new python version, now cannot start idle
| 0.379949 | 0 | 0 | 1,386 |
11,479,978 |
2012-07-14T00:33:00.000
| 5 | 0 | 1 | 0 |
python
| 11,479,983 | 1 | true | 0 | 0 |
You want os.walk(). It will give you a list of files and folders in each directory under the starting directory.
| 1 | 0 | 0 |
I have been at this for a few hours... how to use python to get all enclosing files from a folder... now by enclosing I mean all the files enclosed within a folder within a folder etc. So all the files beyond a certain point using Python.
I have tried to use glob.glob() and listdir() to do this, but those will just only work within the first level of code. I could get this to work if there was a way that python could differentiate between a file and a folder? Any suggestions?
|
Python get list of all enclosing files
| 1.2 | 0 | 0 | 104 |
11,484,029 |
2012-07-14T13:10:00.000
| 5 | 0 | 0 | 1 |
python,command-line,python-3.x
| 11,484,057 | 4 | true | 0 | 0 |
The argparse module from Python's standard library also supports commands, and it works in both, Python 2.x and 3.x.
| 1 | 2 | 0 |
I like the cmdln framework for writing programs that work like svn command argument but it only works in Python 2. What's a good Python 3 alternative?
|
Whats a good command-oriented commandline framework for Python 2 and 3?
| 1.2 | 0 | 0 | 530 |
11,485,610 |
2012-07-14T16:52:00.000
| 0 | 0 | 1 | 0 |
python,json,yajl
| 12,529,379 | 2 | true | 0 | 0 |
Thats an easy one, that is because you haven't installed the YAJL C library!
ijson is a wrapper around the YAJL without it won't work.
| 2 | 1 | 0 |
I need to parse some large (2 Gb+) files into python. I have tried it with the json module but I get a memory error as its methods all load the files at once.
I then moved on into installing ijson which suposedly implements a iterator-based way of parsing the file. However when I run:
import ijson
I get exception : YAJL shared object not found.
Has anyone found a similar issue?
any help would be greatly appreciated
Regards
|
error when importing ijson module python
| 1.2 | 0 | 0 | 1,026 |
11,485,610 |
2012-07-14T16:52:00.000
| 0 | 0 | 1 | 0 |
python,json,yajl
| 65,940,512 | 2 | false | 0 | 0 |
I installed it via Anaconda and suddenly it started working.
Open Anaconda prompt (win search anaconda)
run command: conda install ijson
| 2 | 1 | 0 |
I need to parse some large (2 Gb+) files into python. I have tried it with the json module but I get a memory error as its methods all load the files at once.
I then moved on into installing ijson which suposedly implements a iterator-based way of parsing the file. However when I run:
import ijson
I get exception : YAJL shared object not found.
Has anyone found a similar issue?
any help would be greatly appreciated
Regards
|
error when importing ijson module python
| 0 | 0 | 0 | 1,026 |
11,486,922 |
2012-07-14T19:50:00.000
| 13 | 0 | 1 | 0 |
python,list,python-3.x,iteration
| 11,486,935 | 2 | false | 0 | 0 |
reversed should be best as it returns an iterator, so it doesn't copy the list, just yields one element at a time. (list.reverse() also will not copy the list, but it will mutate it, so the list will be backwards after you're done, whereas reversed doesn't modify the original list.)
| 1 | 8 | 0 |
I'm using Python 3.2.3. What's the fastest way to iterate over a list in reverse? [::-1], reversed, list.reverse() or maybe some other way? I'm dealing with a list of about 5e6 elements or so, so I really need to avoid copying the list.
|
Need to iterate over a Python list in reverse as fast as possible
| 1 | 0 | 0 | 7,961 |
11,487,954 |
2012-07-14T22:45:00.000
| 2 | 0 | 0 | 0 |
python,eclipse,pydev
| 11,488,572 | 2 | true | 1 | 0 |
This was originally a comment on the OP, but turned out to be the correct answer, so I'm reposting.
The setting to replace tabs with spaces exists in two places in eclipse:
General > Editors > Text Editors
Pydev > Editor
Both these settings need to be set correctly in order to solve this problem as they can override each other
| 1 | 1 | 0 |
I'm editing django files in Eclipse Indigo with pydev. Suddenly in one file, eclipse has decided to start using four spaces instead of tabs. The file has a .py extension. It's fine in other files, it's just this one that it's having trouble with. The settings are correct for using tabs. I've tried closing and reopening the file, qutting and restarting eclipse, removing all the spaces and reloading the file, but still eclipse insists on using spaces, which is really irritating because eclipse then flags it as an error.
Anyone else experienced this before, and if so, how did you fix it?
|
Eclipse randomly replacing tabs with spaces
| 1.2 | 0 | 0 | 166 |
11,488,487 |
2012-07-15T00:35:00.000
| 0 | 0 | 0 | 0 |
python,tkinter
| 11,491,757 | 2 | false | 0 | 1 |
Yes, a handler for a button (or any event) can modify any widget in any other toplevel. As long as that handler has a reference to the widget, the handler can modify it. There are no restrictions in that regard.
| 1 | 0 | 0 |
If I have a button that executes a handler in relation to one toplevel window or root - can it modify a widget in another toplevel? What is the standard method of doing this?
|
Tkinter toplevel communication
| 0 | 0 | 0 | 463 |
11,489,481 |
2012-07-15T04:41:00.000
| 1 | 0 | 1 | 1 |
python,patch,ubuntu-12.04
| 11,489,520 | 2 | false | 0 | 0 |
Unless you are running a custom-compiled version of Python that you pulled from the cvs server (which I'm pretty sure you are not), the best thing to do is to wait until an official build is provided by the Ubuntu packagers. Also, since this bug was found on Apr 19, 2012 and hasn't been bundled into Python 2.7's tarball, it isn't a critical bug.
In short, either compile Python from the repository (not recommended), patch the Python library files yourself (they're just Python files, but I wouldn't edit them), or just put up with this cryptic bug that doesn't really affect anyone.
I wouldn't worry about it. If it was critical, Python 2.7.4 would've been released with this patch.
| 2 | 1 | 0 |
I am using Ubuntu 12.04 LTS; python 2.7.3 is pre-installed.
A bug in python 2.7 distribution has been fixed in their repository.
changeset 76420:ab9d6c4907e7 2.7
How do I apply this patch on my PC ?
Thanks,
Vineet
|
python patch : how to apply
| 0.099668 | 0 | 0 | 3,549 |
11,489,481 |
2012-07-15T04:41:00.000
| 1 | 0 | 1 | 1 |
python,patch,ubuntu-12.04
| 11,489,496 | 2 | true | 0 | 0 |
You can use the mercurial equivalents of following comands:
svn log
svn diff
patch
The "hg" equivalents of the first two commands will identify all the files that have changed and the the changes in them. The last command will apply the patches.
Use the man command to get detailed usage information on the commands.
| 2 | 1 | 0 |
I am using Ubuntu 12.04 LTS; python 2.7.3 is pre-installed.
A bug in python 2.7 distribution has been fixed in their repository.
changeset 76420:ab9d6c4907e7 2.7
How do I apply this patch on my PC ?
Thanks,
Vineet
|
python patch : how to apply
| 1.2 | 0 | 0 | 3,549 |
11,490,038 |
2012-07-15T06:48:00.000
| 4 | 0 | 1 | 0 |
c++,python,floating-point
| 11,490,403 | 2 | true | 0 | 0 |
Contra Thomas's answer, floating point operations are not non-deterministic. They are fiendishly subtle, but a given program should give the same outputs for the same inputs, if it is not using uninitialized memory or deliberately randomized data.
My first question is, what do you mean by "the same data"? How is that data getting into your program?
| 1 | 5 | 0 |
Without getting into unnecessary details, is it possible for operations on floating-point numbers (x86_64) to return -however small- variations on their results, based on identical inputs? Even a single bit different?
I am simulating a basically chaotic system, and I expect small variations on the data to have visible effects. However I expected that, with the same data, the behavior of the program would be fixed. This is not the case. I get visible, but acceptable, differences with each run of the program.
I am thinking I have left some variable uninitialized somewhere...
The languages I am using are C++ and Python.
ANSWER
Russell's answer is correct. Floating point ops are deterministic. The non-determinism was caused by a dangling pointer.
|
floating point processor non-determinism?
| 1.2 | 0 | 0 | 1,957 |
11,491,089 |
2012-07-15T10:11:00.000
| 0 | 0 | 0 | 0 |
python,django,e-commerce,satchmo
| 12,105,661 | 1 | false | 1 | 0 |
You can listen to satchmo_store.shop.signals.order_success and include in your listener all the required steps for self subscription (user to group, object creation etc.,..).
| 1 | 0 | 0 |
I'm trying to set up Satchmo, and I found this cool Subscription Product, but what I want is make a members-only section on the site (a multiple store website) itself. In other words, I want the users to make subscriptions to be able to use certain features. Is this possible in Satchmo?
I guess if my website is called xyz.com then I can create xyz store on the system and let it have a subscription product, but can I integrate it with the Django login system?
Thanks in advance.
|
Use Satchmo subscription to the store itself
| 0 | 0 | 0 | 118 |
11,491,529 |
2012-07-15T11:34:00.000
| 0 | 0 | 0 | 0 |
python,django,django-admin
| 58,411,790 | 10 | false | 1 | 0 |
If you had your server running till one point and a certain action/change broke it, try going back to the previous state.
In my case there was an email trigger which would put the system in an invalid state if email doesn't go through. Doing git stash followed by selectively popping the stash and trying the runserver helps narrow down the problem to a particular file in your project.
| 4 | 5 | 0 |
I'm new to django and currently going through the main tutorial. Even though it was working earlier, when I do python manage.py runserver OR python manage.py -h OR with any other command, the shell doesn't output anything. Wondering what I'm doing wrong.
|
Nothing happens when I do: python manage.py command
| 0 | 0 | 0 | 14,807 |
11,491,529 |
2012-07-15T11:34:00.000
| 1 | 0 | 0 | 0 |
python,django,django-admin
| 61,670,225 | 10 | false | 1 | 0 |
Please try this.
Uninstall Python.
Go inside C drive and search Django. You will get many Django related files.
Delete every Django file. don't delete your Django files.
Install Python.
It's worked for me.
| 4 | 5 | 0 |
I'm new to django and currently going through the main tutorial. Even though it was working earlier, when I do python manage.py runserver OR python manage.py -h OR with any other command, the shell doesn't output anything. Wondering what I'm doing wrong.
|
Nothing happens when I do: python manage.py command
| 0.019997 | 0 | 0 | 14,807 |
11,491,529 |
2012-07-15T11:34:00.000
| 0 | 0 | 0 | 0 |
python,django,django-admin
| 63,147,601 | 10 | false | 1 | 0 |
if you are using Redis Server on Windows, check it out if Redis Server is running, I had same problem and realized my Redis Server was not running, I ran it and now my manage.py commands work fine.
| 4 | 5 | 0 |
I'm new to django and currently going through the main tutorial. Even though it was working earlier, when I do python manage.py runserver OR python manage.py -h OR with any other command, the shell doesn't output anything. Wondering what I'm doing wrong.
|
Nothing happens when I do: python manage.py command
| 0 | 0 | 0 | 14,807 |
11,491,529 |
2012-07-15T11:34:00.000
| 0 | 0 | 0 | 0 |
python,django,django-admin
| 63,864,484 | 10 | false | 1 | 0 |
The same happened with me also, but this issue is a minor one as it happens if you have multiple versions of Python on your system, you can select a specific Python version by running python3 or whichever version you want.
SO you should start from the beginning, uninstall Django first then,
create a virtual environment, decide upon a directory where you want to place it, and run the venv module as a script with the directory path:
for e.g:
python3 -m venv tutorial-env
//This will create the tutorial-env directory if it doesn’t exist, and also create directories inside it
Once you’ve created a virtual environment, you may activate it.
On Windows, run:
tutorial-env\Scripts\activate.bat
On Unix or MacOS, run:
source tutorial-env/bin/activate
Now,
In the command prompt, ensure your virtual environment is active, and execute the following command:
...> py -m pip install Django
NOTE:
If django-admin only displays the help text no matter what arguments it is given, there is probably a problem with the file association in Windows. Check if there is more than one environment variable set for running Python scripts in PATH. This usually occurs when there is more than one Python version installed.
| 4 | 5 | 0 |
I'm new to django and currently going through the main tutorial. Even though it was working earlier, when I do python manage.py runserver OR python manage.py -h OR with any other command, the shell doesn't output anything. Wondering what I'm doing wrong.
|
Nothing happens when I do: python manage.py command
| 0 | 0 | 0 | 14,807 |
11,497,376 |
2012-07-16T02:14:00.000
| 4 | 0 | 1 | 0 |
python,line-breaks,file-writing
| 11,497,399 | 15 | false | 0 | 0 |
Most escape characters in string literals from Java are also valid in Python, such as "\r" and "\n".
| 3 | 410 | 0 |
In comparison to Java (in a string), you would do something like "First Line\r\nSecond Line".
So how would you do that in Python, for purposes of writing multiple lines to a regular file?
|
How do I specify new lines on Python, when writing on files?
| 0.053283 | 0 | 0 | 2,399,304 |
11,497,376 |
2012-07-16T02:14:00.000
| 6 | 0 | 1 | 0 |
python,line-breaks,file-writing
| 11,497,389 | 15 | false | 0 | 0 |
The same way with '\n', though you'd probably not need the '\r'. Is there a reason you have it in your Java version? If you do need/want it, you can use it in the same way in Python too.
| 3 | 410 | 0 |
In comparison to Java (in a string), you would do something like "First Line\r\nSecond Line".
So how would you do that in Python, for purposes of writing multiple lines to a regular file?
|
How do I specify new lines on Python, when writing on files?
| 1 | 0 | 0 | 2,399,304 |
11,497,376 |
2012-07-16T02:14:00.000
| 10 | 0 | 1 | 0 |
python,line-breaks,file-writing
| 11,497,390 | 15 | false | 0 | 0 |
In Python you can just use the new-line character, i.e. \n
| 3 | 410 | 0 |
In comparison to Java (in a string), you would do something like "First Line\r\nSecond Line".
So how would you do that in Python, for purposes of writing multiple lines to a regular file?
|
How do I specify new lines on Python, when writing on files?
| 1 | 0 | 0 | 2,399,304 |
11,498,848 |
2012-07-16T06:03:00.000
| 0 | 0 | 1 | 0 |
python,celery
| 11,498,943 | 2 | false | 0 | 0 |
You could using sys.setcheckinterval(somebignumber)
setcheckinterval(...)
setcheckinterval(n)
Tell the Python interpreter to check for asynchronous events every
n instructions. This also affects how often thread switches occur.
| 1 | 4 | 0 |
I'm making a "python debug mapper" that shows a 'snapshot' of current python execution
Currently, I need to know a way to pause every other threads so that the 'capture' won't happen while other threads are running.
Are there any way to do:
PauseOtherThreads();
ResumeOtherThreads();
Thanks.
p.s: should I make any modifications to get the code working with Celery and Django?
|
How can I pause all the other threads in Python?
| 0 | 0 | 0 | 404 |
11,500,239 |
2012-07-16T08:00:00.000
| 0 | 0 | 0 | 0 |
python,sqlalchemy
| 11,500,397 | 3 | false | 0 | 0 |
You can run the SHOW TABLE TABLENAME and get the columns of the tables.
| 1 | 4 | 0 |
Is it possible to determine fields available in a table (MySQL DB) pragmatically at runtime using SQLAlchemy or any other python library ? Any help on this would be great.
Thanks.
|
How to determine fields in a table using SQLAlchemy?
| 0 | 1 | 0 | 103 |
11,501,950 |
2012-07-16T09:52:00.000
| 0 | 0 | 0 | 0 |
python,django,apache,nginx,webserver
| 11,502,051 | 4 | false | 1 | 0 |
Nginx is probably the best http server, there is no need to replace it. I will advise you to upload very large files via ftp or nfs share.
| 1 | 5 | 0 |
I use django to run my website and nginx for front webserver ,
but when i upload a very large file to my site,
it take me very long time ,
there is some thing wrong when nginx hand upload large file;
the nginx will send the file to django after receive all my post file;
so this will take me more time;
i want to find some other webserver to replace the nginx;
wish your suggest?
|
Is there any way to upload a very large file use django on nginx?
| 0 | 0 | 0 | 3,455 |
11,502,928 |
2012-07-16T11:01:00.000
| 0 | 0 | 0 | 0 |
python,windows
| 11,557,820 | 2 | true | 0 | 1 |
ALright, I've come up with an answer.
Instead of using webkit, which doesn't seem to have flash support on windows, I'm gonna use the chromium embedded framework. It should let me do what I need to do, which is embed flash in a desktop app, whilst also allowing for the option of a html based interface.
It's open source, and supports flash on windows(and linux, I believe).
| 1 | 2 | 0 |
I am looking for a way to play video streams with python. I couldn't find anything nice, so I ended up embedding webkit inside a gtk window, and streaming the video in there. it works well, but feels rather hacky to me.
So, my question(s):
Is there any other way to stream video (youtube, justin tv) using python and gtk?
If not, is there a way to make my code run on Windows? Currently it only runs on Linux, I suspect because of a lack of Flash support for GTK on windows. Are there any efforts being made to fix this?
|
Embeding flash in WebKit for pygtk on windows
| 1.2 | 0 | 0 | 551 |
11,505,231 |
2012-07-16T13:20:00.000
| 2 | 0 | 0 | 0 |
python,json,web-services,web-frameworks
| 11,505,774 | 1 | true | 1 | 0 |
I'm no doubt going to be shot down for this answer, but it needs to be said...
You're going to write a service that allows tens of transfers a second, with very large file sizes... Uptime is going to be essential and so is transfer speeds etc...
If this is for a business, and not just a personal pet project get the personal responsible for the IT budget to give "Box" or "DropBox" some pennies and use their services (I am not affiliated with either company).
On a business level, this gets you up and running straight off, would probably end up cheaper than you coding, designing, debugging, paying for EC2 etc...
More related to your question:
Flask seems to be an up-coming and usable "simple" framework. That should provide all the functionality without all the bells and whistles.
The other I would spend time looking at would be Pyramid - which when using a very basic starter template is very simple, but you've got the machinery behind it to really get quite complex things done. (You can mix url dispatch and traversal where necessary for instance).
| 1 | 0 | 0 |
I'm gonna write a web service which will allow upload/download of files, managing permissions and users. It will be the interface to which a Desktop app or Mobile App will communicate. I was wondering which of the web frameworks I should use to to that?
It is a sort of remote storage for media files.
I am going to host the web service on EC2 in a Linux environment. It should be fast (obviously) because It will have to handle tens of requests per second, transferring lots of data (GBs)... Communication will be done using JSon... But how to deal with binary data? If I use base64, it will grow by 33%...
I think web2py should be ok, because it is very stable and mature project, but wanted other suggestions before choosing.
Thank you.
|
Python web framework suggestion for a web service
| 1.2 | 0 | 1 | 170 |
11,507,039 |
2012-07-16T15:02:00.000
| 8 | 0 | 1 | 0 |
python,vim
| 11,509,793 | 5 | true | 0 | 0 |
Rather than use imaps like @CG Mortion's answer suggests, I would strongly advise you to use iabbrs for these sorts of small fixes instead.
With an imap you would never be able to type "define" in insert mode unless you paused between pressing 'd', 'e', or 'f', or did one of a number of other hacky things to prevent the mapping from happening. With iabbr the abbreviation is only expanded once a non-keyword character is pressed. iabbr def def:<left> works exactly as you'd expect and it doesn't have the drawbacks of imaps.
As mentioned in other answers, I would also suggest you move on to a snippet engine once you decide that you want something a little more complex. They are very powerful and can save you loads of time.
| 1 | 9 | 0 |
I recently switched to Vim at the request of a friend after Sublime Text 2 decided it didn't believe a module was installed even though it was...I digress.
I've managed to set up some stuff to make editing Python (currently me only language) easier. However, there's one feature I'm missing from Sublime. It would automatically add a colon to the end of lines which require them (the beginning of function definitions, if statements etc.). This prevented countless annoying errors and I miss it :P
I was wondering whether there was some sort of command I could put in .vimrc to do this.
An example:
If were to type def, I would like vim to automatically insert a colon to make it def : and place the cursor before the colon ready for me to type my function name.
Cheers and apologies if I'm being stupid in any way.
|
Automatic insertion of a colon after 'def', 'if' etc
| 1.2 | 0 | 0 | 723 |
11,507,279 |
2012-07-16T15:16:00.000
| 2 | 0 | 0 | 0 |
python,scrapy,web-crawler,language-detection
| 11,507,534 | 8 | false | 1 | 0 |
If the sites are multilanguage you can send the "Accept-Language:en-US,en;q=0.8" header and expect the response to be in english. If they are not, you can inspect the "response.headers" dictionary and see if you can find any information about the language.
If still unlucky, you can try mapping the IP to the country and then to the language in some way. As a last resource, try detecting the language (I don't know how accurate this is).
| 1 | 5 | 0 |
i am writing a Bot that can just check thousands of website either they are in English or not.
i am using Scrapy (python 2.7 framework) for crawling each website first page ,
can some one suggest me which is the best way to check website language ,
any help would be appreciated.
|
python website language detection
| 0.049958 | 0 | 1 | 4,124 |
11,508,093 |
2012-07-16T16:01:00.000
| 3 | 0 | 1 | 1 |
python,packaging,pip,pypi
| 11,508,441 | 1 | true | 0 | 0 |
distribute is a fork of setuptools with better perhaps documentation. You basically have distutils (stdlib) and setuptools as your choices. Since distutils doesn't let you specify dependencies, only setuptools is left.
You generally list all dependencies, and document the installation procedure clearly (including in the long_description field pushed to PyPI). Include the OS-level installed packages, most distributions include the egg information when installing these.
| 1 | 6 | 0 |
I would like to package a Python scientific application for PyPI. My problem is that it relies on PyPI-level deps (e.g. numpy, scipy, etc.) as well as others which must be dealt at the OS-level: wxPython and Python-VTK (e.g. with apt-get on Ubuntu, homebrew on OSX, etc).
I'd like to know what would be the ideal strategy for doing this, and in particular, which packaging system would fit best (I'm currently favoring Distribute).
|
Packaging a Python app with PyPI + OS-level dependencies
| 1.2 | 0 | 0 | 220 |
11,508,670 |
2012-07-16T16:38:00.000
| 1 | 0 | 0 | 0 |
php,python,mysql,pyqt4,mysql-python
| 11,510,083 | 2 | false | 0 | 0 |
I believe you're asking about whether Python or PHP (what I think you mean by browser?) is more efficient at making a database call.
The answer? It depends on the specific code and calls, but it's going to be largely the same. Both Python and PHP are interpreted languages and interpret the code at run time. If either of the languages you were using were compiled (say, like, if you used C), I'd say you might see a speed advantage of one over the other, but with the current information you've given us, I can't really judge that.
I would use the language you are most comfortable in or feel would best fit the task - they're both going to connect to a MySQL database and do the same exact commands and queries, so just write the code in the easiest way possible for you to do it.
Also, your question as posed doesn't make much sense. Browsers don't interact with a MySQL database, PHP, which is executed by a server when you request a page, does.
| 2 | 0 | 0 |
I wanted to know whether mysql query with browser is faster or python's MySQLdb is faster. I am using MysqlDb with PyQt4 for desktop ui and PHP for web ui.
|
browser query vs python MySQLdb query
| 0.099668 | 1 | 0 | 161 |
11,508,670 |
2012-07-16T16:38:00.000
| 0 | 0 | 0 | 0 |
php,python,mysql,pyqt4,mysql-python
| 11,509,874 | 2 | false | 0 | 0 |
Browsers don't perform database queries (unless you consider the embedded SQLite database), so not only is your question nonsensical, it is in fact completely irrelevant.
| 2 | 0 | 0 |
I wanted to know whether mysql query with browser is faster or python's MySQLdb is faster. I am using MysqlDb with PyQt4 for desktop ui and PHP for web ui.
|
browser query vs python MySQLdb query
| 0 | 1 | 0 | 161 |
11,509,228 |
2012-07-16T17:14:00.000
| 1 | 0 | 1 | 1 |
python,virtualenv
| 22,384,632 | 2 | false | 0 | 0 |
The support for python2.4 was dropped in virtualenv 1.8 therefore make sure you use virtualenv<=1.7.2.
| 1 | 4 | 0 |
When using virtualenv I find that the command: virtualenv -p python2.6 --no-site-packages ~/env/NEW_PROJECT works without any problems, however if I try to do virtualenv -p python2.4 --no-site-packages ~/env/NEW_PROJECT I receive the error "The executable python2.4 (from --python=python2.4) does not exist. Is there a way to setup a virtualenv with python2.4?
Thanks
|
Virtualenv Python 2.4
| 0.099668 | 0 | 0 | 1,376 |
11,510,032 |
2012-07-16T18:10:00.000
| 0 | 1 | 0 | 1 |
java,python
| 11,511,519 | 5 | false | 0 | 0 |
I second the answer by @Eero Aaltonen -- you should run your stuff under nice. A Linux computer can run at 100% CPU busy, yet feel nice and fast for the user, if the extra tasks are all under nice; the scheduler will only run the nice tasks when the main user's tasks are idle.
But if you want to figure out if the machine is being used, I suggest you look into the w command. Try man w at your prompt. The w command prints the load average for the machine, and a list of users and how much time they have been using (a combined time that includes any background tasks they are running, plus a time for their main task).
| 2 | 2 | 0 |
I want to write a program that ssh's into remote boxes and runs jobs there if the remote computer is not actively being used. I'll be logging in as clusterJobRunner@remoteBox, and the other user will be logged in as someLocalUser@remoteBox.
Is there a way to see if a remote user is actively using the box using either Python or Java?
|
How can I find out if someone is actively using a Linux computer in Python or Java?
| 0 | 0 | 0 | 1,087 |
11,510,032 |
2012-07-16T18:10:00.000
| 1 | 1 | 0 | 1 |
java,python
| 11,510,091 | 5 | false | 0 | 0 |
In Java you can execute the users Linux command using Runtime.exec(), grab the standard output and get it into a parsable String. I don't think there are any OS-independent ways to do this.
| 2 | 2 | 0 |
I want to write a program that ssh's into remote boxes and runs jobs there if the remote computer is not actively being used. I'll be logging in as clusterJobRunner@remoteBox, and the other user will be logged in as someLocalUser@remoteBox.
Is there a way to see if a remote user is actively using the box using either Python or Java?
|
How can I find out if someone is actively using a Linux computer in Python or Java?
| 0.039979 | 0 | 0 | 1,087 |
11,512,413 |
2012-07-16T20:55:00.000
| 0 | 0 | 0 | 1 |
python,path,directory,tilde,getcwd
| 11,512,534 | 4 | false | 0 | 0 |
Try to use os.path.realpath, os.path.normpath.
| 2 | 4 | 0 |
How can I get python to return the full pathname of C:\myfolderisafolder\test?
|
Python os.getcwd() returns with tilde in the path. e.g. C:\MYFOLD~1\test
| 0 | 0 | 0 | 1,149 |
11,512,413 |
2012-07-16T20:55:00.000
| 0 | 0 | 0 | 1 |
python,path,directory,tilde,getcwd
| 11,523,138 | 4 | false | 0 | 0 |
You could just split the string with .split() at the tilde and then rejoin the full filepath with the .join() methods.
| 2 | 4 | 0 |
How can I get python to return the full pathname of C:\myfolderisafolder\test?
|
Python os.getcwd() returns with tilde in the path. e.g. C:\MYFOLD~1\test
| 0 | 0 | 0 | 1,149 |
11,514,414 |
2012-07-17T00:13:00.000
| 3 | 1 | 1 | 0 |
python,character-encoding,python-3.x,locale
| 11,516,682 | 1 | true | 0 | 0 |
In Windows, with Python 3.3+, execute chcp 65001 in the console or a batch file before running Python in order to change the locale encoding to UTF-8.
| 1 | 8 | 0 |
[Using Python 3.2]
If I don't provide encoding argument to open, the file is opened using locale.getpreferredencoding(). So for example, on my Windows machine, any time I use open('abc.txt'), it would be decoded using cp1252.
I would like to switch all my input files to utf-8. Obviously, I can add encoding = 'utf-8' to all my open function calls. Or, better, encoding = MY_PROJECT_DEFAULT_ENCODING, where the constant is defined at the global level somewhere.
But I was wondering if there is a clean way to avoid editing all my open calls, by changing the "default" encoding. Is it something I can change by changing the locale? Or by changing a parameter inside the locale? I tried to follow the Python manual but failed to understand how this is supposed to be used.
Thanks!
|
Changing the "locale preferred encoding"
| 1.2 | 0 | 0 | 3,877 |
11,514,608 |
2012-07-17T00:44:00.000
| 2 | 1 | 0 | 1 |
python,http,command-line,cgi
| 11,515,334 | 2 | false | 0 | 0 |
Are the teammates developers or comfortable with the command line? If so, I would propose SSH.
Run SSHD on the box with the scripts. On Windows, this is easy with cygwin, otherwise it's there by default on Mac and Linux
The client logs in (ssh user@host) and runs the script. Set up security with certificates and you won't even have to type your password.
If there are problems, I would much rather be at the command line and able to debug the script than at the end of an opaque web page.
Maintenance will be a lot easier too.
| 1 | 0 | 0 |
We've got a number of perl and python scripts we want to expose to some of our teammates for casual usage; and we really don't want ot deal with getting them setup with git, perl, python, dependencies, etc.
One idea we had was to write a descriptor for each script as to what arguments it needed; and then let a simple HTML page call a CGI script with the appropriate arguments, wait and return stdout to the user.
This seems such a simple need that I'm amazed that I can't find anything like it existing out there. No framework that renders out the form, that puts out a virtual console screen...
There are, of course, major security concerns. Can anyone recommend a solution that does the above, or something else similar?
|
Exposing commandline tools remotely to users
| 0.197375 | 0 | 0 | 132 |
11,515,944 |
2012-07-17T04:17:00.000
| 9 | 0 | 1 | 0 |
python,multithreading,multiprocessing
| 48,592,969 | 7 | false | 0 | 0 |
in "from queue import Queue" there is no module called queue, instead multiprocessing should be used. Therefore, it should look like "from multiprocessing import Queue"
| 1 | 136 | 0 |
I'm having much trouble trying to understand just how the multiprocessing queue works on python and how to implement it. Lets say I have two python modules that access data from a shared file, let's call these two modules a writer and a reader. My plan is to have both the reader and writer put requests into two separate multiprocessing queues, and then have a third process pop these requests in a loop and execute as such.
My main problem is that I really don't know how to implement multiprocessing.queue correctly, you cannot really instantiate the object for each process since they will be separate queues, how do you make sure that all processes relate to a shared queue (or in this case, queues)
|
How to use multiprocessing queue in Python?
| 1 | 0 | 0 | 221,619 |
11,517,143 |
2012-07-17T06:33:00.000
| 0 | 0 | 1 | 0 |
python,performance
| 11,517,362 | 1 | true | 0 | 0 |
What you ask is quite of a problem. Different data structures have different properties. In general, if you need quick access, do not use lists! They have linear access time, which means, the more you put in them, the longer it will take in average to access an element.
You could perhaps use numpy? That library has matrices that can be accessed quite fast, and can be reshaped on the fly. However, if you want to add or delete rows, it will might be a bit slow because it generally reallocates (thus copies) the entire data. So it is a trade off.
If you are gonna have so many internal arrays of different sizes, perhaps you could have a dictionary that contains the internal arrays. I think if it is indexed by integers it will be much faster than a list. Then, the internal arrays could be created with numpy.
| 1 | 1 | 1 |
I will need to create array of integer arrays like [[0,1,2],[4,4,5,7]...[4,5]]. The size of internal arrays changeable. Max number of internal arrays is 2^26. So what do you recommend for the fastest way for updating this array.
When I use list=[[]] * 2^26 initialization is very fast but update is very slow. Instead I use
list=[] , for i in range(2**26): list.append.([]) .
Now initialization is slow, update is fast. For example, for 16777216 internal array and 0.213827311993 avarage number of elements on each array for 2^26-element array it takes 1.67728900909 sec. It is good but I will work much bigger datas, hence I need the best way. Initialization time is not important.
Thank you.
|
Fast access and update integer matrix or array in Python
| 1.2 | 0 | 0 | 497 |
11,517,743 |
2012-07-17T07:21:00.000
| 1 | 0 | 0 | 1 |
python,process,applescript
| 11,518,020 | 2 | false | 0 | 0 |
I realized GUI applescript was the answer in this scenario. With it I could tell the PROCESS to get every window, and that worked. However, I'm leaving this up because I'd like to know other ways. I'm sure this GUI workaround won't work for everything.
| 1 | 0 | 0 |
I'd like to know how to have a program wait for another program to finish a task. I'm not sure what I'd look for for that...
Also, I'm using a mac.
I'd like to use Python or perhaps even applescript (I could just osascript python if the solution if for applescript anyway)
Basically this program "MPEGstreamclip" converts videos, and it opens what appears to be 2 new windows while it's converting. One window is a conversion progress bar, and the other window is a preview of the conversion. (Not sure if these actually count as windows)
(Also, MPEGstreamclip does not have an applescript dictionary, so as far as I know, it can't listen for certain window names existence)
But basically I want my program to listen for when MPEGstreamclip is done, and then run its tasks.
If it helps, when the conversion is done, the mpegstreamclip icon in the dock bounces once. I'm not sure what that means but I'd think you could use that to trigger something couldn't you?
Thanks!
|
Waiting for a program to finish its task
| 0.099668 | 0 | 0 | 220 |
11,520,573 |
2012-07-17T10:25:00.000
| 1 | 0 | 0 | 1 |
google-app-engine,python-2.7
| 11,533,684 | 3 | false | 1 | 0 |
it's been a while, but I believe I've previously fixed this by adding import rdbms to dev_appserver.py
hmm.. or was that import MySQLdb? (more likely)
| 2 | 3 | 0 |
Trying to do HelloWorld on GoogleAppEngine, but getting the following error.
C:\LearningGoogleAppEngine\HelloWorld>dev_appserver.py helloworld
WARNING 2012-07-17 10:21:37,250 rdbms_mysqldb.py:74] The rdbms API is not available because the MySQLdb library could not be loaded.
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 133, in
run_file(file, globals())
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 129, in run_file
execfile(script_path, globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_main.py", line 694, in sys.exit(main(sys.argv))
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_main.py", line 582, in main root_path, {}, default_partition=default_partition)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3217, in LoadAppConfig raise AppConfigNotFoundError
google.appengine.tools.dev_appserver.AppConfigNotFoundError
I've found posts on GoogleCode, StackO regarding this issue. But no matter what I try, I still can't overcome this error.
Python version installed on Windows 7 machine is: 2.7.3
GAE Launcher splash screen displays the following:
Release 1.7.0
Api versions: ['1']
Python: 2.5.2
wxPython : 2.8.8.1(msw-unicode)
Can someone help?
|
GoogleAppEngine error: rdbms_mysqldb.py:74
| 0.066568 | 1 | 0 | 1,146 |
11,520,573 |
2012-07-17T10:25:00.000
| 0 | 0 | 0 | 1 |
google-app-engine,python-2.7
| 12,513,978 | 3 | false | 1 | 0 |
just had the exact same error messages: I found that restarting Windows fixed everything and I did not have to deviate from the YAML or py file given on the google helloworld python tutorial.
| 2 | 3 | 0 |
Trying to do HelloWorld on GoogleAppEngine, but getting the following error.
C:\LearningGoogleAppEngine\HelloWorld>dev_appserver.py helloworld
WARNING 2012-07-17 10:21:37,250 rdbms_mysqldb.py:74] The rdbms API is not available because the MySQLdb library could not be loaded.
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 133, in
run_file(file, globals())
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 129, in run_file
execfile(script_path, globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_main.py", line 694, in sys.exit(main(sys.argv))
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_main.py", line 582, in main root_path, {}, default_partition=default_partition)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3217, in LoadAppConfig raise AppConfigNotFoundError
google.appengine.tools.dev_appserver.AppConfigNotFoundError
I've found posts on GoogleCode, StackO regarding this issue. But no matter what I try, I still can't overcome this error.
Python version installed on Windows 7 machine is: 2.7.3
GAE Launcher splash screen displays the following:
Release 1.7.0
Api versions: ['1']
Python: 2.5.2
wxPython : 2.8.8.1(msw-unicode)
Can someone help?
|
GoogleAppEngine error: rdbms_mysqldb.py:74
| 0 | 1 | 0 | 1,146 |
11,520,713 |
2012-07-17T10:34:00.000
| 1 | 1 | 1 | 1 |
python,linux,ascii,vi
| 11,520,748 | 2 | true | 0 | 0 |
The $ is displayed by vi (in certain modes). It is not in the file contents. You could use od -cx yourfile to check that.
| 1 | 0 | 0 |
I am reading a ASCII file from LINUX(Debian) into Python CGI script where it is edited via a web page and then saved,
If I use a graphical text editor the edited and un-edited file appear the same and are corectly formatted.
Using vi the edited file contains ctrl M as the EOL marker and all lines rolled into one but the unedited file is correctly formatted. Using :set List in vi to see control characters the edited file remains as described above, but in the unedited file $ appears as EOL marker.
I know LINUX EOL is ctrl 0x0D but what is the $?
Why does $ format correctly and ctrl M does not?
|
LINUX End of Line
| 1.2 | 0 | 0 | 409 |
11,522,232 |
2012-07-17T12:15:00.000
| 0 | 0 | 0 | 0 |
python,nosql
| 11,522,576 | 3 | false | 0 | 0 |
If this is just a one-time process, you might want to just setup an EC2 node with more than 1G of memory and run the python scripts there. 5 million items isn't that much, and a Python dictionary should be fairly capable of handling it. I don't think you need Hadoop in this case.
You could also try to optimize your scripts by reordering the items in several runs, than running over the 5 files synchronized using iterators so that you don't have to keep everything in memory at the same time.
| 1 | 1 | 1 |
I would like to get the suggestion on using No-SQL datastore for my particular requirements.
Let me explain:
I have to process the five csv files. Each csv contains 5 million rows and also The common id field is presented in each csv.So, I need to merge all csv by iterating 5 million rows.So, I go with python dictionary to merge all files based on the common id field.But here the bottleneck is you can't store the 5 million keys in memory(< 1gig) with python-dictionary.
So, I decided to use No-Sql.I think It might be helpful to process the 5 million key value storage.Still I didn't have clear thoughts on this.
Anyway we can't reduce the iteration since we have the five csvs each has to be iterated for updating the values.
Is it there an simple steps to go with that?
If this is the way Could you give me the No-Sql datastore to process the key-value pair?
Note: We have the values as list type also.
|
Process 5 million key-value data in python.Will NoSql solve?
| 0 | 1 | 0 | 347 |
11,524,756 |
2012-07-17T14:30:00.000
| 0 | 0 | 0 | 0 |
python,django,view
| 56,405,887 | 4 | false | 1 | 0 |
add to setting.py part of TEMPLATE append to context_processors list -> app_name.view.base,
| 1 | 0 | 0 |
I have notification scrollbar like on fb or twitter. Top menu.html is directly included by base.html Unfortunatelly, I can use only User method there. Is it possible to not write in every view that I need notifications? I want to once paste in one view and have it always in top menu.html which is in base!
from intarface import
menu_nots
nots = menu_nots(request)
|
view in base.html django
| 0 | 0 | 0 | 1,353 |
11,525,717 |
2012-07-17T15:23:00.000
| 0 | 0 | 1 | 1 |
python,google-app-engine
| 11,857,757 | 3 | false | 1 | 0 |
If I set threadsafe: true in my app.yaml file, what are the rules that govern when a new instance will be created to serve a request, versus when a new thread will be created on an existing instance?
Like people are saying here, if a previous instance is already using 10 threads, a new instance with a new thread would be initiated. A new thread will be created if all other threads are busy, they must be either waiting for some response or with computing results.
If I have an app which performs something computationally intensive on each request, does multi-threading buy me anything? In other words, is an instance a multi-core instance or a single core?
Now this question is very controversial. Everyone knows the answer but still they are skeptical. Multi-threading can never buy you any good if your task is based on just computations unless you're using a multi-core processor, don't ask me why a multi-core processor will help better, you know the answer. Now google app engine is not sophisticated enough to decide that when new threads should be dispatched to the other processor/core(if it exists), only new instances are dispatched to the other core/processor. Want your thread to run in the other core/processor? Well, throw some skills there and booya! Remember, it's upto you to decide if threads should run in other cores/processors, the engine can not take the responsibility for such because this could lead to so many confusions, the engine is not God. In short, by default the instance is single core, the engine can't decide for you when it should go multi-core.
Or, are new threads only spun up when existing threads are waiting on IO?
The first part of my answer clears this out. Yes, they only spun up when existing threads are busy, this is how threadsafe works, to prevent deadlocks.
Now I can tell you this all, from my personal experience, I worked on the app engine for many months and programmed/debugged/tested apps that were highly dependent on the threadsafe architecture. If you want I can add references(I don't have references, just personal experience, but I'm ready to search and put things on the table for you), but I don't think they are needed in this case, threadsafe works in obvious ways which I have validated myself.
| 1 | 60 | 0 |
If I set threadsafe: true in my app.yaml file, what are the rules that govern when a new instance will be created to serve a request, versus when a new thread will be created on an existing instance?
If I have an app which performs something computationally intensive on each request, does multi-threading buy me anything? In other words, is an instance a multi-core instance or a single core?
Or, are new threads only spun up when existing threads are waiting on IO?
|
When does the App Engine scheduler use a new thread vs. a new instance?
| 0 | 0 | 0 | 2,794 |
11,526,228 |
2012-07-17T15:49:00.000
| 3 | 0 | 1 | 1 |
python,environment-variables
| 11,526,266 | 1 | true | 0 | 0 |
Err, the simple answer while trying to make this at least 30chars is - Yes. (It doesn't matter what it's set to, as long as it's set - although 1 would probably be reasonable).
If you don't want to do it on a system level/user level basis, then you can always run python with the -B option.
| 1 | 1 | 0 |
I would like to prevent python from automatically creating __pycache__ directories. From some searching, I have learned that I need to set the PYTHONDONTWRITEBYTECODE python environment variable.
In a Windows environment, is this set the exact same way I would set any other system environmental variable (such as PATH)? If not, how can I set this variable so that any time I run python this is set?
|
How to set python environmental variables?
| 1.2 | 0 | 0 | 559 |
11,526,975 |
2012-07-17T16:36:00.000
| 4 | 0 | 1 | 0 |
python,random,seed
| 11,539,965 | 9 | false | 0 | 0 |
Jon Clements pretty much answers my question. However it wasn't the real problem:
It turns out, that the reason for my code's randomness was the numpy.linalg SVD because it does not always produce the same results for badly conditioned matrices !!
So be sure to check for that in your code, if you have the same problems!
| 7 | 101 | 0 |
I have a rather big program, where I use functions from the random module in different files. I would like to be able to set the random seed once, at one place, to make the program always return the same results. Can that even be achieved in python?
|
set random seed programwide in python
| 0.088656 | 0 | 0 | 99,367 |
11,526,975 |
2012-07-17T16:36:00.000
| 3 | 0 | 1 | 0 |
python,random,seed
| 61,290,441 | 9 | false | 0 | 0 |
Building on previous answers: be aware that many constructs can diverge execution paths, even when all seeds are controlled.
I was thinking "well I set my seeds so they're always the same, and I have no changing/external dependencies, therefore the execution path of my code should always be the same", but that's wrong.
The example that bit me was list(set(...)), where the resulting order may differ.
| 7 | 101 | 0 |
I have a rather big program, where I use functions from the random module in different files. I would like to be able to set the random seed once, at one place, to make the program always return the same results. Can that even be achieved in python?
|
set random seed programwide in python
| 0.066568 | 0 | 0 | 99,367 |
11,526,975 |
2012-07-17T16:36:00.000
| 1 | 0 | 1 | 0 |
python,random,seed
| 65,071,570 | 9 | false | 0 | 0 |
One important caveat is that for python versions earlier than 3.7, Dictionary keys are not deterministic. This can lead to randomness in the program or even a different order in which the random numbers are generated and therefore non-deterministic random numbers. Conclusion update python.
| 7 | 101 | 0 |
I have a rather big program, where I use functions from the random module in different files. I would like to be able to set the random seed once, at one place, to make the program always return the same results. Can that even be achieved in python?
|
set random seed programwide in python
| 0.022219 | 0 | 0 | 99,367 |
11,526,975 |
2012-07-17T16:36:00.000
| 0 | 0 | 1 | 0 |
python,random,seed
| 68,950,180 | 9 | false | 0 | 0 |
I was also puzzled by the question when reproducing a deep learning project.So I do a toy experiment and share the results with you.
I create two files in a project, which are named test1.py and test2.py respectively. In test1, I set random.seed(10) for the random module and print 10 random numbers for several times. As you can verify, the results are always the same.
What about test2? I do the same way except setting the seed for the random module.The results display differently every time. Howerver, as long as I import test1———even without using it, the results appear the same as in test1.
So the experiment comes the conclusion that if you want to set seed for all files in a project, you need to import the file/module that define and set the seed.
| 7 | 101 | 0 |
I have a rather big program, where I use functions from the random module in different files. I would like to be able to set the random seed once, at one place, to make the program always return the same results. Can that even be achieved in python?
|
set random seed programwide in python
| 0 | 0 | 0 | 99,367 |
11,526,975 |
2012-07-17T16:36:00.000
| -16 | 0 | 1 | 0 |
python,random,seed
| 11,527,594 | 9 | false | 0 | 0 |
You can guarantee this pretty easily by using your own random number generator.
Just pick three largish primes (assuming this isn't a cryptography application), and plug them into a, b and c:
a = ((a * b) % c)
This gives a feedback system that produces pretty random data. Note that not all primes work equally well, but if you're just doing a simulation, it shouldn't matter - all you really need for most simulations is a jumble of numbers with a pattern (pseudo-random, remember) complex enough that it doesn't match up in some way with your application.
Knuth talks about this.
| 7 | 101 | 0 |
I have a rather big program, where I use functions from the random module in different files. I would like to be able to set the random seed once, at one place, to make the program always return the same results. Can that even be achieved in python?
|
set random seed programwide in python
| -1 | 0 | 0 | 99,367 |
11,526,975 |
2012-07-17T16:36:00.000
| 9 | 0 | 1 | 0 |
python,random,seed
| 11,527,103 | 9 | false | 0 | 0 |
In the beginning of your application call random.seed(x) making sure x is always the same. This will ensure the sequence of pseudo random numbers will be the same during each run of the application.
| 7 | 101 | 0 |
I have a rather big program, where I use functions from the random module in different files. I would like to be able to set the random seed once, at one place, to make the program always return the same results. Can that even be achieved in python?
|
set random seed programwide in python
| 1 | 0 | 0 | 99,367 |
11,526,975 |
2012-07-17T16:36:00.000
| 140 | 0 | 1 | 0 |
python,random,seed
| 11,527,011 | 9 | true | 0 | 0 |
The main python module that is run should import random and call random.seed(n) - this is shared between all other imports of random as long as somewhere else doesn't reset the seed.
| 7 | 101 | 0 |
I have a rather big program, where I use functions from the random module in different files. I would like to be able to set the random seed once, at one place, to make the program always return the same results. Can that even be achieved in python?
|
set random seed programwide in python
| 1.2 | 0 | 0 | 99,367 |
11,527,032 |
2012-07-17T16:39:00.000
| 2 | 0 | 0 | 1 |
python,macports
| 11,604,656 | 1 | true | 0 | 0 |
-set is still there. The issue you have that you are missing a couple of arguments to the command.
It should be sudo port select --set python python27 The port command takes an action and the one here is select. port select --set then takes as first argument the group it is select for in this case python.
| 1 | 0 | 0 |
I am trying to change my default python to python27, I executed sudo port --set python27 but ended up with following error on my Mac Lion 10.7 Error: global does not accept --set. I was trying to see if MacPorts have deprecated the --set command and has introduced a new command instead. But I was unable to find anything related to that on their news website.
|
MacPort: global does not accept --set
| 1.2 | 0 | 0 | 62 |
11,527,100 |
2012-07-17T16:44:00.000
| 1 | 0 | 0 | 0 |
python,excel,formula,xlrd,xlwt
| 11,596,820 | 1 | false | 0 | 0 |
(a) xlrd does not currently support extracting formulas.
(b) You say "XLWT Formula does not support advanced i.e. VLOOKUP Formulas". This is incorrect. If you are the same person that I seem to have convinced that xlwt supports VLOOKUP etc after a lengthy exchange of private emails over the last few days, please say so. Otherwise please supply a valid (i.e. Excel accepts it) formula that xlwt won't parse correctly.
(c) Doing the calculations in Python is not ridiculous if the output is only for display.
| 1 | 1 | 0 |
I am working on the XLWT XLRD XLUTIL packages. Whenever I write to a new sheet, all the formulas have been obliterated.
I tried the following fixes, but they all failed:
Re-write all the formulas in with a loop:
Failure: XLWT Formula does not support advanced i.e. VLOOKUP Formulas
Doing the calculations all in Python: this is ridiculous
How can I preserve the formulas using the above packages? Can I use some other packages to solve my problem? Or, do I need to code my own solution?
|
Preserving Formula in Excel Python XLWT
| 0.197375 | 1 | 0 | 1,819 |
11,528,009 |
2012-07-17T17:48:00.000
| 0 | 0 | 0 | 0 |
python,opencv
| 51,053,926 | 2 | false | 0 | 0 |
2-way to apply:
img = cv2.imread(img_path)
img_buf = cv2.imencode('.jpg', img)[1].tostring()
just read the image file:
img_buf = open(img_path, 'rb').read()
| 1 | 8 | 1 |
I have an image that I load using cv2.imread(). This returns an NumPy array. However, I need to pass this into a 3rd party API that requires the data in IplImage format.
I've scoured everything I could and I've found instances of converting from IplImage to CvMat,and I've found some references to converting in C++, but not from NumPy to IplImage in Python. Is there a function that is provided that can do this conversion?
|
OpenCV: Converting from NumPy to IplImage in Python
| 0 | 0 | 0 | 10,288 |
11,528,327 |
2012-07-17T18:07:00.000
| 1 | 0 | 1 | 1 |
python,virtualenv
| 11,528,399 | 3 | false | 0 | 0 |
You could try pip install -U python from within the virtual environment, not sure what it would break.
You could also change the symlinks that point to the old Python, but not sure what side effects that would have.
I would recommend the safest path, that is to first pip freeze > installed.txt and then recreate your virtualenv with your new Python and pip install -r installed.txt in it.
| 1 | 2 | 0 |
I had installed virtualenv on the system with python2.6.
I upgraded the system python to 2.7, but the virtualenv still has affinity for python2.6.
I tried easy_install --upgrade virtualenv, but that didn't change anything.
Does anyone know how to update the system installed virtualenv to use the new python2.7 on the system?
|
How to upgrade virtualenv to use a new system python?
| 0.066568 | 0 | 0 | 2,650 |
11,529,450 |
2012-07-17T19:25:00.000
| 0 | 0 | 0 | 0 |
python,selenium,webdriver,frame,basic-authentication
| 11,547,170 | 1 | false | 1 | 0 |
Solution: go to the url of the frame itself, and set page load timeout on that page
| 1 | 0 | 0 |
I'm using selenium in python to check the page of a website that uses basic authentication on one frame. I'm checking to see if the password I am entering is correct or not, so the basic authentication often gets stuck because the password is wrong. Normally I use sel.set_page_load_timeout(8) and then catch the exception thrown when the page takes too long, but because the page loads except for the one frame, this function is not throwing an exception, and the page is getting stuck. How can I break out of the page?
|
Selenium stuck loading frame with basic authentication
| 0 | 0 | 1 | 230 |
11,530,196 |
2012-07-17T20:16:00.000
| 2 | 0 | 0 | 0 |
python,sqlalchemy,flask-sqlalchemy
| 68,064,416 | 10 | false | 1 | 0 |
result = ModalName.query.add_columns(ModelName.colname, ModelName.colname)
| 1 | 183 | 0 |
How do I specify the column that I want in my query using a model (it selects all columns by default)? I know how to do this with the sqlalchmey session: session.query(self.col1), but how do I do it with with models? I can't do SomeModel.query(). Is there a way?
|
Flask SQLAlchemy query, specify column names
| 0.039979 | 1 | 0 | 191,024 |
11,531,025 |
2012-07-17T21:18:00.000
| 1 | 0 | 0 | 1 |
django,python-2.7,osx-server
| 11,531,064 | 2 | false | 1 | 0 |
Install it against the updated Python.
| 1 | 0 | 0 |
I am using Django on my Mac OS X server. Things are fine, so far. I have been using python 2.6.1 and all works well. I upgraded Python to version 2.7.3. Invoking python in the terminal brings up version 2.7.3, as expected. Checking Django using the {% debug %) reveals that Django is still using the original python 2.6.1 interpreter.
On this system, /usr/local/bin contains a symlink to ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python
In /usr/bin I find the python interpreter, and from that directory, invoking ./python gets python 2.6.1 running.
My $PATH is
/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/mysql/bin:/usr/local/bin
which I believe must have been altered on the python 2.7.3 install.
What is considered the optimal way to get the command line and Django using the same Python? I am considering either moving the framework version to /usr/bin and sitting a symlink in the framework to the moved new version. On the system is also a /Library/Python directory, that contains the site-packages for versions 2.3, 2.5, and 2.6. In /Library/Python/2.6/site-packages are the major goodies django, mercurial, and south.
Where are people putting things, nowadays? I mean, I know I could move things around, but I would like to anticipate where the Django project is going so future upgrades can go smoothly.
|
How to get Django to use an updated python on Mac OS X server?
| 0.099668 | 0 | 0 | 251 |
11,533,169 |
2012-07-18T01:41:00.000
| 0 | 0 | 1 | 0 |
python,windows,memory,timer,windows-vista
| 11,533,237 | 3 | false | 0 | 0 |
If it is going to have a GUI, you could build this application easily using Tkinter using the after method of tkinter widgets.
If you're not going to have a GUI, you'll probably need 2 threads (1 to do the timing, 1 to accept input from the keyboard).
| 1 | 0 | 0 |
I'm working on a Python program that is to use a timer. It is going to be a memory game where a word pops up and a timer counts to 5 and after 5 seconds the words disappears and you have to type the word from memory. I have already searched around a little and have seen things that time the execution time of a program but don't do anything that I want it to. Does anyone have a code to do such a thing? I'm using Python 2.7.3 on a Windows Vista computer.
Thanks in advance, Sid
|
Trying to find a timer in Python
| 0 | 0 | 0 | 241 |
11,533,524 |
2012-07-18T02:33:00.000
| 8 | 0 | 1 | 0 |
python,python-3.x,python-2.7,ubuntu-12.04,python-2to3
| 11,533,625 | 1 | true | 0 | 0 |
They are both 2to3, but one is part of your Python 2.7 installation, and the other is part of your Python 3.1 installation.
If you look at the bin directory in a Python X.Y installation, each foo executable will also be named foo-X.Y, so that you can run a specific version by name.
| 1 | 3 | 0 |
My Ubuntu 12.04 stock python install has 2 programs for converting code to Python 3.x: 2to3-2.7 and 2to3-3.1. What's the difference?
|
What's the difference between 2to3-2.7 and 2to3-3.1?
| 1.2 | 0 | 0 | 1,387 |
11,534,826 |
2012-07-18T05:32:00.000
| 2 | 1 | 0 | 0 |
php,python,network-programming
| 11,535,406 | 2 | true | 0 | 1 |
General Response
Especially if you include a "waiting room" and such things/ want this to be widely usable, this is a rather big project (definitely not a bad thing, but you may want to do some small projects first to get your feet wet with python programming for the web). However, it is relatively easy to have a simple terminal-based, turn-based game that transmits data over the network between its players; I'd focus on making the simple version first to get a feel for what is involved. That being said, here are some answers to the specific questions you asked; unfortunately they can't be too detailed, because there is so much to learn about these topics.
Specific Answers
Now for something like this would I need (or be greatly helped by) a framework? If so which one(s)?
There are frameworks that would help with several different parts of this project, but you have some big design decisions to make before you start looking into frameworks to help with the implementation.
Would this need a database on a server, or could all data be stored on the user's computers?
Having a "waiting room" implies that there is some kind of server set up to facilitate making connections between players. Whether a database is necessary depends entirely on the scale of the application. If you want to keep track of users/enable repeat logins, there's almost certainly a database involved.
Would I be dealing with CGI or Sockets or both in creating something like this?
Read more about what CGI and sockets are and think about this one.
Would making this game into a web-app be easier? (similar to something I would create if I used PHP and ran the game off of a website)
There seem to be more resources to help making a web app version, but there are a whole new set of challenges and perhaps even more new things to learn about. It depends partly on what you are already comfortable with. Making a web app and making a standalone app that uses the internet are, perhaps surprisingly, very different, but both will involve a lot of new learning.
Conclusion
Well, I hope that was helpful in some way. Best of luck!
| 1 | 0 | 0 |
So I made a game in PHP that worked fairly well, a simple game fairly similar to tic-tac-toe, I didn't really want to go much further with PHP improving the game. With that in mind I decided to learn Python; I'm familiar with the basics now. I used simple math, dictionaries and conditional statements to create a mock-up of my game. However it is turn based and I'd prefer the two players not be on the same computer physically taking turns with the computer.
So what I envision my final product to be is a stand-alone app which each user has on their computer, they execute the app and enter a username then are brought to a screen where other users are, who have logged in as described, from there two users could mutually agree to start a round of the game, after completion they will be brought back to the 'waiting room'
Now for something like this would I need (or be greatly helped by) a framework? If so which one(s)?
Would this need a database on a server, or could all data be stored on the user's computers?
Would I be dealing with CGI or Sockets or both in creating something like this?
Would making this game into a web-app be easier? (similar to something I would create if I used PHP and ran the game off of a website)
I would appreciate reading material on the subject. A link to an example source-code that solves a problem similar to what I have gets a gold star =)
Thank you all for you time, I greatly appreciate everything.
|
Wanting to make a turn-based python game. Where do I go from here?
| 1.2 | 0 | 0 | 1,912 |
11,537,981 |
2012-07-18T09:12:00.000
| 0 | 0 | 1 | 1 |
python,eclipse,pydev
| 11,579,758 | 2 | false | 0 | 0 |
My guess is that the problem is that you're probably pointing to a shortcut and not the actual executable, so, can you check if you're really giving the executable (and not a shortcut) in the interpreter configuration process?
If that's not the case, please post details you may have in your error log during that process.
| 1 | 0 | 0 |
Possible duplicate but i couldn't find one.
I've downloaded python and am having trouble loading it into eclipse,
has anyone got a fool proof ground up solution that is garaunteed to work.
This is what i've tried,
Window--preferences--new--specified(Python 32) and C:\
directory file to python.exe but it keeps spitting out invalid interpreter.
|
Eclpise and pyDev
| 0 | 0 | 0 | 86 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.