Title
stringlengths
15
150
A_Id
int64
2.98k
72.4M
Users Score
int64
-17
470
Q_Score
int64
0
5.69k
ViewCount
int64
18
4.06M
Database and SQL
int64
0
1
Tags
stringlengths
6
105
Answer
stringlengths
11
6.38k
GUI and Desktop Applications
int64
0
1
System Administration and DevOps
int64
1
1
Networking and APIs
int64
0
1
Other
int64
0
1
CreationDate
stringlengths
23
23
AnswerCount
int64
1
64
Score
float64
-1
1.2
is_accepted
bool
2 classes
Q_Id
int64
1.85k
44.1M
Python Basics and Environment
int64
0
1
Data Science and Machine Learning
int64
0
1
Web Development
int64
0
1
Available Count
int64
1
17
Question
stringlengths
41
29k
Problem with running Django 1.1.1 on Google App Engine Developement Server
2,289,005
0
0
261
0
python,django,google-app-engine
I had module nammed same way as the default GAE launcher (main/ and main.py). After renaming the launcher everything works great.
0
1
0
0
2010-02-18T13:00:00.000
1
1.2
true
2,288,725
0
0
1
1
I've downloaded google_appengine version 1.3.1. Using some web tutorials, I've created basic django 1.1.1 application. Using appcfg I managed to deploy it on GAE and it works. The problem is, that application doesn't want to work on dev_appengine.py developement server. Whenever I run the app GAE local server is returning HTTP 200 without any content. If I set basic environement and run main.py manually, then the page is properly returned on stdout. I've also created very basic helloworld application, and this one is working ok on the devel server. Do you have any idea, how can I debug the devel server? Option -d doesn't give any usefull insight at all.
python and process
2,505,040
0
0
325
0
python,windows,wmi
Process name: is sys.argv[0] not sufficient for your purposes?
0
1
0
1
2010-02-19T21:15:00.000
2
0
false
2,299,627
0
0
0
1
What is the best way in python find the process name and owner? Now i use WMI, but this version is too slow.
Specifying python interpreter from virtualenv in emacs
2,307,435
8
12
6,786
0
python,emacs,virtualenv
So it seems that python-shell does the right thing by picking up the environment settings, whereas py-shell does not. python-shell is provided by python.el and py-shell is provided by python-mode.el , There's bug reports etc related to this, so I'm just not going to use py-shell for now. Figured I'd close the loop on this in case the google machine considers this a high ranking item for one reason or another.
0
1
0
0
2010-02-20T22:12:00.000
2
1.2
true
2,303,956
0
0
0
1
Today I've been trying to bring more of the Python related modes into my Emacs configuration but I haven't had much luck. First what I've noticed is that depending on how Emacs is launched (terminal vs from the desktop), the interpreter it decides to use is different. launched from KDE menu: M-! which python gives /usr/bin/python launched from terminal: M-! which python gives ~/local/bin/python I can kind of accept this since I have my .bashrc appending ~/local/bin to the path and I guess KDE ignores that by default. I can work around this, however what I don't understand is then if I activate a virtualenv, I would expect M-! which python to point to ~/project.env/bin/python however it still points to ~/local/bin/python. Thus when I M-x py-shell, I get ~/local/bin/python so if I try to M-x py-execute-buffer on a module that resides in a package in the virtualenv, py-shell will complain about not knowing about modules also in the virtualenv. Setting py-python-command to "~/project.env/bin/python" seems to have no effect after everything is loaded. So I guess the overall crux of my question is, how does one get all the python related emacs stuff pointing at the right interpreter?
GAE Task Queue oddness
2,402,964
0
2
630
0
python,google-app-engine,task-queue
When a task-queue ends in error : I believe it stays in your queue .. Check that
0
1
0
0
2010-02-22T00:05:00.000
1
0
false
2,308,050
0
0
1
1
I have been testing the taskqueue with mixed success. Currently I am using the default queue, in default settings etc etc.... I have a test URL setup which inserts about 8 tasks into the queue. With short order, all 8 are completed properly. So far so good. The problem comes up when I re-load that URL twice under say a minute. Now watching the task queue, all the tasks are added properly, but only the first batch execute it seems. But the "Run in Last Minute" # shows the right number of tasks being run.... The request logs tell a different story. They show only the first set of 8 running, but all task creation URLs working successfully. The oddness of this is that if I wait say a minute between the task creation URL requests, it will work fine. Oddly enough changing the bucket_size or execution speed does not seem to help. Only the first batch are executed. I have also reduced the number of requests all the way down to 2, and still found only the first 2 execute. Any others added display the same issues as above. Any suggestions? Thanks
How can I get python in the command prompt on Windows?
2,311,082
0
2
314
0
python,windows,command-line,command-prompt
Is python.exe in your windows path? Try to look at the PATH environment variable and see if the installation folder of python is listed there.
0
1
0
0
2010-02-22T13:22:00.000
3
0
false
2,311,074
1
0
0
2
I have just installed Python on my Windows 7. I thought that after that I will be able to run python on the command prompt but it is not the case. After the installation I also found out that I can run the python command shell. This is nice. But what should I do if I want to save my program in a file and then I want to run this program (in Linux, for example, I typed "python file_name.py" in the command line).
How can I get python in the command prompt on Windows?
2,311,098
0
2
314
0
python,windows,command-line,command-prompt
You need to update your environment variables to include the path to the Python executable. On XP you can do this by right clicking on "My Computer" -> Properties and then going to the "Advanced" tab.
0
1
0
0
2010-02-22T13:22:00.000
3
0
false
2,311,074
1
0
0
2
I have just installed Python on my Windows 7. I thought that after that I will be able to run python on the command prompt but it is not the case. After the installation I also found out that I can run the python command shell. This is nice. But what should I do if I want to save my program in a file and then I want to run this program (in Linux, for example, I typed "python file_name.py" in the command line).
How to make a user friendly start of a Python program?
2,332,334
1
0
3,714
0
python,command-line,desktop,command-prompt
Use py2exe to make an exe and just to make it more 'user friendly' use Inno set up (www.jrsoftware.org/isinfo.php ) along with IStools to build up an installer which would integrate the GUI with sound, widgets, other elements etc and users who do not have python etc installed in their systems can also play your GUI perfectly fine ! By the way what GUI are you using ? pygame, tk, wx, PyQt ...etc ?
0
1
0
0
2010-02-22T14:28:00.000
4
0.049958
false
2,311,455
1
0
0
1
I have a Python program (GUI application). I can run this program from the command prompt on Windows (command line on Linux). But it can be too complicated for users. Is there an easy way to initiate a start of the program with a click (double click) on a pictogram (a small image on the desktop)?
Programming language decision for C++ legacy project workflow
2,313,266
0
1
317
0
java,python,programming-languages,binding,java-native-interface
I would use Python. You could write very basic wrappers using the Python C API and then call said functions from Python with relative ease.
0
1
0
1
2010-02-22T18:11:00.000
3
0
false
2,313,017
0
0
0
3
I have quite a lot of C++ legacy code modules from my colleagues, unfortunately poorly written. Each is doing a different job, but they are all GNU C++ code running under Linux. I want to write a controller program, to make a singular C++ module for a workflow, for a very urgent demo. Also I need to write a front-end web-app allowing clients submitting jobs to the controller. My main criteria are: development speed (very urgent demo) good binding with C++ (I have legacy code I do not want to rewrite in another language) smooth introduction of new programming language to team (has some python, java and perl knowledge) What programming language fits my needs best, and why? Details: I lean towards python for its perfect binding with C++, as writing JNI is too much work, and kind of obsolete nowadays. However, no one in my team is Python programmer; I do know some Python (no experience in server side programming at all). I have been developing Java EE apps last year, but I do not think JNI is a good solution. Only one team member knows some Perl, others are pure C++ programmers.
Programming language decision for C++ legacy project workflow
2,313,312
2
1
317
0
java,python,programming-languages,binding,java-native-interface
Given the urgency, I'd have to stick with C++. Without that, I'd say keep what you got, but feel free to switch to a preferred language when refactoring. That would be the time to do it. What you should not do, ever, is "port" anything to another language without rewriting or changing functionality in any way. It is a total waste of time, when the "best" outcome you can hope for is that it has no new bugs when you are done.
0
1
0
1
2010-02-22T18:11:00.000
3
0.132549
false
2,313,017
0
0
0
3
I have quite a lot of C++ legacy code modules from my colleagues, unfortunately poorly written. Each is doing a different job, but they are all GNU C++ code running under Linux. I want to write a controller program, to make a singular C++ module for a workflow, for a very urgent demo. Also I need to write a front-end web-app allowing clients submitting jobs to the controller. My main criteria are: development speed (very urgent demo) good binding with C++ (I have legacy code I do not want to rewrite in another language) smooth introduction of new programming language to team (has some python, java and perl knowledge) What programming language fits my needs best, and why? Details: I lean towards python for its perfect binding with C++, as writing JNI is too much work, and kind of obsolete nowadays. However, no one in my team is Python programmer; I do know some Python (no experience in server side programming at all). I have been developing Java EE apps last year, but I do not think JNI is a good solution. Only one team member knows some Perl, others are pure C++ programmers.
Programming language decision for C++ legacy project workflow
2,313,159
3
1
317
0
java,python,programming-languages,binding,java-native-interface
Noting the "very urgent demo" part, assuming that that would take about a month, depending on the complexity, I'd stick to the familiar. True, maintaining python would be easier in the end, and learning python should be a breeze, if you deem it viable. I'd say, have the team learn python and do the basic stuff, as you learn the deeper parts, you could build classes for them to extend/implement. That way, you get things done as they learn.
0
1
0
1
2010-02-22T18:11:00.000
3
1.2
true
2,313,017
0
0
0
3
I have quite a lot of C++ legacy code modules from my colleagues, unfortunately poorly written. Each is doing a different job, but they are all GNU C++ code running under Linux. I want to write a controller program, to make a singular C++ module for a workflow, for a very urgent demo. Also I need to write a front-end web-app allowing clients submitting jobs to the controller. My main criteria are: development speed (very urgent demo) good binding with C++ (I have legacy code I do not want to rewrite in another language) smooth introduction of new programming language to team (has some python, java and perl knowledge) What programming language fits my needs best, and why? Details: I lean towards python for its perfect binding with C++, as writing JNI is too much work, and kind of obsolete nowadays. However, no one in my team is Python programmer; I do know some Python (no experience in server side programming at all). I have been developing Java EE apps last year, but I do not think JNI is a good solution. Only one team member knows some Perl, others are pure C++ programmers.
Python: How to Access Linux Paths
2,313,168
2
3
7,357
0
python,linux,path
It's important to remember: use of the tilde ~ expands the home directory as per Poke's answer use of the forward slash / is the separator for linux / *nix directories by default, *nix systems such as linux for example has a wild card globbing in the shell, for instance echo *.* will return back all files that match the asterisk dot asterisk (as per Will McCutcheon's answer!)
0
1
1
0
2010-02-22T18:17:00.000
4
0.099668
false
2,313,053
0
0
0
1
Using Python, how does one parse/access files with Linux-specific features, like "~/.mozilla/firefox/*.default"? I've tried this, but it doesn't work. Thanks
How do I print to the OS's default printer in Python 3 (cross platform)?
68,132,714
-1
15
13,805
0
python,printing,python-3.x
With the OS module you can print files in Windows or higher.
0
1
0
0
2010-02-23T05:41:00.000
2
-0.099668
false
2,316,368
1
0
0
1
I have a Python 3 script that is going to be doing some regex substitution on some Rich Text Files (rtf) and I would like to be able to print out a whole directory's files on Windows, Linux, and Mac. Is there a way to print to the OS's default printer so that it works in all platforms?
Can distutils use a custom .def to expose extra symbols when it compiles a Windows .dll?
2,334,890
1
0
207
0
python,windows,dll,distutils,dllexport
You can pass ['-Wl,--export-all-symbols'] as extra_link_args if you're using Mingw's GCC. There's probably a similar setting for Visual, somewhere in the IDE. This works only if distutils chooses to use "gcc -mdll" as a linker instead of "dllwrap". It does so if your ld version is later than 2.10.90, which should be the case if you're using a recent Mingw. At first it didn't work for me because I used Python 2.2 which has a small bug related to version parsing: it expects 3 dot-separated numbers so it falls back to dllwrap if the ld version is 2.20...
0
1
0
0
2010-02-25T14:41:00.000
1
0.197375
false
2,334,754
0
0
0
1
I'm abusing distutils to compile an extension module for Python, but rather than using the Python C API I'm using ctypes to talk to the resulting shared library. This works fine in Linux because it automatically exports all symbols in a shared library, but in Windows distutils provides a .def to export only the Python module init function. How do I extend distutils to provide my own .def on Windows so it will export the symbols I need?
How can I run a py2exe program in windows without the terminal?
2,338,973
0
6
3,511
0
python,windows,py2exe
Not really understand your requirement, but you can try start /MIN. type start /? on the command line to see its help page.
0
1
0
0
2010-02-26T01:32:00.000
4
0
false
2,338,951
1
0
0
1
Could someone explain to me how can I run my py2exe program, a console program, without the terminal on Windows? I'm trying to make a program that re-sizes windows and it supposed to start with windows, so I want it hide out but still running...
Creating a Cron Job - Linux / Python
2,339,784
1
4
8,197
0
python,linux,django,ubuntu
The problem with a cron job is that it will start every so often regardless of whether the previous instance is finished. What I would recommend is to have your script start a new instance of itself after a certain amount of time, then exit.
0
1
0
0
2010-02-26T05:46:00.000
4
0.049958
false
2,339,725
0
0
0
1
Hi I have a Django script that I need to run, I think the commands could be called through bash. Thing is the script causes memory leaks after a long a period of time, so I would like to create an external cron job which calls the Python script. So the script would terminate and restart while retaking the lost memory. Can someone point me in the right direction? I know quite little on the subject, and feel a bit lost.
Why isn't Python installed on Windows by default?
2,340,173
6
2
2,554
0
python,windows,ruby,default
Microsoft makes it pretty obvious they want you to use their version of everything. So what is in it for them to have Python or any other language as part of their Windows operating system? They want you to program for Microsoft Internet Explorer using Microsoft Active Server Pages with Microsoft Visual Basic on Microsoft Internet Information Server, back-ended by Microsoft SQL Server running on top of Microsoft Windows. It goes on and on like this... It makes perfect sense from a business perspective when you think about it. So... Will we see competing "products"--even open source ones--installed by default on Windows? Not gonna happen anytime soon.
0
1
0
0
2010-02-26T07:47:00.000
7
1.2
true
2,340,150
1
0
0
4
Or any other normal scripting language for that matter. I know there is VBScript and JScript. But I don't really like those for any kind of computing. I would really love to have python or ruby (or perl) interpreter installed with windows by default so when I write small console applications I wouldn't need to distribute whole python installation with it via py2exe(or similar). Do you know if there is such incentive? Do you think this would be possible? Or it's not acceptable for Microsoft?
Why isn't Python installed on Windows by default?
2,340,241
1
2
2,554
0
python,windows,ruby,default
Firstly, Windows doesn't need them to run, and to be honest, most people buying Windows have no knowledge of - let alone interest in - scripting languages. It then comes down to ownership and support. There's nothing ships as part of a default Windows installation which isn't owned, designed and developed by Microsoft. They own everything, so the buck stops with them. If they shipped any third-party packages as part of the installer who would pick up support if something goes wrong? Finally, there's the competitive advantage of providing your own products over third-party tools or packages in a default installation.
0
1
0
0
2010-02-26T07:47:00.000
7
0.028564
false
2,340,150
1
0
0
4
Or any other normal scripting language for that matter. I know there is VBScript and JScript. But I don't really like those for any kind of computing. I would really love to have python or ruby (or perl) interpreter installed with windows by default so when I write small console applications I wouldn't need to distribute whole python installation with it via py2exe(or similar). Do you know if there is such incentive? Do you think this would be possible? Or it's not acceptable for Microsoft?
Why isn't Python installed on Windows by default?
2,340,169
2
2
2,554
0
python,windows,ruby,default
You could create your own Windows Installation-Disc with the wished script or programming language installed on default.. Perhaps search on SuperUser.com (or Google) for this matter.
0
1
0
0
2010-02-26T07:47:00.000
7
0.057081
false
2,340,150
1
0
0
4
Or any other normal scripting language for that matter. I know there is VBScript and JScript. But I don't really like those for any kind of computing. I would really love to have python or ruby (or perl) interpreter installed with windows by default so when I write small console applications I wouldn't need to distribute whole python installation with it via py2exe(or similar). Do you know if there is such incentive? Do you think this would be possible? Or it's not acceptable for Microsoft?
Why isn't Python installed on Windows by default?
2,340,164
1
2
2,554
0
python,windows,ruby,default
Because Windows doesn't need those languages to run, by default ? (While, for instance, many basic Linux utilities depend on some script-languages, like Perl) I would add that JScript and VBScript have been implemted by Microsoft -- so Microsoft can distribute their implementation ; on the other hand, there is no Microsoft implementation of either Python, PHP, or Perl, ...
0
1
0
0
2010-02-26T07:47:00.000
7
0.028564
false
2,340,150
1
0
0
4
Or any other normal scripting language for that matter. I know there is VBScript and JScript. But I don't really like those for any kind of computing. I would really love to have python or ruby (or perl) interpreter installed with windows by default so when I write small console applications I wouldn't need to distribute whole python installation with it via py2exe(or similar). Do you know if there is such incentive? Do you think this would be possible? Or it's not acceptable for Microsoft?
starting Python IDLE from command line to edit scripts
29,289,580
0
10
58,831
0
python,windows,python-idle
Just add IDLE's path to your PATH environment variable. For example I created an environment variable called IDLE_PATH and set the value to C:\Python27\Lib\idlelib Then in my PATH variable I added ;%IDLE_PATH%; and open a new cmd prompt or in console2 just open a new tab and run idle <file_name> to open the file, you will be able to do this from any directory. In IPython console add an ! before the command, for example !idle test.py. Congrates, Now you're a python pimp!
0
1
0
0
2010-02-26T23:57:00.000
7
0
false
2,345,607
1
0
0
2
I've tried many variations of this command: idle.py -e filepath, but it simply starts IDLE like normal, not opening any extra windows for editing, and not throwing any errors. So how can I do the equivalent of opening IDLE, file>open>filepath via the command line (or perhaps even a Python module)?
starting Python IDLE from command line to edit scripts
39,559,184
2
10
58,831
0
python,windows,python-idle
first make sure you have location of idle in path I am using "python3.5".So mine looks like this: C:\Program Files\Python35\Lib\idlelib.Yours may differ. use this following command:idle -r file_name.py to run the file or just idle file_name.py to edit or start idle -r file_name.py ^&exit
0
1
0
0
2010-02-26T23:57:00.000
7
0.057081
false
2,345,607
1
0
0
2
I've tried many variations of this command: idle.py -e filepath, but it simply starts IDLE like normal, not opening any extra windows for editing, and not throwing any errors. So how can I do the equivalent of opening IDLE, file>open>filepath via the command line (or perhaps even a Python module)?
Accessing a ServerFactory from the Service in Twisted
2,353,932
2
1
408
0
python,twisted
Well, after some help from a friend. I figured it out. If you create a multiservice, you can just pass the multiservice object to all your child services (I pass it in the init). Then you do setName('servicename'). Then from another service you can just get the information like so: x = self.multiService.getServiceNamed('servicename') and access it that way. Works like a charm! -omgpants
0
1
0
0
2010-02-28T07:19:00.000
1
0.379949
false
2,350,394
0
0
1
1
I've been trying to come up with a decent design for multiple factories access each others information. For example, I have the following services: 1 management web service, a VirtualHost instance (multiple domains) and a built in DNS service. Going through the finger tutorial was very helpful but it lacks some key points. It never has a service accessing or executing a method of a factory. I have a hard time believing everyone is implementing 100% of all their logic inside of a single service, and just using the various factories to call those methods defined in the service. If I wanted to update my DNS records, how would my management service tell the DNS Factory, 'hey reload your authority files'? Any hints on how everyone else is doing this sort of inter-factory inter-service communication?
Suggestions for first-time sourceforge project contributer?
2,358,719
0
4
169
0
python,open-source,licensing,sourceforge
Apparently the answer is that there'll be no problem with it. :) Thanks for all the help, you guys!
0
1
0
0
2010-03-01T04:25:00.000
1
1.2
true
2,353,868
0
0
0
1
Hey all. I'm a professional software developer here in Seattle, WA USA. I program for/work in a Windows shop, but I've recently began considering contributing to an Open Source project, specifically one under the Python License (CNRI Python License). I realize that contacting a human resources representative where I work is the first step, but could any existing source forge contributors give me any advice?
Automate Windows GUI operations with Python
2,354,011
1
13
13,254
0
python,winapi
Find out how to do what you want using commands (on the command line) and script these commands instead.
0
1
0
0
2010-03-01T05:02:00.000
6
0.033321
false
2,353,963
0
0
0
2
I want to make a Python script that automates the process of setting up a VPN server in Windows XP, but the only way I know how to do it is using the Windows GUI dialogs. How would I go about figuring out what those dialogs are doing to the system and designing a Python script to automate it?
Automate Windows GUI operations with Python
26,197,899
0
13
13,254
0
python,winapi
PyAutoGUI can be installed with pip from PyPI. It's cross platform and can control the mouse & keyboard. It has the features of pywinauto and a few more on top. It can't identify windows or GUI controls, but it does have basic screenshot & image recognition features to click on particular buttons. And it's well-documented and maintained. pip install pyautogui
0
1
0
0
2010-03-01T05:02:00.000
6
0
false
2,353,963
0
0
0
2
I want to make a Python script that automates the process of setting up a VPN server in Windows XP, but the only way I know how to do it is using the Windows GUI dialogs. How would I go about figuring out what those dialogs are doing to the system and designing a Python script to automate it?
How to append EOF to file using Perl or Python?
2,371,680
1
0
3,283
1
python,sql-server,perl,bcp
This is not a problem with missing EOF, but with EOF that is there and is not expected by bcp. I am not a bcp tool expert, but it looks like there is some problem with format of your data files.
0
1
0
0
2010-03-03T13:35:00.000
3
0.066568
false
2,371,645
0
0
0
2
I’m trying to bulk insert data to SQL server express database. When doing bcp from Windows XP command prompt, I get the following error: C:\temp>bcp in -T -f -S Starting copy... SQLState = S1000, NativeError = 0 Error = [Microsoft][SQL Native Client]Unexpected EOF encountered in BCP data-file 0 rows copied. Network packet size (bytes): 4096 Clock Time (ms.) Total : 4391 So, there is a problem with EOF. How to append a correct EOF character to this file using Perl or Python?
How to append EOF to file using Perl or Python?
2,371,725
3
0
3,283
1
python,sql-server,perl,bcp
EOF is End Of File. What probably occurred is that the file is not complete; the software expects data, but there is none to be had anymore. These kinds of things happen when: the export is interrupted (quit dump software while dumping) while copying the dumpfile aborting the copy disk full during dump these kinds of things. By the way, though EOF is usually just an end of file, there does exist an EOF character. This is used because terminal (command line) input doesn't really end like a file does, but it sometimes is necessary to pass an EOF to such a utility. I don't think it's used in real files, at least not to indicate an end of file. The file system knows perfectly well when the file has ended, it doesn't need an indicator to find that out. EDIT shamelessly copied from a comment provided by John Machin It can happen (uninentionally) in real files. All it needs is (1) a data-entry user to type Ctrl-Z by mistake, see nothing on the screen, type the intended Shift-Z, and keep going and (2) validation software (written by e.g. the company president's nephew) which happily accepts Ctrl-anykey in text fields and your database has a little bomb in it, just waiting for someone to produce a query to a flat file.
0
1
0
0
2010-03-03T13:35:00.000
3
1.2
true
2,371,645
0
0
0
2
I’m trying to bulk insert data to SQL server express database. When doing bcp from Windows XP command prompt, I get the following error: C:\temp>bcp in -T -f -S Starting copy... SQLState = S1000, NativeError = 0 Error = [Microsoft][SQL Native Client]Unexpected EOF encountered in BCP data-file 0 rows copied. Network packet size (bytes): 4096 Clock Time (ms.) Total : 4391 So, there is a problem with EOF. How to append a correct EOF character to this file using Perl or Python?
Generate image for each font on a linux system using Python
2,375,489
1
4
894
0
python,linux,fonts,debian,python-imaging-library
you best bet is to do a find on all the fonts on the system, and then use ImagesFont.load() on the results of that list. I don't know where the fonts are on Debian, but they should be in a well known folder you can just do an os.walk and then feed the filenames in that way.
0
1
0
1
2010-03-03T21:30:00.000
2
0.099668
false
2,375,125
0
0
0
2
I'm looking for a way to list all fonts installed on a linux/Debian system, and then generate images of some strings using these fonts. I'm looking for your advice as I kind of see how to do each part, but not to do both: To list all fonts on a UNIX system, xlsfonts can do the trick: import os list_of_fonts=os.popen("xslfonts").readlines() To render a string into an image using a font, I could use PIL (Python Imaging Library) and the ImageFont class. However, ImagesFont.load expects a file name, whereas xlsfonts gives a kind of normalized font name, and the correspondence between the two doesn't seems obvious (I tried to search my system for files named as the output of xlsfonts, without results). Does anyone has an idea on how I can do that? Thanks!
Generate image for each font on a linux system using Python
2,375,457
1
4
894
0
python,linux,fonts,debian,python-imaging-library
You can do this using pango, through the pygtk package. Pango can list fonts and render them.
0
1
0
1
2010-03-03T21:30:00.000
2
1.2
true
2,375,125
0
0
0
2
I'm looking for a way to list all fonts installed on a linux/Debian system, and then generate images of some strings using these fonts. I'm looking for your advice as I kind of see how to do each part, but not to do both: To list all fonts on a UNIX system, xlsfonts can do the trick: import os list_of_fonts=os.popen("xslfonts").readlines() To render a string into an image using a font, I could use PIL (Python Imaging Library) and the ImageFont class. However, ImagesFont.load expects a file name, whereas xlsfonts gives a kind of normalized font name, and the correspondence between the two doesn't seems obvious (I tried to search my system for files named as the output of xlsfonts, without results). Does anyone has an idea on how I can do that? Thanks!
Which key/value store is the most promising/stable?
2,380,871
7
61
21,008
0
python,ruby,database,comparison
I've been playing with MongoDB and it has one thing that makes it perfect for my application, the ability to store complex Maps/Lists in the database directly. I have a large Map where each value is a list and I don't have to do anything special just to write and retrieve that without knowing all the different keys and list values. I don't know much about the other options but the speed and that ability make Mongo perfect for my application. Plus the Java driver is very simple to use.
0
1
0
0
2010-03-04T04:17:00.000
15
1
false
2,376,846
0
0
0
8
I'm looking to start using a key/value store for some side projects (mostly as a learning experience), but so many have popped up in the recent past that I've got no idea where to begin. Just listing from memory, I can think of: CouchDB MongoDB Riak Redis Tokyo Cabinet Berkeley DB Cassandra MemcacheDB And I'm sure that there are more out there that have slipped through my search efforts. With all the information out there, it's hard to find solid comparisons between all of the competitors. My criteria and questions are: (Most Important) Which do you recommend, and why? Which one is the fastest? Which one is the most stable? Which one is the easiest to set up and install? Which ones have bindings for Python and/or Ruby? Edit: So far it looks like Redis is the best solution, but that's only because I've gotten one solid response (from ardsrk). I'm looking for more answers like his, because they point me in the direction of useful, quantitative information. Which Key-Value store do you use, and why? Edit 2: If anyone has experience with CouchDB, Riak, or MongoDB, I'd love to hear your experiences with them (and even more so if you can offer a comparative analysis of several of them)
Which key/value store is the most promising/stable?
2,438,183
5
61
21,008
0
python,ruby,database,comparison
I only have experience with Berkeley DB, so I'll mention what I like about it. It is fast It is very mature and stable It has outstanding documentation It has C,C++,Java & C# bindings out of the box. Other language bindings are available. I believe Python comes with bindings as part of its "batteries". The only downside I've run into is that the C# bindings are new and don't seem to support every feature.
0
1
0
0
2010-03-04T04:17:00.000
15
0.066568
false
2,376,846
0
0
0
8
I'm looking to start using a key/value store for some side projects (mostly as a learning experience), but so many have popped up in the recent past that I've got no idea where to begin. Just listing from memory, I can think of: CouchDB MongoDB Riak Redis Tokyo Cabinet Berkeley DB Cassandra MemcacheDB And I'm sure that there are more out there that have slipped through my search efforts. With all the information out there, it's hard to find solid comparisons between all of the competitors. My criteria and questions are: (Most Important) Which do you recommend, and why? Which one is the fastest? Which one is the most stable? Which one is the easiest to set up and install? Which ones have bindings for Python and/or Ruby? Edit: So far it looks like Redis is the best solution, but that's only because I've gotten one solid response (from ardsrk). I'm looking for more answers like his, because they point me in the direction of useful, quantitative information. Which Key-Value store do you use, and why? Edit 2: If anyone has experience with CouchDB, Riak, or MongoDB, I'd love to hear your experiences with them (and even more so if you can offer a comparative analysis of several of them)
Which key/value store is the most promising/stable?
2,377,161
3
61
21,008
0
python,ruby,database,comparison
I really like memcached personally. I use it on a couple of my sites and it's simple, fast, and easy. It really was just incredibly simple to use, the API is easy to use. It doesn't store anything on disk, thus the name memcached, so it's out if you're looking for a persistent storage engine. Python has python-memcached. I haven't used the Ruby client, but a quick Google search reveals RMemCache If you just need a caching engine, memcached is the way to go. It's developed, it's stable, and it's bleedin' fast. There's a reason LiveJournal made it and Facebook develops it. It's in use at some of the largest sites out there to great effect. It scales extremely well.
0
1
0
0
2010-03-04T04:17:00.000
15
0.039979
false
2,376,846
0
0
0
8
I'm looking to start using a key/value store for some side projects (mostly as a learning experience), but so many have popped up in the recent past that I've got no idea where to begin. Just listing from memory, I can think of: CouchDB MongoDB Riak Redis Tokyo Cabinet Berkeley DB Cassandra MemcacheDB And I'm sure that there are more out there that have slipped through my search efforts. With all the information out there, it's hard to find solid comparisons between all of the competitors. My criteria and questions are: (Most Important) Which do you recommend, and why? Which one is the fastest? Which one is the most stable? Which one is the easiest to set up and install? Which ones have bindings for Python and/or Ruby? Edit: So far it looks like Redis is the best solution, but that's only because I've gotten one solid response (from ardsrk). I'm looking for more answers like his, because they point me in the direction of useful, quantitative information. Which Key-Value store do you use, and why? Edit 2: If anyone has experience with CouchDB, Riak, or MongoDB, I'd love to hear your experiences with them (and even more so if you can offer a comparative analysis of several of them)
Which key/value store is the most promising/stable?
2,616,225
24
61
21,008
0
python,ruby,database,comparison
You need to understand what modern NoSQL phenomenon is about. It is not about key-value storages. They've been available for decades (BerkeleyDB for example). Why all the fuss now ? It is not about fancy document or object oriented schemas and overcoming "impedance mismatch". Proponents of these features have been touting them for years and they got nowhere. It is simply about adressing 3 technical problems: automatic (for maintainers) and transparent (for application developers) failover, sharding and replication. Thus you should ignore any trendy products that do not deliver on this front. These include Redis, MongoDB, CouchDB etc. And concentrate on truly distributed solutions like cassandra, riak etc. Otherwise you'll loose all the good stuff sql gives you (adhoc queries, Crystal Reports for your boss, third party tools and libraries) and get nothing in return.
0
1
0
0
2010-03-04T04:17:00.000
15
1
false
2,376,846
0
0
0
8
I'm looking to start using a key/value store for some side projects (mostly as a learning experience), but so many have popped up in the recent past that I've got no idea where to begin. Just listing from memory, I can think of: CouchDB MongoDB Riak Redis Tokyo Cabinet Berkeley DB Cassandra MemcacheDB And I'm sure that there are more out there that have slipped through my search efforts. With all the information out there, it's hard to find solid comparisons between all of the competitors. My criteria and questions are: (Most Important) Which do you recommend, and why? Which one is the fastest? Which one is the most stable? Which one is the easiest to set up and install? Which ones have bindings for Python and/or Ruby? Edit: So far it looks like Redis is the best solution, but that's only because I've gotten one solid response (from ardsrk). I'm looking for more answers like his, because they point me in the direction of useful, quantitative information. Which Key-Value store do you use, and why? Edit 2: If anyone has experience with CouchDB, Riak, or MongoDB, I'd love to hear your experiences with them (and even more so if you can offer a comparative analysis of several of them)
Which key/value store is the most promising/stable?
2,380,915
4
61
21,008
0
python,ruby,database,comparison
There is also zodb.
0
1
0
0
2010-03-04T04:17:00.000
15
0.053283
false
2,376,846
0
0
0
8
I'm looking to start using a key/value store for some side projects (mostly as a learning experience), but so many have popped up in the recent past that I've got no idea where to begin. Just listing from memory, I can think of: CouchDB MongoDB Riak Redis Tokyo Cabinet Berkeley DB Cassandra MemcacheDB And I'm sure that there are more out there that have slipped through my search efforts. With all the information out there, it's hard to find solid comparisons between all of the competitors. My criteria and questions are: (Most Important) Which do you recommend, and why? Which one is the fastest? Which one is the most stable? Which one is the easiest to set up and install? Which ones have bindings for Python and/or Ruby? Edit: So far it looks like Redis is the best solution, but that's only because I've gotten one solid response (from ardsrk). I'm looking for more answers like his, because they point me in the direction of useful, quantitative information. Which Key-Value store do you use, and why? Edit 2: If anyone has experience with CouchDB, Riak, or MongoDB, I'd love to hear your experiences with them (and even more so if you can offer a comparative analysis of several of them)
Which key/value store is the most promising/stable?
14,586,720
1
61
21,008
0
python,ruby,database,comparison
As the others said, it depends always on your needs. I for example prefer whatever suits my applications best. I first used memcached to have fast read/write access. As Java API I´ve used SpyMemcached, what comes with an very easy interface you can use for writing and reading data. Due to memory leaks (no more RAM) I was required to look for another solution, also I was not able scale right, just increase the memory for a single process seemed to be not an good achievement. After some reviewing I saw couchbase, it comes with replication, clustering, auto-failover, and a community edition (MS Windows, MacOs, Linux). And the best thing for me was, the Java client of it implements also SpyMemcached, so I had almost nothing else to do as setup the server and use couchbase instead of memcached as datastore. Advantage? Sure, my data is now persistent, replicated, and indexed. It comes with a webconsole to write map reduce functions for document views in erlang. It has Support for Python, Ruby, .Net and more, easy configuration through the webconsole and client-tools. It runs stable. With some tests I was able to write about 10k per second for 200 - 400 byte long records. Reading Performance was way higher though (both tested locally). Have a lot of fun making your decision.
0
1
0
0
2010-03-04T04:17:00.000
15
0.013333
false
2,376,846
0
0
0
8
I'm looking to start using a key/value store for some side projects (mostly as a learning experience), but so many have popped up in the recent past that I've got no idea where to begin. Just listing from memory, I can think of: CouchDB MongoDB Riak Redis Tokyo Cabinet Berkeley DB Cassandra MemcacheDB And I'm sure that there are more out there that have slipped through my search efforts. With all the information out there, it's hard to find solid comparisons between all of the competitors. My criteria and questions are: (Most Important) Which do you recommend, and why? Which one is the fastest? Which one is the most stable? Which one is the easiest to set up and install? Which ones have bindings for Python and/or Ruby? Edit: So far it looks like Redis is the best solution, but that's only because I've gotten one solid response (from ardsrk). I'm looking for more answers like his, because they point me in the direction of useful, quantitative information. Which Key-Value store do you use, and why? Edit 2: If anyone has experience with CouchDB, Riak, or MongoDB, I'd love to hear your experiences with them (and even more so if you can offer a comparative analysis of several of them)
Which key/value store is the most promising/stable?
2,380,715
1
61
21,008
0
python,ruby,database,comparison
Just to make the list complete: there's Dreamcache, too. It's compatible with Memcached (in terms of protocol, so you can use any client library written for Memcached), it's just faster.
0
1
0
0
2010-03-04T04:17:00.000
15
0.013333
false
2,376,846
0
0
0
8
I'm looking to start using a key/value store for some side projects (mostly as a learning experience), but so many have popped up in the recent past that I've got no idea where to begin. Just listing from memory, I can think of: CouchDB MongoDB Riak Redis Tokyo Cabinet Berkeley DB Cassandra MemcacheDB And I'm sure that there are more out there that have slipped through my search efforts. With all the information out there, it's hard to find solid comparisons between all of the competitors. My criteria and questions are: (Most Important) Which do you recommend, and why? Which one is the fastest? Which one is the most stable? Which one is the easiest to set up and install? Which ones have bindings for Python and/or Ruby? Edit: So far it looks like Redis is the best solution, but that's only because I've gotten one solid response (from ardsrk). I'm looking for more answers like his, because they point me in the direction of useful, quantitative information. Which Key-Value store do you use, and why? Edit 2: If anyone has experience with CouchDB, Riak, or MongoDB, I'd love to hear your experiences with them (and even more so if you can offer a comparative analysis of several of them)
Which key/value store is the most promising/stable?
2,384,388
6
61
21,008
0
python,ruby,database,comparison
I notice how everyone is confusing memcached with memcachedb. They are two different systems. The op asked about memcachedb. memcached is memory storage. memcachedb uses Berkeley DB as its datastore.
0
1
0
0
2010-03-04T04:17:00.000
15
1
false
2,376,846
0
0
0
8
I'm looking to start using a key/value store for some side projects (mostly as a learning experience), but so many have popped up in the recent past that I've got no idea where to begin. Just listing from memory, I can think of: CouchDB MongoDB Riak Redis Tokyo Cabinet Berkeley DB Cassandra MemcacheDB And I'm sure that there are more out there that have slipped through my search efforts. With all the information out there, it's hard to find solid comparisons between all of the competitors. My criteria and questions are: (Most Important) Which do you recommend, and why? Which one is the fastest? Which one is the most stable? Which one is the easiest to set up and install? Which ones have bindings for Python and/or Ruby? Edit: So far it looks like Redis is the best solution, but that's only because I've gotten one solid response (from ardsrk). I'm looking for more answers like his, because they point me in the direction of useful, quantitative information. Which Key-Value store do you use, and why? Edit 2: If anyone has experience with CouchDB, Riak, or MongoDB, I'd love to hear your experiences with them (and even more so if you can offer a comparative analysis of several of them)
Tab not working properly in Python
17,719,748
2
3
8,330
0
python,eclipse,eclipse-plugin,pydev
Putting aside the tabs vs spaces argument. To fix this you need to chose 'toggle force tabs' in preferences for eclipse to use tabs instead of the default spaces.
0
1
0
0
2010-03-04T09:35:00.000
3
0.132549
false
2,378,119
1
0
0
2
I have been using NotePAD++ for editing Python scripts. I recently downloaded the PyDEV IDE (for Eclipse). The problem is that when I wrote the scripts in NotePad++ I used "TAB" for indentation, and now when I open them with PyDEV, every time I try to write a new line instead of "TABS" PyDEV inserts spaces. (even if I click the "TAB" key Eclipse inserts 4 spaces instead of one tab). This raises indentation error. Is there anyway to fix this thing? Thanks!
Tab not working properly in Python
2,379,282
4
3
8,330
0
python,eclipse,eclipse-plugin,pydev
Tabs are problematic—different people can choose different widths in their editor settings, and then you have bad formatting (for e.g. C) or execution problems (Python). So spaces are better for getting consistently sensible results. But one issue with that is that some editors still default to using tabs. In the companies I've worked for, our coding guidelines have specified that we should always use spaces, no tabs. But default editor settings sometimes catch us out. In Eclipse with PyDev, the fast way to convert tabs to spaces is the menu item Source⇒Convert tabs to space-tabs.
0
1
0
0
2010-03-04T09:35:00.000
3
0.26052
false
2,378,119
1
0
0
2
I have been using NotePAD++ for editing Python scripts. I recently downloaded the PyDEV IDE (for Eclipse). The problem is that when I wrote the scripts in NotePad++ I used "TAB" for indentation, and now when I open them with PyDEV, every time I try to write a new line instead of "TABS" PyDEV inserts spaces. (even if I click the "TAB" key Eclipse inserts 4 spaces instead of one tab). This raises indentation error. Is there anyway to fix this thing? Thanks!
Can someone explain pipe buffer deadlock?
2,381,822
9
16
6,347
0
python,operating-system,pipe
Careful, this has a subtle mistake in it. My mental model: subproccess produces something to stdout/err, which is buffered and after buffer is filled, it's flushed to stdout/err of subproccess, which is send through pipe to parent process. The buffer is shared by parent and child process. Subprocess produces something to stdout, which is the same buffer the parent process is supposed to be reading from. When the buffer is filled, writing stops until the buffer is emptied. Flush doesn't mean anything to a pipe, since two processes share the same buffer. Flushing to disk means that the device driver must push the bytes down to the device. Flushing a socket means to tell TCP/IP to stop waiting to accumulate a buffer and send stuff. Flushing to a console means stop waiting for a newline and push the bytes through the device driver to the device.
0
1
0
0
2010-03-04T18:33:00.000
2
1.2
true
2,381,751
0
0
0
2
Python documentation to Popen states: Warning Use communicate() rather than .stdin.write, .stdout.read or .stderr.read to avoid deadlocks due to any of the other OS pipe buffers filling up and blocking the child process. Now, I'm trying to figure out how this deadlock can occur and why. My mental model: subproccess produces something to stdout/err, which is buffered and after buffer is filled, it's flushed to stdout/err of subproccess, which is send through pipe to parent process. From what documentation states, pipe has it's own buffer and when it's filled or subprocess terminates, it's flushed to to the parent process. Either way (with pipe buffer or not), I'm not entirely sure how deadlock can occur. Only thing I can think of is some kind of "global" OS pipe buffer processes will be striving for, which sounds strange. Another is that more processes will share same pipe, which should not happen on it's own. Can someone please explain this?
Can someone explain pipe buffer deadlock?
2,381,791
5
16
6,347
0
python,operating-system,pipe
A deadlock can occur when both buffers (stdin and stdout) are full: your program is waiting to write more input to the external program, and the external program is waiting for you to read from its output buffer first. This can be solved by using non-blocking I/O and properly prioritizing the buffers. You can try to make it work yourself, but communicate() just does that for you.
0
1
0
0
2010-03-04T18:33:00.000
2
0.462117
false
2,381,751
0
0
0
2
Python documentation to Popen states: Warning Use communicate() rather than .stdin.write, .stdout.read or .stderr.read to avoid deadlocks due to any of the other OS pipe buffers filling up and blocking the child process. Now, I'm trying to figure out how this deadlock can occur and why. My mental model: subproccess produces something to stdout/err, which is buffered and after buffer is filled, it's flushed to stdout/err of subproccess, which is send through pipe to parent process. From what documentation states, pipe has it's own buffer and when it's filled or subprocess terminates, it's flushed to to the parent process. Either way (with pipe buffer or not), I'm not entirely sure how deadlock can occur. Only thing I can think of is some kind of "global" OS pipe buffer processes will be striving for, which sounds strange. Another is that more processes will share same pipe, which should not happen on it's own. Can someone please explain this?
Crontab job does not start... ideas?
2,384,246
4
1
2,936
0
python,linux,ubuntu,cron,crontab
From the crontab manpage: BUGS Although cron requires that each entry in a crontab end in a newline character, neither the crontab command nor the cron daemon will detect this error. Instead, the crontab will appear to load normally. However, the command will never run. The best choice is to ensure that your crontab has a blank line at the end. (my emphasis).
0
1
0
1
2010-03-05T02:40:00.000
3
0.26052
false
2,384,225
0
0
0
2
thanks for helping me setting my cron jobs, crontab has really been a gold mine for me. Unfortunately I have a problem, and have no idea what so ever what it might be... basically a job does not start while the neighbour jobs do. I'll explain This is my crontabs job list: */10 * * * * python /webapps/foo/manage.py fetch_articles */10 * * * * python /webapps/bar/manage.py fetch_books I wrote them as they are in a file and stored them using crontab /path/to/file . Checked with crontab -l and the jobs are there. The strange thing is that 1 of these executes every 10 minutes normally... but the other one does not. I tried typing in the command manually, and it works fine without a problem. Does anyone have suggestions? Help would be much appreciated, thanks guys. Update: I've been in the system log files and I found this: Mar 5 02:50:01 localhost CRON[21652]: (root) CMD (python /webapps/foo/manage.py fetch_books) Does this mean crontab is calling the job fine? Thanks for your replies guys! FIXED IT! thank you very much everyone!! The problem was that the script silently failed, I believe it's due to the PYTHON_PATH changing due to where the script is called from... I'm entirely sure.
Crontab job does not start... ideas?
2,384,281
1
1
2,936
0
python,linux,ubuntu,cron,crontab
I think ~unutbu's answer is probably correct if it's the second job that isn't running. However another thing to check is whether /webapps/bar/manage.py requires exclusive access to any resources, eg network sockets/tempfiles etc. Since you are starting 2 processes at the same time, you may be triggering a race condition.
0
1
0
1
2010-03-05T02:40:00.000
3
0.066568
false
2,384,225
0
0
0
2
thanks for helping me setting my cron jobs, crontab has really been a gold mine for me. Unfortunately I have a problem, and have no idea what so ever what it might be... basically a job does not start while the neighbour jobs do. I'll explain This is my crontabs job list: */10 * * * * python /webapps/foo/manage.py fetch_articles */10 * * * * python /webapps/bar/manage.py fetch_books I wrote them as they are in a file and stored them using crontab /path/to/file . Checked with crontab -l and the jobs are there. The strange thing is that 1 of these executes every 10 minutes normally... but the other one does not. I tried typing in the command manually, and it works fine without a problem. Does anyone have suggestions? Help would be much appreciated, thanks guys. Update: I've been in the system log files and I found this: Mar 5 02:50:01 localhost CRON[21652]: (root) CMD (python /webapps/foo/manage.py fetch_books) Does this mean crontab is calling the job fine? Thanks for your replies guys! FIXED IT! thank you very much everyone!! The problem was that the script silently failed, I believe it's due to the PYTHON_PATH changing due to where the script is called from... I'm entirely sure.
List of evented / asynchronous languages
2,384,352
4
12
4,311
0
javascript,python,ruby,asynchronous,lisp
F# has asynchronous workflows, which are a tremendous way to write async code.
0
1
0
0
2010-03-05T03:07:00.000
4
0.197375
false
2,384,314
1
0
0
1
I'm working on a system than has to be pretty scalable from the beginning. I've started looking at / playing around with asynchronous/evented approaches to writing serverside code. I've played around with both ruby's EventMachine and node.js. EventMachine is cool, but doesn't have asynchronous file I/O, which I need. The interface is kind of strange, too. Node.js is awesome, but it's... uhh.. it's javascript. Can the greater Stack Overflow community help me out by listing other languages that have strong asynchronous support? To qualify, the language would need to support both closures and have libraries for asynchronous file io, http, etc. It would be nice to have something like node.js that was written in a stronger language than javascript. Lisp? Python has twisted, right?
Setting up Linux to use a certain version of python for compile
10,455,166
0
2
3,632
0
python,linux,development-environment,compilation
Watch out for using the alias when wanting to use the python you want. If the python script uses $0 to figure out, how it was called, then uses that answer to execute another python script. The other script will be called with whatever version that matches the link name, not the version the link points to.
0
1
0
0
2010-03-06T15:50:00.000
4
0
false
2,393,054
1
0
0
4
I'm running Ubuntu to compile a set of code which requires python 2.4. How can I setup a terminal launcher so that when I open that launcher all python related commands will use python 2.4 instead of the python 2.6 that is defaulted in Ubuntu?
Setting up Linux to use a certain version of python for compile
2,393,098
2
2
3,632
0
python,linux,development-environment,compilation
Invoke the interpreter via python2.4 instead of using the default.
0
1
0
0
2010-03-06T15:50:00.000
4
0.099668
false
2,393,054
1
0
0
4
I'm running Ubuntu to compile a set of code which requires python 2.4. How can I setup a terminal launcher so that when I open that launcher all python related commands will use python 2.4 instead of the python 2.6 that is defaulted in Ubuntu?
Setting up Linux to use a certain version of python for compile
2,393,229
4
2
3,632
0
python,linux,development-environment,compilation
Set a bash alias in that shell session: alias python=python2.4 (assuming python2.4 is in your $PATH of course). This way you won't have to remember to explicitly type the 2.4 a zillion times in that terminal -- which is what bash aliases are for!-)
0
1
0
0
2010-03-06T15:50:00.000
4
1.2
true
2,393,054
1
0
0
4
I'm running Ubuntu to compile a set of code which requires python 2.4. How can I setup a terminal launcher so that when I open that launcher all python related commands will use python 2.4 instead of the python 2.6 that is defaulted in Ubuntu?
Setting up Linux to use a certain version of python for compile
2,393,768
1
2
3,632
0
python,linux,development-environment,compilation
For a permenant system wide change put a symbolic link to the version you want in place of /usr/bin/python. ie rm /usr/bin/python; ln -s /usr/bin/python2.4 /usr/bin/python gentoo has a program 'eselect' which is for just this kind of thing (listing versions of programs and setting the default), Ubuntu may have something analogous; you'd have to check their docs.
0
1
0
0
2010-03-06T15:50:00.000
4
0.049958
false
2,393,054
1
0
0
4
I'm running Ubuntu to compile a set of code which requires python 2.4. How can I setup a terminal launcher so that when I open that launcher all python related commands will use python 2.4 instead of the python 2.6 that is defaulted in Ubuntu?
Calling an executable from within Python / Django web application running on IIS
2,395,623
0
1
1,622
0
python,windows,django,iis,executable
Might be a permissions issue. when you run from the shell, you're using the user that run the python manage.py shell command. When serving requests from the IIS you're using its user (IUSR or something like that). Try giving execution permission on the executable file to the Everyone group just to see if it helps.
0
1
0
0
2010-03-06T20:48:00.000
1
0
false
2,394,054
0
0
1
1
I have a Python / Django application which is supposed to call an external windows binary and get its output at some point. And it does so when tested via 'python manage.py shell'. But when it is run from within the web browser, which is served by IIS, the external application is not executed. Is IIS blocking something on the way? Can this be avoided? Any help is much appreciated. oMat
Python _ctypes import error on OSX 10.6
2,394,908
0
3
2,937
0
python,macos
The only thing that I can think of is that maybe it's not on your path. Seems unlikely, but I would check that anyways.
0
1
0
0
2010-03-07T02:09:00.000
4
0
false
2,394,903
0
0
1
2
I'm very new to Python development, and am having a problem with one of my apps in OSX. Technologies being used in this project python 2.6 django google app engine rpx (openid) When loading up the site on my windows app, there are no issues, but when trying to same app on OSX 10.6, I get the following issue: ImportError at /rpx/rpx/login/ No module named _ctypes Here's where the error is happening: /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ctypes/init.py in # """create and manipulate C data types in Python""" import os as _os, sys as _sys version = "1.1.0" from _ctypes import Union, Structure, Array Any ideas? Thanks!
Python _ctypes import error on OSX 10.6
4,802,082
3
3
2,937
0
python,macos
I don't have enough rep to comment so I will make this a post. The accepted answer is correct in that all you need to do is set the Python Path in the GAE preferences to /usr/bin/python2.5. There is no need to download python 2.5 via macports or from the official python website. python 2.5 is still installed in OSX 10.6, it is just not the default python interpreter. For this reason you need to tell GAE explicitly to use version 2.5. FWIW I'm using GAE Launcher 1.4.1
0
1
0
0
2010-03-07T02:09:00.000
4
0.148885
false
2,394,903
0
0
1
2
I'm very new to Python development, and am having a problem with one of my apps in OSX. Technologies being used in this project python 2.6 django google app engine rpx (openid) When loading up the site on my windows app, there are no issues, but when trying to same app on OSX 10.6, I get the following issue: ImportError at /rpx/rpx/login/ No module named _ctypes Here's where the error is happening: /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ctypes/init.py in # """create and manipulate C data types in Python""" import os as _os, sys as _sys version = "1.1.0" from _ctypes import Union, Structure, Array Any ideas? Thanks!
Setting up a python screen scraper that could work on Google App engine
2,660,349
0
3
2,539
0
python,google-app-engine,screen-scraping
I have used BeautifulSoup with great success parsing HTML. Problem is that's all BeautifulSoup does, is parse the HTML. I ended up writing all the http interactions using urlfetch. To web-scrape my target I need a full fledged code driven browser that can execute javascript on my target site's pages. I think I'm having to dump the python app and go java so I can use HTMLUnit - prototyping underway. - mattb
0
1
0
0
2010-03-09T01:38:00.000
4
0
false
2,406,082
0
0
1
2
I am looking to setup a automated screen scraper that will run on Google app engine using python. I want it to scrape the site and put the specified results into a Entity in app engine. I am looking for some directions on what to use. I have seen beautifulsoup but wonder if people could recommend anything else that could run on Google App engine.
Setting up a python screen scraper that could work on Google App engine
2,406,093
0
3
2,539
0
python,google-app-engine,screen-scraping
The other choice is lxml, but it uses C code and so does not work on GAE.
0
1
0
0
2010-03-09T01:38:00.000
4
0
false
2,406,082
0
0
1
2
I am looking to setup a automated screen scraper that will run on Google app engine using python. I want it to scrape the site and put the specified results into a Entity in app engine. I am looking for some directions on what to use. I have seen beautifulsoup but wonder if people could recommend anything else that could run on Google App engine.
standalone application in python
2,409,213
2
1
467
0
python
You could write a installer (using NSIS or something) that does two things : install LateX (or make sure there is an installation of latex available), potentially by calling another installer then install your python script (which can assume latex is now available)
0
1
0
0
2010-03-09T13:04:00.000
2
0.197375
false
2,409,168
1
0
0
1
I wanted to know how can I make standalone application in python. Basically what I am doing right now is I have a template.tex file and my script generate the pdf by giving some input values. So I have to make exe file for windows and same for linux. I can use cx_freeze for creating exe file. But my problem is most of people do not contain latex on their computer. SO how can I make latex get install when I first run my exe. Basically how to make make file. Thanks
Technique to limit number of instances of our application under Terminal Server
2,410,065
1
3
702
0
python,terminal-services,citrix
The various instances of your application need some way to communicate with one another. When an instance starts up, it asks the question, 'how many are already running?'. If there are more than the allowed n, it chooses not to start up. One implementation approach might be to make n files to lock for the n instances of your application you allow to run at the same time. Then, the application tries to get a lock on one of those files; if it can't, it exits immediately. Release the lock when you're done, but presumably the OS would release the lock for you if you crash. Another approach would be to register some per-process unique piece of information (a PID?) in a central location (some database) when you start. Yet a third might be to use a host-only network server where either a dedicated server program or one of the instances coordinates communications with the other instances. If the host exits, one of the other instances can self-promote to being the server.
0
1
0
0
2010-03-09T13:12:00.000
2
1.2
true
2,409,200
0
0
0
2
I'm looking for simple ways to monitor and limit the number of instances of our application under Terminal Server (2003 and 2008). The purpose of this restriction is to make sure we don't overload our servers. This is an internal administrative requirement - I am not looking for a licensing solution. The application in question is written in Python 2.6 (32-bit) but I'm happy to receive development tool agnostic answers. Although we are not using Citrix, I am happy to receive Citrix related ideas with the hope that I can use a similar technique with Terminal Server.
Technique to limit number of instances of our application under Terminal Server
2,431,193
1
3
702
0
python,terminal-services,citrix
Based on feedback on the Python Win32 API mailing list I'm also considering one of the following techniques: Using Windows Semaphores Using a pool of Mutexes (offer better recoverability than semaphores) Using a range of ports
0
1
0
0
2010-03-09T13:12:00.000
2
0.099668
false
2,409,200
0
0
0
2
I'm looking for simple ways to monitor and limit the number of instances of our application under Terminal Server (2003 and 2008). The purpose of this restriction is to make sure we don't overload our servers. This is an internal administrative requirement - I am not looking for a licensing solution. The application in question is written in Python 2.6 (32-bit) but I'm happy to receive development tool agnostic answers. Although we are not using Citrix, I am happy to receive Citrix related ideas with the hope that I can use a similar technique with Terminal Server.
How to make script/program to make it so an application is always running?
2,414,677
1
0
221
0
c#,c++,python
The first solution would be to fix your EXE, so it does not crash. If you can not fix it now, you probably need to add exception handling, so you can catch the exception, and not close the EXE. Second solution is to write simple guard programm that will start your simple .exe and will monitor specific process handle. It will restart your program when it closes.
0
1
0
0
2010-03-10T04:56:00.000
5
0.039979
false
2,414,616
1
0
0
1
I have a simple .exe that needs to be running continuously. Unfortunately, sometimes it crashes unexpectedly, and there's nothing that can be done for this. I'm thinking of like a C# program that scans the running application tree on a timer and if the process stops running it re-launches it... ? Not sure how to do that though.... Any other ideas?
What is the fastest way to check whether a folder size is greater than a specific size?
2,414,931
1
2
1,806
0
python,linux,shell
Folder size is still the total size of the folder contents. You may try to call du -s foldername from python
0
1
0
1
2010-03-10T06:21:00.000
4
0.049958
false
2,414,917
0
0
0
2
What will be the fastest way to check whether a folder size is beyond a specific size say 10 MB, 1 Gb , 10 GB etc, without actually calculating the folder size. Something like quota. A Pythonic solution will be great, but standard UNIX utilities also welcome
What is the fastest way to check whether a folder size is greater than a specific size?
2,414,949
2
2
1,806
0
python,linux,shell
I'd have to say it's impossible. I don't believe any filesystems cache folder sizes. Whatever you do is going to have to walk the tree in some fashion or another. Using du is probably the fastest method since it's all going to be happening in C. If you know the maximum filesize expected or supported you could perhaps optimise a little by counting the enties in each folder rather than the sizes and short-cutting in the case where there aren't enough files to meet the limit.
0
1
0
1
2010-03-10T06:21:00.000
4
0.099668
false
2,414,917
0
0
0
2
What will be the fastest way to check whether a folder size is beyond a specific size say 10 MB, 1 Gb , 10 GB etc, without actually calculating the folder size. Something like quota. A Pythonic solution will be great, but standard UNIX utilities also welcome
What is the Bash equivalent of Python's pass statement
2,421,592
179
125
36,506
0
python,bash,language-comparisons
You can use : for this.
0
1
0
1
2010-03-10T23:54:00.000
2
1.2
true
2,421,586
0
0
0
2
Is there a Bash equivalent to the Python's pass statement?
What is the Bash equivalent of Python's pass statement
2,421,637
45
125
36,506
0
python,bash,language-comparisons
true is a command that successfully does nothing. (false would, in a way, be the opposite: it doesn't do anything, but claims that a failure occurred.)
0
1
0
1
2010-03-10T23:54:00.000
2
1
false
2,421,586
0
0
0
2
Is there a Bash equivalent to the Python's pass statement?
Any downsides to UPX-ing my 32-bit Python 2.6.4 development environment EXE/PYD/DLL files?
2,433,251
2
2
637
0
python,py2exe,upx
I have experienced significant increases in start up time when UPX compressed executables are run on systems with certain virus scanners. I was only compressing single executables, but I expect that each compressed dll would add to the start time. Is it really necessary to use UPX? I can't imagine the space savings to be significant enough to be worth the trouble.
0
1
0
1
2010-03-12T07:56:00.000
1
0.379949
false
2,431,236
1
0
0
1
Are there any downsides to UPX-ing my 32-bit Python 2.6.4 development environment EXE/PYD/DLL files? The reason I'm asking is that I frequently use a custom PY2EXE script that UPX's copies of these files on every build. Yes, I could get fancy and try to cache UPXed files, but I think a simpler, safer, and higher performance solution would be for me to just UPX my Python 2.6.4 directory once and be done with it. Thoughts? Malcolm
What is the easiest way to ping/notify a .NET Windows Service?
2,539,346
0
1
858
0
.net,python,windows-services,ironpython
I had to host a WCF in the windows service to allow it to be notified remotely. Just to keep deploying the solution as simple as possible. using the ServiceController would require the correct setup of permissions
0
1
0
0
2010-03-13T01:41:00.000
3
1.2
true
2,436,927
0
0
0
1
What is the easiest way to ping/notify a .NET Windows Service? Do I have to use WCF for this? Or is there an easier way? I would like to be able to wake up the service using a Python (or an Iron Python) script from anywhere. Also is there a way I can be notified (by email) if that the service has stopped?
Getting CPU temperature using Python?
2,440,544
8
28
57,891
0
python,cpu,temperature
If your Linux supports ACPI, reading pseudo-file /proc/acpi/thermal_zone/THM0/temperature (the path may differ, I know it's /proc/acpi/thermal_zone/THRM/temperature in some systems) should do it. But I don't think there's a way that works in every Linux system in the world, so you'll have to be more specific about exactly what Linux you have!-)
0
1
0
1
2010-03-13T23:35:00.000
12
1
false
2,440,511
0
0
0
1
How do I retrieve the temperature of my CPU using Python? (Assuming I'm on Linux)
How do I find the length of media with gstreamer?
31,616,242
0
13
6,793
0
python,video,media,gstreamer
Why re-invent the wheel? Use: gst-discoverer-1.0 filename or gst-discoverer-0.10 filename Depending on the file type you may want to add " | grep Duration" to avoid the tags which can be lengthy. For the ridding of extraneous tags for video,flac and mp3 files this should do the trick by using grep to exclude them. gst-discoverer-1.0 filename | grep -v Tags | grep -v ID3v2 | grep -v image | grep -v attachment
0
1
0
0
2010-03-13T23:44:00.000
3
0
false
2,440,554
0
0
0
1
How do I find the playback time of media with gstreamer?
What are some good ways to do intermachine locking?
2,449,391
0
7
2,492
0
python,linux,multithreading,mutex
Write code using immutable objects. Write objects that implement the Singleton Pattern. Use a stable Distributed messaging technology such as IPC, webservices, or XML-RPC. I would take a look at Twisted. They got plenty of solutions for such task. I wouldn't use threads in Python esp with regards to the GIL, I would look at using Processes as working applications and use a comms technology as described above for intercommunications. Your singleton class could then appear in one of these applications and interfaced via comms technology of choice. Not a fast solution with all the interfacing, but if done correctly should be stable.
0
1
0
1
2010-03-15T17:08:00.000
5
0
false
2,448,984
1
0
0
2
Our server cluster consists of 20 machines, each with 10 pids of 5 threads. We'd like some way to prevent any two threads, in any pid, on any machine, from modifying the same object at the same time. Our code's written in Python and runs on Linux, if that helps narrow things down. Also, it's a pretty rare case that two such threads want to do this, so we'd prefer something that optimizes the "only one thread needs this object" case to be really fast, even if it means that the "one thread has locked this object and another one needs it" case isn't great. What are some of the best practices?
What are some good ways to do intermachine locking?
2,466,954
1
7
2,492
0
python,linux,multithreading,mutex
if you can get the complete infrastructure for a distributed lock manager then go ahead and use that. But that infrastructure is not easy to setup! But here is a practical solution: -designate the node with the lowest ip address as the the master node (that means if the node with lowest ip address hangs, a new node with lowest ip address will become new master) -let all nodes contact the master node to get the lock on the object. -let the master node use native lock semantics to get the lock. this will simplify things unless you need complete clustering infrastructure and DLM to do the job.
0
1
0
1
2010-03-15T17:08:00.000
5
0.039979
false
2,448,984
1
0
0
2
Our server cluster consists of 20 machines, each with 10 pids of 5 threads. We'd like some way to prevent any two threads, in any pid, on any machine, from modifying the same object at the same time. Our code's written in Python and runs on Linux, if that helps narrow things down. Also, it's a pretty rare case that two such threads want to do this, so we'd prefer something that optimizes the "only one thread needs this object" case to be really fast, even if it means that the "one thread has locked this object and another one needs it" case isn't great. What are some of the best practices?
faking a filesystem / virtual filesystem
2,452,503
3
4
1,877
0
python,security,filesystems,sandbox
You are probably best to use a virtual machine like VirtualBox or VMware (perhaps even creating one per user/session). That will allow you some control over other resources such as memory and network as well as disk The only python that I know of that has such features built in is the one on Google App Engine. That may be a workable alternative for you too.
0
1
0
0
2010-03-16T06:24:00.000
3
0.197375
false
2,452,488
1
0
0
1
I have a web service to which users upload python scripts that are run on a server. Those scripts process files that are on the server and I want them to be able to see only a certain hierarchy of the server's filesystem (best: a temporary folder on which I copy the files I want processed and the scripts). The server will ultimately be a linux based one but if a solution is also possible on Windows it would be nice to know how. What I though of is creating a user with restricted access to folders of the FS - ultimately only the folder containing the scripts and files - and launch the python interpreter using this user. Can someone give me a better alternative? as relying only on this makes me feel insecure, I would like a real sandboxing or virtual FS feature where I could run safely untrusted code.
How to schedule hundreds of thousands of tasks?
2,458,335
1
17
2,429
0
python
If you're worried about writes, you can have a set of servers that dispatch the tasks (may be stripe the servers to equalize load) and have each server write bulk checkpoints to the DB (this way, you will not have so many write queries). You still have to write to be able to recover if scheduling server dies, of course. In addition, if you don't have a clustered index on timestamp, you will avoid having a hot-spot at the end of the table.
0
1
0
0
2010-03-16T21:28:00.000
5
0.039979
false
2,458,296
0
0
0
2
We have hundreds of thousands of tasks that need to be run at a variety of arbitrary intervals, some every hour, some every day, and so on. The tasks are resource intensive and need to be distributed across many machines. Right now tasks are stored in a database with an "execute at this time" timestamp. To find tasks that need to be executed, we query the database for jobs that are due to be executed, then update the timestamps when the task is complete. Naturally this leads to a substantial write load on the database. As far as I can tell, we are looking for something to release tasks into a queue at a set interval. (Workers could then request tasks from that queue.) What is the best way to schedule recurring tasks at scale? For what it's worth we're largely using Python, although we have no problems using components (RabbitMQ?) written in other languages. UPDATE: Right now we have about 350,000 tasks that run every half hour or so, with some variation. 350,000 tasks * 48 times per day is 16,800,000 tasks executed per day. UPDATE 2: There are no dependencies. The tasks do not have to be executed in order and do not rely on previous results.
How to schedule hundreds of thousands of tasks?
2,459,571
1
17
2,429
0
python
350,000 tasks * 48 times per day is 16,800,000 tasks executed per day. To schedule the jobs, you don't need a database. Databases are for things that are updated. The only update visible here is a change to the schedule to add, remove or reschedule a job. Cron does this in a totally scalable fashion with a single flat file. Read the entire flat file into memory, start spawning jobs. Periodically, check the fstat to see if the file changed. Or, even better, wait for a HUP signal and use that to reread the file. Use kill -HUP to signal the scheduler to reread the file. It's unclear what you're updating the database for. If the database is used to determine future schedule based on job completion, then a single database is a Very Dad Idea. If you're using the database to do some analysis of job history, then you have a simple data warehouse. Record completion information (start time, end time, exit status, all that stuff) in a simple flat log file. Process the flat log files to create a fact table and dimension updates. When someone has the urge to do some analysis, load relevant portions of the flat log files into a datamart so they can do queries and counts and averages and the like. Do not directly record 17,000,000 rows per day into a relational database. No one wants all that data. They want summaries: counts and averages.
0
1
0
0
2010-03-16T21:28:00.000
5
0.039979
false
2,458,296
0
0
0
2
We have hundreds of thousands of tasks that need to be run at a variety of arbitrary intervals, some every hour, some every day, and so on. The tasks are resource intensive and need to be distributed across many machines. Right now tasks are stored in a database with an "execute at this time" timestamp. To find tasks that need to be executed, we query the database for jobs that are due to be executed, then update the timestamps when the task is complete. Naturally this leads to a substantial write load on the database. As far as I can tell, we are looking for something to release tasks into a queue at a set interval. (Workers could then request tasks from that queue.) What is the best way to schedule recurring tasks at scale? For what it's worth we're largely using Python, although we have no problems using components (RabbitMQ?) written in other languages. UPDATE: Right now we have about 350,000 tasks that run every half hour or so, with some variation. 350,000 tasks * 48 times per day is 16,800,000 tasks executed per day. UPDATE 2: There are no dependencies. The tasks do not have to be executed in order and do not rely on previous results.
Abort a slow flush to disk after write?
2,458,697
2
3
683
0
python,linux,file-io,flush
It's somewhat filesystem dependent, but in some filesystems, if you delete a file before (all of) it is allocated, the IO to write the blocks will never happen. This might also be true if you truncate it so that the part which is still being written is chopped off. Not sure that you can really abort a write if you want to still access the data. Also the kinds of filesystems that support this (e.g. xfs, ext4) are not normally used on USB sticks. If you want to flush data to the disc, use fdatasync(). Merely flushing your IO library's buffer into the OS one will not achieve any physical flushing.
0
1
0
0
2010-03-16T22:30:00.000
3
1.2
true
2,458,624
0
0
0
2
Is there a way to abort a python write operation in such a way that the OS doesn't feel it's necessary to flush the unwritten data to the disc? I'm writing data to a USB device, typically many megabytes. I'm using 4096 bytes as my block size on the write, but it appears that Linux caches up a bunch of data early on, and write it out to the USB device slowly. If at some point during the write, my user decides to cancel, I want the app to just stop writing immediately. I can see that there's a delay between when the data stops flowing from the application, and the USB activity light stops blinking. Several seconds, up to about 10 seconds typically. I find that the app is holding in the close() method, I'm assuming, waiting for the OS to finish writing the buffered data. I call flush() after every write, but that doesn't appear to have any impact on the delay. I've scoured the python docs for an answer but have found nothing.
Abort a slow flush to disk after write?
2,458,871
1
3
683
0
python,linux,file-io,flush
When you abort the write operation, trying doing file.truncate(0); before closing it.
0
1
0
0
2010-03-16T22:30:00.000
3
0.066568
false
2,458,624
0
0
0
2
Is there a way to abort a python write operation in such a way that the OS doesn't feel it's necessary to flush the unwritten data to the disc? I'm writing data to a USB device, typically many megabytes. I'm using 4096 bytes as my block size on the write, but it appears that Linux caches up a bunch of data early on, and write it out to the USB device slowly. If at some point during the write, my user decides to cancel, I want the app to just stop writing immediately. I can see that there's a delay between when the data stops flowing from the application, and the USB activity light stops blinking. Several seconds, up to about 10 seconds typically. I find that the app is holding in the close() method, I'm assuming, waiting for the OS to finish writing the buffered data. I call flush() after every write, but that doesn't appear to have any impact on the delay. I've scoured the python docs for an answer but have found nothing.
How to implement a master/watchdog script in python?
2,464,752
1
2
1,275
0
python,subprocess,watchdog
I've done this same thing to process web statistics using a semaphore. Essentially, as processes are created, the semaphore is incremented. When they exit, it's decremented. The creation process is blocked when the semaphore blocks. This actually fires off threads, which run external processes down execution path a bit. Here's an example. thread_sem = threading.Semaphore(int(cfg.maxthreads)) for k,v in log_data.items(): thread_list.append(ProcessorThread(int(k), v, thread_sem)) thread_list[-1].start() And then in the constructor for ProcessorThread, I do this: def __init__(self, siteid, data, lock_object): threading.Thread.__init__(self) self.setDaemon(False) self.lock_object = lock_object self.data = data self.siteid = siteid self.lock_object.acquire() When the thread finishes it's task (whether successfully or not), the lock_object is released which allows for another process to begin. HTH
0
1
0
0
2010-03-17T18:09:00.000
2
0.099668
false
2,464,704
1
0
0
1
I need it to open 10 processes, and each time one of them finishes I want to wait few seconds and start another one. It seems pretty simple, but somehow I can't get it to work.
Artificial Intelligence in online game using Google App Engine
2,471,015
2
1
1,026
0
python,google-app-engine,artificial-intelligence
If the game is turn based then it would probably be best to avoid the Cron task and just update the NPCs every time the player moves. I'm not sure how big of a map you are planning on but you may consider even having the player object find the NPCs that are close to it and call their AI routine. That way NPCs that are out of range of a player wouldn't move at all which may save on resources. Not sure if that matter though.
0
1
0
0
2010-03-17T18:59:00.000
3
0.132549
false
2,465,056
0
0
1
3
I am currently in the planning stages of a game for google app engine, but cannot wrap my head around how I am going to handle AI. I intend to have persistant NPCs that will move about the map, but short of writing a program that generates the same XML requests I use to control player actions, than run it on another server I am stuck on how to do it. I have looked at the Task Queue feature, but due to long running processes not being an option on the App engine, I am a little stuck. I intend to run multiple server instances with 200+ persistant NPC entities that I will need to update. Most action is slowly roaming around based on player movements/concentrations, and attacking close range players...(you can probably guess the type of game im developing)
Artificial Intelligence in online game using Google App Engine
2,471,126
2
1
1,026
0
python,google-app-engine,artificial-intelligence
Bear in mind that you can also break up your updates into multiple requests (internally): do a bit of work, redirect to the same handler but different state; do more work; etc. (I'm failing somehow to comment on Peter Recore's answer, which is where this really belongs.) I see that the free service only allows 100k task queue calls/day, so 1 task/NPC would probably use up your resources way too fast. Cron job to do some work/create task queues to update NPCs in appropriately-sized groups? Anyway, just some thoughts; good luck.
0
1
0
0
2010-03-17T18:59:00.000
3
0.132549
false
2,465,056
0
0
1
3
I am currently in the planning stages of a game for google app engine, but cannot wrap my head around how I am going to handle AI. I intend to have persistant NPCs that will move about the map, but short of writing a program that generates the same XML requests I use to control player actions, than run it on another server I am stuck on how to do it. I have looked at the Task Queue feature, but due to long running processes not being an option on the App engine, I am a little stuck. I intend to run multiple server instances with 200+ persistant NPC entities that I will need to update. Most action is slowly roaming around based on player movements/concentrations, and attacking close range players...(you can probably guess the type of game im developing)
Artificial Intelligence in online game using Google App Engine
2,465,142
3
1
1,026
0
python,google-app-engine,artificial-intelligence
Will your game be turn based or real time? Either way, I think you have 2 options to look into. One is to use the Cron feature so you can schedule NPC updates at regular intervals, the other is to stick a "update NPCs" task into the Task Queue every time a human player moves.
0
1
0
0
2010-03-17T18:59:00.000
3
1.2
true
2,465,056
0
0
1
3
I am currently in the planning stages of a game for google app engine, but cannot wrap my head around how I am going to handle AI. I intend to have persistant NPCs that will move about the map, but short of writing a program that generates the same XML requests I use to control player actions, than run it on another server I am stuck on how to do it. I have looked at the Task Queue feature, but due to long running processes not being an option on the App engine, I am a little stuck. I intend to run multiple server instances with 200+ persistant NPC entities that I will need to update. Most action is slowly roaming around based on player movements/concentrations, and attacking close range players...(you can probably guess the type of game im developing)
Using wget via Python
2,467,717
-6
32
92,663
0
python,linux
No reason to use python. Avoid writing a shell script in Python and go with something like bash or an equivalent.
0
1
1
0
2010-03-18T04:55:00.000
6
-1
false
2,467,609
0
0
0
2
How would I download files (video) with Python using wget and save them locally? There will be a bunch of files, so how do I know that one file is downloaded so as to automatically start downloding another one? Thanks.
Using wget via Python
2,467,646
9
32
92,663
0
python,linux
No reason to use os.system. Avoid writing a shell script in Python and go with something like urllib.urlretrieve or an equivalent. Edit... to answer the second part of your question, you can set up a thread pool using the standard library Queue class. Since you're doing a lot of downloading, the GIL shouldn't be a problem. Generate a list of the URLs you wish to download and feed them to your work queue. It will handle pushing requests to worker threads. I'm waiting for a database update to complete, so I put this together real quick. #!/usr/bin/python import sys import threading import urllib from Queue import Queue import logging class Downloader(threading.Thread): def __init__(self, queue): super(Downloader, self).__init__() self.queue = queue def run(self): while True: download_url, save_as = queue.get() # sentinal if not download_url: return try: urllib.urlretrieve(download_url, filename=save_as) except Exception, e: logging.warn("error downloading %s: %s" % (download_url, e)) if __name__ == '__main__': queue = Queue() threads = [] for i in xrange(5): threads.append(Downloader(queue)) threads[-1].start() for line in sys.stdin: url = line.strip() filename = url.split('/')[-1] print "Download %s as %s" % (url, filename) queue.put((url, filename)) # if we get here, stdin has gotten the ^D print "Finishing current downloads" for i in xrange(5): queue.put((None, None))
0
1
1
0
2010-03-18T04:55:00.000
6
1
false
2,467,609
0
0
0
2
How would I download files (video) with Python using wget and save them locally? There will be a bunch of files, so how do I know that one file is downloaded so as to automatically start downloding another one? Thanks.
Configuring Pydev Interpreter in Eclipse to use Enthought Python Distribution
9,306,753
1
16
20,897
0
python,pydev,enthought
I am running Python 3, so I had to make these changes to get python.exe as my interpreter. File: C:\EasyEclipse-for-LAMP-1.2.2.2\extensions\pydev-1.3.3\eclipse\plugins\org.python.pydev_1.3.3\PySrc\interpreterInfo.py Edit all occurrences of "print ..." to "print(...)" (the ... is whatever is being printed), so wrap it in parentheses. Comment out line 16, since True and False are considered keywords in Python 3. Save, and you should be able to successfully set C:\Python32\python.exe as the interpreter. I kept the default folders checked.
0
1
0
0
2010-03-18T12:45:00.000
7
0.028564
false
2,469,849
1
0
0
2
I downloaded Pydev plugin for Eclipse (3.5.2) today on Mac OSX 10.5.8. To be able to use Pydev, I need to configure the interpreter in Eclipse. I am not clear what exactly I need to do here, or what this step does. I want to make sure that when I run programs from Eclipse using Pydev, it uses the Enthought Python Distribution (EPD) I have installed, and can use all the packages that come with EPD. Can someone please tell me simple steps that I need to follow. If I click on autoconfig, it shows a bunch of folders with the path /System/Library/Frameworks/Python.Framework/Versions/2.5/... But I know that the Python that came with EPD is version 2.6.4, so autoconfig is not choosing EPD. Thanks for any help. UPDATE - solution If anyone else is interested in learning how to do this, see the first link in the answer by mlvljr below. Use the solution there EXCEPT that as suggested in the solution, Shift+Cmd+G, did not help me see inside the Python.app package. To look inside it, use the "gear" drop down menu in the Finder and choose "Show Package Contents"
Configuring Pydev Interpreter in Eclipse to use Enthought Python Distribution
4,060,609
12
16
20,897
0
python,pydev,enthought
Mac OS 10.6.4: Selecting the interpreter as /Library/Frameworks/Python.framework/Versions/2.7/Python did not work. I had to select /Library/Frameworks/Python.framework/Versions/2.7/bin/python
0
1
0
0
2010-03-18T12:45:00.000
7
1
false
2,469,849
1
0
0
2
I downloaded Pydev plugin for Eclipse (3.5.2) today on Mac OSX 10.5.8. To be able to use Pydev, I need to configure the interpreter in Eclipse. I am not clear what exactly I need to do here, or what this step does. I want to make sure that when I run programs from Eclipse using Pydev, it uses the Enthought Python Distribution (EPD) I have installed, and can use all the packages that come with EPD. Can someone please tell me simple steps that I need to follow. If I click on autoconfig, it shows a bunch of folders with the path /System/Library/Frameworks/Python.Framework/Versions/2.5/... But I know that the Python that came with EPD is version 2.6.4, so autoconfig is not choosing EPD. Thanks for any help. UPDATE - solution If anyone else is interested in learning how to do this, see the first link in the answer by mlvljr below. Use the solution there EXCEPT that as suggested in the solution, Shift+Cmd+G, did not help me see inside the Python.app package. To look inside it, use the "gear" drop down menu in the Finder and choose "Show Package Contents"
Pypcap for mac on python 2.6?
2,488,246
1
1
1,242
0
python,pcap,packet-sniffers
Python 2.5 code should run fine unaltered on Python 2.6 (you'll just occasionaly get a DeprecationWarning for features which are changing in Python 3.x).
0
1
0
0
2010-03-21T18:25:00.000
1
1.2
true
2,488,185
1
0
0
1
How do you end up running pypcap for python 2.6 on a mac? It seems that there hasn't been any new releases since 2.5 or am I just looking in the wrong places? I seem to be unable to install the 2.5 binary with the following error: You cannot install pcap 1.1 on this volume. pcap requires System Python 2.5 to install.
Performance Wise, Python VS JAVA For File Based Processing
2,490,299
0
1
1,498
0
java,python,file-io
Performance-wise, for an I/O - syscall bound task such as you're mentioning, it's going to be a wash, most likely, depending a bit on the platform. Java tends to have better CPU usage (partly because a JVM can effectively use multiple cores on a multicore CPU on different threads, with CPython having problems with that; partly because of strong JIT abilities), but typically pays for them with higher RAM footprints (no big deal if you have 64GB of RAM laying around and not much else to do on the machine, say, but often an issue in other circumstances). If you specify the platform (Linux vs Windows vs ...), we might be able to offer more help. Edit: with processing required as light as the OP's mentioned in the Q's edit, there's really nothing either way in the CPU-load part of the task. Unfortunately I don't know what freebsd offers for "directory watching" (like Linux's inotify, etc).
0
1
0
1
2010-03-22T06:07:00.000
1
1.2
true
2,490,291
0
0
1
1
I need to create daemon that will monitor certain directory and will process every file that's written to that particular path. My choice is either java or python. Did you guys have any experience using both technology? what is the best one? EDIT 1: files that will be processed is simple text file (one line with tab separated fields). I just need to move it to buffer and send to further to my php file. EDIT 2: It's for freebsd server
Use URL Fetch of Google App Engine just to call a php script
2,491,775
0
1
658
0
python,google-app-engine
Why not rewrite what your php script does in python? Php is a awful scripting language, and considering your thinking about calling it from inside a very powerful language, why not do it all in python
0
1
0
0
2010-03-22T07:36:00.000
3
0
false
2,490,592
0
0
1
1
I wanto call a PHP script using Google App Engine. I just want to execute the script. The script updates a couple of databases on my webhost. But I guess Google App waits for the response. Is there a way by which I can start the script. The script takes some time and Google App might die during that time.
GAE, Python 2.5, Python 2.6 Side-by-side on windows
2,492,830
0
2
470
0
python,django,google-app-engine
Re virtualenv question above: virtualenv have a parameter --python=PYTHON_EXE that you can point to the interpreter you'd like it to use. Running virtualenv without parameters or with an --help option whill show you which options you may pass it.
0
1
0
0
2010-03-22T10:08:00.000
3
0
false
2,491,280
0
0
1
2
On my development system, I have Python 2.6, Django 1.1 and GAE. I have three projects running on Python 2.6 and Django 1.1. I have 1 project using GAE, Python 2.6 and Django 1.1. I have heard that my set-up for running GAE using Python 2.6 may create some head-scratching problems while deploying it on the production server, because GAE supports only Python 2.5, and using 2.6 is not recommended. Can I develop GAE application using Python 2.6? If not, what should I do? I am using Windows Vista as my development system. Please note : I don't want to disturb my other projects in development, which uses Python 2.6 and Django 1.1.
GAE, Python 2.5, Python 2.6 Side-by-side on windows
2,491,639
0
2
470
0
python,django,google-app-engine
Unless you are using python 2.6 specific syntax/code your application is safe to run on GAE.
0
1
0
0
2010-03-22T10:08:00.000
3
0
false
2,491,280
0
0
1
2
On my development system, I have Python 2.6, Django 1.1 and GAE. I have three projects running on Python 2.6 and Django 1.1. I have 1 project using GAE, Python 2.6 and Django 1.1. I have heard that my set-up for running GAE using Python 2.6 may create some head-scratching problems while deploying it on the production server, because GAE supports only Python 2.5, and using 2.6 is not recommended. Can I develop GAE application using Python 2.6? If not, what should I do? I am using Windows Vista as my development system. Please note : I don't want to disturb my other projects in development, which uses Python 2.6 and Django 1.1.
Display an image as a splash screen when running Windows batch file, vbscript/wscript or Python console script
2,502,963
0
2
5,541
0
python,image,vbscript,batch-file,console-application
Try TK, it is included with python. Also, PyGtk is lighter than wxPython, but I ended up bitting the bullet and using wxPython for the same purpose recently, it is heavy, but it didn't have any affect on the script performance.
1
1
0
0
2010-03-23T18:02:00.000
4
0
false
2,502,385
0
0
0
1
Any ideas how I can display an image file (bmp or png) centered on the screen as an application splash screen when running a Windows console script based on a batch file, vbscript/wscript or Python console script? I'm not interested in a wxPython solution - that's too much overhead just to implement a cosmetic feature like a splash screen. Thank you, Malcolm
How do I set up a Python development environment on Linux?
2,504,835
19
13
15,576
0
python,programming-languages,development-environment
Your system already has Python on it. Use the text editor or IDE of your choice; I like vim. I can't tell you what third-party modules you need without knowing what kind of development you will be doing. Use apt as much as you can to get the libraries. To speak to your edit: This isn't minimalistic, like handing a .NET newbie notepad and a compiler: a decent text editor and the stdlib are all you really need to start out. You will likely need third-party libraries to develop whatever kind of applications you are writing, but I cannot think of any third-party modules all Python programmers will really need or want. Unlke the .NET/Windows programming world, there is no one set of dev tools that stands above all others. Different people use different editors a whole lot. In Python, a module namespace is fully within a single file and project organization is based on the filesystem, so people do not lean on their IDEs as hard. Different projects use different version control software, which has been booming with new faces recently. Most of these are better than TFS and all are 1000 times better than SourceSafe. When I want an interactive session, I use the vanilla Python interpreter. Various more fancy interpreters exist: bpython, ipython, IDLE. bpython is the least fancy of these and is supposed to be good about not doing weird stuff. ipython and IDLE can lead to strange bugs where code that works in them doens't work in normal Python and vice-versa; I've seen this first hand with IDLE. For some of the tools you asked about and some others In .NET you would use NUnit. In Python, use the stdlib unittest module. There are various third-party extensions and test runners, but unittest should suit you okay. If you really want to look into something beyond this, get unittest2, a backport of the 2.7 version of unittest. It has incorporated all the best things from the third-party tools and is really neat. In .NET you would use SQL Server. In Python, you may use PostgreSQL, MySQL, sqlite, or some other database. Python specifies a unified API for databases and porting from one to another typically goes pretty smoothly. sqlite is in the stdlib. There are various Object Relational Models to make using databases more abstracted. SQLAlchemy is the most notable of these. If you are doing network programming, get Twisted. If you are doing numerical math, get numpy and scipy. If you are doing web development, choose a framework. There are about 200000: Pylons, zope, Django, CherryPy, werkzeug...I won't bother starting an argument by recommending one. Most of these will happily work with various servers with a quick setting. If you want to do GUI development, there are quite a few Python bindings. The stdlib ships with Tk bindings I would not bother with. There are wx bindings (wxpython), GTK+ bindings (pygtk), and two sets of Qt bindings. If you want to do native Windows GUI development, get IronPython and do it in .NET. There are win32 bindings, but they'll make you want to pull your hair out trying to use them directly.
0
1
0
0
2010-03-24T01:31:00.000
11
1.2
true
2,504,800
1
0
0
5
I'm a .NET developer who knows very little about Python, but want to give it a test drive for a small project I'm working on. What tools and packages should I install on my machine? I'm looking for a common, somewhat comprehensive, development environment. I'll likely run Ubuntu 9.10, but I'm flexible. If Windows is a better option, that's fine too. Edit: To clarify, I'm not looking for the bare minimum to get a Python program to run. I wouldn't expect a newbie .NET dev to use notepad and a compiler. I'd recommend Visual Studio, NUnit, SQL Server, etc.
How do I set up a Python development environment on Linux?
2,504,896
4
13
15,576
0
python,programming-languages,development-environment
Since I'm accustomed to Eclipse, I find Eclipse + PyDev convenient for Python. For quick computations, Idle is great. I've used Python on Windows and on Ubuntu, and Linux is much cleaner.
0
1
0
0
2010-03-24T01:31:00.000
11
0.072599
false
2,504,800
1
0
0
5
I'm a .NET developer who knows very little about Python, but want to give it a test drive for a small project I'm working on. What tools and packages should I install on my machine? I'm looking for a common, somewhat comprehensive, development environment. I'll likely run Ubuntu 9.10, but I'm flexible. If Windows is a better option, that's fine too. Edit: To clarify, I'm not looking for the bare minimum to get a Python program to run. I wouldn't expect a newbie .NET dev to use notepad and a compiler. I'd recommend Visual Studio, NUnit, SQL Server, etc.
How do I set up a Python development environment on Linux?
2,506,982
1
13
15,576
0
python,programming-languages,development-environment
You don't need much. Python comes with "Batteries Included." Visual Studio == IDLE. You already have it. If you want more IDE-like environment, install Komodo Edit. NUnit == unittest. You already have it in the standard library. SQL Server == sqlite. You already have it in the standard library. Stop wasting time getting everything ready. It's already there in the basic Python installation. Get to work. Linux, BTW, is primarily a development environment. It was designed and built by developers for developers. Windows is an end-user environment which has to be supplemented for development. Linux was originally focused on developers. All the tools you need are either already there or are part of simple yum or RPM installs.
0
1
0
0
2010-03-24T01:31:00.000
11
0.01818
false
2,504,800
1
0
0
5
I'm a .NET developer who knows very little about Python, but want to give it a test drive for a small project I'm working on. What tools and packages should I install on my machine? I'm looking for a common, somewhat comprehensive, development environment. I'll likely run Ubuntu 9.10, but I'm flexible. If Windows is a better option, that's fine too. Edit: To clarify, I'm not looking for the bare minimum to get a Python program to run. I wouldn't expect a newbie .NET dev to use notepad and a compiler. I'd recommend Visual Studio, NUnit, SQL Server, etc.
How do I set up a Python development environment on Linux?
2,504,806
2
13
15,576
0
python,programming-languages,development-environment
Python (duh), setuptools or pip, virtualenv, and an editor. I suggest geany, but that's just me. And of course, any other Python modules you'll need.
0
1
0
0
2010-03-24T01:31:00.000
11
0.036348
false
2,504,800
1
0
0
5
I'm a .NET developer who knows very little about Python, but want to give it a test drive for a small project I'm working on. What tools and packages should I install on my machine? I'm looking for a common, somewhat comprehensive, development environment. I'll likely run Ubuntu 9.10, but I'm flexible. If Windows is a better option, that's fine too. Edit: To clarify, I'm not looking for the bare minimum to get a Python program to run. I wouldn't expect a newbie .NET dev to use notepad and a compiler. I'd recommend Visual Studio, NUnit, SQL Server, etc.
How do I set up a Python development environment on Linux?
2,505,840
0
13
15,576
0
python,programming-languages,development-environment
Database: sqlite (inbuilt). You might want SQLAlchemy though. GUI: tcl is inbuilt, but wxPython or pyQt are recommended. IDE: I use idle (inbuilt) on windows, TextMate on Mac, but you might like PyDev. I've also heard good things about ulipad. Numerics: numpy. Fast inline code: lots of options. I like boost weave (part of scipy), but you could look into ctypes (to use dlls), Cython, etc. Web server: too many options. Django (plus Apache) is the biggest. Unit testing: inbuilt. Pyparsing, just because. BeautifulSoup (or another good HTML parser). hg, git, or some other nice VC. Trac, or another bug system. Oh, and StackOverflow if you have any questions.
0
1
0
0
2010-03-24T01:31:00.000
11
0
false
2,504,800
1
0
0
5
I'm a .NET developer who knows very little about Python, but want to give it a test drive for a small project I'm working on. What tools and packages should I install on my machine? I'm looking for a common, somewhat comprehensive, development environment. I'll likely run Ubuntu 9.10, but I'm flexible. If Windows is a better option, that's fine too. Edit: To clarify, I'm not looking for the bare minimum to get a Python program to run. I wouldn't expect a newbie .NET dev to use notepad and a compiler. I'd recommend Visual Studio, NUnit, SQL Server, etc.
webapp, tipfy or django on google app engine
2,512,079
1
10
2,218
0
python,django,google-app-engine,web-applications,tipfy
I'm still investigating, but I think webapp and tipfy will be a lighter framework than django. Right now, I am using just webapp and the cold start times are already too long. I want to use tipfy for sessions and keep everything else in webapp. What are you trying to optimize for? Speed of development? Easy of programming? Obscure middleware?
0
1
0
0
2010-03-24T19:45:00.000
6
0.033321
false
2,510,903
0
0
1
3
which one are you using on google app engine? what were the reasons behind your decision?
webapp, tipfy or django on google app engine
3,184,831
1
10
2,218
0
python,django,google-app-engine,web-applications,tipfy
I would still prefer Django for its structure and a high support available over internet for it and for the following reasons: Webapp offcourse is light weight, but Django comes with a nice structure which saves a lots of time while working on a large application. Google app engine does provide a good document for working with Webapp but Django has a large community of programmers and thus proves to be a better choice for implementing some complex applications. Django provides a default admin panel, which otherwise would need to be created in Webapp, though Google app provides an admin interface but that is not equivalent of a full fledged customizable admin panel. Webapp itself follows Django for its templates.
0
1
0
0
2010-03-24T19:45:00.000
6
0.033321
false
2,510,903
0
0
1
3
which one are you using on google app engine? what were the reasons behind your decision?
webapp, tipfy or django on google app engine
3,304,317
4
10
2,218
0
python,django,google-app-engine,web-applications,tipfy
Imho.. Django - the only part that's relevant is the templating and maybe the no rel.. Webapp - never tried it after Tipfy - is what I'm using, seems to be more "pylons" like, has a basic apps/modules structure and lots of "helpers" which quite frankly should be in the google.appengine.api Easy to implement templates and routing is nice. Your pretty much left on your own on how to use tipfy and how to structure the application.
0
1
0
0
2010-03-24T19:45:00.000
6
0.132549
false
2,510,903
0
0
1
3
which one are you using on google app engine? what were the reasons behind your decision?
Idiots guide to app engine and memcache
2,514,663
3
2
2,620
0
python,google-app-engine,memcached
If you cache a query, is there an accepted method for ensuring that the cache is cleared/updated when an object stored in that query is updated. Typically you wrap your reads with a conditional to retrieve the value from the main DB if it's not in the cache. Just wrap your updates as well to fill the cache whenever you write the data. That's if you need the results to be as up to date as possible - if you're not so bothered about it being out of date just set an expiry time that is low enough for the application to have to re-request the data from the main DB often enough.
0
1
0
0
2010-03-25T01:20:00.000
3
0.197375
false
2,512,571
0
0
1
2
I am struggling to find a good tutorial or best practices document for the use of memcache in app engine. I'm pretty happy with it on the level presented in the docs. Get an object by ID, checking memcache first, but I'm unclear on things like: If you cache a query, is there an accepted method for ensuring that the cache is cleared/updated when an object stored in that query is updated. What are the effects of using ReferenceProperties ? If a cache a Foo object with a Bar reference. Is my foo.bar in memcache too and in need of clearing down if it gets updated from some other part of my application. I don't expect answers to this here (unless you are feeling particularly generous!), but pointers to things I could read would be very gratefully received.
Idiots guide to app engine and memcache
5,571,331
0
2
2,620
0
python,google-app-engine,memcached
About reference properties, let's say you have MainModel and RefModel with a reference property 'ref' that points to a MainModel instance. Whenever you cal ref_model.ref it does a datastore get operation and retrieves the object from datastore. It does not interact with memcache in any way.
0
1
0
0
2010-03-25T01:20:00.000
3
0
false
2,512,571
0
0
1
2
I am struggling to find a good tutorial or best practices document for the use of memcache in app engine. I'm pretty happy with it on the level presented in the docs. Get an object by ID, checking memcache first, but I'm unclear on things like: If you cache a query, is there an accepted method for ensuring that the cache is cleared/updated when an object stored in that query is updated. What are the effects of using ReferenceProperties ? If a cache a Foo object with a Bar reference. Is my foo.bar in memcache too and in need of clearing down if it gets updated from some other part of my application. I don't expect answers to this here (unless you are feeling particularly generous!), but pointers to things I could read would be very gratefully received.
Creating Read-only logs with python
2,519,800
1
0
414
0
python,linux,logging,permissions
I see you are on linux, Depending on which filesystem you are using, you may be able to use the chattr command. You can make files that are append only by setting the a attribute
0
1
0
0
2010-03-25T21:56:00.000
2
0.099668
false
2,519,706
0
0
0
1
I am writing a python script that needs to make a log entry whenever it's invoked. The log created by the script must not be changeable by the user (except root) who invoked the script. I tried the syslog module and while this does exactly what I want in terms of file permissions, I need to be able to put the resulting log file in an arbitrary location. How would I go about doing this?
Compiling a Python binding on Linux
2,526,648
1
3
772
0
python,debian,binding
The python-dev package needs to be installed.
0
1
0
0
2010-03-26T20:46:00.000
5
0.039979
false
2,526,632
0
0
0
1
I'm trying to compile a Python binding, but I'm unable to find the python.h header on debian. Which package should I install?
I need a simple command line program to transform XML using an XSL Stylesheet
2,541,765
0
15
23,093
0
java,python,xml,macos,xslt
I have used Saxon 6.5 for years for command line transformations. (Java, XSLT 1) An excellent fallback if a native solution is not available.
0
1
0
0
2010-03-26T20:55:00.000
8
0
false
2,526,681
0
0
1
1
I am on OSX Snow Leopard (10.6.2) I can install anything I need to. I would preferably like a Python or Java solution. I have searched on Google and found lots of information on writing my own program to do this, but this is a just a quick and dirty experiment so I don't want to invest a lot of time on writing a bunch of code to do this, I am sure someone else has done this already. This is off-topic now, do not use this question as an example of why your recommendations request is on topic, it is not. I apologize, but my Google-Foo was failing me the day I asked this 4 years ago!
Is Using Python to MapReduce for Cassandra Dumb?
2,528,683
6
4
1,625
0
python,mongodb,cassandra,couchdb,nosql
Cassandra supports map reduce since version 0.6. (Current stable release is 0.5.1, but go ahead and try the new map reduce functionality in 0.6.0-beta3) To get started I recommend to take a look at the word count map reduce example in 'contrib/word_count'.
0
1
0
0
2010-03-26T22:28:00.000
2
1.2
true
2,527,173
0
1
0
1
Since Cassandra doesn't have MapReduce built in yet (I think it's coming in 0.7), is it dumb to try and MapReduce with my Python client or should I just use CouchDB or Mongo or something? The application is stats collection, so I need to be able to sum values with grouping to increment counters. I'm not, but pretend I'm making Google analytics so I want to keep track of which browsers appear, which pages they went to, and visits vs. pageviews. I would just atomically update my counters on write, but Cassandra isn't very good at counters either. May Cassandra just isn't the right choice for this? Thanks!