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 return... |
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 t... | 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 /us... |
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... |
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... |
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... |
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 per... | 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... |
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... | 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... |
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 ... | 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... |
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 t... | 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 th... | 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 ... |
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.
... |
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 M... | 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 distribu... |
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.... | 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 distribu... |
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 distribu... |
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 Micro... | 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 distribu... |
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 w... | 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... | 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 poi... |
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 ... |
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-documen... | 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.
Netwo... |
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... | 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.
Netwo... |
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("... |
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("... |
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... | 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 t... |
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 downs... | 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 t... |
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-memcache... | 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 t... |
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 tou... | 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 t... |
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 t... |
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 w... | 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 t... |
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 t... |
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 t... |
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 ... |
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 compa... | 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 ... |
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 produ... | 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 p... |
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 ma... | 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 p... |
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... | 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 f... |
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 conditi... | 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 f... |
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. T... |
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 somethin... | 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 somethin... |
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:
ImportE... |
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.... | 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:
ImportE... |
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 h... | 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 cou... |
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 cou... |
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 ... |
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 o... | 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... |
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... |
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. I... | 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 th... |
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 o... | 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 t... | 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 perfor... |
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 exa... | 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 exclud... | 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 l... | 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... |
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 wi... | 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... |
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 m... | 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 w... |
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... | 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 t... |
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 f... | 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 t... |
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... | 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, an... |
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, an... |
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... | 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... | 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 s... |
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 ta... | 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 s... |
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 s... |
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 pr... | 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 i... | 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 Distr... |
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 Distr... |
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 tha... | 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 s... |
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 producti... |
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 producti... |
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 ... |
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 .N... | 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... |
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... |
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 g... | 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... |
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... |
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... | 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... |
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 progra... | 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 wo... | 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 a... | 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 whe... | 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 ... |
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 ... |
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... |
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 ... |
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'... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.