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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1,849,523 | 2009-12-04T20:39:00.000 | 36 | 0 | 1 | 1 | python,file-io,pickle | 1,850,806 | 6 | true | 0 | 0 | Python's pickle is perfectly cross-platform.
This is likely due to EOL (End-Of-Line) differences between Windows and Linux. Make sure to open your pickle files in binary mode both when writing them and when reading them, using open()'s "wb" and "rb" modes respectively.
Note: Passing pickles between different versions o... | 2 | 21 | 0 | I have created a small python script of mine. I saved the pickle file on Linux and then used it on windows and then again used it back on Linux but now that file is not working on Linux but it is working perfectly on windows.
Is is so that python is coss-platform but the pickle file is not.
Is there any solution to th... | Is pickle file of python cross-platform? | 1.2 | 0 | 0 | 24,001 |
1,849,523 | 2009-12-04T20:39:00.000 | 1 | 0 | 1 | 1 | python,file-io,pickle | 1,849,549 | 6 | false | 0 | 0 | You could use json instead of pickle. If it can save your data, you know it's cross platform. | 2 | 21 | 0 | I have created a small python script of mine. I saved the pickle file on Linux and then used it on windows and then again used it back on Linux but now that file is not working on Linux but it is working perfectly on windows.
Is is so that python is coss-platform but the pickle file is not.
Is there any solution to th... | Is pickle file of python cross-platform? | 0.033321 | 0 | 0 | 24,001 |
1,850,607 | 2009-12-05T00:40:00.000 | -1 | 0 | 1 | 0 | python,datetime | 1,850,623 | 5 | false | 0 | 0 | For what purpose? import time -> time.clock() returns the current time in milliseconds, so it can be used for timing purposes to millisecond accuracy. | 1 | 26 | 0 | What is the best way to handle portions of a second in Python? The datetime library is excellent, but as far as I can tell it cannot handle any unit less than a second. | Python fraction of seconds | -0.039979 | 0 | 0 | 38,662 |
1,850,640 | 2009-12-05T00:55:00.000 | 5 | 0 | 0 | 0 | python,ruby,web-services,api,rest | 1,850,652 | 7 | true | 1 | 0 | I know Ruby, don't know python... you can see which way I'm leaning toward, right? | 5 | 6 | 0 | So this thread is definitely NOT a thread for why Python is better than Ruby or the inverse. Instead, this thread is for objective criticism on why you would pick one over the other to write a RESTful web API that's going to be used by many different clients, (mobile, web browsers, tablets etc).
Again, don't compare Ru... | Objective reasons for using Python or Ruby for a new REST Web API | 1.2 | 0 | 0 | 3,675 |
1,850,640 | 2009-12-05T00:55:00.000 | 4 | 0 | 0 | 0 | python,ruby,web-services,api,rest | 1,850,653 | 7 | false | 1 | 0 | Choose the one you're most familiar with and most likely to get things done with the fastest. | 5 | 6 | 0 | So this thread is definitely NOT a thread for why Python is better than Ruby or the inverse. Instead, this thread is for objective criticism on why you would pick one over the other to write a RESTful web API that's going to be used by many different clients, (mobile, web browsers, tablets etc).
Again, don't compare Ru... | Objective reasons for using Python or Ruby for a new REST Web API | 0.113791 | 0 | 0 | 3,675 |
1,850,640 | 2009-12-05T00:55:00.000 | 2 | 0 | 0 | 0 | python,ruby,web-services,api,rest | 1,850,743 | 7 | false | 1 | 0 | I think they are fairly evenly matched in features. I prefer Python, but I have been using it for over a decade so I freely admit that what follows is totally biased.
IMHO Python is more mature - there are more libraries for it (although Ruby may be catching up), and the included libraries I think are better designed.... | 5 | 6 | 0 | So this thread is definitely NOT a thread for why Python is better than Ruby or the inverse. Instead, this thread is for objective criticism on why you would pick one over the other to write a RESTful web API that's going to be used by many different clients, (mobile, web browsers, tablets etc).
Again, don't compare Ru... | Objective reasons for using Python or Ruby for a new REST Web API | 0.057081 | 0 | 0 | 3,675 |
1,850,640 | 2009-12-05T00:55:00.000 | 1 | 0 | 0 | 0 | python,ruby,web-services,api,rest | 1,852,162 | 7 | false | 1 | 0 | Either will do a great job and you'll gain in other ways from learning something new. Why not spend as couple of days with each? See how far you can get with a simple subset of the problem, then see how you feel. For bonus points report back here and answer your own question! | 5 | 6 | 0 | So this thread is definitely NOT a thread for why Python is better than Ruby or the inverse. Instead, this thread is for objective criticism on why you would pick one over the other to write a RESTful web API that's going to be used by many different clients, (mobile, web browsers, tablets etc).
Again, don't compare Ru... | Objective reasons for using Python or Ruby for a new REST Web API | 0.028564 | 0 | 0 | 3,675 |
1,850,640 | 2009-12-05T00:55:00.000 | 6 | 0 | 0 | 0 | python,ruby,web-services,api,rest | 1,850,701 | 7 | false | 1 | 0 | I would say the important thing is that regardless of which you choose, make sure that your choice does not leak through your REST API. It should not matter to the client of your API which you chose. | 5 | 6 | 0 | So this thread is definitely NOT a thread for why Python is better than Ruby or the inverse. Instead, this thread is for objective criticism on why you would pick one over the other to write a RESTful web API that's going to be used by many different clients, (mobile, web browsers, tablets etc).
Again, don't compare Ru... | Objective reasons for using Python or Ruby for a new REST Web API | 1 | 0 | 0 | 3,675 |
1,851,396 | 2009-12-05T06:52:00.000 | 1 | 1 | 0 | 0 | python | 1,852,706 | 2 | false | 1 | 0 | At the risk of stating the obvious, why not just do the rubyquiz examples in python. Those exercises as well as others aren't tied to a language - you're just as well off just doing projecteuler problems in python rather than searching for python-specific puzzles. A puzzle is a puzzle a language is just a tool to solve... | 1 | 2 | 0 | Is there a blog/forum/listserv that is equivalent to RubyQuiz.com for the Python language? | Ruby Quiz for Python | 0.099668 | 0 | 0 | 463 |
1,851,862 | 2009-12-05T10:48:00.000 | 2 | 0 | 0 | 0 | python,user-interface,pygtk,gtk | 1,872,356 | 2 | true | 0 | 1 | There's no way to automatically do you want you want. You might want to subclass gtk.Image and in your subclass, scale a pixbuf to your widget's allocation size. The advantage of this is that you'll have a reusable widget and you'll be able to have it resize your image on the fly.
The downside is that you'll have an ug... | 1 | 2 | 0 | I have a GTK layout with a widget on the left of an HBox deciding the maximum height I want, and a VBox on the right containing three buttons, each containing only an image and no text. The images are a GTK stock icon, and so have the stock storage type.
Using expand=True, fill=True packing the buttons without images a... | Scaling an image to its parent button size in GTK? | 1.2 | 0 | 0 | 2,476 |
1,852,897 | 2009-12-05T17:51:00.000 | 2 | 1 | 1 | 0 | ironpython,dynamic-language-runtime | 1,852,956 | 2 | true | 0 | 1 | No, there is no way to statically verify at compile time that the interface changes have not broken your IronPython code. This is the nature of dynamic languages. Such errors are instead presented at runtime | 2 | 4 | 0 | I know that IronPython is a dynamically typed language so what I am asking sounds pretty stupid, but is it possible to do something with an IronPython script to make sure the changing of the CLR libraries it references will not result in a runtime error when the script is executed?
The reason I ask is that I have writt... | IronPython compile-time checks against CLR libraries? | 1.2 | 0 | 0 | 244 |
1,852,897 | 2009-12-05T17:51:00.000 | 1 | 1 | 1 | 0 | ironpython,dynamic-language-runtime | 1,866,436 | 2 | false | 0 | 1 | A good set of fast running unit tests would be a good alternative to compile time checking. | 2 | 4 | 0 | I know that IronPython is a dynamically typed language so what I am asking sounds pretty stupid, but is it possible to do something with an IronPython script to make sure the changing of the CLR libraries it references will not result in a runtime error when the script is executed?
The reason I ask is that I have writt... | IronPython compile-time checks against CLR libraries? | 0.099668 | 0 | 0 | 244 |
1,853,673 | 2009-12-05T22:28:00.000 | 3 | 0 | 0 | 0 | python,web-crawler | 1,853,865 | 6 | false | 1 | 0 | You waste a lot of time waiting for network requests when spidering, so you'll definitely want to make your requests in parallel. I would probably save the result data to disk and then have a second process looping over the files searching for the term. That phase could easily be distributed across multiple machines ... | 3 | 6 | 0 | I'm writing a spider in Python to crawl a site. Trouble is, I need to examine about 2.5 million pages, so I could really use some help making it optimized for speed.
What I need to do is examine the pages for a certain number, and if it is found to record the link to the page. The spider is very simple, it just needs t... | Writing a Faster Python Spider | 0.099668 | 0 | 1 | 7,091 |
1,853,673 | 2009-12-05T22:28:00.000 | 0 | 0 | 0 | 0 | python,web-crawler | 1,854,592 | 6 | false | 1 | 0 | What Adam said. I did this once to map out Xanga's network. The way I made it faster is by having a thread-safe set containing all usernames I had to look up. Then I had 5 or so threads making requests at the same time and processing them. You're going to spend way more time waiting for the page to DL than you will pro... | 3 | 6 | 0 | I'm writing a spider in Python to crawl a site. Trouble is, I need to examine about 2.5 million pages, so I could really use some help making it optimized for speed.
What I need to do is examine the pages for a certain number, and if it is found to record the link to the page. The spider is very simple, it just needs t... | Writing a Faster Python Spider | 0 | 0 | 1 | 7,091 |
1,853,673 | 2009-12-05T22:28:00.000 | 3 | 0 | 0 | 0 | python,web-crawler | 1,853,689 | 6 | false | 1 | 0 | Spidering somebody's site with millions of requests isn't very polite. Can you instead ask the webmaster for an archive of the site? Once you have that, it's a simple matter of text searching. | 3 | 6 | 0 | I'm writing a spider in Python to crawl a site. Trouble is, I need to examine about 2.5 million pages, so I could really use some help making it optimized for speed.
What I need to do is examine the pages for a certain number, and if it is found to record the link to the page. The spider is very simple, it just needs t... | Writing a Faster Python Spider | 0.099668 | 0 | 1 | 7,091 |
1,854,278 | 2009-12-06T03:48:00.000 | 2 | 0 | 1 | 0 | python,concurrency,stackless,python-stackless | 1,854,333 | 2 | true | 0 | 0 | Focus on functionality first, and performance second (unless you know you have the need).
Most of the time on a server is spent with I/O, so multi-cores do not help so much. If it is mostly I/O that you are working with, multi-threading python may be the simplest answer.
If the server requests are CPU intensive, th... | 2 | 2 | 0 | stackless python didn't take a good usage of multi-core, so where is the point it should be faster than python thread/multiprocessing ?
all the benchmark use stackless python tasklet to compare with python thread lock and queue, that's unfair, cause lock always has low efficiency
see, if use single thread function ca... | how stackless python can be fast for concurrency? | 1.2 | 0 | 0 | 1,656 |
1,854,278 | 2009-12-06T03:48:00.000 | 0 | 0 | 1 | 0 | python,concurrency,stackless,python-stackless | 4,222,704 | 2 | false | 0 | 0 | There is this new and trendy thing called asynchronous-IO-loops and message-passing-concurrency and a few other trendy terms. Well, its not at all new, but it is only just these last 5 years being discovered by the mainstream.
Stackless Python is a version of Python where the VM has itself been modified to better supp... | 2 | 2 | 0 | stackless python didn't take a good usage of multi-core, so where is the point it should be faster than python thread/multiprocessing ?
all the benchmark use stackless python tasklet to compare with python thread lock and queue, that's unfair, cause lock always has low efficiency
see, if use single thread function ca... | how stackless python can be fast for concurrency? | 0 | 0 | 0 | 1,656 |
1,854,718 | 2009-12-06T08:10:00.000 | -3 | 0 | 0 | 1 | python,autorun | 1,854,777 | 5 | false | 0 | 0 | You want the script to download the weather information online and output the clothes based on your predefined rules?
If this is the case, use urllib to download the page and do some ad hoc parsing over the downloaded html page to get the whether information. And write your logic using nested IF THEN ELSE blocks. | 3 | 4 | 0 | I created a script that will tell me what to wear in the morning based on the weather (i.e. rain slicker if it will rain, heavy jacket if it will be cold, etc). I have fairly basic programming experience with python and the script works perfectly, but I want to be able to create a file that I can just double-click fro... | How to auto-run a script | -0.119427 | 0 | 0 | 35,644 |
1,854,718 | 2009-12-06T08:10:00.000 | 0 | 0 | 0 | 1 | python,autorun | 34,125,858 | 5 | false | 0 | 0 | Use a batch file to make it automatic
Example :
1. Open Notepad -> type the following.
This one's for Windows..It might give you a hint
:start
C:\Python34\python.exe(your python file location)Your *.py file location.
:end
Save this with a *.bat extension
That's it ..you can configure more on this batch,I guess b... | 3 | 4 | 0 | I created a script that will tell me what to wear in the morning based on the weather (i.e. rain slicker if it will rain, heavy jacket if it will be cold, etc). I have fairly basic programming experience with python and the script works perfectly, but I want to be able to create a file that I can just double-click fro... | How to auto-run a script | 0 | 0 | 0 | 35,644 |
1,854,718 | 2009-12-06T08:10:00.000 | -2 | 0 | 0 | 1 | python,autorun | 51,091,871 | 5 | false | 0 | 0 | In Linux/unix based OS , add #!/usr/bin/python3 line on top of your script file with extension .py , if you have python version 3. Or change it to the version installed in the machine
Further , make the file executable by
sudo chmod +x <fileName>
for windows, add windows python path and make the file executable | 3 | 4 | 0 | I created a script that will tell me what to wear in the morning based on the weather (i.e. rain slicker if it will rain, heavy jacket if it will be cold, etc). I have fairly basic programming experience with python and the script works perfectly, but I want to be able to create a file that I can just double-click fro... | How to auto-run a script | -0.07983 | 0 | 0 | 35,644 |
1,854,821 | 2009-12-06T08:58:00.000 | 3 | 0 | 0 | 1 | python,django,google-app-engine | 2,908,765 | 8 | false | 1 | 0 | I used pingdom for obvious reasons - no cold starts is a bonus. Of course the customers will soon come flocking and it will be a non-issue | 5 | 17 | 0 | I created a Hello World website in Google App Engine. It is using Django 1.1 without any patch.
Even though it is just a very simple web page, it takes long time and often it times out.
Any suggestions to solve this?
Note: It is responding fast after the first call. | Google App Engine Application Extremely slow | 0.07486 | 0 | 0 | 8,372 |
1,854,821 | 2009-12-06T08:58:00.000 | 3 | 0 | 0 | 1 | python,django,google-app-engine | 1,856,432 | 8 | false | 1 | 0 | I encounteres the same with pylons based app. I have the initial page server as static, and have a dummy ajax call in it to bring the app up, before the user types in credentials. It is usually enough to avoid a lengthy response... Just an idea that you might use before you actually have a million users ;). | 5 | 17 | 0 | I created a Hello World website in Google App Engine. It is using Django 1.1 without any patch.
Even though it is just a very simple web page, it takes long time and often it times out.
Any suggestions to solve this?
Note: It is responding fast after the first call. | Google App Engine Application Extremely slow | 0.07486 | 0 | 0 | 8,372 |
1,854,821 | 2009-12-06T08:58:00.000 | 4 | 0 | 0 | 1 | python,django,google-app-engine | 1,854,829 | 8 | false | 1 | 0 | If it's responding quickly after the first request, it's probably just a case of getting the relevant process up and running. Admittedly it's slightly surprising that it takes so long that it times out. Is this after you've updated the application and verified that the AppEngine dashboard shows it as being ready?
"Firs... | 5 | 17 | 0 | I created a Hello World website in Google App Engine. It is using Django 1.1 without any patch.
Even though it is just a very simple web page, it takes long time and often it times out.
Any suggestions to solve this?
Note: It is responding fast after the first call. | Google App Engine Application Extremely slow | 0.099668 | 0 | 0 | 8,372 |
1,854,821 | 2009-12-06T08:58:00.000 | 14 | 0 | 0 | 1 | python,django,google-app-engine | 1,854,875 | 8 | true | 1 | 0 | This is a horrible suggestion but I'll make it anyway:
Build a little client application or just use wget with cron to periodically access your app, maybe once every 5 minutes or so. That should keep Google from putting it into a dormant state.
I say this is a horrible suggestion because it's a waste of resources and a... | 5 | 17 | 0 | I created a Hello World website in Google App Engine. It is using Django 1.1 without any patch.
Even though it is just a very simple web page, it takes long time and often it times out.
Any suggestions to solve this?
Note: It is responding fast after the first call. | Google App Engine Application Extremely slow | 1.2 | 0 | 0 | 8,372 |
1,854,821 | 2009-12-06T08:58:00.000 | 4 | 0 | 0 | 1 | python,django,google-app-engine | 1,856,888 | 8 | false | 1 | 0 | One more tip which might increase the response time.
Enabling billing does increase the quotas, and, to my personal experience, increase the overall response of an application as well. Probably because of the higher priority for billing-enabled applications google has. For instance, an app with billing disabled, can se... | 5 | 17 | 0 | I created a Hello World website in Google App Engine. It is using Django 1.1 without any patch.
Even though it is just a very simple web page, it takes long time and often it times out.
Any suggestions to solve this?
Note: It is responding fast after the first call. | Google App Engine Application Extremely slow | 0.099668 | 0 | 0 | 8,372 |
1,854,827 | 2009-12-06T09:04:00.000 | 0 | 0 | 0 | 0 | python,coding-style,code-readability | 2,628,550 | 9 | false | 1 | 0 | Maybe you have a project in mind that you want to code up? It's very hard to read what other people write, the best way to learn is to try something. Other people will have gone through the problems you will come across, and so why code is written the way it is may start to make sense. This is an excellent site to post... | 5 | 2 | 0 | I am a complete, total beginner in programming, although I do have knowledge of CSS and HTML.
I would like to learn Python. I downloaded lots of source code but the amount of files and the complexity really confuses me. I don't know where to begin. Is there a particular order I should look for?
Thanks.
EDIT: Sorry guys... | How can a total, complete beginner read source code? | 0 | 0 | 1 | 1,248 |
1,854,827 | 2009-12-06T09:04:00.000 | 6 | 0 | 0 | 0 | python,coding-style,code-readability | 1,854,832 | 9 | false | 1 | 0 | I would recommend you understand the basics. What are methods, classes, variables and so on. It would be important to understand the constructs you are seeing. If you don't understand those then it's just going to be a bunch of characters. | 5 | 2 | 0 | I am a complete, total beginner in programming, although I do have knowledge of CSS and HTML.
I would like to learn Python. I downloaded lots of source code but the amount of files and the complexity really confuses me. I don't know where to begin. Is there a particular order I should look for?
Thanks.
EDIT: Sorry guys... | How can a total, complete beginner read source code? | 1 | 0 | 1 | 1,248 |
1,854,827 | 2009-12-06T09:04:00.000 | 3 | 0 | 0 | 0 | python,coding-style,code-readability | 1,973,070 | 9 | false | 1 | 0 | Donald Knuth suggests:
"It [is] basically the way you solve some kind of unknown puzzle -- make tables and charts and get a little more information here and make a hypothesis."
(From "Coders at Work", Chapter 15)
In my opinion, the easiest way to understand a program is to study the data structures first. Write them d... | 5 | 2 | 0 | I am a complete, total beginner in programming, although I do have knowledge of CSS and HTML.
I would like to learn Python. I downloaded lots of source code but the amount of files and the complexity really confuses me. I don't know where to begin. Is there a particular order I should look for?
Thanks.
EDIT: Sorry guys... | How can a total, complete beginner read source code? | 0.066568 | 0 | 1 | 1,248 |
1,854,827 | 2009-12-06T09:04:00.000 | 3 | 0 | 0 | 0 | python,coding-style,code-readability | 1,854,841 | 9 | false | 1 | 0 | There is no magic way to learn anything without reading and writing code yourself. If you get stuck there are always folks in SO who will help you. | 5 | 2 | 0 | I am a complete, total beginner in programming, although I do have knowledge of CSS and HTML.
I would like to learn Python. I downloaded lots of source code but the amount of files and the complexity really confuses me. I don't know where to begin. Is there a particular order I should look for?
Thanks.
EDIT: Sorry guys... | How can a total, complete beginner read source code? | 0.066568 | 0 | 1 | 1,248 |
1,854,827 | 2009-12-06T09:04:00.000 | 3 | 0 | 0 | 0 | python,coding-style,code-readability | 1,854,836 | 9 | false | 1 | 0 | To understand source code in any language, you first need to learn the language. It's as simple as that!
Usually, reading source code (as a sole activity) will hurt your head without giving much benefit in terms of learning the underlying language. You need a structured tour through carefully chosen small source code e... | 5 | 2 | 0 | I am a complete, total beginner in programming, although I do have knowledge of CSS and HTML.
I would like to learn Python. I downloaded lots of source code but the amount of files and the complexity really confuses me. I don't know where to begin. Is there a particular order I should look for?
Thanks.
EDIT: Sorry guys... | How can a total, complete beginner read source code? | 0.066568 | 0 | 1 | 1,248 |
1,855,748 | 2009-12-06T15:59:00.000 | 0 | 1 | 0 | 0 | javascript,python,ajax | 1,855,787 | 4 | false | 1 | 0 | Update img.src attribute in onsubmit() handler.
img.src url points to your Python script that should generate an image in response.
onsubmit() for your form could be registered and written using JQuery. | 1 | 2 | 0 | I've been researching this on and off for a number of months now, but I am incapable of finding clear direction.
My goal is to have a page which has a form on it and a graph on it. The form can be filled out and then sent to the CGI Python script (yeah, I'll move to WSGI or fast_cgi later, I'm starting simple!) I'd li... | Dynamically Refreshed Pages produced by Python | 0 | 0 | 0 | 1,212 |
1,856,786 | 2009-12-06T22:10:00.000 | 3 | 0 | 0 | 1 | python,twisted,p2p | 1,857,145 | 1 | true | 0 | 0 | Without knowing all the details of the protocol, I would still recommend using a single reactor -- a reactor scales quite well (especially advanced ones such as PollReactor) and this way you will avoid the overhead connected with threads (that's how Twisted and other async systems get their fundamental performance boos... | 1 | 3 | 0 | I'm working on writing a Python client for Direct Connect P2P networks. Essentially, it works by connecting to a central server, and responding to other users who are searching for files.
Occasionally, another client will ask us to connect to them, and they might begin downloading a file from us. This is a direct conne... | Proper way to implement a Direct Connect client in Twisted? | 1.2 | 0 | 1 | 1,176 |
1,858,117 | 2009-12-07T06:06:00.000 | 0 | 0 | 1 | 0 | python,validation,parsing,numbers | 1,858,289 | 4 | false | 0 | 0 | I haven't heard of one. Do you know of any such library for any other languages? That way you could leverage their documentation and tests.
If you can't find one, write a bunch of testcases, then we can help you fill out the parsing code.
Google must have one, try searching for 5.5billion * 10, but I don't think they... | 1 | 7 | 0 | Are there any Python libraries that help parse and validate numeric strings beyond what is supported by the built-in float() function? For example, in addition to simple numbers (1234.56) and scientific notation (3.2e15), I would like to be able to parse formats like:
Numbers with commas: 2,147,483,647
Named large num... | Flexible numeric string parsing in Python | 0 | 0 | 0 | 2,001 |
1,859,195 | 2009-12-07T10:38:00.000 | 0 | 0 | 0 | 0 | python,video,pyglet | 1,860,559 | 2 | true | 0 | 1 | I think calling "pyglet.app.run()" is missing. | 1 | 1 | 0 | I'm new to pyglet and i have a problem with video..
I'm trying to play a video using pyglet .. but instead of playing the video in the window it just exits immediately and terminates ..
do you guys have any solution for this problem how can i hold the window to play vedio??
i use windows vista 64x with python 2.5
ple... | problem with pyglet playing video | 1.2 | 0 | 0 | 4,199 |
1,859,634 | 2009-12-07T12:12:00.000 | 0 | 0 | 0 | 1 | python,web-services,google-app-engine,xmpp | 1,859,664 | 3 | false | 1 | 0 | In that situation, I would perform ajax calls every 5 minutes in example to check it.
It's easy to implement and the data exchanged can be reduced to the max (taking advantage of "fast query/response" bonifications of google-app).
Regards. | 2 | 1 | 0 | I've been looking for a way to tell clients about expired objects and AppEngine's XMPP implementation seems really interesting because it's scalable, should be reliable and can contain up to 100kb of data.
But as I understand it, before a client can listen to messages, he should have a gmail account. That's very impra... | Using AppEngine XMPP for Client Notifications | 0 | 0 | 0 | 1,077 |
1,859,634 | 2009-12-07T12:12:00.000 | 1 | 0 | 0 | 1 | python,web-services,google-app-engine,xmpp | 1,859,647 | 3 | true | 1 | 0 | No this isn't true: you can have the AppEngine robot as contact over any Jabber/XMPP based networks.
Unless you are talking about the need for a GMAIL account to create an AppEngine robot... in which case YES you need to have a Google account. | 2 | 1 | 0 | I've been looking for a way to tell clients about expired objects and AppEngine's XMPP implementation seems really interesting because it's scalable, should be reliable and can contain up to 100kb of data.
But as I understand it, before a client can listen to messages, he should have a gmail account. That's very impra... | Using AppEngine XMPP for Client Notifications | 1.2 | 0 | 0 | 1,077 |
1,859,865 | 2009-12-07T13:08:00.000 | 0 | 0 | 1 | 0 | java,python,jython | 57,640,568 | 10 | false | 0 | 0 | To achieve a good speed performance or implementing a real multithreading program, calling python script directly from java (native) is the best way. Just prepare your python script then let java do the rest for concurrent invocation into your python script. | 6 | 31 | 0 | I know Python, but what is Jython?
When will I need Jython?
What are the drawbacks?
I assume it is slow?
Please detail it out! thanks. | What is Jython and is it useful at all? | 0 | 0 | 0 | 33,340 |
1,859,865 | 2009-12-07T13:08:00.000 | 4 | 0 | 1 | 0 | java,python,jython | 1,860,018 | 10 | false | 0 | 0 | When will I need Jython?
For example to add a nice scripting language to your code.
What are the drawbacks?
The main drawback is that Jython lags behind the official CPython distribution. Currently, you can get a version of Jython that is compatible with Python 2.5.2 while CPython is at 3.1.
Also some esoteric modul... | 6 | 31 | 0 | I know Python, but what is Jython?
When will I need Jython?
What are the drawbacks?
I assume it is slow?
Please detail it out! thanks. | What is Jython and is it useful at all? | 0.07983 | 0 | 0 | 33,340 |
1,859,865 | 2009-12-07T13:08:00.000 | 5 | 0 | 1 | 0 | java,python,jython | 1,860,242 | 10 | false | 0 | 0 | Two other reasons:
Embedding scripting into large Java application.
Use Java threads to write multi-threaded programs in Jython. | 6 | 31 | 0 | I know Python, but what is Jython?
When will I need Jython?
What are the drawbacks?
I assume it is slow?
Please detail it out! thanks. | What is Jython and is it useful at all? | 0.099668 | 0 | 0 | 33,340 |
1,859,865 | 2009-12-07T13:08:00.000 | 1 | 0 | 1 | 0 | java,python,jython | 1,865,328 | 10 | false | 0 | 0 | When will I need Jython?
I need Jython to test JDBC drivers. Some of apps I use work use ODBC, some use JDBC. Using Jython I can test both type of drivers from one Python source
(to test ODBC I use JDBC-ODBC bridge). | 6 | 31 | 0 | I know Python, but what is Jython?
When will I need Jython?
What are the drawbacks?
I assume it is slow?
Please detail it out! thanks. | What is Jython and is it useful at all? | 0.019997 | 0 | 0 | 33,340 |
1,859,865 | 2009-12-07T13:08:00.000 | 9 | 0 | 1 | 0 | java,python,jython | 1,872,738 | 10 | false | 0 | 0 | If you know Python and has bought into the "pythonic" way of doing things, then Jython allows you to bring that philosophy to the JVM stack. If you do this, it is much more than just adding scripting capability.
In our latest projects, all the custom and business logic is built in Jython, at the same time we can still ... | 6 | 31 | 0 | I know Python, but what is Jython?
When will I need Jython?
What are the drawbacks?
I assume it is slow?
Please detail it out! thanks. | What is Jython and is it useful at all? | 1 | 0 | 0 | 33,340 |
1,859,865 | 2009-12-07T13:08:00.000 | 7 | 0 | 1 | 0 | java,python,jython | 1,859,971 | 10 | false | 0 | 0 | When will I need Jython?
When you want to program in Python but need (or want) to have the result run on a Java virtual machine, or use existing Java components.
What are the drawbacks.
Jython may not be 100% compatible with Python, though any incompatibility would be considered a bug. If you later want/need to run ... | 6 | 31 | 0 | I know Python, but what is Jython?
When will I need Jython?
What are the drawbacks?
I assume it is slow?
Please detail it out! thanks. | What is Jython and is it useful at all? | 1 | 0 | 0 | 33,340 |
1,860,348 | 2009-12-07T14:35:00.000 | 3 | 0 | 1 | 0 | python,virtualenv | 1,860,614 | 2 | false | 0 | 0 | Newly created virtual environment by default have access to global site-packages directory, unless created with --no-site-packages. Calling easy_install (installing new packages) with certain environment activated will cause local overwrite of already existing ones in global site-packages (similar to inheritance). Envi... | 1 | 7 | 0 | If I have a certain package installed both in the global site-packages and in the local one, which package will get imported? Will that even work or will I get an error?
Which packages should I put in the global site-packages and which in the local one? | Virtualenv: global site-packages vs the site-packages in the virtual environment | 0.291313 | 0 | 0 | 3,915 |
1,861,267 | 2009-12-07T16:52:00.000 | 1 | 0 | 0 | 0 | python,django,django-cms | 1,872,391 | 1 | true | 1 | 0 | This all depends on your model. Plugins use standard django admin features.
This also depends on the source data for the table.
If you have a CSV or Exel sheet as source i only would make a file field and render the file in the render function with some optional caching.
If you want to enter data by hand:
A Table mode... | 1 | 1 | 0 | I don't see any possibility for creating a table in django-cms. I need this functionnality so I am evaluating the possibility to write my own plugin.
I am getting started with this product. I've read the documentation carefully and I see more or less how to do that.
However, I would be happy to hear some tips and trick... | Writing my own django-cms plugin. Any recommendations? | 1.2 | 0 | 0 | 1,710 |
1,861,457 | 2009-12-07T17:21:00.000 | 1 | 0 | 1 | 0 | java,python,concurrency,python-stackless | 1,861,594 | 11 | false | 0 | 0 | For some tasks, Python is too slow. Your single thread Java program could be faster than the concurrent version of Python on a multi-core computer...
I'd like to use Java or Scala, F# or simply go to C++(MPI and OpenMPI). | 3 | 9 | 0 | Also, if not python or java, then would you more generally pick a statically-typed language or a dynamic-type language? | Python vs. Java -- Which would you pick to do concurrent programming and why? | 0.01818 | 0 | 0 | 16,957 |
1,861,457 | 2009-12-07T17:21:00.000 | 1 | 0 | 1 | 0 | java,python,concurrency,python-stackless | 1,862,045 | 11 | false | 0 | 0 | I'd look at Objective-C and the Foundation Framework. Asynchronous, concurrent programming is well provided for.
This of course depends on your access to Apple's Developer Tools or GnuStep, but if you have access to either one it's a good route to take with concurrent programming. | 3 | 9 | 0 | Also, if not python or java, then would you more generally pick a statically-typed language or a dynamic-type language? | Python vs. Java -- Which would you pick to do concurrent programming and why? | 0.01818 | 0 | 0 | 16,957 |
1,861,457 | 2009-12-07T17:21:00.000 | 2 | 0 | 1 | 0 | java,python,concurrency,python-stackless | 1,861,532 | 11 | false | 0 | 0 | I would use Java, via Jython. Java has strong thread capabilities, and it can be written using the Python syntax with Jython, so you got the best of the two worlds.
Python itself is not really good with concurrency, and is slower than Java anyway.
But if you have concurrency issues and free hands, I'd have a look at Er... | 3 | 9 | 0 | Also, if not python or java, then would you more generally pick a statically-typed language or a dynamic-type language? | Python vs. Java -- Which would you pick to do concurrent programming and why? | 0.036348 | 0 | 0 | 16,957 |
1,862,782 | 2009-12-07T20:47:00.000 | 0 | 0 | 1 | 0 | python,regex | 1,864,066 | 3 | false | 0 | 0 | If you have not figured it out yet, I recommend trying [python_root]/tools/scripts/redemo.py It is a nice testing area. | 1 | 1 | 0 | One rule that I need is that if the last vowel (aeiou) of a string is before a character from the set ('t','k','s','tk'), then a : needs to be added right after the vowel.
So, in Python if I have the string "orchestras" I need a rule that will turn it into "orchestra:s"
edit: The (t, k, s, tk) would be the final charac... | Regular Expression search/replace help needed, Python | 0 | 0 | 0 | 253 |
1,865,262 | 2009-12-08T07:33:00.000 | 6 | 0 | 1 | 0 | python,programming-languages | 1,865,329 | 8 | false | 0 | 0 | By explicit, do you mean "explicitly passed as an argument to each class function"?
If so, then Python is the only one I know off-hand.
Most OO languages support this or self in some form, but most of them let you define class functions without always defining self as the first argument. | 3 | 4 | 0 | It seems a bit weird that Python requires you to explicitly pass self as the first argument to all class functions. Are there other languages that require something similar? | What languages other than Python have an explicit self? | 1 | 0 | 0 | 467 |
1,865,262 | 2009-12-08T07:33:00.000 | 0 | 0 | 1 | 0 | python,programming-languages | 1,865,411 | 8 | false | 0 | 0 | many object oriented languages if not all of them
for example c++ support "this" instead of "self"
but you dont have to pass it, it is passed passively
hope that helps ;) | 3 | 4 | 0 | It seems a bit weird that Python requires you to explicitly pass self as the first argument to all class functions. Are there other languages that require something similar? | What languages other than Python have an explicit self? | 0 | 0 | 0 | 467 |
1,865,262 | 2009-12-08T07:33:00.000 | 4 | 0 | 1 | 0 | python,programming-languages | 1,865,386 | 8 | false | 0 | 0 | Depending on your point of view, Lua. To quote the reference: "A call v:name(args) is syntactic sugar for v.name(v,args), except that v is evaluated only once." You can also define methods using either notation. So you could say that Lua has an optional explicit self. | 3 | 4 | 0 | It seems a bit weird that Python requires you to explicitly pass self as the first argument to all class functions. Are there other languages that require something similar? | What languages other than Python have an explicit self? | 0.099668 | 0 | 0 | 467 |
1,865,581 | 2009-12-08T08:45:00.000 | 1 | 0 | 1 | 0 | python,blender | 2,582,123 | 1 | false | 0 | 0 | your grammar is really bad but i think i understand what you are asking. When you use a camera you have to zoom in until the box fills your screen. | 1 | 0 | 0 | i try to create car's type game, but when i choose camera view , a view is not real every building have miss shape its look like perspective view .So i finding how to config it | How to setting Camera options in Blender | 0.197375 | 0 | 0 | 279 |
1,867,357 | 2009-12-08T14:33:00.000 | 2 | 0 | 0 | 1 | python,linux,file,filesystems,ext2 | 1,867,399 | 7 | false | 0 | 0 | Most reliable would be create a wrapping class which would check file's size when you open it, track write and seek operations, count current size based on those operations and prevent from exceeding size limit. | 1 | 12 | 0 | There's a file that I would like to make sure does not grow larger than 2 GB (as it must run on a system that uses ext 2). What's a good way to check a file's size bearing in mind that I will be writing to this file in between checks? In particular, do I need to worry about buffered, unflushed changes that haven't be... | How do I determine an open file's size in Python? | 0.057081 | 0 | 0 | 11,581 |
1,868,879 | 2009-12-08T18:22:00.000 | 1 | 0 | 1 | 0 | python,software-design | 1,869,817 | 18 | false | 0 | 0 | Wow, I wonder why nobody said until now that U really should not go too deep into theory. After one year Ur code is ugly. Nothing to do about it. If U get most things done U want to finish, it is already very awesome. But U cannot cheat Ur brain with theory. Just go on writing and be angry about Ur code. That is the be... | 5 | 15 | 0 | I've been programming for around a year now, and all the stuff that I've written works - it's just extremely poorly written from my point of view. I'd like to know if there are any (free) good books on Software Design out there that can offer a little guidance to the beginning programmer? I don't think I'd have as many... | Design principles for complete noobs? | 0.011111 | 0 | 0 | 2,727 |
1,868,879 | 2009-12-08T18:22:00.000 | 2 | 0 | 1 | 0 | python,software-design | 1,869,761 | 18 | false | 0 | 0 | The best way to learn good software design is to write code in a bunch of different ways, read code written by others, and learn what works and what doesn't first-hand.
When you are writing code, ask the following questions:
How will I test it?
How will I debug it?
What do I find myself doing over and over again?
I'm... | 5 | 15 | 0 | I've been programming for around a year now, and all the stuff that I've written works - it's just extremely poorly written from my point of view. I'd like to know if there are any (free) good books on Software Design out there that can offer a little guidance to the beginning programmer? I don't think I'd have as many... | Design principles for complete noobs? | 0.022219 | 0 | 0 | 2,727 |
1,868,879 | 2009-12-08T18:22:00.000 | 1 | 0 | 1 | 0 | python,software-design | 1,869,151 | 18 | false | 0 | 0 | Learn a different language! I love python, and, despite what everyone says, my python is better because I know java. (Some people complain that starting with java causes one to initially write clunky python, but if you already know more or less the easy way to do something in python, you will be safe from this.)
Let ... | 5 | 15 | 0 | I've been programming for around a year now, and all the stuff that I've written works - it's just extremely poorly written from my point of view. I'd like to know if there are any (free) good books on Software Design out there that can offer a little guidance to the beginning programmer? I don't think I'd have as many... | Design principles for complete noobs? | 0.011111 | 0 | 0 | 2,727 |
1,868,879 | 2009-12-08T18:22:00.000 | 0 | 0 | 1 | 0 | python,software-design | 1,869,025 | 18 | false | 0 | 0 | Forget the books. In my experience (which includes time as an instructor and writer of OO design courses) some people can do design and some pople can't - it's a talent, like being a sculptor. At best, reading books on the subject will enable you to design badly, if you don't have the talent. | 5 | 15 | 0 | I've been programming for around a year now, and all the stuff that I've written works - it's just extremely poorly written from my point of view. I'd like to know if there are any (free) good books on Software Design out there that can offer a little guidance to the beginning programmer? I don't think I'd have as many... | Design principles for complete noobs? | 0 | 0 | 0 | 2,727 |
1,868,879 | 2009-12-08T18:22:00.000 | 0 | 0 | 1 | 0 | python,software-design | 1,868,911 | 18 | false | 0 | 0 | Get the Gang of four book - Design Patterns..
But please don't over follow it and try to use Singleton everywhere :)
Just know it and use it wisely. Also after that look into good open source code and try to learn from their structures.. I suggest google code and sourceforge | 5 | 15 | 0 | I've been programming for around a year now, and all the stuff that I've written works - it's just extremely poorly written from my point of view. I'd like to know if there are any (free) good books on Software Design out there that can offer a little guidance to the beginning programmer? I don't think I'd have as many... | Design principles for complete noobs? | 0 | 0 | 0 | 2,727 |
1,870,140 | 2009-12-08T21:59:00.000 | 0 | 0 | 1 | 0 | python,google-app-engine,cron | 1,870,164 | 4 | false | 1 | 0 | Can you use cron to schedule the job to run at certain intervals? It's usually considered better than infinite loops, and was designed to help solve this sort of problem. | 1 | 1 | 0 | Question for Python 2.6
I would like to create an simple web application which in specified time interval will run a script that modifies the data (in database). My problem is code for infinity loop or some other method to achieve this goal. The script should be run only once by the user. Next iterations should run aut... | Render in infinity loop | 0 | 0 | 0 | 283 |
1,870,383 | 2009-12-08T22:36:00.000 | 0 | 0 | 0 | 0 | python,xml,excel,csv | 1,870,411 | 3 | false | 0 | 0 | Reformat it as CSV. It's dead easy to do, is fairly human readable, and can be read by loads of pieces of spreadsheet software. | 1 | 0 | 0 | I have a Python script gathering info from some remote network devices. The output can be maybe 20 to 1000 lines of text. This then goes into excel on my local PC for now.
Now access to this Linux device is convoluted, a citrix session to a remote windows server then ssh to the Linux device half way around the world. T... | Python to generate output ready for Excel | 0 | 0 | 1 | 720 |
1,871,549 | 2009-12-09T04:18:00.000 | 5 | 0 | 1 | 1 | python,virtualenv | 57,109,196 | 15 | false | 0 | 0 | Easiest way is to just run: which python, if you are in a virtualenv it will point to its python instead of the global one | 3 | 397 | 0 | Is it possible to determine if the current script is running inside a virtualenv environment? | Determine if Python is running inside virtualenv | 0.066568 | 0 | 0 | 237,037 |
1,871,549 | 2009-12-09T04:18:00.000 | 9 | 0 | 1 | 1 | python,virtualenv | 51,409,948 | 15 | false | 0 | 0 | You can do which python and see if its pointing to the one in virtual env. | 3 | 397 | 0 | Is it possible to determine if the current script is running inside a virtualenv environment? | Determine if Python is running inside virtualenv | 1 | 0 | 0 | 237,037 |
1,871,549 | 2009-12-09T04:18:00.000 | 204 | 0 | 1 | 1 | python,virtualenv | 38,939,054 | 15 | false | 0 | 0 | Try using pip -V (notice capital V)
If you are running the virtual env. it'll show the path to the env.'s location. | 3 | 397 | 0 | Is it possible to determine if the current script is running inside a virtualenv environment? | Determine if Python is running inside virtualenv | 1 | 0 | 0 | 237,037 |
1,871,672 | 2009-12-09T05:01:00.000 | 6 | 0 | 1 | 0 | python,design-patterns,oop,pygame | 1,871,698 | 3 | false | 0 | 1 | If this is your first Pygame application, don't spend time worrying about "object oriented design patterns for managing levels". What you need to do now is to figure out how to make Pygame do what you want it to do.
Can you display everything you want to?
Is your display flicker-free?
Can you read the user input contr... | 3 | 3 | 0 | Hey--I'm trying to design my first game using the Pygame library for Python, and I was wondering what the best practices are for level design in general. I would love to hear what you guys think are good object oriented design patterns for managing levels. Also, I'm fairly new to Python--thanks! | Level Design in Pygame | 1 | 0 | 0 | 5,646 |
1,871,672 | 2009-12-09T05:01:00.000 | 1 | 0 | 1 | 0 | python,design-patterns,oop,pygame | 1,871,700 | 3 | false | 0 | 1 | Generally speaking, a simple way to do it is using matrices (or multidimensional arrays - they work the same way here).
Basically, each Map is an Array, with each item in the array being a square on the grid.
For example a 3 by 3 grid would be as follows:
(Psuedocode)
var Map = [[1,2,3][1,2,3][1,2,3]];
In place of num... | 3 | 3 | 0 | Hey--I'm trying to design my first game using the Pygame library for Python, and I was wondering what the best practices are for level design in general. I would love to hear what you guys think are good object oriented design patterns for managing levels. Also, I'm fairly new to Python--thanks! | Level Design in Pygame | 0.066568 | 0 | 0 | 5,646 |
1,871,672 | 2009-12-09T05:01:00.000 | 7 | 0 | 1 | 0 | python,design-patterns,oop,pygame | 1,873,480 | 3 | true | 0 | 1 | With this type of game your maps are in terms of tiles (I'm assuming that by level you mean an individual level, not managing all of your levels). Each tile has
an associated picture (what it looks like on the display)
a type (ie, a wall, the ground, a trap, etc.)
When I create tile-based games in Pygame, I usually h... | 3 | 3 | 0 | Hey--I'm trying to design my first game using the Pygame library for Python, and I was wondering what the best practices are for level design in general. I would love to hear what you guys think are good object oriented design patterns for managing levels. Also, I'm fairly new to Python--thanks! | Level Design in Pygame | 1.2 | 0 | 0 | 5,646 |
1,873,806 | 2009-12-09T13:15:00.000 | 1 | 0 | 0 | 0 | python,django | 40,871,533 | 10 | false | 1 | 0 | Once the url pattern is added as shown in Ciro Santilli's answer, a quick way to allow users to change passwords is to give them "staff access" for the admin functions. If you don't add them to any groups or give them special permissions, they can still change their password by going to the example.com/admin page. Th... | 2 | 93 | 0 | Can any one point me to code where users can change their own passwords in Django? | How to allow users to change their own passwords in Django? | 0.019997 | 0 | 0 | 92,604 |
1,873,806 | 2009-12-09T13:15:00.000 | 26 | 0 | 0 | 0 | python,django | 1,873,933 | 10 | false | 1 | 0 | You can also just use the django.contrib.auth.views.password_change view in your URLconf. It uses a default form and template; supplying your own is optional. | 2 | 93 | 0 | Can any one point me to code where users can change their own passwords in Django? | How to allow users to change their own passwords in Django? | 1 | 0 | 0 | 92,604 |
1,876,908 | 2009-12-09T21:11:00.000 | 0 | 0 | 0 | 0 | python,google-wave | 1,932,852 | 2 | false | 1 | 0 | At the moment the answer is that i can't be done. Hopefully in a future version of the Api. | 1 | 1 | 0 | I'm working on a small wave thingy where i need to load a wave based on an outside event. So i don't have a context to work with.
I've been looking at the python api for a while but i can't figure out the correct way to get a wave object (that i can then call CreateBlip() on) when i just have the waveid.
Is there somet... | Loading a wave from waveid | 0 | 0 | 1 | 95 |
1,877,238 | 2009-12-09T22:04:00.000 | 2 | 0 | 1 | 0 | powershell,ironpython,etl,fileparsing | 1,877,311 | 2 | false | 0 | 0 | Depending on the complexity and variability of your work, you should consider an ETL tool like SSIS (SQL Server Integration Services). | 1 | 0 | 0 | I am looking for the best solution for custom file parsing for our enterprise import routines. I want to basically change one file format into a standard file format and have one routine that imports that data into the database. I need to be able to create custom scripts for each client since its difficult to get the c... | What is the best file parsing solution for converting files? | 0.197375 | 0 | 0 | 2,314 |
1,877,402 | 2009-12-09T22:32:00.000 | 1 | 0 | 0 | 0 | python,drag-and-drop,wxpython | 1,935,002 | 2 | false | 0 | 1 | IMO the best way is, Panel should bind to control's wx.EVT_LEFT_DOWN and drag only when special key combination e.g. cntrl-alt-d are pressed
Panel can do it recursively or have a function in Panel, addControl and only such control will be hooked.
Your point that "individual controls may already be using that event for ... | 1 | 0 | 0 | I have a wxPython program where I want to be able to drag groups of controls around to reorder them. Each group of controls is on a panel, and I want the panel object to handle the drag-and-drop.
Currently it works if you click and drag on the panel itself, but it doesn't work if you click on any control inside the pa... | wxPython: Handling drag-and-drop in a parent object - problem with event propagation | 0.099668 | 0 | 0 | 1,099 |
1,878,353 | 2009-12-10T02:49:00.000 | 3 | 0 | 0 | 0 | python,qt,pyqt4 | 1,879,368 | 1 | false | 0 | 1 | There is no signal emitted on first display, instead, you will have to intercept the first resizeEvent or paintEvent by overloading these methods (as you don't want to initialize from the __init__ method).
Another option would be to add your own showAndInit method, that initializes and then calls show. | 1 | 1 | 0 | I have an application in which I would like to connect whatever signal is emitted when a pyqt4 dialog is displayed in order to do execute an initial method. I don't want the method to be called in the __init__ method for a number of reasons. I've spent quite some time searching but I have yet to find an answer. I'm sur... | What signal can be connected to an initial dialog display in pyqt4 (qt) | 0.53705 | 0 | 0 | 114 |
1,879,113 | 2009-12-10T06:52:00.000 | 4 | 0 | 0 | 1 | python,enterprise | 1,879,157 | 5 | false | 1 | 0 | The larger your investment in an existing technology is, the more expensive it is to move away from it. COBOL is perhaps the best example here.
That investment isn't just in porting existing solutions, but also in retraining or hiring new staff so that you have the skill sets to build and support the new technologies e... | 3 | 9 | 0 | This will not be a "programming" question but more technology / platform related question. I'm trying to figure out whether Python can be a suitable Java alternative for enterprise / web applications.
Which are the ideal cases where you would prefer to use Python instead of Java? How would a typical Python web applica... | A business Case for Enterprise Python | 0.158649 | 0 | 0 | 2,483 |
1,879,113 | 2009-12-10T06:52:00.000 | 0 | 0 | 0 | 1 | python,enterprise | 1,880,411 | 5 | false | 1 | 0 | There is -- almost -- no usable "Business Case" for any technology choice.
"what about a large MNC that already has a lot invested in Java" Ask around. See if there's a business case for Java.
I doubt you'll find anything. Most companies drift into technology choices slowly.
There was no business case for COBOL -- i... | 3 | 9 | 0 | This will not be a "programming" question but more technology / platform related question. I'm trying to figure out whether Python can be a suitable Java alternative for enterprise / web applications.
Which are the ideal cases where you would prefer to use Python instead of Java? How would a typical Python web applica... | A business Case for Enterprise Python | 0 | 0 | 0 | 2,483 |
1,879,113 | 2009-12-10T06:52:00.000 | 1 | 0 | 0 | 1 | python,enterprise | 2,506,203 | 5 | false | 1 | 0 | The answer to your question is yes. Python can be well suited for Enterprise because python is a language which has raw power, flexible and can be glued with other programming languages. What enterprise really requires is a language which does everything and i feel python is already enterprise ready. If you want exampl... | 3 | 9 | 0 | This will not be a "programming" question but more technology / platform related question. I'm trying to figure out whether Python can be a suitable Java alternative for enterprise / web applications.
Which are the ideal cases where you would prefer to use Python instead of Java? How would a typical Python web applica... | A business Case for Enterprise Python | 0.039979 | 0 | 0 | 2,483 |
1,879,872 | 2009-12-10T09:42:00.000 | 2 | 0 | 0 | 0 | jquery,python,ajax,django,django-templates | 1,879,991 | 3 | false | 1 | 0 | Since you're already using an AJAX post, why don't you return the data from that and insert it into the div? The view that accepts the post can return a rendered template or JSON, and your javascript can insert it in the callback. | 1 | 8 | 0 | I am building a chat application. So far I am adding chat messages with jquery $.post() and this works fine.
Now I need to retrieve the latest chat message from the table and append the list on the chat page.
I am new to Django, so please go slow.
So how do I get data from the chat table back to the chat page?
Thanks i... | DJANGO : Update div with AJAX | 0.132549 | 0 | 0 | 5,349 |
1,879,914 | 2009-12-10T09:50:00.000 | 1 | 0 | 0 | 0 | python,string,unpack | 1,880,427 | 5 | false | 0 | 0 | Is this the best way of doing this or is there a better way
It is likely that there will be strings with other formats which will require a different unpacking scheme
field1 = struct.unpack('B',data[0])
field2 = struct.unpack('B',data[1])
field3 = struct.unpack('!I',data[2:6])
field4 = struct.unpack('!H',data[6:8])
fie... | 1 | 5 | 0 | What would the best way of unpacking a python string into fields
I have data received from a tcp socket, it is packed as follows, I believe it will be in a string from the socket recv function
It has the following format
uint8 - header
uint8 - length
uint32 - typeID
uint16 -param1
uint16 -param2
uint16 -param3
uint16 -... | Decoding packed data into a structure | 0.039979 | 0 | 1 | 11,515 |
1,880,746 | 2009-12-10T12:42:00.000 | 0 | 0 | 0 | 1 | python,apache,upgrade,sys.path | 1,881,774 | 3 | false | 0 | 0 | On RH box Apache probably runs as root user. Login as root and see which version of python root sees.
HIH
..richie | 2 | 2 | 0 | On a Red hat box, I upgraded Python from 2.3 to 2.6.4 and changed the symlink to python so when I type in python the 2.6.4 interpreter comes up.
However my .py file works from the command-line, but not in the browser. It seemed like a sys.path issue so I opened the file in a browser and printed out sys.path.
Surprising... | How to upgrade the version of Python used by Apache? | 0 | 0 | 0 | 2,824 |
1,880,746 | 2009-12-10T12:42:00.000 | 1 | 0 | 0 | 1 | python,apache,upgrade,sys.path | 1,882,006 | 3 | false | 0 | 0 | Apache isn't calling python directly, so the path is irrelevant. You will probably want to build yourself a new mod_wsgi to link against python 2.6.4. | 2 | 2 | 0 | On a Red hat box, I upgraded Python from 2.3 to 2.6.4 and changed the symlink to python so when I type in python the 2.6.4 interpreter comes up.
However my .py file works from the command-line, but not in the browser. It seemed like a sys.path issue so I opened the file in a browser and printed out sys.path.
Surprising... | How to upgrade the version of Python used by Apache? | 0.066568 | 0 | 0 | 2,824 |
1,881,851 | 2009-12-10T15:41:00.000 | 0 | 0 | 0 | 0 | python,c | 1,881,867 | 7 | false | 0 | 0 | take a look at module struct ? | 1 | 1 | 1 | I have a python code computing a matrix, and I would like to use this matrix (or array, or list) from C code.
I wanted to pickle the matrix from the python code, and unpickle it from c code, but I could not find documentation or example on how to do this.
I found something about marshalling data, but nothing about unpi... | How to unpickle from C code | 0 | 0 | 0 | 1,690 |
1,883,098 | 2009-12-10T18:39:00.000 | 0 | 0 | 0 | 0 | python,django,excel | 1,937,261 | 4 | false | 1 | 0 | You need to use Excel to calculate the results? I mean, maybe you could run the Excel sheet from OpenOffice and use a pyUNO macro, which is somehow "native" python.
A different approach will be to create a macro to generate some more friendly code to python, if you want Excel to perform the calculation is easy you end... | 1 | 2 | 0 | I have an Excel spreadsheet with calculations I would like to use in a Django web application. I do not need to present the spreadsheet as it appears in Excel. I only want to use the formulae embedded in it. What is the best way to do this? | Importing Excel sheets, including formulae, into Django | 0 | 1 | 0 | 1,592 |
1,883,118 | 2009-12-10T18:41:00.000 | 4 | 1 | 0 | 0 | python,portability | 1,883,501 | 7 | false | 0 | 0 | If you deal with binary file formats in Python, note that the struct and array modules uses machine dependent size and endianness. struct can be used portably by always using < or > in the format string. array can't. It will probably be portable for arrays of bytes, but the documentation makes no such guarantee. | 4 | 4 | 0 | I thought it would be a good idea to compile a list of things to watch out for when making a Python app portable. There are a lot of subtle 'gotchas' in portability that are only discovered through experience and thorough testing; there needs to be some sort of list addressing the more common ones.
Please post one gotc... | Big List Of Portability in Python | 0.113791 | 0 | 0 | 2,875 |
1,883,118 | 2009-12-10T18:41:00.000 | 2 | 1 | 0 | 0 | python,portability | 1,883,350 | 7 | false | 0 | 0 | Getting away from the syntax side of things, I think the biggest thing to watch out for is that typically when people think of python, they might not think of all the libraries it is composed of.
Many python packages depend on C libraries which may or may not be cross platform compatible. In addition, Python runs unde... | 4 | 4 | 0 | I thought it would be a good idea to compile a list of things to watch out for when making a Python app portable. There are a lot of subtle 'gotchas' in portability that are only discovered through experience and thorough testing; there needs to be some sort of list addressing the more common ones.
Please post one gotc... | Big List Of Portability in Python | 0.057081 | 0 | 0 | 2,875 |
1,883,118 | 2009-12-10T18:41:00.000 | 1 | 1 | 0 | 0 | python,portability | 1,883,137 | 7 | false | 0 | 0 | I'll start off:
Windows uses backslashes for path separators --> '\'
Unix uses forward slashes for path separators --> '/'
The os module comes with os.sep, which contains the path separator for the current platform that the script is being run on. Use os.sep instead of forward or back slashes. os.path.join will join tw... | 4 | 4 | 0 | I thought it would be a good idea to compile a list of things to watch out for when making a Python app portable. There are a lot of subtle 'gotchas' in portability that are only discovered through experience and thorough testing; there needs to be some sort of list addressing the more common ones.
Please post one gotc... | Big List Of Portability in Python | 0.028564 | 0 | 0 | 2,875 |
1,883,118 | 2009-12-10T18:41:00.000 | 2 | 1 | 0 | 0 | python,portability | 1,883,817 | 7 | false | 0 | 0 | Some modules are not cross-platform. Two that come to mind are both curses (Linux) and msvcrt (Windows). The fix to this simple problem is simply not to use them but find an alternative instead. | 4 | 4 | 0 | I thought it would be a good idea to compile a list of things to watch out for when making a Python app portable. There are a lot of subtle 'gotchas' in portability that are only discovered through experience and thorough testing; there needs to be some sort of list addressing the more common ones.
Please post one gotc... | Big List Of Portability in Python | 0.057081 | 0 | 0 | 2,875 |
1,883,322 | 2009-12-10T19:21:00.000 | 9 | 0 | 0 | 0 | python,django,design-patterns,django-models,django-managers | 1,883,526 | 4 | false | 1 | 0 | I always place mine in managers.py. If you have a circular import issue remember that a) You can reference the model class for a manager at self.model, and b) You can do imports inside of functions. | 3 | 25 | 0 | This is a pretty simple django patterns question. My manager code usually lives in models.py, but what happens when models.py is really huge? Is there any other alternative pattern to letting your manager code live in models.py for maintainability and to avoid circular imports?
A question may be asked as to why models.... | Where should django manager code live? | 1 | 0 | 0 | 4,377 |
1,883,322 | 2009-12-10T19:21:00.000 | 32 | 0 | 0 | 0 | python,django,design-patterns,django-models,django-managers | 1,883,460 | 4 | true | 1 | 0 | I prefer to keep my models in models.py and managers in managers.py (forms in forms.py) all within the same app. For more generic managers, I prefer to keep them in core.managers if they can be re-used for other apps. In some of our larger apps with models/modelname.py that will contains a manager and the model code ... | 3 | 25 | 0 | This is a pretty simple django patterns question. My manager code usually lives in models.py, but what happens when models.py is really huge? Is there any other alternative pattern to letting your manager code live in models.py for maintainability and to avoid circular imports?
A question may be asked as to why models.... | Where should django manager code live? | 1.2 | 0 | 0 | 4,377 |
1,883,322 | 2009-12-10T19:21:00.000 | 4 | 0 | 0 | 0 | python,django,design-patterns,django-models,django-managers | 1,883,342 | 4 | false | 1 | 0 | What I did when building Django apps was to create a [modelname].py file with just the specific model code, manager code and sometimes form code and used an __init__.py file to import then all in the models directory. This helped me atleast in keeping it managable. | 3 | 25 | 0 | This is a pretty simple django patterns question. My manager code usually lives in models.py, but what happens when models.py is really huge? Is there any other alternative pattern to letting your manager code live in models.py for maintainability and to avoid circular imports?
A question may be asked as to why models.... | Where should django manager code live? | 0.197375 | 0 | 0 | 4,377 |
1,883,455 | 2009-12-10T19:41:00.000 | 8 | 1 | 0 | 0 | java,python | 1,883,690 | 9 | false | 0 | 1 | Java and C# will be less of a step away from Python than would C or C++ because Java, C#, and Python all have automatic memory management. A good Java book is Thinking in Java by Bruce Eckel. It starts at an introductory level, but also has a lot of depth.
The big difference with the language coming from Python is the ... | 5 | 20 | 0 | I have been programming in Python for a while now, and I'd like to learn a more "hireable" language like Java or the C/C++/C# family. I'm acquainted with (though not necessarily good at) all of them. I'm leaning towards Java because it runs just about everywhere, and I'd like to start developing for the Android.
Comin... | Learn Java from Python background | 1 | 0 | 0 | 18,209 |
1,883,455 | 2009-12-10T19:41:00.000 | 0 | 1 | 0 | 0 | java,python | 1,883,538 | 9 | false | 0 | 1 | I don't think you should use a special way to learn Java because you know Python. Just start with HelloWorld.java and move on step by step. Your basic skills in programming will help you. | 5 | 20 | 0 | I have been programming in Python for a while now, and I'd like to learn a more "hireable" language like Java or the C/C++/C# family. I'm acquainted with (though not necessarily good at) all of them. I'm leaning towards Java because it runs just about everywhere, and I'd like to start developing for the Android.
Comin... | Learn Java from Python background | 0 | 0 | 0 | 18,209 |
1,883,455 | 2009-12-10T19:41:00.000 | 0 | 1 | 0 | 0 | java,python | 1,884,743 | 9 | false | 0 | 1 | I suppose one could ease his/her way into .NET and Java by starting with IronPython and Jython respectively. This will not teach you the new language syntax but open up respective libraries so you can explore what is "out there", learn development tools, build process etc. Syntax is by far the easiest to switch but the... | 5 | 20 | 0 | I have been programming in Python for a while now, and I'd like to learn a more "hireable" language like Java or the C/C++/C# family. I'm acquainted with (though not necessarily good at) all of them. I'm leaning towards Java because it runs just about everywhere, and I'd like to start developing for the Android.
Comin... | Learn Java from Python background | 0 | 0 | 0 | 18,209 |
1,883,455 | 2009-12-10T19:41:00.000 | 0 | 1 | 0 | 0 | java,python | 1,883,705 | 9 | false | 0 | 1 | 1) It depends what you would do with an "hireable" language. For instance, if you were interested in programming web applications and distributed/client/server app, Java would be a good choice.
C# is maybe a bit less client / server oriented, and maybe more valuable for small non IT companies and for most retail softw... | 5 | 20 | 0 | I have been programming in Python for a while now, and I'd like to learn a more "hireable" language like Java or the C/C++/C# family. I'm acquainted with (though not necessarily good at) all of them. I'm leaning towards Java because it runs just about everywhere, and I'd like to start developing for the Android.
Comin... | Learn Java from Python background | 0 | 0 | 0 | 18,209 |
1,883,455 | 2009-12-10T19:41:00.000 | 9 | 1 | 0 | 0 | java,python | 1,883,585 | 9 | false | 0 | 1 | I would take a project you've implemented in Python and try converting it to Java. Since you already know basic programming fundamentals, it'll probably be easier if you take things you know how to do and figure out how you'd do the same sort of operations in Java (or whatever new language you want to learn).
In the e... | 5 | 20 | 0 | I have been programming in Python for a while now, and I'd like to learn a more "hireable" language like Java or the C/C++/C# family. I'm acquainted with (though not necessarily good at) all of them. I'm leaning towards Java because it runs just about everywhere, and I'd like to start developing for the Android.
Comin... | Learn Java from Python background | 1 | 0 | 0 | 18,209 |
1,885,594 | 2009-12-11T03:19:00.000 | 6 | 0 | 0 | 0 | python,django,hosting,shared,vps | 1,885,629 | 6 | false | 1 | 0 | Django runs on GoogleAppEngine but php doesn't.
Your Django code will have to use Google's datastore models instead of Django's usual ORM, so there is some tie in to GAE - if you decide you want to host your own app later on it could be quite a lot of work.
If you go with a VPS obviously you can run Django and php toge... | 3 | 12 | 0 | I am new to web development and everything involved with it. Im finishing my website in django and i will soon have to find a hosting and deploy it. I heard there are vps or shared hosting types. So here are the questions:
1. How many visits/clicks per day make it worth choosing vps? shared?
2. How hard is it to tune a... | Django: vps or shared hosting? | 1 | 0 | 0 | 5,421 |
1,885,594 | 2009-12-11T03:19:00.000 | 3 | 0 | 0 | 0 | python,django,hosting,shared,vps | 1,885,597 | 6 | false | 1 | 0 | Should i know something else to make a decision?
Django (albeit a subset) runs on Google AppEngine:
free for starters and pay as you grow.
auto-scale
resilient (backups are "automatic" i.e. datastore)
The drawback of course is you only have Python and Java as options... | 3 | 12 | 0 | I am new to web development and everything involved with it. Im finishing my website in django and i will soon have to find a hosting and deploy it. I heard there are vps or shared hosting types. So here are the questions:
1. How many visits/clicks per day make it worth choosing vps? shared?
2. How hard is it to tune a... | Django: vps or shared hosting? | 0.099668 | 0 | 0 | 5,421 |
1,885,594 | 2009-12-11T03:19:00.000 | 7 | 0 | 0 | 0 | python,django,hosting,shared,vps | 1,886,390 | 6 | true | 1 | 0 | I've been using Webfaction for shared hosting of Django. The price is pretty decent, they have good forums, and have a nice web-based interface to help get you setup. Despite the web interface, it doesn't impede you from having full control over your site form the command line. You can host all sorts of things, from ... | 3 | 12 | 0 | I am new to web development and everything involved with it. Im finishing my website in django and i will soon have to find a hosting and deploy it. I heard there are vps or shared hosting types. So here are the questions:
1. How many visits/clicks per day make it worth choosing vps? shared?
2. How hard is it to tune a... | Django: vps or shared hosting? | 1.2 | 0 | 0 | 5,421 |
1,886,090 | 2009-12-11T06:00:00.000 | 12 | 0 | 1 | 0 | python,multithreading,python-multithreading,exit-code | 1,891,891 | 13 | false | 0 | 0 | If you were calling join() to wait for the thread to complete, you could simply attach the result to the Thread instance itself and then retrieve it from the main thread after the join() returns.
On the other hand, you don't tell us how you intend to discover that the thread is done and that the result is available. ... | 1 | 69 | 0 | How do I get a thread to return a tuple or any value of my choice back to the parent in Python? | Return value from thread | 1 | 0 | 0 | 97,583 |
1,886,192 | 2009-12-11T06:29:00.000 | 0 | 1 | 1 | 0 | python,pylons | 1,894,559 | 4 | false | 0 | 0 | You should check in development.ini. Most developers are smart enough to realize that if they want to run your application they need to make some tweaks. The development.ini will serve as a template. A file that has the database configured incorrectly is still useful since I can see that the system is trying to connect... | 4 | 1 | 0 | I'm learning about Pylons and I've read a few tutorials, but none of them have addressed collaboration practices. Starting on a practice project. I'd like to keep my code in a revision-control system (Git, specifically) as if it were an open-source project with multiple developers, in order to practice that aspect of ... | Should Pylons' development.ini be checked in? | 0 | 0 | 0 | 358 |
1,886,192 | 2009-12-11T06:29:00.000 | 2 | 1 | 1 | 0 | python,pylons | 1,891,883 | 4 | false | 0 | 0 | On a team development, we make an effort to ensure everyone has a common development environment, or we make adjustments to things (like database URLs) to allow people on different environments (we do Mac, Windows, and Linux) to share all files.
And our Pylons development.ini files are committed to subversion, just lik... | 4 | 1 | 0 | I'm learning about Pylons and I've read a few tutorials, but none of them have addressed collaboration practices. Starting on a practice project. I'd like to keep my code in a revision-control system (Git, specifically) as if it were an open-source project with multiple developers, in order to practice that aspect of ... | Should Pylons' development.ini be checked in? | 0.099668 | 0 | 0 | 358 |
1,886,192 | 2009-12-11T06:29:00.000 | 2 | 1 | 1 | 0 | python,pylons | 1,886,486 | 4 | true | 0 | 0 | You could check it in as sample.ini for example so that everyone can copy to their own development.ini and modify as needed | 4 | 1 | 0 | I'm learning about Pylons and I've read a few tutorials, but none of them have addressed collaboration practices. Starting on a practice project. I'd like to keep my code in a revision-control system (Git, specifically) as if it were an open-source project with multiple developers, in order to practice that aspect of ... | Should Pylons' development.ini be checked in? | 1.2 | 0 | 0 | 358 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.