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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
What is the possibility of using a Python app, deployed online, that has access to a users local disk? | 9,560,968 | 4 | 0 | 139 | 0 | python,google-app-engine,web.py | You'd have to create a "client" and "server" type of interface to do this. So it wouldn't be a solely JavaScript with Python on the server program. They'd have to have something running on their end as well, communicating in the background.
HTML5 allows some local storage, but not what you're looking for. | 0 | 1 | 0 | 0 | 2012-03-05T02:30:00.000 | 2 | 1.2 | true | 9,560,950 | 0 | 0 | 1 | 2 | I currently have a local python application that scans a users drive, maps it into a tree and displays this information with javascript. I would really like to try to develop something with a Drop-Box like system to manage drive trees.
I have searched and read that App Engine specifically doesn't allow access to a use... |
Gevent installation error in Mac OS X Lion | 11,092,390 | 0 | 2 | 590 | 0 | python,macos,osx-lion,gevent | I encountered this error as well. I believe it is due to a conflict between libev and libevent (in my case, libev-4.11 and libevent-1.4.14b). libev replaces /usr/local/include/event.h and /usr/local/include/evutil.h with its own version of those files, and trying to compile gevent with the versions from libev results i... | 0 | 1 | 0 | 0 | 2012-03-05T09:20:00.000 | 1 | 0 | false | 9,564,203 | 1 | 0 | 0 | 1 | Tried installing gevent using pip install gevent and also tried compiling from source. Both the times the installation stopped because of the following error.
/usr/local/include/evhttp.h:223: error: expected specifier-qualifier-list before ‘ev_int64_t’
i have libevent installed in /usr/local/lib and its being picked up... |
Feed input of MS-DOS interactive executable with a string value | 9,567,478 | 0 | 0 | 373 | 0 | python,perforce | Have you tried merely piping the input to the command?
In cmd.exe:
C:\> echo m | p4 resolve | 0 | 1 | 0 | 0 | 2012-03-05T13:19:00.000 | 5 | 0 | false | 9,567,322 | 1 | 0 | 0 | 1 | p4.exe is the perforce command line tool (git/cvs/svn like tool).
I am trying to launch several ms-dos commands 'p4 resolve' in an python script. because I have a hundred files to resolve.
However I cannot launch 'p4 resolve -m' as I want (which automatically opens my 3-way merge tool on the conflicting files). p4 does... |
Why does Tornado take so long to die when I hit ctrl-c? | 9,578,432 | 2 | 3 | 1,548 | 0 | python,tornado | I don't know why it takes so long to exit with Ctrl+C, but it worked for me in some cases to press Ctrl+\ (Linux terminal) | 0 | 1 | 0 | 0 | 2012-03-06T05:14:00.000 | 3 | 0.132549 | false | 9,578,245 | 0 | 0 | 0 | 1 | When developing a Tornado application, I frequently want to restart the server to pick up new changes. I hit ctrl-c to stop the server, but with Tornado, this seems to be very slow. It waits for many seconds before shutting down, or doesn't shut down at all when issued a ctrl-c.
What's weird, is if, after clicking ctrl... |
One Command/Script to Upload X Files Using FTP | 9,592,357 | 0 | 0 | 313 | 0 | python,shell,upload,ftp | I would pick a different FTP client. The libcurl library (and its "curl" command line program) has a FTP upload method. | 0 | 1 | 0 | 0 | 2012-03-06T21:18:00.000 | 1 | 0 | false | 9,592,083 | 0 | 0 | 0 | 1 | If there is a thread that answers this question I'm sorry for being a fool (reading through the titles and the threads that look like they might have been [about] the same as mine, none of them were close enough for me to be able to figure it out for myself.
I'm looking to have a script (I suppose bash or python would ... |
How to change a python path in sudo state? | 9,594,398 | 0 | 2 | 2,960 | 0 | python,bash,sudo,pythonpath | It uses the first one found in $PATH
try doing
echo $PATH
then
sudo bash -c 'echo $PATH'
I bet these are different.
In any case, there is usually an rc script of some sort for the shell you use in both /root and your current user, just rearrange the paths in the environment variable for the one you want. | 0 | 1 | 0 | 0 | 2012-03-07T01:05:00.000 | 3 | 0 | false | 9,594,369 | 0 | 0 | 0 | 1 | My problem is that when I do :
$ which python
=> I get /a/b/c/python as my directory
but if I do
$ sudo which python
=> I get /d/e/python as the result
How do I change the sudo one to match with the normal case, it is making it impossible to install libraries from source. |
Reducing the size of executable from py2exe | 9,602,835 | 1 | 1 | 794 | 0 | python,py2exe | There is an option to compress, which you can enable in the config file, but it will always be relatively large (~megabytes) because python interpreter must also be bundled in with the source code. | 0 | 1 | 0 | 0 | 2012-03-07T13:48:00.000 | 1 | 1.2 | true | 9,602,691 | 1 | 0 | 0 | 1 | Are there some practices to minimize the size of .exe file created by py2exe when creating executable of python script? My first impression upon using py2exe is, it creates relatively large size file. |
apache mpm worker run only single process | 9,608,216 | 1 | 0 | 452 | 0 | python,django,apache,process | Another alternative could be to use something like mod_wsgi in daemon mode configured with only one process, then hand off to that.
This is all assuming that your web server only ever needs to be single process, and that no other request should be served in parallel? Do you have other views which aren't rate limited? I... | 0 | 1 | 0 | 0 | 2012-03-07T16:50:00.000 | 1 | 1.2 | true | 9,605,759 | 0 | 0 | 1 | 1 | I need to make apache mpm worker use only a single process to run my django server .
I have a view which needs to be run only once when the first request hits the apache . But i see it running twice. I made the runprocess configuration from 2 to 1 .
what else should i do to make apache run only one process.. |
Python Daemons - Program Structure and Exception Control | 9,611,336 | 3 | 2 | 476 | 0 | python,daemon | Exceptions are designed for the purpose of (potentially) not being caught immediately-- that's how they differ from when a function returns a value that means "error". Each exception can be caught at the level where you want to (and can) do something about it.
At a minimum, you could start by catching all exceptions a... | 0 | 1 | 0 | 0 | 2012-03-07T18:16:00.000 | 2 | 0.291313 | false | 9,606,937 | 1 | 0 | 0 | 2 | I've been doing amateur coding in Python for a while now and feel quite comfortable with it. Recently though I've been writing my first Daemon and am trying to come to terms with how my programs should flow.
With my past programs, exceptions could be handled by simply aborting the program, perhaps after some minor clea... |
Python Daemons - Program Structure and Exception Control | 9,610,525 | 0 | 2 | 476 | 0 | python,daemon | The answer will be "it depends".
If an exception occurs in some low-level function, it may be appropriate to catch it there if there is enough information available at this level to let the function complete successfully in spite of the exception. E.g. when reading triangles from an .stl file, the normal vector of the ... | 0 | 1 | 0 | 0 | 2012-03-07T18:16:00.000 | 2 | 0 | false | 9,606,937 | 1 | 0 | 0 | 2 | I've been doing amateur coding in Python for a while now and feel quite comfortable with it. Recently though I've been writing my first Daemon and am trying to come to terms with how my programs should flow.
With my past programs, exceptions could be handled by simply aborting the program, perhaps after some minor clea... |
What is the best utility/library/strategy with Python to copy files across multiple computers? | 9,619,361 | 0 | 0 | 836 | 0 | python,file,rsync,unison | I think rsync is the solution. If you are concerned about data integrity, look at the explanation of the "--checksum" parameter in the man page.
Other arguments that might come in handy are "--delete" and "--archive". Make sure the exit code of the command is checked properly. | 0 | 1 | 0 | 1 | 2012-03-08T13:49:00.000 | 3 | 0 | false | 9,618,641 | 0 | 0 | 0 | 1 | I have data across several computers stored in folders. Many of the folders contain 40-100 G of files of size from 500 K to 125 MB. There are some 4 TB of files which I need to archive, and build a unfied meta data system depending on meta data stored in each computer.
All systems run Linux, and we want to use Python. ... |
Environment variables getting preserved in Python script even after exiting | 9,634,524 | 1 | 2 | 2,224 | 0 | python,environment-variables | A subshell can change variables it inherited from the parent, but the changes made by the child don't affect the parent.
When a new subshell is started, in which the variable exported from the parent is visible. The variable is unsetted by del os.environ['var'], but the value for this variable in the parent stays the s... | 0 | 1 | 0 | 1 | 2012-03-09T13:00:00.000 | 2 | 1.2 | true | 9,634,473 | 0 | 0 | 0 | 1 | I am running my Test Harness which is written in Python. Before running a test through this test harness, I am exporting some environment variables through a shell script which calls the test harness after exporting the variables. When the harness comes in picture, it checks if the variables are in the environment and ... |
celery with multiple django instances | 9,635,351 | 1 | 5 | 1,580 | 0 | python,django,linux,celery | If you make changes in tasks.py for celery, then you will have to restart it once to apply changes by running command ./manage.py celeryd start or python manage.py celeryd start --settings=settings for using settings.py as configuration for celery. It will not be affected by the changes in your projects until you make ... | 0 | 1 | 0 | 0 | 2012-03-09T13:26:00.000 | 2 | 0.099668 | false | 9,634,800 | 0 | 0 | 1 | 1 | I'm using several django instances, each in a virtualenv, on the same
server.
How can I start the celery server and make sure it is always running and
updated? I.e. after a server restart or code update?
The /etc/init.d script and the config file assume a single Django
installation. Do I have to use the ./manage.p... |
stack dump in twisted app.py 'application' error when using twistd but works with python? | 9,650,823 | 0 | 0 | 528 | 0 | python,twisted,twistd | To use 'twistd -y', your .tac file must create a suitable object (e.g., by calling service.Application()) and store it in a variable named 'application'. twistd loads your .tac file and scans the global variables for one of this name.
Please read the 'Using Application' HOWTO for details. | 1 | 1 | 0 | 0 | 2012-03-10T20:24:00.000 | 2 | 0 | false | 9,649,879 | 0 | 0 | 0 | 1 | I am trying to use twisted but when i try to run some of the example code provided with the twisted package, it seems to always crash when i use "twistd" instead of "python"
for example, using the example code given with twisted,
if i run to command : twisted -ny echoserv.py
Unhandled Error
Traceback (most recent call... |
Not finding other files in the same workspace folder in Eclipse with PyDev | 9,658,901 | 1 | 0 | 712 | 0 | python,eclipse,python-3.x,pydev | If I understand you correctly, you need to import the other class from the other file into your original file to be able to use the class.
For example, from otherfile import OtherClass
Otherwise, please add more info. | 0 | 1 | 0 | 0 | 2012-03-11T20:58:00.000 | 1 | 0.197375 | false | 9,658,846 | 1 | 0 | 0 | 1 | This is probably a very simple question. But it's driving me nuts and I can't find the solution. I setup Eclipse and PyDev in my Windows box and I've written a class to do something. Then I created another .py file to run a program that users that class, but the program cannot find the class.
It works well if I put al... |
getting compilation order from SCons | 9,662,504 | 1 | 0 | 74 | 0 | python,python-3.x,scons | You can use scons command-line parameter --no-exec would only print build commands but not execute them. | 0 | 1 | 0 | 0 | 2012-03-11T21:21:00.000 | 1 | 1.2 | true | 9,659,004 | 0 | 0 | 0 | 1 | Is there a quick way to get the order that SCons will process your program's files?
I'd like to snag the ordered list of program file names and skip the compilation process.
thanks in advance! |
Python framework for task execution and dependencies handling | 28,289,788 | 1 | 13 | 4,879 | 0 | python,build,build-process,build-automation,jobs | Another option is to use make.
Write a Makefile manually or let a python script write it
use meaningful intermediate output file stages
Run make, which should then call out the processes. The processes would be a python (build) script with parameters that tell it which files to work on and what task to do.
parallel e... | 0 | 1 | 0 | 0 | 2012-03-12T09:49:00.000 | 3 | 0.066568 | false | 9,664,809 | 0 | 0 | 0 | 1 | I need a framework which will allow me to do the following:
Allow to dynamically define tasks (I'll read an external configuration file and create the tasks/jobs; task=spawn an external command for instance)
Provide a way of specifying dependencies on existing tasks (e.g. task A will be run after task B is finished)
B... |
Python - List issues (multiple lists?) | 9,666,450 | 0 | 1 | 189 | 0 | python,list | re.findall returns a list of matches. In your case you are getting lists with only one value. If that is always the case then @x539 answer will get the first item in the list. | 0 | 1 | 0 | 0 | 2012-03-12T10:42:00.000 | 5 | 0 | false | 9,665,586 | 0 | 0 | 0 | 1 | The below is a part of a script i'm trying to write. The script opens my iptables log, each line in the log contains the details in the example below.
#example of a single line
#Mar 9 14:57:51 machine kernel: [23780.638839] IPTABLES Denied UDP: IN=p21p1 OUT= MAC=ff:ff:ff:ff:ff:ff:00:00:00:00:00:00:00:00 SRC=10.100.1... |
Hadoop-streaming : PYTHONPATH not working when mapper runs | 10,921,996 | 0 | 2 | 1,189 | 0 | python,hadoop,mapreduce,hadoop-streaming | I had the same issue, and I think the problem is that the Hadoop virtual environments won't recognize your system's pythonpath. If you install packages to /Library/Python/2.7/site-packages, Hadoop will pick them up and it will work. | 0 | 1 | 0 | 0 | 2012-03-12T18:14:00.000 | 2 | 0 | false | 9,672,495 | 0 | 0 | 0 | 2 | I have a PYTHONPATH set up in and it works fine too except when I run map-reduce job
It fails saying
Traceback (most recent call last):
File "/work/app/hadoop/tmp/mapred/local/taskTracker/hduser/jobcache/job_201203091218_0006/attempt_201203091218_0006_m_000020_0/work/./mapper.py", line 57, in
from src.utilities... |
Hadoop-streaming : PYTHONPATH not working when mapper runs | 21,020,422 | 0 | 2 | 1,189 | 0 | python,hadoop,mapreduce,hadoop-streaming | we need to add MapReduce Service Environment Safety Valve, In mycase we are using cloudera-manager GUI, I added PYTHONPATH it's working. | 0 | 1 | 0 | 0 | 2012-03-12T18:14:00.000 | 2 | 0 | false | 9,672,495 | 0 | 0 | 0 | 2 | I have a PYTHONPATH set up in and it works fine too except when I run map-reduce job
It fails saying
Traceback (most recent call last):
File "/work/app/hadoop/tmp/mapred/local/taskTracker/hduser/jobcache/job_201203091218_0006/attempt_201203091218_0006_m_000020_0/work/./mapper.py", line 57, in
from src.utilities... |
PyDev: how remove command line switch -u | 9,687,892 | 0 | 0 | 336 | 0 | python,eclipse,command-line,pydev | Actually, so far you can't do that without grabbing the code and changing it yourself (i.e.: that's hardcoded).
But still, if you don't use the unbuffered output (i.e.: -u option), the PyDev console will end up not showing the I/O output as it's printed (as it'll be buffered).
So, what is it that breaks because -u? (ma... | 0 | 1 | 0 | 0 | 2012-03-13T08:48:00.000 | 3 | 0 | false | 9,680,762 | 1 | 0 | 0 | 1 | My code is broken by eclipse but works normaly if I launch it from command prompt with python and no option. I need to delete -u option when the python interpreter is launched in eclipse and pydev, how can I do that? |
Asynchronous versions of Google APIs? | 9,948,934 | 0 | 6 | 2,692 | 0 | python,google-app-engine,google-docs-api | Currently the Documents List API library for Python (The GData Library) is rigidly synchronous. One solution would be to serialize the requests as tasks for a task queue and run them later, but the library itself won't help, I'm afraid. | 0 | 1 | 0 | 0 | 2012-03-13T14:54:00.000 | 2 | 1.2 | true | 9,686,505 | 0 | 0 | 1 | 1 | Is there any way to queue up document list API requests and handle them asynchronously (similar to the google app engine async urlfetch requests)?
I could conceivably copy/rewrite a lot of the client request modification logic in DocsClient around a urlfetch request, but I'd rather avoid that if there's some other meth... |
Get the memory address pointed to by a ctypes pointer | 9,784,508 | 16 | 11 | 12,060 | 0 | python,ctypes | I have fixed this myself by reading the documentation.
I wanted to know the memory location of a block of memory allocated by a library. I had the ctypes pointer that pointed to said block. To get the memory address of the block I used ctypes.addressof(p_block.contents).
The confusion arose around my understanding that... | 1 | 1 | 0 | 0 | 2012-03-13T15:26:00.000 | 2 | 1.2 | true | 9,687,002 | 0 | 0 | 0 | 1 | Short version:
How can I get the address that a ctypes pointer points to?
Long version:
I have registered a python function as a callback with a C library. The C library expects function signature of void (*p_func)(char stat, char * buf, short buf_len) so I register an appropriate python function. When I get into the p... |
Does app engine automatically cache frequent queries? | 9,689,883 | 1 | 3 | 1,313 | 1 | python,google-app-engine,memcached,bigtable | I think that app engine does not cache anything for you. While it could be that, internally, it caches some things for a split second, I don't think you should rely on that.
I think you will be charged the normal number of read operations for every entity you read from every query. | 0 | 1 | 0 | 0 | 2012-03-13T18:06:00.000 | 3 | 0.066568 | false | 9,689,588 | 0 | 0 | 1 | 2 | I seem to remember reading somewhere that google app engine automatically caches the results of very frequent queries into memory so that they are retrieved faster.
Is this correct?
If so, is there still a charge for datastore reads on these queries? |
Does app engine automatically cache frequent queries? | 9,690,080 | 1 | 3 | 1,313 | 1 | python,google-app-engine,memcached,bigtable | No, it doesn't. However depending on what framework you use for access to the datastore, memcache will be used. Are you developing in java or python? On the java side, Objectify will cache GETs automatically but not Queries. Keep in mind that there is a big difference in terms of performance and cachability between get... | 0 | 1 | 0 | 0 | 2012-03-13T18:06:00.000 | 3 | 0.066568 | false | 9,689,588 | 0 | 0 | 1 | 2 | I seem to remember reading somewhere that google app engine automatically caches the results of very frequent queries into memory so that they are retrieved faster.
Is this correct?
If so, is there still a charge for datastore reads on these queries? |
Checking "liveness" of a Windows application? | 9,694,585 | 3 | 5 | 368 | 0 | python,windows,winapi,pywin32 | You'll need to get a HWND handle to the window in question (EnumWindowHandles might be a good start), and then try calling IsHungAppWindow to see if the system thinks it's unresponsive. | 0 | 1 | 0 | 0 | 2012-03-13T20:09:00.000 | 2 | 0.291313 | false | 9,691,306 | 0 | 0 | 0 | 1 | I've got a Windows application running some expensive equipment; this application dies in a variety of creative ways. Usually when it goes, the process dies completely. I wrote a little monitoring program which looks for the process' name in the list of things which are currently running, and that works great for those... |
How do I know timestamp when my Python app was deployed on GAE? | 9,696,354 | 4 | 3 | 266 | 0 | python,google-app-engine | Wrap appcfg.py in a shell script. Before actually running appcfg.py update, save the current time, possibly adjusting for your time zone, if necessary, in a file that's marked as a resource. You can open and read that file from the deployed app.
Alternatively, have that script substitute the current time directly into ... | 0 | 1 | 0 | 0 | 2012-03-14T02:59:00.000 | 2 | 0.379949 | false | 9,695,320 | 0 | 0 | 0 | 1 | I need to know a value holding timestamp when my app was deployed on the GAE server. In runtime.
Surely I could generate some Python constant in the deployment script. But is there an easier and more correct way to reach the goal?
(I'd like not to use data store for that.) |
Google app engine how to schedule Crons one after another | 9,715,283 | 1 | 0 | 112 | 0 | python,google-app-engine | Though I agree with suggestions in comment, I think I have a better solution to your problem (Hopefully :))
Although it's not necessary you can use pull queue in your application, to facilitate design of your problem. The pattern I am suggesting is like this:
1) A servlet centrally handles execution (Let's call it cont... | 0 | 1 | 0 | 0 | 2012-03-15T04:16:00.000 | 2 | 0.099668 | false | 9,713,908 | 0 | 0 | 0 | 1 | Hi um struggling with a problem . I created number of crons and i and i want to run them one after another in a specific order . Lets say i have A , B , C and D crons and want to Run Cron B after Completion of Cron A and after that want to run Cron D and after that cron C. I searched for a way to accomplish this task b... |
Popen-ing a python call that invokes a script using multiprocessing (pgrp issue)? | 10,034,142 | 1 | 1 | 241 | 0 | python,unix | You're asking about something pretty messy here. I suspect that none of this is what you want to do at all, and that you really want to accomplish this some simpler way. However, presuming you really want to mess with process groups...
Generally, a new process group is created only by the setpgrp(2) system call. Otherw... | 0 | 1 | 0 | 1 | 2012-03-15T15:21:00.000 | 1 | 1.2 | true | 9,722,778 | 0 | 0 | 0 | 1 | I'm writing a unittesting framework for servers that uses popen to basically execute "python myserver.py" with shell=False, run some tests, and then proceed to take the server down by killpg.
This myserver.py can and will use multiprocessing to spawn subprocesses of its own. The problem is, from my tests, it seems tha... |
bottle framework: getting requests and routing to work | 10,681,349 | 0 | 1 | 693 | 0 | python,bottle | I actually resolved the issue. The Bottle framework tutorial encourages first-time users to set up the server on a high port (to avoid conflict with apache, etc) for development. I was missing two parts of the process: 1. import the python script so that it can be called from the main bottle file 2. in the main bottle ... | 0 | 1 | 0 | 0 | 2012-03-15T20:25:00.000 | 1 | 1.2 | true | 9,727,608 | 0 | 0 | 1 | 1 | I have written a webapp using traditional cgi. I'm now trying to rewrite it with bottle
The page is simple...the user fills out a form, hits submit and the data object is sent to a python script that used to live in my cgi-bin
The python script generates an image, and prints the url for that image out to standard out
O... |
Python subprocess in parallel | 9,743,899 | 4 | 22 | 25,715 | 0 | python,subprocess | You don't need to run a thread for each process. You can peek at the stdout streams for each process without blocking on them, and only read from them if they have data available to read.
You do have to be careful not to accidentally block on them, though, if you're not intending to. | 0 | 1 | 0 | 0 | 2012-03-16T20:08:00.000 | 4 | 0.197375 | false | 9,743,838 | 1 | 0 | 0 | 1 | I want to run many processes in parallel with ability to take stdout in any time. How should I do it? Do I need to run thread for each subprocess.Popen() call, a what? |
Google App Engine library imports | 9,748,040 | 0 | 0 | 2,099 | 0 | python,google-app-engine,google-api,google-api-client,google-api-python-client | The packages needs to be locally available, where did you put the packages, in the Python folder or in your project folder? | 0 | 1 | 1 | 0 | 2012-03-17T04:30:00.000 | 2 | 0 | false | 9,747,258 | 0 | 0 | 1 | 1 | I've been experimenting with the Google App Engine, and I'm trying to import certain libraries in order to execute API commands. I've been having trouble importing, however. When I tried to execute "from apiclient.discovery import build", my website doesn't load anymore. When I test locally in IDLE, this command works... |
change directory (python) doesnt work in localhost | 9,757,219 | 6 | 0 | 213 | 0 | python,google-app-engine,python-2.7 | AppEngine restricts you from doing things that don't make sense. Your AppEngine application can't go wandering all over the filesystem once it is running on Google's servers, and Google's servers certainly don't have a C: drive.
Whatever you are trying to accomplish by changing directories, it's something that you need... | 0 | 1 | 0 | 0 | 2012-03-18T09:15:00.000 | 1 | 1 | false | 9,757,203 | 0 | 0 | 1 | 1 | import os os.chdir("c:\Users")
works in the command prompt but not on localhost (google app engine.)
can anyone help. |
default python does not locate modules installed with homebrew | 10,824,368 | 0 | 0 | 311 | 0 | python,macos,module,homebrew | From the Homebrew page: "Homebrew installs packages into their own isolated prefix and then symlinks everything into /usr/local"
I think that the OS X preinstalled python looks for modules in
/Library/Frameworks/Python.framework/Versions/Current//lib/python2.7/site-packages
So maybe you need to symlink your Homebrew in... | 0 | 1 | 0 | 0 | 2012-03-18T22:54:00.000 | 1 | 0 | false | 9,763,056 | 0 | 0 | 0 | 1 | I am installing modules with homebrew and other installers, and they are not recognized by my default python. Module installations with easy_install (such as pip) appear to be available for my system and system python).
My default python is located here and is this version:
15:49 [~]: which python
/usr/local/bin... |
How to use Coffeescript on Google App Engine | 9,764,949 | 2 | 2 | 1,031 | 0 | python,google-app-engine,coffeescript,go | Coffeescript compiles to Javascript, which can be run in a web browser. In that case, App Engine can serve up the resulting javascript.
I don't know of any way to compile coffeescript to python, java or go though, so you can't use it as a server side language. | 0 | 1 | 0 | 0 | 2012-03-19T04:03:00.000 | 2 | 1.2 | true | 9,764,895 | 0 | 0 | 1 | 1 | Does anyone know if it is possible to use Coffeescript on Google App Engine? If so how can this be done with the app engine Python or Go platforms? |
Practical server side includes with Python on Google App Engine | 9,782,676 | 0 | 0 | 1,024 | 0 | python,google-app-engine,server-side-includes,static-files | Or use a framework like django, which will help in inheritance of templates. | 0 | 1 | 0 | 0 | 2012-03-19T15:43:00.000 | 2 | 0 | false | 9,773,232 | 0 | 0 | 1 | 1 | Is there a decent way to "simulate" server side includes using Python on Google App Engine?
I would really like to split my static html files up into smaller pieces for two reasons:
They will be easier to manage from a development perspective
HTML that is redundant across multiple pages can be more easily re-used and ... |
How to connect android device to specific AP with adb shell or monkeyrunner | 10,211,905 | 0 | 1 | 799 | 0 | android,python,android-intent,android-emulator,monkeyrunner | wpa_cli should work.Open wpa_cli>>
add_network
set_network ssid "APSSID"
set_network key_mgmt NONE \if ap is confgrd in open none
save_config
enable
these set of commands should work if WiFI is ON in UI.
using Monkeyrunner navigate using keycode is the only option OR
you need to make an APK for ... | 0 | 1 | 0 | 1 | 2012-03-19T19:24:00.000 | 1 | 0 | false | 9,776,529 | 0 | 0 | 0 | 1 | I am trying to connect an android device to specific AP without keycodes. I am looking for adb shell commands or monkeyrunner script that can perform the same.
Hope you guys can help me with this.
PS. After researching for days only way I found is using wpa_cli in adb shell. But couldnt exactly connect because I was no... |
Is writing a daemon in Python a good idea? | 9,779,553 | 1 | 18 | 2,480 | 0 | python,daemon | I've written many things in C/C++ and Perl that are initiated when a LINUX box O.S. boots, launching them using the rc.d.
Also I've written a couple of java and python scripts that are started the same way I've mentioned above, but I needed a little shell-script (.sh file) to launch them and I used rc.5.
Let me tell y... | 0 | 1 | 0 | 1 | 2012-03-19T23:00:00.000 | 3 | 0.066568 | false | 9,779,200 | 1 | 0 | 0 | 2 | I have to write a daemon program that constantly runs in the background and performs some simple tasks. The logic is not complicated at all, however it has to run for extended periods of time and be stable.
I think C++ would be a good choice for writing this kind of application, however I'm also considering Python sin... |
Is writing a daemon in Python a good idea? | 9,779,293 | 14 | 18 | 2,480 | 0 | python,daemon | I've written a number of daemons in Python for my last company. The short answer is, it works just fine. As long as the code itself doesn't have some huge memory bomb, I've never seen any gradual degradation or memory hogging. Be mindful of anything in the global or class scopes, because they'll live on, so use del mor... | 0 | 1 | 0 | 1 | 2012-03-19T23:00:00.000 | 3 | 1.2 | true | 9,779,200 | 1 | 0 | 0 | 2 | I have to write a daemon program that constantly runs in the background and performs some simple tasks. The logic is not complicated at all, however it has to run for extended periods of time and be stable.
I think C++ would be a good choice for writing this kind of application, however I'm also considering Python sin... |
bash: pip: command not found | 40,450,261 | 2 | 580 | 1,748,193 | 0 | python,macos,pip,python-2.6 | (Context: My OS is Amazon linux using AWS. It seems similar to RedHat but it's stripped down a bit, it seems.)
Exit the shell, then open a new shell. The pip command now works.
That's what solved the problem at this location.
You might want to know as well: The pip commands to install software then needed to be writte... | 0 | 1 | 0 | 0 | 2012-03-20T02:43:00.000 | 36 | 0.011111 | false | 9,780,717 | 1 | 0 | 0 | 10 | I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found".
This is on Mac OS X, which I'm new to, so I'm assuming there's some ki... |
bash: pip: command not found | 51,316,425 | 1 | 580 | 1,748,193 | 0 | python,macos,pip,python-2.6 | What I did to overcome this was sudo apt install python-pip.
It turned out my virtual machine did not have pip installed yet. It's conceivable that other people could have this scenario too. | 0 | 1 | 0 | 0 | 2012-03-20T02:43:00.000 | 36 | 0.005555 | false | 9,780,717 | 1 | 0 | 0 | 10 | I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found".
This is on Mac OS X, which I'm new to, so I'm assuming there's some ki... |
bash: pip: command not found | 54,471,268 | 2 | 580 | 1,748,193 | 0 | python,macos,pip,python-2.6 | Not sure why this wasnt mentioned before, but the only thing that worked for me (on my NVIDIA Xavier) was:
sudo apt-get install python3-pip
(or sudo apt-get install python-pip for python 2) | 0 | 1 | 0 | 0 | 2012-03-20T02:43:00.000 | 36 | 0.011111 | false | 9,780,717 | 1 | 0 | 0 | 10 | I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found".
This is on Mac OS X, which I'm new to, so I'm assuming there's some ki... |
bash: pip: command not found | 62,098,214 | 1 | 580 | 1,748,193 | 0 | python,macos,pip,python-2.6 | The problem seems that your python version and the library yoıu want to install is not matching versionally. Ex: If Django is Django3 and your python version is 2.7, you may get this error.
"After installing is running 'python' still ran Python 2.6 and PATH was not updated."
1- Install latest version of Python
2- Chan... | 0 | 1 | 0 | 0 | 2012-03-20T02:43:00.000 | 36 | 0.005555 | false | 9,780,717 | 1 | 0 | 0 | 10 | I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found".
This is on Mac OS X, which I'm new to, so I'm assuming there's some ki... |
bash: pip: command not found | 60,697,532 | 4 | 580 | 1,748,193 | 0 | python,macos,pip,python-2.6 | To overcome the issue "bash: pip: command not found" in Mac
Found two versions on Mac 1 is 2.7 and the other is 3.7
when I say sudo easy_install pip, pip got installed under 2.7
when I say sudo easy_install-3.7 pip, pip got installed under 3.7
But, whenever I would require to do pip install , I wanted to install the ... | 0 | 1 | 0 | 0 | 2012-03-20T02:43:00.000 | 36 | 0.022219 | false | 9,780,717 | 1 | 0 | 0 | 10 | I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found".
This is on Mac OS X, which I'm new to, so I'm assuming there's some ki... |
bash: pip: command not found | 62,380,015 | 6 | 580 | 1,748,193 | 0 | python,macos,pip,python-2.6 | It solved my problem by using
sudo easy_install pip | 0 | 1 | 0 | 0 | 2012-03-20T02:43:00.000 | 36 | 1 | false | 9,780,717 | 1 | 0 | 0 | 10 | I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found".
This is on Mac OS X, which I'm new to, so I'm assuming there's some ki... |
bash: pip: command not found | 64,437,923 | 15 | 580 | 1,748,193 | 0 | python,macos,pip,python-2.6 | Latest update 2021.
In Ubuntu 20 64bit works perfectly
Installation of python3
sudo apt install python3
Pip Installation
sudo apt install python3-pip
Add following alias in $HOME/.bash_aliases in some cases file may be hidden.
alias pip="/usr/bin/python3 -m pip "
Refresh current terminal session.
. ~/.profile
... | 0 | 1 | 0 | 0 | 2012-03-20T02:43:00.000 | 36 | 1 | false | 9,780,717 | 1 | 0 | 0 | 10 | I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found".
This is on Mac OS X, which I'm new to, so I'm assuming there's some ki... |
bash: pip: command not found | 38,888,588 | 23 | 580 | 1,748,193 | 0 | python,macos,pip,python-2.6 | Installing using apt-get installs a system wide pip, not just a local one for your user. Try this command to get pip running on your system ...
$ sudo apt-get install python-pip python-dev build-essential
Then pip will be installed without any issues and you will be able to use "sudo pip...". | 0 | 1 | 0 | 0 | 2012-03-20T02:43:00.000 | 36 | 1 | false | 9,780,717 | 1 | 0 | 0 | 10 | I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found".
This is on Mac OS X, which I'm new to, so I'm assuming there's some ki... |
bash: pip: command not found | 9,781,267 | 15 | 580 | 1,748,193 | 0 | python,macos,pip,python-2.6 | To solve:
Add this line to ~/.bash_profile
export PATH="/usr/local/bin:$PATH"
In a terminal window, run
source ~/.bash_profile | 0 | 1 | 0 | 0 | 2012-03-20T02:43:00.000 | 36 | 1 | false | 9,780,717 | 1 | 0 | 0 | 10 | I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found".
This is on Mac OS X, which I'm new to, so I'm assuming there's some ki... |
bash: pip: command not found | 69,341,076 | 0 | 580 | 1,748,193 | 0 | python,macos,pip,python-2.6 | If on Windows and using the Python installer, make sure to check the "Add Python to environment variables" option.
After installation, restart your shell and retry to see if pip exists. | 0 | 1 | 0 | 0 | 2012-03-20T02:43:00.000 | 36 | 0 | false | 9,780,717 | 1 | 0 | 0 | 10 | I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found".
This is on Mac OS X, which I'm new to, so I'm assuming there's some ki... |
Should Python library modules start with #!/usr/bin/env python? | 9,783,492 | 0 | 8 | 1,029 | 0 | python,coding-style,shebang | if you want your script to be an executable, you have to include this line | 0 | 1 | 0 | 1 | 2012-03-20T08:27:00.000 | 3 | 0 | false | 9,783,482 | 1 | 0 | 0 | 1 | Should Python library modules start with #!/usr/bin/env python?
Looking at first lines of *.py in /usr/share/pyshared (where Python libs are stored in Debian) reveals that there are both files that start with the hashbang line and those that do not.
Is there a reason to include or omit this line? |
Google App Engine Development and Production Environment Setup | 9,793,302 | 0 | 1 | 398 | 0 | django,google-app-engine,github,development-environment,python-2.7 | I'm on a pretty similar setup, though I'm still runing on py2.5, django-nonrel.
1) I usually use 'git status' or 'git gui' to see if I forgot to check in files.
2) I personally don't check in my datastore. Are you familiar with .gitignore? It's a text file in which you list files for git to ignore when you run 'git s... | 0 | 1 | 0 | 0 | 2012-03-20T13:58:00.000 | 1 | 1.2 | true | 9,788,264 | 0 | 0 | 1 | 1 | Here is my current setup:
GitHub repository, a branch for dev.
myappdev.appspot.com (not real url)
myapp.appspot.com (not real url)
App written on GAE Python 2.7, using django-nonrel
Development is performed on a local dev server. When I'm ready to release to dev, I increment the version, commit, and run "manage.py u... |
Google AppEngine and Threaded Workers | 9,790,858 | 5 | 0 | 152 | 0 | python,multithreading,google-app-engine,queue | You can use "backends" or "task queues" to run processes in the background. Tasks have a 10-minute run time limit, and backends have no run time limit. There's also a cronjob mechanism which can trigger requests at regular intervals.
You can fetch the data from external servers with the "URLFetch" service. | 0 | 1 | 0 | 0 | 2012-03-20T14:21:00.000 | 2 | 0.462117 | false | 9,788,635 | 0 | 0 | 1 | 2 | I am currently trying to develop something using Google AppEngine, I am using Python as my runtime and require some advise on setting up the following.
I am running a webserver that provides JSON data to clients, The data comes from an external service in which I have to pull the data from.
What I need to be able to do... |
Google AppEngine and Threaded Workers | 9,809,659 | 1 | 0 | 152 | 0 | python,multithreading,google-app-engine,queue | Note that using memcache as the communication mechanism between front-end and back-end is unreliable -- the contents of memcache may be partially or fully erased at any time (and it does happen from time to time).
Also note that you can't query memcache of you don't know the exact keys ahead of time. It's probably bet... | 0 | 1 | 0 | 0 | 2012-03-20T14:21:00.000 | 2 | 0.099668 | false | 9,788,635 | 0 | 0 | 1 | 2 | I am currently trying to develop something using Google AppEngine, I am using Python as my runtime and require some advise on setting up the following.
I am running a webserver that provides JSON data to clients, The data comes from an external service in which I have to pull the data from.
What I need to be able to do... |
Is it possible to find out which USB port a MIDI device is connected to in portmidi / pyportmidi | 9,790,821 | 0 | 3 | 455 | 0 | python,usb,midi,pyportmidi | lsusb should do the trick. All devices and their respective hubs are listed there. | 0 | 1 | 0 | 1 | 2012-03-20T16:19:00.000 | 1 | 0 | false | 9,790,715 | 0 | 0 | 0 | 1 | I'm connecting a several identical USB-MIDI devices and talking to them using Python and pyportmidi. I have noticed that when I run my code on Linux, occasionally the MIDI ports of the devices are enumerated in a different order, so I send messages to the wrong devices. As the devices do not have unique identifiers, I ... |
hook into wndproc of another application? | 10,608,464 | 2 | 7 | 1,449 | 0 | python,winapi,wndproc | You are going about this the wrong way. If you think about it, you'll realize that responding to menu events with your custom "actions" must require some code to run in the process that you're targeting. This means you'll need to inject code into the other process in order to achieve what you want.
Since you're going t... | 1 | 1 | 0 | 0 | 2012-03-20T21:58:00.000 | 1 | 1.2 | true | 9,795,645 | 0 | 0 | 0 | 1 | I have a small question hoping someone will help me.
Is there any way to hook into other applications WNDPROC?
The situation is that I want to insert a menu in the other app menubar and I want to define the commands for every menu item.
I was able to insert the menu with menu items using some Win32 API
functions (user3... |
GAE wait response from other source | 9,808,831 | 1 | 0 | 68 | 0 | android,python,http,google-app-engine | You don't seem to have understood how web applications work. They don't wait for signals - or, rather, that's all they do. Every page served by a Web service is in response to a signal, ie a request. Your web service just needs to respond to normal requests in the normal way. | 0 | 1 | 0 | 0 | 2012-03-21T15:56:00.000 | 1 | 0.197375 | false | 9,808,250 | 0 | 0 | 1 | 1 | I don't know how to present the title more clearly.
I want build a site on Google app engine (GAE), and one app on android.
The site on GAE should wait the signal which is from the app on android and handle the signal to do something.
I don't know how to search the "keyword" on Google of waiting signal on GAE, or wha... |
Apache httpd doesn't load .bashrc | 9,815,735 | 0 | 2 | 2,452 | 0 | python,bash,cgi,apache | What? Surely you don't mean that your scripts rely on configurations in some account's personal home directory.
Apache config files can export environment variables to CGI scripts, etc.
Maybe your program is too dependent on too many environment variables. How about supporting a configuration file: /etc/mypythonprogram... | 0 | 1 | 0 | 1 | 2012-03-22T02:33:00.000 | 2 | 0 | false | 9,815,655 | 0 | 0 | 0 | 1 | I'm running Python scripts as a CGI under Apache 2.2. These scripts rely on environment variables set in my .bashrc to run properly. The .bashrc is never loaded, and my scripts fail.
I don't want to duplicate my bashrc by using a bunch of SETENV commands; the configuration files will easily get out of sync and cause ha... |
How do I see the Python doc on Linux? | 9,818,314 | 6 | 31 | 15,843 | 0 | python,linux,doc | If you use the Fedora distribution, then yum install python-docs. Other distributions may provide similar packages. | 0 | 1 | 0 | 0 | 2012-03-22T06:56:00.000 | 9 | 1 | false | 9,817,712 | 0 | 0 | 0 | 1 | In Windows, Python has a chm type document, and it is very convenient to read.
But in the Linux, is there any document let me to read? |
Model to create threaded comments on Google Appengine with Python | 9,819,945 | 0 | 1 | 380 | 0 | python,google-app-engine | It depends on how nested threads you expect to get and if you want to optimize reading or writing. If we guess that the threads normally are quite shallow and that you want to optimize reading all subcomments on all levels of a comment, I think you should store each comment in a separate entry and then put a reference ... | 0 | 1 | 0 | 0 | 2012-03-22T09:15:00.000 | 2 | 0 | false | 9,819,260 | 0 | 0 | 1 | 1 | I am trying to write a comments model which can be threaded (no limits to the number of child threads). How do I do this in Appengine? and what is the fastest way to read all comments?
I am trying to do this in a scalable way so that app engine's new pricing does not kill my startup :) |
When invoking a Python script, what is the difference between "./script.py" and "python script.py" | 9,826,394 | 0 | 6 | 2,513 | 0 | python,django,posix,sh | ./script.py runs the interpreter defined in the #! at the beginning of the file. For example, the first line might be #! /usr/bin/env python or #! /usr/bin/python or something else like that. If you look at what interpreter is invoked, you might be able to fix that problem. | 0 | 1 | 0 | 1 | 2012-03-22T16:16:00.000 | 4 | 0 | false | 9,826,313 | 0 | 0 | 0 | 2 | One difference is that "./script.py" only works if script.py is executable (as in file permissions), but "python script.py" works regardless. However, I strongly suspect there are more differences, and I want to know what they are.
I have a Django website, and "python manage.py syncdb" works just fine, but "./manage.py... |
When invoking a Python script, what is the difference between "./script.py" and "python script.py" | 9,826,923 | 1 | 6 | 2,513 | 0 | python,django,posix,sh | In Linux using terminal you can execute any file -if the user has execute permission- by typing
./fileName. When the OS sees a valid header like #! /usr/bin/python (or for perl #! /usr/bin/python), It will call the python or perl (appropriate) interpreter to execute the program. You can use the command python script.p... | 0 | 1 | 0 | 1 | 2012-03-22T16:16:00.000 | 4 | 0.049958 | false | 9,826,313 | 0 | 0 | 0 | 2 | One difference is that "./script.py" only works if script.py is executable (as in file permissions), but "python script.py" works regardless. However, I strongly suspect there are more differences, and I want to know what they are.
I have a Django website, and "python manage.py syncdb" works just fine, but "./manage.py... |
Storing constant data: python module v. the datastore | 9,838,594 | 2 | 0 | 269 | 0 | python,google-app-engine,google-cloud-datastore | If it's small and read-only, it's a much better idea to store data in locally - nothing beats the latency of local memory. Note you don't have to store it as a Python module - any data file will work, if you write the code to read it into memory. | 0 | 1 | 0 | 0 | 2012-03-23T08:14:00.000 | 1 | 1.2 | true | 9,835,895 | 1 | 0 | 0 | 1 | I am developing a simple data visualization application in python with Google AppEngine. The data has the following properties:
structure : simple key - tuple-of-int
size : in the order (1-10mb on disk or in memory when loaded by the python interpreter)
read-only (uploaded once and for all by me, not modified by users)... |
How to determine if Python script was run via command line? | 9,839,781 | 1 | 36 | 35,970 | 0 | python,command-line | This is typically done manually/, I don't think there is an automatic way to do it that works for every case.
You should add a --pause argument to your script that does the prompt for a key at the end.
When the script is invoked from a command line by hand, then the user can add --pause if desired, but by default ther... | 0 | 1 | 0 | 1 | 2012-03-23T12:32:00.000 | 13 | 0.015383 | false | 9,839,240 | 0 | 0 | 0 | 1 | Background
I would like my Python script to pause before exiting using something similar to:
raw_input("Press enter to close.")
but only if it is NOT run via command line. Command line programs shouldn't behave this way.
Question
Is there a way to determine if my Python script was invoked from the command line:
$ pytho... |
how to show an object's type in google app engine | 9,885,834 | 1 | 0 | 89 | 0 | python,google-app-engine,types | When browser renders html it thinks that <type 'str'> is a (unknown) tag, so it renders it as <type 'str'></type>, hence it becomes part of your page markup... You can see this with Firebug or any similar tool. | 0 | 1 | 0 | 0 | 2012-03-26T12:22:00.000 | 1 | 1.2 | true | 9,872,029 | 0 | 0 | 1 | 1 | For debug use I want to show the type of a variable in Google App Engine.
In traditional environment, I will use "print type( x )" to do it. But in GAE I just don't know why I can't use self.response.out.write( str( type( x ) ) ) to echo it in the browser. I got confused because I did transform the <type 'type'> to <... |
How to send emails from django App in Google App Engine | 9,875,058 | 2 | 3 | 1,520 | 0 | python,django,google-app-engine | Google only allows you to send emails from a domain name that they control in the google app engine. So you will either have to send it from the test domain they give you, a gmail account, or you need to use their name servers for your domain name. | 0 | 1 | 0 | 0 | 2012-03-26T15:26:00.000 | 4 | 0.099668 | false | 9,874,959 | 0 | 0 | 1 | 1 | I have created one Django Application,also hosted it on the google app engine. I can send emails from django application, but after hosting it to app engine I cant do that.I really stuck with this problem, so please tell me if there is any solution for using django email functions in Google app engine.
I have tried ... |
SGE script: print to file during execution (not just at the end)? | 15,344,911 | 3 | 5 | 4,083 | 0 | python,qsub,sungridengine | This is SGE buffering the output of your process, it happens whether its a python process or any other.
In general you can decrease or disable the buffering in SGE by changing it and recompiling. But its not a great thing to do, all that data is going to be slowly written to disk affecting your overall performance. | 0 | 1 | 0 | 0 | 2012-03-26T17:40:00.000 | 8 | 0.07486 | false | 9,876,967 | 0 | 0 | 0 | 1 | I have an SGE script to execute some python code, submitted to the queue using qsub. In the python script, I have a few print statements (updating me on the progress of the program). When I run the python script from the command line, the print statements are sent to stdout. For the sge script, I use the -o option to r... |
enthought python distribution wx | 11,151,178 | 1 | 1 | 682 | 0 | python,64-bit,pygame,wxwidgets,enthought | I had the same problem. The only way around it that has worked for me is to uninstall your EPD version ($ sudo remove-EPD-7.2-1, or whichever version you have) and reinstall the 32 bit version. Wx comes as part of the EPD package, so once you have downloaded the 32 bit version there is no need to download and install w... | 0 | 1 | 0 | 1 | 2012-03-27T19:53:00.000 | 1 | 1.2 | true | 9,896,687 | 0 | 0 | 0 | 1 | For some reason my 64 bit EPD can't import wx.
I also tried to install the wxPython2.8-osx-unicode-py2.7 version from the wx site.
It installed successfully, but is no where to be found on my harddrive.
I checked the sitepackes for 2.7 and the EPD 7.2.2. where all the modules usually should be installed.
I am confused... |
How do i run the python 'sdist' command from within a python automated script without using subprocess? | 9,918,260 | 0 | 6 | 1,605 | 0 | python,subprocess,packaging,pip,distutils | If you don’t have a real reason to avoid subprocesses (i.e. lack of platform support, not just aesthetics (“I see no point”)), then I suggest you should just not care and run in a subprocess. There are a few ways to achieve what you request, but they have their downsides (like having to catch exceptions and reporting ... | 0 | 1 | 0 | 0 | 2012-03-28T10:36:00.000 | 2 | 0 | false | 9,905,743 | 1 | 0 | 0 | 1 | I am writing a script to automate the packaging of a 'home-made' python module and distributing it on a remote machine.
i am using Pip and have created a setup.py file but i then have to call the subprocess module to call the "python setup.py sdist" command.
i have looked at the "run_setup" method in distutils.core but... |
Trouble running waitress as a service on Windows Server 2003 | 13,188,519 | 0 | 1 | 659 | 0 | python,windows-services,waitress | Hmm, March, a bit late. You can't debug without more info. I'd turn the logging all the way to debug, if not already done. I'd also check the NT event log.
The only things coming to mind are the firewall, and extra restrictions on apps in server. If possible, try adding an exception for your app. | 0 | 1 | 0 | 0 | 2012-03-28T15:27:00.000 | 1 | 0 | false | 9,910,788 | 0 | 0 | 0 | 1 | So I've written a windows service in python which starts a subprocess that runs a Waitress server, monitors a directory for changes, and restarts the server when a change is detected. On Windows 7, everything works fine. On Windows Server 2003, where I have to deploy this server, the server fails to bind to its port. I... |
Determing PID of CGI Script on Windows | 9,912,713 | 0 | 0 | 222 | 0 | python,windows,process,kill | Why are you assured that your CGI script are still working when you try to kill it? Web server starts one instance of CGI script for one request and when script finishes it... just finishes. | 0 | 1 | 0 | 1 | 2012-03-28T16:47:00.000 | 1 | 0 | false | 9,912,121 | 0 | 0 | 0 | 1 | I'm obtaining a PID, using python, of a CGI script, however, the PID is not valid i.e. can't Taskkill it from CL. I get:
"Process: no process found with pid xxxx" where xxxx is the pid
I thought maybe I have to kill a parent python shell instance, but os.ppid doesn't work in windows.
So then I installed psutil python ... |
different PYSTARTUP variables for different python installations | 9,915,173 | 0 | 0 | 184 | 0 | python,environment-variables | You can always export PYSTARTUP="whatever" on the shell before starting your script.
You can also put PYSTARTUP="whatever" in front of the command you want to run, e.g. PYSTARTUP="whatever" python something.py | 0 | 1 | 0 | 0 | 2012-03-28T20:14:00.000 | 1 | 0 | false | 9,914,985 | 1 | 0 | 0 | 1 | We have an in-house developed network-based application that is based on python, it provides a command-line environment in the same way like python does. I also have a local python installation on my machine. Sometimes for simple python tasks, i prefer using my local python install... Is possible to to have a different... |
How can I get gevent-py2.7-win64.egg | 9,923,444 | 0 | 0 | 377 | 0 | python,gevent | first test cmd easy_install gevent
if failed, just go google python setuptools and then installed it and easy_install gevent
just let the setuptools to help you choose the suitable module | 0 | 1 | 0 | 1 | 2012-03-29T10:03:00.000 | 2 | 0 | false | 9,923,175 | 0 | 0 | 0 | 1 | I'm new for python. How can I get gevent-py2.7-win64.egg, my system is win32, and I need a 64bit module of gevent |
eclipse pydev refuses to parse a .py file | 9,926,632 | 2 | 1 | 439 | 0 | python,eclipse,pydev | Right click on the python file you care about and see what the default editor is. You can manually switch any file type here. If it's plain text, just switch it back to PyDev.
To ensure that the setting is global, go to Window > Preferences > General > Editors > File associations and look for .py, .pyw, and .pyx. They ... | 0 | 1 | 0 | 1 | 2012-03-29T13:14:00.000 | 1 | 1.2 | true | 9,926,088 | 0 | 0 | 0 | 1 | I'm having a problem with eclipse+pydev. It suddenly refuses to parse a .py file as a python script, which means no syntax highlighting, code completion etc. It worked up until now, but I couldn't find a way to convince it to re parse it. re-opening the file, re-starting the IDE does not help. I suspect deleting some k... |
How do I create Python eggs from distutils source packages? | 9,960,426 | 26 | 17 | 15,618 | 0 | python,setuptools,distutils | setuptools monkey-patches some parts of distutils when it is imported. When you use easy_install to get a distutils-based project from PyPI, it will create an egg (pip may do that too). To do the same thing locally (i.e. in a directory that’s a code checkout or an unpacked tarball), use this trick: python -c "import ... | 0 | 1 | 0 | 0 | 2012-03-30T21:01:00.000 | 2 | 1.2 | true | 9,950,362 | 1 | 0 | 0 | 1 | I vaguely remember some sort of setuptools wrapper that would generate .egg files from distutils source. Can someone jog my memory? |
How do I generate code under Eclipse+PyDev? | 9,998,578 | 1 | 0 | 339 | 0 | eclipse,python-3.x,pydev,generated-code | It should be possible to do what you want using an external builder inside Eclipse...
Right click project > properties > builders > new > program, then configure the program as python having as a parameter the module to run and receiving as arguments also the ${build_files} variable (if it's a python script, you have ... | 0 | 1 | 0 | 1 | 2012-03-31T01:49:00.000 | 2 | 1.2 | true | 9,952,327 | 0 | 0 | 1 | 1 | I'm developing a system, and I have build a code generator that emits a bunch of classes based on a configuration file.
I would like to configure PyDev to invoke the generator for me whenever the configuration file (or the generator source) changes. I know that this is possible "in theory" because e.g., the ANTLR plug... |
How to simulate Google login using gaeunit | 9,953,084 | 0 | 0 | 401 | 0 | python,google-app-engine,google-apps,google-signin,gaeunit | Two situations:
Local Dev server: login is mocked via a simple web form. You can do a http POST to log in.
Production server: login goes through the Google auth infrastructure. No way to mock this. To make this work you'd need to code around it. | 0 | 1 | 0 | 1 | 2012-03-31T03:50:00.000 | 2 | 0 | false | 9,952,873 | 0 | 0 | 1 | 1 | I am currently using gaeunit to perform automated test on my google app engine application. I am wondering whether it's possible to simulate the user login action using his/her google account using gaeunit?
Thank you very much. |
How do you make an installer for your python program | 9,960,652 | 3 | 15 | 28,302 | 0 | python,installation,cross-platform,python-3.2 | Python is an interpreted, not a compiled language. So any standalone program you may want to distribute must bundle the entire interpreter inside it plus the libraries you used. This will result in an enormous file size for a single program. Also, this huge install cannot be used to run other python programs. An only m... | 0 | 1 | 0 | 0 | 2012-03-31T23:24:00.000 | 5 | 0.119427 | false | 9,960,583 | 1 | 0 | 0 | 1 | Im new to python, but I was thinking about making a program with python to give to my friends.
They don't know much about computers so if I asked them to install python by them selves they couldn't do it, but what if I could make an installer that downloads some version of python that only has what is needed for my fil... |
Python + Tornado Restart after editing files | 9,961,405 | 12 | 12 | 6,556 | 0 | python,reload,tornado,restart | If you are looking for automatic reloading of .py files during development. In your tornado.web.Application() put debug=True after your handlers.
I don't think you should do this in production environment, because such implementation typically use a background thread to actively scan files for changes, which may slow d... | 0 | 1 | 0 | 0 | 2012-04-01T02:03:00.000 | 2 | 1.2 | true | 9,961,357 | 0 | 0 | 0 | 1 | I just start learning Python + Tornado for my web servers. Every time I modify some code on my python scripts or templates I have to stop the in my terminal (CTRL+C) and restart it (python server.py) and I want a more effective way to do this, that after modifying code in some files the server automatically restarts.
P... |
Is it possible to have shared python library in GAE? | 9,965,775 | 0 | 2 | 161 | 0 | python,google-app-engine,shared-libraries | The deploy tools for Google App Engine (in the Python world at least) don't know anything about shared projects in Eclipse. You point the deploy script to a folder and that's about it.
You can create a script that will copy the projects into a deploy folder and deploy that folder. | 0 | 1 | 0 | 0 | 2012-04-01T15:41:00.000 | 2 | 0 | false | 9,965,725 | 1 | 0 | 0 | 2 | I want to share some modules between a python GAE project, and another python project but want to use the same source files so that I can change them without having to worry about keeping the source files in each project up to date.
Is there a way to let two python projects share the same source files outside of their ... |
Is it possible to have shared python library in GAE? | 9,968,299 | 4 | 2 | 161 | 0 | python,google-app-engine,shared-libraries | IF your dev environment is linux, you can use symlinks in your project folder to the shared source. The deployment will treat the symlinks as actual files/folders. | 0 | 1 | 0 | 0 | 2012-04-01T15:41:00.000 | 2 | 1.2 | true | 9,965,725 | 1 | 0 | 0 | 2 | I want to share some modules between a python GAE project, and another python project but want to use the same source files so that I can change them without having to worry about keeping the source files in each project up to date.
Is there a way to let two python projects share the same source files outside of their ... |
Take all input in Python (like UAC) | 9,965,932 | 3 | 0 | 507 | 0 | python | You cannot do this without cooperation with operating system. Whatever you do, Ctrl-Alt-Del will allow the user to circumvent your lock. | 0 | 1 | 0 | 0 | 2012-04-01T16:02:00.000 | 4 | 0.148885 | false | 9,965,881 | 1 | 0 | 0 | 3 | Is there any way I can create a UAC-like environment in Python? I want to basically lock the workstation without actually using the Windows lock screen. The user should not be able to do anything except, say, type a password to unlock the workstation. |
Take all input in Python (like UAC) | 9,968,755 | 1 | 0 | 507 | 0 | python | I would try with pygame, because it can lock mouse to itself and thus keep all input to itself, but i wouldn't call this secure without much testing, ctr-alt-del probably escape it, can't try on windows right now.
(not very different of Bryan Oakley's answer, except with pygame) | 0 | 1 | 0 | 0 | 2012-04-01T16:02:00.000 | 4 | 0.049958 | false | 9,965,881 | 1 | 0 | 0 | 3 | Is there any way I can create a UAC-like environment in Python? I want to basically lock the workstation without actually using the Windows lock screen. The user should not be able to do anything except, say, type a password to unlock the workstation. |
Take all input in Python (like UAC) | 9,966,066 | 1 | 0 | 507 | 0 | python | You might be able to get the effect you desire using a GUI toolkit that draws a window that covers the entire screen, then do a global grab of the keyboard events. I'm not sure if it will catch something like ctrl-alt-del on windows, however.
For example, with Tkinter you can create a main window, then call the overrid... | 0 | 1 | 0 | 0 | 2012-04-01T16:02:00.000 | 4 | 1.2 | true | 9,965,881 | 1 | 0 | 0 | 3 | Is there any way I can create a UAC-like environment in Python? I want to basically lock the workstation without actually using the Windows lock screen. The user should not be able to do anything except, say, type a password to unlock the workstation. |
Securely passing credentials to a program via plaintext file or command line | 9,986,152 | 0 | 0 | 1,344 | 0 | python,security,passwords,pipe | Tough problem. If you have access to source code of the program in question, you can change argv[0] after startup. On most flavors of *nix, this will work.
The config file approach may be better from a security perspective.
If the config file can be specified at run time, you could generate a temp file (see mkstemp), w... | 0 | 1 | 0 | 1 | 2012-04-03T01:38:00.000 | 2 | 0 | false | 9,986,059 | 0 | 0 | 0 | 2 | I have a program (not written by me) that I would like to use. It authenticates to an online service using a username and password that I would like to keep private. The authentication information may be passed to the program in two ways: either directly as command-line arguments or via a plaintext configuration file, ... |
Securely passing credentials to a program via plaintext file or command line | 9,986,183 | 0 | 0 | 1,344 | 0 | python,security,passwords,pipe | About the only thing you can do in this situation is store the credentials in a text file and then deny all other users of the machine permissions to read or write it. Create a user just for this script, in fact. Encrypting doesn't do much because you still have to have the key in the script, or somewhere the script ca... | 0 | 1 | 0 | 1 | 2012-04-03T01:38:00.000 | 2 | 0 | false | 9,986,059 | 0 | 0 | 0 | 2 | I have a program (not written by me) that I would like to use. It authenticates to an online service using a username and password that I would like to keep private. The authentication information may be passed to the program in two ways: either directly as command-line arguments or via a plaintext configuration file, ... |
dll in a different directory than c:\windows\system32 | 10,012,400 | 1 | 0 | 239 | 0 | python,dll,windows-7,pylucene | The answer is probably, that if something like that happens to you, there is a wrong DLL somewhere in the path that is called first (and puttting the DLL in system32 ensures it is first).
So if you put the relevant DLL in your PATH - make sure it is the first (or look into each element to find out who is getting ahead ... | 0 | 1 | 0 | 0 | 2012-04-03T09:15:00.000 | 1 | 1.2 | true | 9,990,358 | 0 | 0 | 0 | 1 | Finally I managed to get pylucene working on my windows7 machine,
Which raised a more general question:
How come that when I have a dll on a directory in the path, python couldn't find it,
and when I put the dll in c:\windows\system32 - it did work?
Using windows 7 32 bit |
Generating a unique data store key from a federated identity | 10,023,490 | 2 | 2 | 194 | 1 | python,google-app-engine,authentication | User.federated_identity() "Returns the user's OpenID identifier.", which is unique by definition (it's a URL that uniquely identifies the user). | 0 | 1 | 0 | 0 | 2012-04-03T22:13:00.000 | 1 | 1.2 | true | 10,002,209 | 0 | 0 | 1 | 1 | I need a unique datastore key for users authenticated via openid with the python 2.7 runtime for the google apps engine.
Should I use User.federated_identity() or User.federated_provider() + User.federated_identity()?
In other words is User.federated_identity() unique for ALL providers or just one specific provider... |
How to install the py2exe modul in Linux | 10,009,715 | 9 | 9 | 23,189 | 0 | python,installation,py2exe | Py2exe has to run on Windows, you can not run it in Linux. (Maybe wine can help, but I'm not sure) | 0 | 1 | 0 | 0 | 2012-04-04T10:53:00.000 | 2 | 1 | false | 10,009,660 | 0 | 0 | 0 | 1 | I downloaded the actual py2exe package.
But I've no idea how to get it in my system. I mean I can follow the tutorial a 100% but I can't find anything how to install py2exe to my kubuntu 11.10.
I also can't find a py2exe.py which I could include to my workingfolder.
Could some please help me the project has to be fini... |
Completely locking down Windows 7 using Python 3.2? | 28,282,261 | -1 | 0 | 545 | 0 | winapi,windows-7,python-3.x,block,pywin32 | write a while loop
Into the while loop write the command to taskkill dwm.exe
It's a poor solution, but the only one I know.
Regards! | 0 | 1 | 0 | 0 | 2012-04-04T22:52:00.000 | 1 | -0.197375 | false | 10,020,389 | 0 | 0 | 0 | 1 | This might be a more difficult question since I don't even know how to do it outside of Python...
I want to write a terminal program that completely locks up my PC until a password is entered. In the locked state no one should be able to do anything outside the terminal. In it, the user may rampage and write silly comm... |
Determine a JDK install directory through Python | 10,029,856 | 3 | 0 | 970 | 0 | python,path,directory,java | You can check for JAVA_HOME or JDK_HOME system variables. But there is no guarantee that there are no other JDKs installed. You have to be more specific what you are willing to achieve. | 0 | 1 | 0 | 0 | 2012-04-05T13:47:00.000 | 1 | 1.2 | true | 10,029,823 | 1 | 0 | 0 | 1 | I'm currently writing a program in Python, and I would like to determine the path to the JDK install directory if it's on the system. Is there a way of doing this in Python? If not, is there a way of doing it in Java (or another language)? If it is the latter, I could open a subprocess from within Python to obtain i... |
Android Back End Technology - Language (Java, Python) & IDE (CoderBuddy, exo Cloud, Cloud 9) | 10,033,297 | 1 | 5 | 2,053 | 0 | java,android,python,ide,cloud | My guess is that using Java you will have lots of frameworks to find solutions and I really don't think Python will offer you that.
About IDE, I don't think you should worry about it with Python, you can use SublimeText 2 or Eclipse(have to install python editor). Both work great and Python is easy to deploy.
With Java... | 0 | 1 | 0 | 0 | 2012-04-05T16:09:00.000 | 1 | 1.2 | true | 10,032,093 | 0 | 0 | 1 | 1 | I've done my research and narrowed this down. OK, so I am deciding on the language and and tool to use for backend (server side) of developing cloud based android applications.. I've decided on Google App Engine as my framework. As I am going to be developing on my android tablet I want a cloud based IDE. (I am go... |
Authenticate with sudo on a crontab job | 10,198,435 | 1 | 2 | 489 | 0 | python,crontab | Everything solved with the sudo crontab -u username -e
credits to 9000 | 0 | 1 | 0 | 1 | 2012-04-05T17:19:00.000 | 1 | 1.2 | true | 10,033,057 | 0 | 0 | 0 | 1 | I have a call to a python script that is sudo -u user_name python python_scipt.py and I need to schedule it to run every 30 minutes with crontab. The problem is how can I authenticate it with sudo on crontab? |
how to track revoked tasks in across multiple celeryd processes | 10,063,062 | 0 | 2 | 803 | 0 | python,celery,celeryd | I implemented something similar to this some time ago, and the solution I came up with was very similar to yours.
The way I solved this problem was to have the worker fetch the Task object from the database when the job ran (by passing it the primary key, as the documentation recommends). In your case, before the remin... | 0 | 1 | 0 | 0 | 2012-04-08T13:01:00.000 | 3 | 0 | false | 10,062,999 | 0 | 0 | 0 | 1 | I have a reminder type app that schedules tasks in celery using the "eta" argument. If the parameters in the reminder object changes (e.g. time of reminder), then I revoke the task previously sent and queue a new task.
I was wondering if there's any good way of keeping track of revoked tasks across celeryd restarts. I'... |
how to compile a python .app from ubuntu or windows | 10,861,704 | 0 | 2 | 1,261 | 0 | python,ubuntu,osx-snow-leopard,cx-freeze | As far as I remember, last I used Mac OSX, it already had Python installed. This was with Mac OSX Snow Leopard. | 0 | 1 | 0 | 0 | 2012-04-08T16:52:00.000 | 2 | 0 | false | 10,064,560 | 0 | 0 | 0 | 1 | I am still very new to Python and any freezing programs.
Recently I made a very short text adventure game I'd like to send to a few friends, most of whom have Snow Leopard. I don't want them to have to bother downloading python just to play the game though.
Is there a way to convert my game from Ubuntu so that it is p... |
How to get program to not throw "Error: Can't load Floyd's algorithm library" | 10,067,738 | 0 | 0 | 144 | 0 | python,windows,linux,isometric | This source code is over 5 years old and the build script for floyd looks to assume hard-coded python2.4.
It seems pretty clear that your floyd module did not build. You will most likely have to go back to the build step and ensure that you are properly generating a _floyd.so.
If you built it correctly, then this sho... | 0 | 1 | 0 | 0 | 2012-04-08T21:11:00.000 | 3 | 0 | false | 10,066,554 | 0 | 0 | 0 | 1 | another question for all of you-
So i am trying to get a program called Pysomap to work (its basically ISOMAP but for python[http://web.vscht.cz/spiwokv/pysomap/]), i follow the directions best as i can, building it on Ubuntu, Windows, and Fedora (prebuilt libraries), but cant seem to get it to work. On windows (which ... |
Python 2.5.6 build error on Mac Lion | 10,090,778 | 2 | 1 | 483 | 0 | python,build,osx-lion,web2py | web2py works fine with Lion's stock Python 2.7. Unless you have a compelling reason to use 2.5, stick with 2.7. | 0 | 1 | 0 | 0 | 2012-04-10T06:56:00.000 | 3 | 1.2 | true | 10,084,379 | 0 | 0 | 0 | 2 | Here is what I would like to do.
Use web2py with MySQL.
To do that, I need to use source web2py rather than web2py.app
To use web2py, I need Python 2.5
I am having trouble building and installing Python 2.5
I downloaded Python-2.5.6.tgz from Python release page.
Now, I did
./configure
and then
make
Then, I get th... |
Python 2.5.6 build error on Mac Lion | 10,114,744 | 0 | 1 | 483 | 0 | python,build,osx-lion,web2py | I have web2py on my iMac OSX Lion using the web2py app and MySQL. I haven't run into any reason why you can't use the app with MySQL. | 0 | 1 | 0 | 0 | 2012-04-10T06:56:00.000 | 3 | 0 | false | 10,084,379 | 0 | 0 | 0 | 2 | Here is what I would like to do.
Use web2py with MySQL.
To do that, I need to use source web2py rather than web2py.app
To use web2py, I need Python 2.5
I am having trouble building and installing Python 2.5
I downloaded Python-2.5.6.tgz from Python release page.
Now, I did
./configure
and then
make
Then, I get th... |
Securing data in the google app engine datastore | 10,097,467 | 3 | 17 | 3,792 | 0 | python,security,google-app-engine,rsa,sha | You can increase your hashing algorithm security by using HMAC, a secret key, and a unique salt per entry (I know people will disagree with me on this but it's my belief from my research that it helps avoid certain attacks). You can also use bcrypt or scrypt to hash which will make reversing the hash an extremely time ... | 0 | 1 | 0 | 0 | 2012-04-10T20:50:00.000 | 3 | 0.197375 | false | 10,096,268 | 0 | 0 | 1 | 2 | Our google app engine app stores a fair amount of personally identifying information (email, ssn, etc) to identify users. I'm looking for advice as to how to secure that data.
My current strategy
Store the sensitive data in two forms:
Hashed - using SHA-2 and a salt
Encrypted - using public/private key RSA
When we ne... |
Securing data in the google app engine datastore | 10,098,781 | 11 | 17 | 3,792 | 0 | python,security,google-app-engine,rsa,sha | When deciding on a security architecture, the first thing in your mind should always be threat models. Who are your potential attackers, what are their capabilities, and how can you defend against them? Without a clear idea of your threat model, you've got no way to assess whether or not your proposed security measures... | 0 | 1 | 0 | 0 | 2012-04-10T20:50:00.000 | 3 | 1.2 | true | 10,096,268 | 0 | 0 | 1 | 2 | Our google app engine app stores a fair amount of personally identifying information (email, ssn, etc) to identify users. I'm looking for advice as to how to secure that data.
My current strategy
Store the sensitive data in two forms:
Hashed - using SHA-2 and a salt
Encrypted - using public/private key RSA
When we ne... |
Google App Engine & Google Storage | 10,115,635 | 2 | 2 | 644 | 0 | python,google-app-engine,google-cloud-storage | Since you created the API console project with an Apps account (one @yourdomain.com), the project is automatically treated as an Apps project, and only users from your domain can be added to it.
To avoid this, create a new project using a @gmail.com account, and then add all the developers you want to have access to it... | 0 | 1 | 0 | 0 | 2012-04-11T13:41:00.000 | 2 | 1.2 | true | 10,107,136 | 0 | 0 | 1 | 1 | I try to enable Cloud Storage for my GAE app. I read in the docs that:
Add the service account as a project editor to the Google APIs Console
project that the bucket belongs to. For information about permissions
in Cloud Storage, see Scopes and Permissions on the Cloud Storage
documentation.
However when I try ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.