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
Python mysqldb on Mac OSX 10.6 not working
5,072,940
2
2
1,535
1
python,mysql,django,macos
I eventually managed to solve the problem by Installing python 2.7 with Mac Ports and installing mysqldb using Mac Ports - was pretty simple after that.
0
1
0
0
2011-02-21T22:35:00.000
2
1.2
true
5,072,066
0
0
1
2
I am using Python 2.7 and trying to get a Django project running on a MySQL backend. I have downloaded mysqldb and followed the guide here:http://cd34.com/blog/programming/python/mysql-python-and-snow-leopard/ Yet when I go to run the django project the following traceback occurs: Traceback (most recent call last): ...
Python mysqldb on Mac OSX 10.6 not working
5,305,496
0
2
1,535
1
python,mysql,django,macos
you needed to add the MySQL client libraries to the LD_LIBRARY_PATH.
0
1
0
0
2011-02-21T22:35:00.000
2
0
false
5,072,066
0
0
1
2
I am using Python 2.7 and trying to get a Django project running on a MySQL backend. I have downloaded mysqldb and followed the guide here:http://cd34.com/blog/programming/python/mysql-python-and-snow-leopard/ Yet when I go to run the django project the following traceback occurs: Traceback (most recent call last): ...
How to write `app.yaml` file for Google App Engine app?
5,077,700
1
1
1,439
0
python,google-app-engine,yaml
you should put your static files into some directory, for example staticdata then your app.yaml would look like: application: temp version: 1 runtime: python api_version: 1 handlers: - url: /staticdata static_dir: staticdata - url: /.* script: temp.py
0
1
0
0
2011-02-22T11:12:00.000
1
1.2
true
5,077,336
0
0
1
1
I registered a Google App Engine app and I have some files below: /index.html /tabs.css /tab.js /temp.py How should I write the app.yaml file?
Automatic deletion or expiration of GAE datastore entities
5,079,939
5
3
2,483
1
python,google-app-engine,google-cloud-datastore
Assuming you have a DateProperty on the entities indicating when the election ended, you can have a cron job search for any older than 3 months every night and delete them.
0
1
0
0
2011-02-22T15:09:00.000
3
1.2
true
5,079,885
0
0
1
1
I'm building my first app with GAE to allow users to run elections, and I create an Election entity for each election. To avoid storing too much data, I'd like to automatically delete an Election entity after a certain period of time -- say three months after the end of the election. Is it possible to do this automa...
django signal on GAE
5,083,039
0
1
124
0
python,django,google-app-engine,django-nonrel
Does Django signals work on google app engine ? Yes, as long as you save those models use the Model.save()
0
1
0
0
2011-02-22T16:23:00.000
2
0
false
5,080,844
0
0
1
2
Does Django signals work on google app engine ? I am using django-nonrel. Thanks
django signal on GAE
5,080,893
0
1
124
0
python,django,google-app-engine,django-nonrel
Works fine. Signals do not use the db.
0
1
0
0
2011-02-22T16:23:00.000
2
1.2
true
5,080,844
0
0
1
2
Does Django signals work on google app engine ? I am using django-nonrel. Thanks
Editor for use with GoogleAppEngineLauncher on Mac
5,086,257
4
2
226
0
python,google-app-engine,editor,directory,yaml
Why not use your favorite editor? Textmate or gvim or emacs anything should do here. All them support Python and YAML syntax.
0
1
0
0
2011-02-23T02:03:00.000
3
1.2
true
5,086,239
0
0
1
2
What editors are best for use with the "Edit" button in GoogleAppEngineLauncher for Mac? A good editor would preferably be able to edit Python and YAML and be able to open directories.
Editor for use with GoogleAppEngineLauncher on Mac
5,087,788
0
2
226
0
python,google-app-engine,editor,directory,yaml
Have you tried TextWrangler or jEdit? You can get the links to them on Apple site or you can google for them. They are pretty good editors.
0
1
0
0
2011-02-23T02:03:00.000
3
0
false
5,086,239
0
0
1
2
What editors are best for use with the "Edit" button in GoogleAppEngineLauncher for Mac? A good editor would preferably be able to edit Python and YAML and be able to open directories.
Easiest way to install pygtk on Mac OS X
5,090,869
1
8
11,837
0
python,macos,gtk,pip,homebrew
You need to install pygtk yourself - at least because since some of its dependencies like dextras are not available through PyPI.
0
1
0
0
2011-02-23T10:29:00.000
2
1.2
true
5,089,649
1
0
0
1
Ideally, I would like to install pygtk using pip or Homebrew. Neither one seems to be possible. I am running Leopard.
Multi-threading different scripts
5,161,519
0
1
4,367
0
python,multithreading
So it doesn't have to be a Python launcher? Back when I was doing heavy sys admin, I wrote a Perl script using the POE framework to run scripts or whatever with a limited concurrency. Worked great. for example when we had to run a script over a thousand user accounts or a couple of hundred data bases. Limit it to just ...
0
1
0
0
2011-02-23T15:42:00.000
2
0
false
5,093,164
1
0
0
1
I have aa few scripts written in python. I am trying to multi thread them. When Script A starts. I would like scripts B, C, and D to start. After A runs, I would A2 to run. After B runs, I would B2 to run, then B3. C and D have no follow up scripts. I have checked that the scripts are independent of each other. ...
Programmatically create Google Apps Domain
5,271,776
1
1
671
0
java,python,google-app-engine
There is an API only available to Google Apps Resellers, if you are one of them you should get access to it.
0
1
0
0
2011-02-23T18:13:00.000
2
1.2
true
5,095,117
0
0
1
1
I am currently working on a project that involves the google apps provisioning api. Without getting too detailed about the purpose or inner workings of the project, I would like to ask a very simple question: Is there a way to programmatically create a google apps for business domain (especially as a reseller)? After t...
Killing individual Apache processes in mod_python
5,098,486
0
1
318
0
python,apache,mod-python
I'd say that even it is possible, it would be a tremendous hack (and instable) - you should set-up a process external to apache in this case, that would supervise running processes and kill an individual apache when it goes beyond memory/time predefined limits. Such a script can be kept running continuously with a main...
0
1
0
1
2011-02-23T19:33:00.000
1
0
false
5,096,057
0
0
1
1
We are having a problem with individual apache processes utilizing large amounts of memory, depending on the request, and never releasing it back to the main system. Since these requests can happen at any time, over time the web server is pushed into swap, rendering it unresponsive even to SSH. Worse, after the reque...
python: subprocess.call threads problem
5,106,150
0
0
577
0
python,multithreading,subprocess
What are the program listings for abc.py and def.py? Are you sure that the commands you are executing ever end? Try running it with the two subprocess.call() lines commented out and see if it works as intended. If it suddenly works, then the problem is somewhere related to the scripts you're calling outside of the c...
0
1
0
0
2011-02-23T22:56:00.000
1
1.2
true
5,098,334
0
0
0
1
Hello people within the while True processing never ends, even if I use q.task_done, what is wrong? fileQueue = Queue() def submit(i, q): global filespath while True: filename = q.get() retVT = subprocess.call("python abc.py -f %s" % (filespath + filename), shell=True, stdout=open('/dev/null', 'w')...
Writing python script for a Mac on a linux or windows machine
5,102,951
1
0
315
0
python,multiplatform
As long as you stick to the common and POSIX/UNIX interfaces, it will work equally fine on both Ubuntu and OS X barring any deep magic. Since you haven't described the problem, that's the only advice that can be given.
0
1
0
0
2011-02-24T09:48:00.000
2
0.099668
false
5,102,909
0
0
0
1
I wrote a python script for a friend to make a job task easier. Now her company wants to pay me for another script (woot!). However she works on a Mac and I have only a Windows pc and an Ubuntu pc. While python is multi-platform, I ran into a problem with the first script that was only happening on her Mac. So is there...
webservices in python
5,104,394
0
0
931
0
python,web-services,frameworks
For REST, I am very satisfied with Flask.
0
1
0
1
2011-02-24T11:48:00.000
2
0
false
5,104,215
0
0
1
1
i want to create a webservice (SOAP & REST) in python which cab be called from iphone, now i have install python 2.7.1 on Ubuntu 10.04.2 LTS using Putty. so now i am searching for a nice and easy framework that helps me in creating webservices and web programming. I have searched a lot but confused with the combinatio...
async http request on Google App Engine Python
5,111,470
2
4
1,253
0
python,http,google-app-engine,asynchronous,request
Use the taskqueue. If you're just pushing data, there's no sense in waiting for the response.
0
1
1
0
2011-02-24T16:43:00.000
4
0.099668
false
5,107,675
0
0
1
2
Does anybody know how to make http request from Google App Engine without waiting a response? It should be like a push data with http without latency for response.
async http request on Google App Engine Python
5,111,384
0
4
1,253
0
python,http,google-app-engine,asynchronous,request
I've done this before by setting doing a URLFetch and setting a very low value for the deadline parameter. I put 0.1 as my value, so 100ms. You need to wrap the URLFetch in a try/catch also since the request will timeout.
0
1
1
0
2011-02-24T16:43:00.000
4
0
false
5,107,675
0
0
1
2
Does anybody know how to make http request from Google App Engine without waiting a response? It should be like a push data with http without latency for response.
In Windows using Python, how do I kill my process?
5,114,093
1
1
2,588
0
python,windows,winapi,pywin32
win32api.TerminateProcess(handle, 0) works, but i'm concerned it may cause memory leaks because i won't have the opportunity to close the handle (program immediately stops after calling TerminateProcess). note: Yup, I am force quitting it so there are bound to be some unfreed resources, but I want to mi...
0
1
0
0
2011-02-25T04:57:00.000
3
1.2
true
5,113,791
0
0
0
2
Edit: Looks like a duplicate, but I assure you, it's not. I'm looking to kill the current running process cleanly, not to kill a separate process. The problem is the process I'm killing isn't spawned by subprocess or exec. It's basically trying to kill itself. Here's the scenario: The program does cleanup on exit, but ...
In Windows using Python, how do I kill my process?
14,405,624
1
1
2,588
0
python,windows,winapi,pywin32
TerminateProcess and taskkill /f do not free resources and will result in memory leaks. Here is the MS quote on terminateProcess: { ... Terminating a process does not cause child processes to be terminated. Terminating a process does not necessarily remove the process object from the system. A process object is delete...
0
1
0
0
2011-02-25T04:57:00.000
3
0.066568
false
5,113,791
0
0
0
2
Edit: Looks like a duplicate, but I assure you, it's not. I'm looking to kill the current running process cleanly, not to kill a separate process. The problem is the process I'm killing isn't spawned by subprocess or exec. It's basically trying to kill itself. Here's the scenario: The program does cleanup on exit, but ...
Does poster.encode module supported in python appengine?
5,119,334
2
0
937
0
python,google-app-engine
You'd need to deploy the module with your code by including it in your application's directory when deploying, but it does appear to be a pure python module and looking through the source I see no reason why it wouldn't work just fine in App Engine. The only modules that won't work are those that use C extensions or ma...
0
1
0
0
2011-02-25T15:46:00.000
2
0.197375
false
5,119,269
0
0
1
1
Does poster.encode module supported in python appengine ?? if No , whats is the possible alternatives ?
Py2app build runs perfectly when run from command line or the executable in the pkg, but not when the app is double clicked
5,164,580
5
2
1,028
0
python,macos,py2app
Check the Console (Applications > Utilities). All stack traces from py2app applications get printed there. I had this problem today, and my solution was that there was something broken with argv_emulation in py2app itself, so I had to set it to False in the OPTIONS dict. It's set to True by default.
0
1
0
0
2011-02-26T18:47:00.000
1
1.2
true
5,128,999
1
0
0
1
I have a program that I'm trying to distribute with py2app. When I run the program from the command line, it works without any problems. It also works if I go into the package that py2app creates and find the exec inside the package contents and run it from there. There are not any errors in the output during the build...
Find the current directory and file's directory
18,185,825
17
2,737
4,064,701
0
python,directory
If you're searching for the location of the currently executed script, you can use sys.argv[0] to get the full path.
0
1
0
0
2011-02-28T01:51:00.000
13
1
false
5,137,497
1
0
0
1
In Python, what commands can I use to find: the current directory (where I was in the terminal when I ran the Python script), and where the file I am executing is?
Counting records from datastore
5,139,865
4
0
122
0
python,google-app-engine
Store the count in another entity (named Statistics for example), and modify your application so that the stored count is updated each time a new entity is inserted or deleted.
0
1
0
0
2011-02-28T08:44:00.000
1
1.2
true
5,139,767
0
0
1
1
I am using python with Django to develop application on google app engine. Now my entity in data store contain millions or billions of record and I want to count those records in real time. By using count() it takes more time then what I can afford I want to count those record with in 2 or 3 second.. So can any one tel...
Querying on multiple tables using google apps engine (Python)
5,143,851
0
1
873
1
python,google-app-engine,model
If your are looking for join - there is no joins in GAE. BTW, there is pretty easy to make 2 simple queries (Softwares and UserSoftware), and calculate all additional data manually
0
1
0
0
2011-02-28T12:48:00.000
3
0
false
5,142,192
0
0
1
1
I have three tables, 1-Users, 2-Softwares, 3-UserSoftwares. if suppose, Users table having 6 user records(say U1,U2,...,U6) and Softwares table having 4 different softwares(say S1,S2,S3,S4) and UserSoftwares stores the references if a user requested for given software only. For example: UserSoftwares(5 records) have on...
python subprocess: raising an error when a process prompts
5,142,966
0
1
354
0
python,subprocess
You need a time-out while waiting for your tasks to complete and then have your script kill or terminate the process (in addition to raising the error).
0
1
0
0
2011-02-28T13:58:00.000
3
0
false
5,142,908
1
0
0
1
I have a python script that runs on a server after hours and invokes many shell subprocesses. None of the programs that are called should be prompting, but sometimes it happens and the script hangs, waiting for input until the user (me) notices and gets angry. :) Tried: Using p.communicate() with stdin=PIPE, as written...
Django on python2.5
5,154,551
0
0
238
0
python,django,ubuntu-10.10
Install python2.5 with synaptic, then you will be able to use easy_install2.5 to install django. If you don't have the python2.5 in your package list you can put django on your python2.5 system path and be with it to view the system path do: python2.5 import sys sys.path
0
1
0
0
2011-03-01T12:25:00.000
1
1.2
true
5,154,479
0
0
1
1
AppEngine needs Python2.5. Ubuntu 2010.10 comes with Python 2.6.6 and I didn't want to interfere with it, so I downloaded and compiled Python 2.5 in my home directory. Then I downloaded Django-1.2.5.tar.gz, and ran "sudo python setup.py install". Problem: "import django" says "ImportError: No module named django" I gu...
I'm running 32-bit Windows on an x86-64 PC. Should I download the 32-bit or 64-bit Python installer?
5,158,909
3
2
533
0
python,installation,download,32bit-64bit
Even though you have a 64-bit processor, your OS is of a 32-bit flavour. The Windows installer for Python targets the OS it is built on, not just the processor. Since your OS is 32-bit, you can only install the regular 32-bit Python 2.7.1 Windows installer. Note that you can install both 32-bit (under a 32-bit emulatio...
0
1
0
0
2011-03-01T18:35:00.000
3
0.197375
false
5,158,781
1
0
0
1
I have an Intel T9550 64-bit processor with 32-bit Windows Vista. I want to install Python 2.7.1 onto my PC. From the python.org website, which installer should I use: "Python 2.7.1 Windows Installer"? or "Python 2.7.1 Windows X86-64 Installer"? The latter one is for x86-64. I don't understand if this bit refers to t...
twisted reactor: priority and insights
5,160,794
3
4
724
0
python,twisted,reactor
No. The reactor does not implement priority-based scheduling; it just runs events in whatever order they happen to come back from your multiplexing/timing mechanism, depending on the particular reactor implementation (it's slightly different for the different ones). Implementing a scheduling or fair queueing API in th...
0
1
0
0
2011-03-01T19:21:00.000
1
1.2
true
5,159,259
0
0
0
1
Two simple questions about twisted reactor: Is there a way to explicitly assign a priority while scheduling a task ? Is it possible to inspect the reactor in order to list all the pending tasks?
Debugging SCons
5,221,496
1
2
2,486
0
python,debugging,trace,scons,circular-dependency
Ok, I've solved the problem. It seems the reason was that a directory slipped into the list of targets, and directories create their own set of implicit dependencies. At least that's what I think, because after removing the directory the scripts work as expected. Can anyone clarify if my assumption is correct? I still ...
0
1
0
0
2011-03-02T11:15:00.000
1
0.197375
false
5,166,700
0
0
0
1
I've written a rather complicated set of SCons scripts, and I have some errors I cannot find, for example intermediate files are removed or there are cyclic dependencies reported, and I want to know the reason. Unfortunately, I don't see any means to get good verbose debugging output of what SCons is doing and where. F...
After saving memcache data, is it immediately available on GAE?
5,170,495
3
1
699
0
python,google-app-engine,caching,memcached
The distributed memcache architecture has a pool of memcache instances that serves all the Google App Engine applications; the stored data is not replicated between memcache servers. After successfully saving data on memcache, your data will be there* for any subsequent requests because it is stored in one specific me...
0
1
0
0
2011-03-02T14:37:00.000
3
1.2
true
5,169,001
0
0
1
1
On Google App Engine (python), I need to save data with memcache and quickly read it on another page. But before I start coding to have memcache saved, then on the next page I open up that data with the known key, I'm starting to wonder if the data will always be there on the next page? How long does it take to cache ...
Learning the directory's physical disk on Linux with Python
5,171,542
1
1
515
0
python,linux
An easier alternative to using mount might be to invoke df <directory>. This prints out the filesystem. Also, on my Ubuntu box, passing -P to df makes the output a little bit easier to parse.
0
1
0
1
2011-03-02T18:05:00.000
2
0.099668
false
5,171,511
0
0
0
1
First, sorry for my bad English. I'm writing a python script, which compares the files in two different directories. But for performance, I want to know that: "Are the directories on the same physical disk or not?", so I can read them simultaneously for performance gain. My current idea is getting "mount" commands outp...
python script execution through crontab
5,174,130
1
2
7,385
0
python,cron,execution,crontab
I believe it should be */1, not *\1.
0
1
0
1
2011-03-02T22:00:00.000
4
0.049958
false
5,174,080
0
0
0
2
what happens to my script in python that does not run through crontab every minute. My script has execute permissions and then calls two other scripts in python. This is the content of my crontab (#crontab -l): */1 * * * * /usr/bin/rsm/samplesMonitor.py Thank you guys.
python script execution through crontab
5,174,140
0
2
7,385
0
python,cron,execution,crontab
It should be */1 instead of *\1 (forward slash instead of backslash). Also, make sure the path is correct; there usually are no subdirectories under /usr/bin.
0
1
0
1
2011-03-02T22:00:00.000
4
0
false
5,174,080
0
0
0
2
what happens to my script in python that does not run through crontab every minute. My script has execute permissions and then calls two other scripts in python. This is the content of my crontab (#crontab -l): */1 * * * * /usr/bin/rsm/samplesMonitor.py Thank you guys.
How to turn off blinking cursor in command window?
70,550,803
9
16
16,984
0
python,text-cursor,command-window
I'm surprised nobody mentioned that before, but you actually don't need any library to do that. Just use print('\033[?25l', end="") to hide the cursor. You can show it back with print('\033[?25h', end=""). It's as easy as that :)
0
1
0
0
2011-03-02T23:25:00.000
4
1
false
5,174,810
0
0
0
1
I have a Python script that sends output to a DOS command window (I am using Windows 7) using the print() function, but I would like to prevent (or hide) the cursor from blinking at the next available output position. Has anyone any idea how I can do this? I have looked at a list of DOS commands but I cannot find any...
Python: How to execute a thread in a new terminal window/command prompt?
5,178,184
0
0
1,644
0
python,multithreading,terminal
The -S option of xterm can be used to pass a PTY slave file descriptor. Data written to the corresponding PTY master should then appear in the xterm window. So in your thread, you could call os.openpty() to open a new PTY, start an xterm with subprocess.Popen(), passing a suitable -S option, and write all thread's outp...
0
1
0
0
2011-03-03T05:30:00.000
1
0
false
5,177,030
1
0
0
1
How to execute a thread in a script in a new terminal window/command prompt? So that the results of the thread will be displayed on a separate window while still having control on the main interpreter? The thread is a continuous remote server pinging thread for alive check.
python/c++ wrapping on Snow Leopard
5,191,205
0
1
142
0
c++,python,swig,osx-leopard,importerror
Given that it worked on 32 bits, I would first check whether the library has 64 bits code. You can use the file command I think to check the arch in a multi-arch mach-o binary. If the library is indeed 64 bits, then please give us the exact exception in python, and more importantly, a build log from cmake. Build issues...
0
1
0
0
2011-03-03T20:48:00.000
1
0
false
5,186,361
0
0
0
1
I create a dynamic library and then using swig under snow leopard but when I import my module it returns always ImportError: No module named blabla. I've all compiled in 64 bit, download and install python 2.7 64 bit. This test library has been created with cmake, and when I was with leopard 32 bit, it worked.
Cannot find appcfg.py or dev_appserver.py?
5,187,728
1
11
17,655
0
python,google-app-engine,macos,bash
Try: ./appcfg.py Current dir is usually not part of path.
0
1
0
0
2011-03-03T22:48:00.000
7
0.028564
false
5,187,602
0
0
1
2
My computer says... "-bash: appcfg.py: command not found" What is wrong? I can run my application using google-app-engine-launcher and I have python pre-installed. I am trying to upload my app using "appcfg.py update myapp" I am new to Mac development.
Cannot find appcfg.py or dev_appserver.py?
5,188,313
17
11
17,655
0
python,google-app-engine,macos,bash
In App Engine launcher there is a menu option called "Make Symlinks..." that adds symlinks for the various App Engine utility commands, like appcfg.py.
0
1
0
0
2011-03-03T22:48:00.000
7
1.2
true
5,187,602
0
0
1
2
My computer says... "-bash: appcfg.py: command not found" What is wrong? I can run my application using google-app-engine-launcher and I have python pre-installed. I am trying to upload my app using "appcfg.py update myapp" I am new to Mac development.
Fast Reading of 10000 Binary Files?
5,187,734
0
3
669
0
python,linux
Iterate over them and use optimise flag you might also want to parse them using pypy it compiles python via a JIT compiler allowing for a somewhat marked increase in speed.
0
1
0
1
2011-03-03T23:00:00.000
3
0
false
5,187,705
0
0
0
1
I have 10,000 binary files, named like this: file0.bin file1.bin ............ ............ file10000.bin Each of the above files contains exactly 391 float values (1564 bytes per file). my goal is to read all of the files into a python array in the fastest way possible. If I open & close each file using a script, it ta...
Python & memory mapping?
5,188,512
4
0
479
0
python,linux,ubuntu
There's multiple limits in play. The first is the system-wide open files limit, /proc/sys/fs/nr_open. This is typically in the million-range. This limit may continue to be counted against processes that open the file, set up the mapping, then close the file again. The second is the per-process getrlimit(2) RLIMIT_NOFIL...
0
1
0
0
2011-03-04T00:42:00.000
2
1.2
true
5,188,423
1
0
0
2
Using a Linux machine, how many files can one 'mmap' using python (what is the limit)? Thanks.
Python & memory mapping?
5,188,437
1
0
479
0
python,linux,ubuntu
This is completely system dependent. This limit won't be imposed by python, rather it will be dependent on your OS settings and the amount of memory you have available. Furthermore, your system may impose a per process mmap limit which you can check at /proc/sys/vm/max_map_count.
0
1
0
0
2011-03-04T00:42:00.000
2
0.099668
false
5,188,423
1
0
0
2
Using a Linux machine, how many files can one 'mmap' using python (what is the limit)? Thanks.
How do I create a line-break in Terminal?
5,190,101
0
12
43,483
0
python,macos,terminal
The statements which represent a block of code below end with a colon(:) in Python. By doing that way, you can add extra statements under a single block and execute them at once.
0
1
0
0
2011-03-04T05:25:00.000
6
0
false
5,190,030
1
0
0
2
I'm using Python in Terminal on Mac OSX latest. When I press enter, it processes the code I've entered, and I am unable to figure out how to add an additional line of code e.g. for a basic loop.
How do I create a line-break in Terminal?
25,158,836
1
12
43,483
0
python,macos,terminal
The answer here is far more simple. If you want to continue in the next line after a loop like while b<1: when you press enter you get prompted with ... then you "have to make an indent" by space of tab and only then you can put more code after the three dots like ... (tab or space) print b then when you press en...
0
1
0
0
2011-03-04T05:25:00.000
6
0.033321
false
5,190,030
1
0
0
2
I'm using Python in Terminal on Mac OSX latest. When I press enter, it processes the code I've entered, and I am unable to figure out how to add an additional line of code e.g. for a basic loop.
Change to sudo user within a python script
5,192,008
0
27
53,178
0
python,security,sudo
You can use setuid to set the users uid. But for obvious security reasons you can only do this if you are root (or the program has suid root rights). Both of these are probably a bad idea. In this case you need to sudo rights to run a specific program. In that case just sub to "sudo theprogram" instead.
0
1
0
0
2011-03-04T09:25:00.000
9
0
false
5,191,878
0
0
0
1
I have a problem. I am writing a piece of software, which is required to perform an operation which requires the user to be in sudo mode. running 'sudo python filename.py' isn't an option, which leads me to my question. Is there a way of changing to sudo half way through a python script, security isn't an issue as the ...
how to install multiple python versions on snow leopard?
5,195,551
0
0
1,005
0
python,osx-snow-leopard,virtualenv,homebrew
I use the python_select utility to switch between versions (it takes care of all the paths and links). It's easy to install with MacPorts or fink, so I would guess you can install the same utility with Homebrew.
0
1
0
0
2011-03-04T13:30:00.000
2
0
false
5,194,343
1
0
0
2
whats is the current best practice for installing multiple versions of python on snow leopard? have setup python 2.7.1 via Homebrew, very easy process, all great. but now I need to setup python 2.5 to develop an appengine project.. Initially created a new virtualenv against system python2.5 .. but finding I have all ...
how to install multiple python versions on snow leopard?
5,194,593
2
0
1,005
0
python,osx-snow-leopard,virtualenv,homebrew
Snow leopard already contains python 2.5 and python 2.6, no issues there. If you require obscure modifications to the python installations, just compile your own, and put it in some place where it won't conflict with the system python. (I suggest /opt/your-pythonx.y). As an aside, check: "man python" on mac to see how ...
0
1
0
0
2011-03-04T13:30:00.000
2
1.2
true
5,194,343
1
0
0
2
whats is the current best practice for installing multiple versions of python on snow leopard? have setup python 2.7.1 via Homebrew, very easy process, all great. but now I need to setup python 2.5 to develop an appengine project.. Initially created a new virtualenv against system python2.5 .. but finding I have all ...
GAE redirection with a delay
5,203,395
1
1
2,116
0
python,google-app-engine,redirect
import time at the top of your module and do a time.sleep(0.5) before you do a self.redirect call. The sleep argument can take a floating point value of number of seconds to delay. Just make sure that you don't exceed 30 seconds of delay as GAE expects that every request be handled within that otherwise it will be int...
0
1
0
0
2011-03-05T11:02:00.000
2
0.099668
false
5,203,378
0
0
1
2
Is that possible to redirect to another url with a delay in GAE? I know I can use JavaScript for this purpose, but may be there is a way to do delayed redirection without it? Now I use self.redirect("/") from GAE tutorial. Thanks.
GAE redirection with a delay
5,203,418
8
1
2,116
0
python,google-app-engine,redirect
You can use the <meta http-equiv="refresh" content="x;url=http://yoururl/"> tag where x is the number of seconds to wait before redirect. This tag would go in <head> part of the generated page.
0
1
0
0
2011-03-05T11:02:00.000
2
1.2
true
5,203,378
0
0
1
2
Is that possible to redirect to another url with a delay in GAE? I know I can use JavaScript for this purpose, but may be there is a way to do delayed redirection without it? Now I use self.redirect("/") from GAE tutorial. Thanks.
CUPP (pentest) on google app engine
5,210,681
2
0
272
0
python,google-app-engine
I see a few problems right off: You'll need to create a web interface to the script GAE does not allow long running tasks and this looks like it could take a while. You'd need to recode it to break the work up into chunks. Outbound FTP (for fetching word lists) is not supported on GAE Local file write access is not s...
0
1
0
0
2011-03-05T21:18:00.000
1
0.379949
false
5,206,838
0
0
1
1
Do you see any limitations for cupp (http://www.securityfocus.com/tools/7320) running on GAE?
GAE: scheduled import of big gzipped file from a third party site
5,211,520
0
0
87
0
python,google-app-engine
My initial gut reaction (without knowing what's inside the gzipped file) is to do the processing somewhere else (AWS?) and then pushed the processed data to your GAE application in small bits.
0
1
0
0
2011-03-06T14:45:00.000
2
0
false
5,211,129
0
0
1
2
I'm working on a Python web app that needs to import big (in terms of GAE limits) gzipped files from a third party site on regular basis. Think of rdf exports DMOZ project is producing on regular intervals. This means daily fetching of a 500+ MB gzip file, gunzipping, parsing, processing and storing the results in GAE'...
GAE: scheduled import of big gzipped file from a third party site
5,226,725
1
0
87
0
python,google-app-engine
The limit on downloaded file size in App Engine is currently 64MB. As a result, you've got two options: Use HTTP Range headers to download and process the file in chunks. Use an external service to do the download, split it into pieces, and send the pieces to your App Engine app.
0
1
0
0
2011-03-06T14:45:00.000
2
1.2
true
5,211,129
0
0
1
2
I'm working on a Python web app that needs to import big (in terms of GAE limits) gzipped files from a third party site on regular basis. Think of rdf exports DMOZ project is producing on regular intervals. This means daily fetching of a 500+ MB gzip file, gunzipping, parsing, processing and storing the results in GAE'...
Change system date
5,217,076
1
0
666
0
python,date
If you use Windows, you should be able to do that in the time and date control panel (should be self explaining). If you use Linux, use the date command, and maybe hwclock (more info in the man pages). If you use AmigaOS, use the appropriate settings window in the system Preferences folder. If you use any other OS, yo...
0
1
0
0
2011-03-07T07:34:00.000
2
0.099668
false
5,217,033
0
0
0
2
I need to change my computer's local date to an earlier date (e.g. 2010). I couldnt do that in BIOS. Does anybody know how to do this task, for example by writing a Python snippet? Thanks.
Change system date
5,375,660
1
0
666
0
python,date
If you are not permitted to do this via the operating system, then you will not be permitted to do it from a scripting language like Python, either.
0
1
0
0
2011-03-07T07:34:00.000
2
0.099668
false
5,217,033
0
0
0
2
I need to change my computer's local date to an earlier date (e.g. 2010). I couldnt do that in BIOS. Does anybody know how to do this task, for example by writing a Python snippet? Thanks.
App Engine Bulkloader
5,220,288
2
1
1,639
0
python,google-app-engine,bulkloader
If you're using App Engine Launcher, simply click the Deploy button; it runs appcfg.py update. appcfg is installed as part of the SDK.
0
1
0
0
2011-03-07T12:55:00.000
4
0.099668
false
5,219,977
0
0
1
1
I am trying to use Bulkloader of google app engine but unfortunately could not understand what to do from documentation. It says add this part to app.yaml builtins: - remote_api: on ok i have added. Then says that i have to execute this command appcfg.py update but i don't have any appcfg.py file. And also what is the...
Limit amount of writes to database using memcache
5,222,081
6
2
1,124
1
python,google-app-engine,caching,memcached,google-cloud-datastore
This is a recipe for lost data. I have a hard time believing that a guest book is causing enough write activity to be an issue. Also, the bookkeeping involved in this would be tricky, since memcache isn't searchable.
0
1
0
0
2011-03-07T16:12:00.000
3
1.2
true
5,221,977
0
0
1
1
I am trying to modify the guestbook example webapp to reduce the amount of database writes. What I am trying to achieve is to load all the guestbook entries into memcache which I have done. However I want to be able to directly update the memcache with new guestbook entries and then write all changes to the database a...
python copy files to a network location on Windows without mapping a drive
5,224,625
31
14
64,546
0
python,file,networking,copy,unc
Personally, I've never had difficulties getting Python to simply recognize \\\\<server>\\path\\to\\directory\\. The annoying part is that for every "\" in the win. path, there needs to be 2 in python.
0
1
0
0
2011-03-07T19:55:00.000
2
1
false
5,224,541
0
0
0
1
I am running python in a non interactive session on windows and therefore I cannot map a network drive. Most of what I have researched on here and through google everyone suggests mapping a network drive and copying the files that way. On linux I would facilitate this with an smbmount but unfortunately the software I a...
Celery/Redis some (many) messages getting dropped
7,691,148
0
2
732
0
python,redis,celery,django-celery
The only reason that seems logical is that you exceed the memory that your redis-instance uses. So some messages are discarded ( with LRU policy (?) ).
0
1
0
0
2011-03-07T22:12:00.000
1
0
false
5,225,899
0
0
0
1
I'm using Celery (2.2.4) with Redis (v.2.2.2) as my message broker. Any idea what would cause SOME (most) messages to randomly and inconsistently get lost?
Implementing Django with ODK Aggregate
7,540,809
1
0
469
0
python,django,google-app-engine
ODK Aggregate is written on Java stack. If you want to use python/Django to make it more user friendly and good looking, it is better to rewrite it completely instead of mixing technologies. Several ODK Build alternatives are available, neither one of those was built on top of others, so it is not mandatory what you a...
0
1
0
0
2011-03-08T00:59:00.000
1
0.197375
false
5,227,167
0
0
1
1
I'm working on a project where our team is trying to implement Django into the ODK Aggregate platform, we don't quite enjoy their choice of functionality/looks, so we want to create a better template and make it more user-friendly. We've yet to understand how to upload Django onto the Appengine/Appspot, Aggregate was p...
Is it possible to minimize the console in python with the standard librairy (without extra module)?
5,245,646
0
3
6,676
0
python,console,minimize,standard-library
My first idea would be to have a .pyw-script for that specific task, that is launched in this case. Then only the original script's console pops up for a short time.
0
1
0
0
2011-03-09T12:07:00.000
3
0
false
5,245,520
1
0
0
2
I wrote a program that uses the console. Most of the time, the user must see the console informations. For a specific function from command line, I would like to run the script without the console rises. I just don't want see the window but it can be in the task bar. I know I can use extra modules (gui, win32,..) to ...
Is it possible to minimize the console in python with the standard librairy (without extra module)?
5,245,696
1
3
6,676
0
python,console,minimize,standard-library
on windows there are two python executables in your installation, one is "python.exe", which is the one you typically use. There is another called "pythonw.exe" which is for gui programs. It works just like python.exe, but does not display a console at all.
0
1
0
0
2011-03-09T12:07:00.000
3
0.066568
false
5,245,520
1
0
0
2
I wrote a program that uses the console. Most of the time, the user must see the console informations. For a specific function from command line, I would like to run the script without the console rises. I just don't want see the window but it can be in the task bar. I know I can use extra modules (gui, win32,..) to ...
AppEngine Analytics Model with Lists of Times
5,251,064
0
1
175
0
python,google-app-engine,model,transactions,google-cloud-datastore
There's no reason to shard a model. There's no limit on the number of entities you can have with a given kind name - they're all stored in the same Bigtable anyway! It's not clear what you're trying to do that requires filtering on a list. Can you clarify? What sort of query do you want to perform?
0
1
0
0
2011-03-09T18:11:00.000
2
0
false
5,250,236
0
0
1
2
I want to log analytics data (when someone loads page X, loads a js plugin, cancels a transaction) for my AppEngine app. I'm going to set it up as follows: 1. Event X occurs. 2. Add to taskqueue to put this event in the datastore. 3. Filter over datastore to graph and analyze usage data. So here's the issue: I'd like...
AppEngine Analytics Model with Lists of Times
5,360,121
0
1
175
0
python,google-app-engine,model,transactions,google-cloud-datastore
Instead of logging this data inside your app, have you considered imbedding a proper analytics software, such as Google Analytics in your app? Your app is not really all that different from a normal website, even if you require logins. Google Analytics will provide you a much better reporting suit than just putting dat...
0
1
0
0
2011-03-09T18:11:00.000
2
0
false
5,250,236
0
0
1
2
I want to log analytics data (when someone loads page X, loads a js plugin, cancels a transaction) for my AppEngine app. I'm going to set it up as follows: 1. Event X occurs. 2. Add to taskqueue to put this event in the datastore. 3. Filter over datastore to graph and analyze usage data. So here's the issue: I'd like...
Does python's `os.system` ever throw an exception?
5,251,897
4
11
11,902
0
python,exception,command-line,exception-handling,operating-system
os.system throws a TypeError if there is not exactly one string argument. If the fork fails due to resource or ulimit restrictions, it will return -1. If the argument is not valid in some way (like non-existing command), it will return a high error code. Apart from the aforementioned TypeError, os.system does not throw...
0
1
0
0
2011-03-09T20:30:00.000
4
0.197375
false
5,251,771
1
0
0
2
Might the esteemed os.system of Python fame throw an exception? If so, which ones?
Does python's `os.system` ever throw an exception?
5,252,355
2
11
11,902
0
python,exception,command-line,exception-handling,operating-system
If you're asking whether it throws an exception when the process you're calling ends with an error, the answer is no, you can call a program with os.system(), have it error out, and you will never know. That's why you should use the subprocess module.
0
1
0
0
2011-03-09T20:30:00.000
4
0.099668
false
5,251,771
1
0
0
2
Might the esteemed os.system of Python fame throw an exception? If so, which ones?
Economically deleting data from app engine
5,252,580
0
8
524
0
python,google-app-engine
You mean you used GQL in the datastore admin? Like, delete from x...? And that was too expensive? Hmmm... Well, you might save some money if you integrate deleting into your runtime code. ie, if a user is logged in, you're already accessing the db, presumably with the same indicies, so why not delete it then? You would...
0
1
0
0
2011-03-09T21:37:00.000
6
0
false
5,252,477
0
0
1
4
I have a popular social game, for which I was storing every user action as an Event entity in the data store and then once per day exporting these events from GAE for processing. Now I'd like to delete all of these entities from the data store, all 300 million of them. I started using the "datastore admin" for this. In...
Economically deleting data from app engine
5,257,085
0
8
524
0
python,google-app-engine
Questions. - Are your Event entities grouped in entity groups? - How many indexes do you have? Any composite ones? - How many properties that are not indexed=False? Just trying to determine the cost of a delete. You may be able have some of your indexes vacuumed before you start deleting the entities.
0
1
0
0
2011-03-09T21:37:00.000
6
0
false
5,252,477
0
0
1
4
I have a popular social game, for which I was storing every user action as an Event entity in the data store and then once per day exporting these events from GAE for processing. Now I'd like to delete all of these entities from the data store, all 300 million of them. I started using the "datastore admin" for this. In...
Economically deleting data from app engine
5,260,096
3
8
524
0
python,google-app-engine
Presuming your goal is to delete for the cheapest cost, rather than face migration, I would launch a self-scheduling task, that would clean up several hundred/thousand keys in each run, then re-schedules itself. I would purposefully throttle this task on a separate queue so that the task ran only often enough to avoid ...
0
1
0
0
2011-03-09T21:37:00.000
6
0.099668
false
5,252,477
0
0
1
4
I have a popular social game, for which I was storing every user action as an Event entity in the data store and then once per day exporting these events from GAE for processing. Now I'd like to delete all of these entities from the data store, all 300 million of them. I started using the "datastore admin" for this. In...
Economically deleting data from app engine
5,263,768
3
8
524
0
python,google-app-engine
Removing indexes first will substantially reduce the cost of deleting records. You could also limit your deletion rate to keep under the 6.5 CPU hours per day you're allocated for free, to avoid paying. Regarding doing the deletion yourself, it's unlikely you can do it more efficiently than the datastore admin tool, wh...
0
1
0
0
2011-03-09T21:37:00.000
6
1.2
true
5,252,477
0
0
1
4
I have a popular social game, for which I was storing every user action as an Event entity in the data store and then once per day exporting these events from GAE for processing. Now I'd like to delete all of these entities from the data store, all 300 million of them. I started using the "datastore admin" for this. In...
Looking for a good book for Google App Engine Python
7,766,177
2
6
3,027
0
python,google-app-engine
I come back to this question after sereval searches. I rode Programming Google App Engine by Dan Sanderson and Using Google App Engine by Charles Severance (both edited O'Reilly and Google Press) and they are pretty good. I recommend it for basic usage.
0
1
0
0
2011-03-10T09:06:00.000
4
0.099668
false
5,257,456
0
0
1
1
Can you recommend me book to Google App Engine in Python? English/French books are both accepted.
A list of everything I need for running my app on a web server
5,260,848
1
4
159
0
python,django,web-application-project
You need Python, Django, a WSGI container (e.g. mod_wsgi, uWSGI, Paste Deploy), and a database server. You make the Django project available as a WSGI app, bound to the appropriate interface on the machine.
0
1
0
0
2011-03-10T14:11:00.000
2
0.099668
false
5,260,801
0
0
1
1
What I want to know are actually 2 things. Part 1: I have a developed source code for an application in python that uses Django framework. What I want is to be able to run the code on a developer machine and see the result. What do I need for it? (my guesses): Python development enironment (Eclipse/PyDev/Aptana Studio...
What is best pythonic way to communicate between spreaded services/unix machines?
5,264,700
0
0
219
0
python,django,unix,tcp,communication
Some general ideas for you: You could have a master-client approach. Requests would be inserted in the master, stored in a database. Master knows the state of each client (same db). Whenever there is a request, the master redirects it to a free client. The client reports back when has finished the task (including answe...
0
1
0
0
2011-03-10T18:58:00.000
2
0
false
5,264,414
0
0
0
1
Mornink! I need to design, write and implement wide system consisting of multiple unix servers performing different roles and running different services. The system must be bullet proof, robust and fast. Yeah, I know. ;) Since I dont know how to approach this task, I've decided to ask you for your opinion before I leav...
WinCVS - Python - TCL
5,296,594
1
1
2,712
0
python,tcl,wincvs
The problem is that Tcl's trying to build the standard file descriptors into available-by-default channels (i.e., stdin, stdout and stderr) but this goes wrong when they're not opened by default. That's the case on Windows when running disconnected (which is what happens inside GUI applications on that platform). When ...
0
1
0
1
2011-03-11T11:05:00.000
1
1.2
true
5,272,116
0
0
0
1
I have got a list of files in txt files and I need to check them out in edit mode, and make some changes(there are word documents), and check them back in via WinCVS. I know I can write tcl scripts or macro, or python scripts in wincvs shell but I have some problems with them. I have installed TCL 8.5 and selected tcl ...
Tornado process data in request handler after return
5,275,791
5
8
1,965
0
python,tornado
ioloop.add_callback, Tornado will execute the callback in the next IOLoop iteration.
0
1
0
0
2011-03-11T15:21:00.000
4
0.244919
false
5,274,733
0
0
0
2
In a tornado request handler if I have to call function foo() which doesn't affect what's returned to the user, it makes sense to return result to the user first and then call foo(). Is it possible to do this easily in tornado (or with some third-party package)?
Tornado process data in request handler after return
5,417,646
-2
8
1,965
0
python,tornado
No it's not "easy" out-of-the-box. What you're referring to is "fire and forget". Even if you use a thread pool to farm out the request, that thread pool will belong to the main python process that belongs to Tornado. The best approach is a message queue. Something like Carrot. That way, suppose you have a page where ...
0
1
0
0
2011-03-11T15:21:00.000
4
1.2
true
5,274,733
0
0
0
2
In a tornado request handler if I have to call function foo() which doesn't affect what's returned to the user, it makes sense to return result to the user first and then call foo(). Is it possible to do this easily in tornado (or with some third-party package)?
Use ping through SOCKS server?
5,275,216
13
6
18,202
0
python,socks,icmp
A SOCKS proxy provides a TCP proxy service (SOCKS 5 added UDP Support). You cannot perform an ICMP Echo "via" a SOCKS proxy service. Even if you could, you would be testing ICMP Echo and Echo Reply, and not that your SOCKS server is running fine. If you want to test that your SOCKS server is "running fine" I'd suggest ...
0
1
1
0
2011-03-11T15:35:00.000
4
1.2
true
5,274,934
0
0
0
1
I'd like to periodicity check if my SOCKS server is working fine. In order to do that, I thought of pinging 8.8.8.8 (google DNS server) through the SOCKS server. Is there other recommended way? If it's optimal, how can I ping through SOCKS with python?
Setting timezone in Tornado
5,275,903
0
2
1,179
0
python,timezone,tornado
Pardon my dimness but why do you mean to format the date based on the user in the context of Tornado? Tornado is a server. The user is a client.
0
1
0
0
2011-03-11T16:21:00.000
3
0
false
5,275,488
1
0
0
1
How do people handle timezones in Tornado so that users see time formatted relative to their timezone? I know there's locale.format_date which defaults to GMT, but how do I set the right timezone based on the user?
Piping output from a python script to a remote machine?
5,278,104
1
1
3,563
0
python,linux,bash,shell
You can do it on different levels - here are a few options use ssh to pipe myprog | ssh remotemachine myotherprog use nfs (if going to a file use netcat (nc) use something like thrift It depends on how solid & permanent the solution needs to be
0
1
0
1
2011-03-11T20:38:00.000
5
0.039979
false
5,278,044
0
0
0
1
I have a python script that output/prints a large array (50MB in size) to the screen. This script is running on machineA. Is it at all possible to 'pipe' this output to machineB, where it will be processed? I know I can save the output in a file on machineA and then send the file to machineB. I was just wondering if it...
How to deploy a simple python application in linux for shared, company environment?
5,281,722
1
5
5,427
0
python,linux,deployment
you can use pyinstaller to create a stand-alone executables see:http://www.pyinstaller.org/
0
1
0
0
2011-03-12T07:40:00.000
4
0.049958
false
5,281,336
1
0
0
1
I have written an (obviously) excellent tool in python (under linux) that I would like to share with my co-workers. We work on different machines, but with the same, shared environment. Also, we are users, so there is no way of easily installing dependencies. Now here's the catch: I like python, my users don't care. Th...
UnicodeEncodeError: ascii when wishing to use unicode
5,281,825
0
0
180
0
macos,unicode,utf-8,python-3.x
str() returns a string yes. And a str will be encoded when written, yes. I'm not entirely sure why the ascii encoding is being used (it is the default encoding in Python 2, but not in Python 3), but I'm even less sure why you do str(sentence). If you want to decode bytes you don' use str() you use .decode(). So start w...
0
1
0
0
2011-03-12T08:55:00.000
1
0
false
5,281,589
1
0
0
1
I'm trying something like this: outFile = open("file.txt", "wt",encoding='utf-8') outFile.write(str(sentence)) outFile.close() and getting the error: UnicodeEncodeError: 'ascii' codec can't encode character '/x4e'. why is an ascii encoder being used? Am I right in saying that my string (str(sentence)) is in unicode? ...
how to set the admin user with GAE dev app server?
5,283,536
0
3
924
0
python,google-app-engine
When you log in (the blue box where you enter the email) there is a checkbox to apply the administrator flag to your session.
0
1
0
0
2011-03-12T15:44:00.000
3
0
false
5,283,506
0
0
1
1
I want to create an Admin-only page for my GAE application. But I found there's no way to set a Admin user, so I cannot log on the page I created and test the function. I tried the local Admin console, but no luck. How can I do this?
amqp queue_delete catch errors in async way
5,787,202
0
1
307
0
python,rabbitmq,amqp,tornado
Try to avoid the error. If you declare a connection to the queue, and it doesn't exist, it will be created. Then immediately delete it. Or, if you will use that queue again in the next week or so, i.e. it is not single-use, then just leave it around and handle deletion as a system admin activity that cleans up long ter...
0
1
0
0
2011-03-14T18:23:00.000
2
0
false
5,302,695
0
0
1
1
I've just got started using pika(v 0.9.4) with Tornado (through the use of pika.adapters.tornado_connection.TornadoConnection) and I was wondering what's the appropriate way of catching errors when using, say: queue_delete for when the queue you're trying to delete doesn't exist. RabbitMQ raises AMQPError, but I am not...
Get a Global Variable while a Python Program is running
5,307,026
0
2
1,775
0
python,debugging,command-line,gdb
I'm afraid names won't help you much. Since you didn't build in some printing mechanism and your process is already running you're pretty much screwed. If you have an idea what the values might be your best bet would be using a process memory scanner and start messing around. Though I estimate your chances of success v...
0
1
0
0
2011-03-15T02:43:00.000
2
0
false
5,306,959
1
0
0
1
I write a Python 2.5 Command Line program on CentOS 5.5 and it has been running for 1 day and is still running. Now I want to end this program but get the value of a global variable. I have done some Google. It seems the only way to get the value of a global variable is to attach the Python program to a GDB. Suppose th...
Is there any python implement of edonkey/emule
5,313,852
1
1
2,485
0
python,p2p
After 20 minutes of googling all combinations of python and edonkey/emule/ed2k and visiting all sites of all clients listed under the "eDonkey network" Wikipedia page I can say with near certainty that the answer is "No."
0
1
0
0
2011-03-15T14:51:00.000
2
0.099668
false
5,313,513
0
0
1
1
I want deploy a project in google appengine to search edonkey/emule, Is there any python implement of edonkey/emule or ed2k protocol library ?
python webservice execution problem
5,319,171
0
1
93
0
python,web-services
This is from my experience of using Django with Apache, but have you tried restarting your web server? Sometimes the web server will hold a copy of the code in memory to speed up execution, but restarting your web server will make it reload all *.py files. Providing more information about the technology stack you are ...
0
1
0
0
2011-03-15T22:59:00.000
2
0
false
5,319,088
0
0
1
2
I have a python web service. My problem is when I changed my web service classes. I can't see the changes on the browser and I see last version of web service on the browser all the time. I used Bottle framework and cgi.
python webservice execution problem
7,275,232
0
1
93
0
python,web-services
You need to restart the Bottle app after each change. Doing this manually during development is a pain in the neck. Fortunately Bottle provides a way to automate via a "reloader" option to the Run method: run(reloader=True) When you edit & save a module file, the reloader will restart the server process for you...
0
1
0
0
2011-03-15T22:59:00.000
2
0
false
5,319,088
0
0
1
2
I have a python web service. My problem is when I changed my web service classes. I can't see the changes on the browser and I see last version of web service on the browser all the time. I used Bottle framework and cgi.
Can I use google app engine to run the python program in the background for chrome extension?
5,322,597
3
0
136
0
python,google-app-engine,google-chrome
What kind of program is to be executed? You could very well send a request from Chrome extension to your appengine server, process and return the response.
0
1
0
0
2011-03-16T04:33:00.000
1
1.2
true
5,321,079
0
0
1
1
I have a python program which has to execute when i click on the chrome extension.Can I use the Google app engine to do the same??
gevent multiple StreamServer listeners
5,338,718
5
3
1,772
0
python,gevent
first instance of StreamServer could be started with: server.start() and second with server2.serve_forever()
0
1
0
0
2011-03-16T08:00:00.000
3
1.2
true
5,322,445
0
0
0
2
I have daemon which has connection pool to handlerSocket. I have 2 types of clients and their protocol differs. I want to setup 2 listeners which handles each protocol and shares connection pool between them. In twisted this is relatively easy to accomplish, but couldn't find out how to do this in gevent. Thanks!
gevent multiple StreamServer listeners
8,439,364
0
3
1,772
0
python,gevent
I think the problem will come from the StreamServer's stop() method. It kills the pool, so, finishing one of listeners will drop all connections, from both listeners. If this is does not frighten you, you can simply pass the same Pool object to both StreamServers, running each of them in the separate greenlet.
0
1
0
0
2011-03-16T08:00:00.000
3
0
false
5,322,445
0
0
0
2
I have daemon which has connection pool to handlerSocket. I have 2 types of clients and their protocol differs. I want to setup 2 listeners which handles each protocol and shares connection pool between them. In twisted this is relatively easy to accomplish, but couldn't find out how to do this in gevent. Thanks!
Using an SSH keyfile with Fabric
14,738,198
1
101
58,539
0
python,fabric
As stated above, Fabric will support .ssh/config file settings after a fashion, but using a pem file for ec2 seems to be problematic. IOW a properly setup .ssh/config file will work from the command line via 'ssh servername' and fail to work with 'fab sometask' when env.host=['servername']. This was overcome by speci...
0
1
0
1
2011-03-16T15:20:00.000
8
0.024995
false
5,327,465
0
0
0
1
How do you configure fabric to connect to remote hosts using SSH keyfiles (for example, Amazon EC2 instances)?
What is the best way to communicate between Python softwares running on the same computer?
5,343,298
0
1
368
0
python,pipe
How about one of them being a thread started by the another one?
0
1
0
1
2011-03-17T18:05:00.000
3
0
false
5,343,264
0
0
0
1
I used MailSlots with Delphi for my softwares when I needed dialogs between them (on MS Windows on the same coputer). Now I need to do the same things but with Python and on MS Windows but also on Linux. So : what is the best way to communicate between Python written software running on the same computer ? For some fir...
Amazon Linux AMI EC2 - librrd.so.2 dependency issue
5,344,716
0
2
410
1
python,linux,centos,cassandra,yum
Try installing rrdtool via yum, that should contain librrd.so.2 and correct your issue.
0
1
0
0
2011-03-17T20:10:00.000
2
0
false
5,344,641
0
0
0
1
I am attemping to install OpsCenter for Cassandra, and using the the standard REHL image. I can't figure out how to get this to work. Another version of EPEL perhaps? yum install opscenter.... Error: Package: python26-rrdtool-1.2.27-1.i386 (opscenter) Requires: librrd.so.2
What is the best way to implement a pool of worker processes compatible with gevent?
6,671,124
2
2
1,761
0
python,linux,asynchronous,multiprocessing,gevent
I'd consider custom socket IPC or using ZeroMQ.
0
1
0
0
2011-03-19T04:22:00.000
2
0.197375
false
5,360,050
0
0
0
1
Scenario I have a server process implemented in Python and gevent, which is connecting to a backend service over TCP/IP and serving many Web clients (~1000 per process) with fast changing dynamic content based on the changes delivered by the backend service. The service is running on Ubuntu 10.04 and won't run on Windo...
Puppet like syntax for python
5,368,736
3
4
2,468
0
python,puppet
Consider using Python, with in-house rules limiting what can appear in a config file. The advantages are that no one has to learn another language, it's really, really cheap to implement, and you don't have to worry about maintenance of the config parser. The disadvantages are that it's not a custom-designed language f...
0
1
0
0
2011-03-20T01:21:00.000
3
0.197375
false
5,366,136
1
0
0
1
Anyone know of any good ways to do puppet like pp files for python. Almost like config files that can inherit other configs files and also have limited logic in them like if statements and variables? Thanks!
Python: Verifying NFS authentication
10,356,745
0
0
798
0
python,nfs
There is a python suite to test NFS server functionality. git://git.linux-nfs.org/projects/bfields/pynfs.git While it's for NFSv4 you can simply adopt it for v3 as well.
0
1
0
1
2011-03-20T02:02:00.000
2
0
false
5,366,298
0
0
0
1
Folks, I believe there are two questions I have: one python specific and the other NFS. The basic point is that my program gets the 'username', 'uid', NFS server IP and exported_path as input from the user. It now has to verify that the NFS exported path is readable/writable by this user/uid. My program is running as r...
How to run a program with python 3.x
5,369,526
0
4
6,836
0
linux,python-3.x,ubuntu-10.10
Blender is not run with or through Python at all. It's a native compiled executable and runs directly. It does however embed Python and use it as a scripting language. Blender 2.5 uses Python 3, and for this to work you need Python 3 installed on your system in the path, so blender can find it. That's all, afaik.
0
1
0
0
2011-03-20T14:22:00.000
4
0
false
5,369,031
1
0
0
2
I use ubuntu 10.10, and I have both Python 2.x and Python 3.x. I have a program that needs to run with python 3.x (blender 2.5x). How do I run a program with python 3.x?
How to run a program with python 3.x
5,369,057
0
4
6,836
0
linux,python-3.x,ubuntu-10.10
Do you have a separate python executable for python 2.x and for python 3.x? On my system I have /usr/bin/python2.5 and /usr/bin/python2.6. I also have a /usr/bin/python2, which is a symbolic link to /usr/bin/python2.6. I presume that you have a /usr/bin/python3 too. In which case, you simply run the program using /...
0
1
0
0
2011-03-20T14:22:00.000
4
0
false
5,369,031
1
0
0
2
I use ubuntu 10.10, and I have both Python 2.x and Python 3.x. I have a program that needs to run with python 3.x (blender 2.5x). How do I run a program with python 3.x?
Using cx_Freeze (Python 2.7) on a Windows box OOTB
5,373,639
0
1
746
0
python,windows,windows-xp,msvcrt,cx-freeze
AFAIK if you have a Visual Studio licence, you have the right to bundle the appropriate msvcrXY.dll with your application. That will make it run without having to install the runtime files. If you don't have a Visual Studio licence, I can think of two solutions: One is to bundle the VS runtime installer with your appli...
0
1
0
1
2011-03-21T03:30:00.000
1
1.2
true
5,373,558
0
0
0
1
I have been plagued with this problem ever since I started with Python, I want to write a Python script, and then export it as an EXE that I can run on any Windows XP (and up) machine. cx_Freeze covers all of this perfectly, the only problem is that it required Visual C++ Runtime to be installed on the client computer ...
Python/Google app engine data storage performance
5,400,785
1
1
496
0
python,performance,json,google-app-engine,google-cloud-datastore
For superior app performance, as Chris and others pointed out, python dict is the best. But if you are ok with the minimal performance hit caused by datastore queries, I think that is the way to go purely from a design and maintenance perspective. Simplicity takes precedence over performance if you are not approaching...
0
1
0
0
2011-03-22T18:03:00.000
3
0.066568
false
5,395,782
0
0
1
2
In a python/google app engine app, I've got a choice between storing some static data (couple KB in size) in a local json/xml file or putting it into the datastore and querying it from there. The data is created by me, so there's no issues with badly formed data. In specific terms such as saving quota, less resource ...
Python/Google app engine data storage performance
5,395,833
5
1
496
0
python,performance,json,google-app-engine,google-cloud-datastore
If your data is small, static and infrequently changed, you'll get the best performance by just writing your data as a dict in it's own module and just import it where you need it. This would take advantage of the fact that Python will cache your modules on import.
0
1
0
0
2011-03-22T18:03:00.000
3
1.2
true
5,395,782
0
0
1
2
In a python/google app engine app, I've got a choice between storing some static data (couple KB in size) in a local json/xml file or putting it into the datastore and querying it from there. The data is created by me, so there's no issues with badly formed data. In specific terms such as saving quota, less resource ...
Overcoming 1mb file restriction in GAE Datastore
5,413,209
0
2
349
0
python,google-app-engine,google-cloud-datastore
You could work around this by splitting the blob into multiple pieces and storing them in separate entities. What you should do, though, is use the Blobstore as @Thilo suggests.
0
1
0
0
2011-03-23T05:03:00.000
2
0
false
5,401,070
0
0
1
1
As if for now, we are using datastore blob to store profile images of our site. And there is restriction in Datastore for storing more than 1mb file as a blob in datastore. Is there any work around for this.