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
In Python, how do I execute a .exe file, and stop it after n seconds?
18,743,249
0
0
1,986
0
python
subprocess.check_call is used to check the returned value - use subprocess.Popen this returns a process ID, (pid), which can be used after your time limit with pid.terminate() to end the process, (kill it).
0
1
0
0
2013-09-11T13:39:00.000
1
0
false
18,742,845
1
0
0
1
I am using "subprocess" to execute a .exe file from a Python script. I need to do this in a loop, ie start the .exe, run it for a minute, kill it, do it all over again. I am using subprocess.check_call to execute it with arguments, but I don't know how to stop it.
noob, but I installed python 2.7.5 on my mac, how to I "target" that one rather than the built in 2.7.2?
18,748,089
1
1
257
0
python,macos,pip
Honestly, one way around this is to make sure that virtualenv works with the right version, and just use pip inside the virtualenv.
0
1
0
0
2013-09-11T17:54:00.000
2
1.2
true
18,748,060
1
0
0
1
I went thought and installed pip and then added a bunch of libraries that I like to use and then, only after installing everything, did I realize that everything went into the 2.7.2 sit-packages directory, so the Python2.7.5 version doesn't see anything. Now, If I type python --version in the terminal, the correct ver...
Python remote programming / debugging
18,763,976
0
0
237
0
linux,windows,python-2.7,ide,remote-debugging
Beaglebone can do whatever we want to do in a a linux PC. But it is slower than PC so compile in pc and run in beaglebone via SSH is better way.
0
1
0
1
2013-09-11T21:09:00.000
1
1.2
true
18,751,328
0
0
0
1
I want to program beaglebone black(linux) from PC(linux/windows) using any Python IDE (scientific IDE's like anaconda/python(xy) is preferred). How can I do that? How I can configure the systems? Sincerly.
Upgrading to Python 2.7 Google App Engine 500 server error
18,774,464
2
0
198
0
python,google-app-engine,python-2.7,server-error
I'm not sure if this is your formatting when you loaded your code here, but where you define app in main.py should not be part of the contacts class. If it is, your reference to main.app in your app.yaml won't work and your page won't load.
0
1
0
0
2013-09-12T02:08:00.000
3
0.132549
false
18,754,202
0
0
1
3
I just started using Google App Engine and I am very new to Python. I may have made a stupid mistake or a fatal error, I don't know, but I realized that the basic "template" I downloaded from a website was old and used Python 2.5. So, I decided to update to Python 2.7 (after recieving a warning in the site's dashboard)...
Upgrading to Python 2.7 Google App Engine 500 server error
18,778,368
0
0
198
0
python,google-app-engine,python-2.7,server-error
Thank you everyone for your respective answers and comments, but I recently stumbled upon GAE boilerplate and decided to use that and everything's fine. I kept having very odd problems with GAE beforehand, but the boilerplate is simple and seems to be working fine so far. Anyways, thanks again. (Note: I would delete th...
0
1
0
0
2013-09-12T02:08:00.000
3
1.2
true
18,754,202
0
0
1
3
I just started using Google App Engine and I am very new to Python. I may have made a stupid mistake or a fatal error, I don't know, but I realized that the basic "template" I downloaded from a website was old and used Python 2.5. So, I decided to update to Python 2.7 (after recieving a warning in the site's dashboard)...
Upgrading to Python 2.7 Google App Engine 500 server error
18,754,606
2
0
198
0
python,google-app-engine,python-2.7,server-error
I'm submitting as an answer because I'm relatively new to SO and don't have enough rep to comment, so sorry about that... But line 7 of your new main.py uses webapp instead of webapp2, so that may be causing some troubles, but likely isn't the reason that it's not working. Could you also provide the contact.html templa...
0
1
0
0
2013-09-12T02:08:00.000
3
0.132549
false
18,754,202
0
0
1
3
I just started using Google App Engine and I am very new to Python. I may have made a stupid mistake or a fatal error, I don't know, but I realized that the basic "template" I downloaded from a website was old and used Python 2.5. So, I decided to update to Python 2.7 (after recieving a warning in the site's dashboard)...
Python's ConfigParser: Cross platform line endings?
18,756,706
2
1
1,432
0
python,newline,configparser
You're fine, ConfigParser will still work. The reason is that is uses fp.readline, which reads up to and including the next LF (\n). The value is then stripped of whitespace, which removes the CR (\r). I'd say just use LF (\n) as your line separator - it will work on both systems, but using both won't cause any harm ei...
0
1
0
0
2013-09-12T05:13:00.000
1
1.2
true
18,755,831
1
0
0
1
Does anyone know how Python deals with ConfigParser line endings in the different OSes? Because it follows the Windows INI format. But what about Linux? (As you know, Windows text line endings are typically CRLF, and Unix's are CR.) I want users of my app to take their config files (.INI files) easily from Windows to L...
After converting python script to executable with pyinstaller I get: error while loading shared libraries... Permission denied
18,767,999
0
0
550
0
python,pyinstaller
Looks like os.system('sudo useradd user') solved the issue.
0
1
0
0
2013-09-12T10:39:00.000
1
1.2
true
18,761,985
1
0
0
1
I have a python script which adds a user using the command os.system('useradd user'). This code works fine when run like a python script like this sudo python script.py. However, once I convert it to executable with pyinstaller with the command python pyinstaller.py --onefile script.py, and run the executable like this...
python pip specify a library directory and an include directory
18,847,849
-3
88
69,488
0
python,shared-libraries,pip,include-path,pyodbc
Just in case it's of help to somebody, I still could not find a way to do it through pip, so ended up simply downloading the package and doing through its 'setup.py'. Also switched to what seems an easier to install API called 'pymssql'.
0
1
0
0
2013-09-13T09:56:00.000
7
-0.085505
false
18,783,390
1
0
0
1
I am using pip and trying to install a python module called pyodbc which has some dependencies on non-python libraries like unixodbc-dev, unixodbc-bin, unixodbc. I cannot install these dependencies system wide at the moment, as I am only playing, so I have installed them in a non-standard location. How do I tell pip wh...
PIP uninstall not looking into /usr/local
21,244,963
1
2
1,195
0
python,ubuntu,pip
I do not really have a solution for the pip path lookup, but deleting /usr/local/lib/python2.7/dist-packages/_PACKAGE_NAME did the trick for me. At the very least it allowed me to install anew.
0
1
0
0
2013-09-13T16:01:00.000
1
1.2
true
18,790,639
1
0
0
1
I installed several packages (among them patsy and statsmodels) with pip 1.3.1 in kubuntu 13.04. They were put into /usr/local/lib, instead of /usr/lib. When using pip freeze or pip list, these packages appear fine, and are usable in python. However, when I use pip uninstall I get "Can't uninstall 'statsmodels'. No fil...
Debugging Cloud Endpoints: Error making request, but no request appears in logs
18,817,455
0
0
177
0
python,google-app-engine,google-cloud-endpoints
Check if you are running out of resources.
0
1
0
0
2013-09-14T14:48:00.000
2
0
false
18,802,940
0
0
1
1
I have an issue with debugging and Cloud Endpoints. I'm using tons of endpoints in my application, and one endpoint consistently returns with error code 500, message "Internal Error". This endpoint does not appear in my app's logs, and when I run its code directly in the interactive console (in production), everything ...
Raspberry Pi crontab starts py script at bootup -> logging: error mysql 2002 (can't connect to local server)
18,811,200
1
0
1,257
0
python,mysql,crontab,raspberry-pi
solved the problem in quite ugly way, but it's working now. Just added: time.sleep(5) before trying to connect to mysql db. I would be pleased if someone has a better solution.
0
1
0
1
2013-09-14T19:18:00.000
1
1.2
true
18,805,490
0
0
0
1
A Raspberry Pi (raspian wheezy) has a cronjob, created as user pi with "sudo crontab -e" so it should has root grants. ps aux | grep /home/.../myscript.py ...say it's owner is user "pi"!? (is this correct?) The python script called from crontab is working fine if i call it from the terminal. It's reading data from U...
Where does Web2py save project files OS X?
18,813,520
2
4
912
0
python,macos,web2py
If you are using the Mac binary, I think the applications are in /web2py/web2py.app/Contents/Resources/applications/. Note, you can also run the source version of web2py, in which case, the applications will be in /web2py/applications/.
0
1
0
0
2013-09-15T14:07:00.000
1
1.2
true
18,813,288
0
0
1
1
I am pulling my hair out trying to figure out where web2py stores the project files by default in OS X. It is not located in the same directoy as the web2py.app . I can launch the web interface and see project in the admin view but want to edit the files from sublime text as opposed to the admin web interface. I've loo...
Porting compiled code (distutils) from Windows 7 to Windows Server
18,814,595
1
0
45
0
python,c,windows,compiler-construction,windows-server-2008-r2
Yes, but there are other issues you need to watch-out for. Are both systems either 32-bit or 64-bit? Not just the hardware, but the Python version as well. Are both systems running the same version of Python? That's tied to both major and minor version numbers (see sys.version_info). Edit: Your edit has answered th...
0
1
0
0
2013-09-15T16:12:00.000
1
1.2
true
18,814,543
1
0
0
1
I installed a Python package (such as SQLAlchemy), and it compiled C into binaries on a Windows 7 machine. Can I expect to be able to reuse the compiled binaries on Windows Server 2008-R2? Edit: Both are AMD64 Python 2.7.3 and Windows 64 bit.
python 7z extraction with subprocess
18,833,072
1
1
2,735
0
python,subprocess,7zip
Set shell=False . Set the output directory to be '-o%s' % directory. You are prepending a space before the directory on the 7z command line.
0
1
0
0
2013-09-16T16:26:00.000
1
1.2
true
18,832,897
1
0
0
1
I try extract my archive using the subprocess: subprocess.call(['7z', 'x', '-r', '-y', '-o %s' % os.path.normpath("C:/temp"), archivePath], shell = True) but I get an error: 7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18 Processing archive: \172.16.0.30\TestFarm\testdata\testdata.7z Error: Can no...
Arbitrary Code Execution with Docker
18,839,033
4
3
745
0
python,docker
Docker is indeed very suitable for this kind of usage. However, please note that docker is NOT yet ready for production usage. I would recommend to create a new container and give non-root privileges to your users to this container. One container per user. This way, you can prepare your docker image and prepare the env...
0
1
0
0
2013-09-16T23:20:00.000
1
1.2
true
18,838,922
0
0
0
1
I'm thinking about building a web app that would involve users writing small segments of python and the server testing that code. However, this presents a ton of security concerns. Would docker be a good isolation tool for running this potentially malicious code? From what I've read, checking system calls with ptrace i...
Cannot Install Python Modules after Installing Anaconda
20,306,856
0
3
10,802
0
python,windows,python-2.7,pyodbc,anaconda
I suggest trying "conda install" + PackageName. If it fails installing using conda, it may automatically jump to using pip with success.
0
1
0
0
2013-09-17T02:21:00.000
6
0
false
18,840,292
1
0
0
1
[New Note: I cannot install through binstar or anaconda. Why can't I install in python, outside of anaconda? Is there a way to get my computer to stop using the anaconda install of python when I don't luanch it specifically through the continuum launcher?] I have an install of Python 2.7 on a windows machine. I just ...
Automating scp upload without password
18,880,805
0
0
641
0
python,ssh-keys,pexpect,apscheduler,beagleboneblack
As a temporary workaround, I found I could schedule pulling from the server using APScheduler and pexpect.run along with scp. This is less than ideal, as I prefer to have the always running processes on the beaglebones, rather than the server, but it will suffice until I can schedule enough time to switch to Ubuntu. St...
0
1
0
1
2013-09-17T18:26:00.000
1
0
false
18,857,206
0
0
0
1
I am working on having APScheduler upload a data file periodically using pexepect.run('scp ...'). The scp command works fine from the command line without password authentication (keys have been shared). However, when running in a python script on Beaglebone Black (started from a remote machine using pexpect), scp fail...
You Tube API Calls
18,857,640
0
0
63
0
python,youtube-api
Most google api code snippet require the user to input their personal API KEY. Please be sure you have appropriately updated the code snippet to use your api key.
0
1
0
1
2013-09-17T18:48:00.000
1
0
false
18,857,599
0
0
0
1
I have cut and pasted a python code sample from Google API to access You Tube video viewing data of my companies videos. The application will be scheduled and get usage data then write to a database on the server ( CENTOS ). I have tried both Simple API and installed application types. Is there a solid samle type th...
Fine-grained authorisation with ZODB
18,883,943
1
0
86
0
python,zodb
No, ZEO was never designed for such use. It is designed for scaling ZODB access across multiple processes instead, with authentication and authorisation left to the application on top of the data. I would not use ZEO for anything beyond a local network anyway. Use a different protocol to handle communication between g...
0
1
0
0
2013-09-18T12:22:00.000
1
1.2
true
18,872,148
0
0
0
1
I have been looking into using ZODB as a persistence layer for a multiplayer video game. I quite like how seamlessly it integrates with arbitrary object-oriented data structures. However, I am stumbling over one issue, where I can't figure out, whether ZODB can resolve this for me. Apparently, one can use the ClientSto...
Existing HTML website, but processing on Google App Engine?
18,884,880
2
0
67
0
python,html,google-app-engine
you can make a post request to whatever http resource you want in your html form you can change the action to point at your gae python script <form action="http://yourdomain/your/gae/endpoint" method="post"> You can then follow the tutorial and access the posted data accordingly. Finally, it is up to you to return an ...
0
1
0
0
2013-09-19T01:18:00.000
1
1.2
true
18,884,852
0
0
1
1
I have a website hosted already and it contains an HTML form. I want to be able to submit the form to a Python script on Google App engine to handle the data. In the documentation, there is a tutorial to process forms with Python, but it was from a page that was served in the script itself. How do I link an existing do...
How to uninstall OpenERP-7 module in ubuntu 12.04 ?
18,888,839
0
0
1,437
0
python-2.7,ubuntu-12.04,openerp
uninstallation of module will surely bring up some surprises with openerp, so better to test the module for functionality and features in a test system and when you are sure about things install it in LIVE system. For your problem, just check if there is any aeroo report is in the system, if yes delete the report and ...
0
1
0
0
2013-09-19T07:10:00.000
1
0
false
18,888,331
0
0
1
1
I am using OpenERP 7 with Ubuntu 12.04. I have been trying to install Aero Reports module for creating OpenERP reports. I faced some "XML issues " during installation. Now when I try to remove the module it says "Integrity Error The operation cannot be completed, probably due to the following: - deletion: you may be tr...
Writing an "interactive" client with Twisted/Autobahn Websockets
18,913,092
3
8
2,363
0
python,websocket,twisted,autobahn
Why do you need a thread to launch protocolInstance.sendMessage() ? This can be done in a normal reactor loop. The core of a twisted is reactor and it gives a much easier look at things when you consider twisted itself reactive - meaning it does something as a reaction (response) to something else. Now I assume that th...
0
1
0
0
2013-09-19T15:55:00.000
2
0.291313
false
18,899,515
0
0
1
1
Maybe I'm missing something here in the asynchronous designs of Twisted, but I can't seem to find a way to call the sendMessage() method "externaly". By this I mean, sending messages without being solely at the callback methods of Twisted/AutobahnWebsockets (like at onOpen or when receiving data from server at onMessag...
ipython: Can I provide input to a shell command
28,972,659
1
5
4,131
0
shell,ipython,ipython-notebook
Was just looking for this and my wee face dropped when I saw it was a bit of an issue. Thought I would just post my solution in case it is usefull to anyone else. Basically I was looking for a way to send sudo commands through the notebook, probably not very wise but I needed it for what I was doing. And i couldn't get...
0
1
0
0
2013-09-20T00:28:00.000
4
0.049958
false
18,907,103
1
0
0
1
Can I execute a shell command that requires input in ipython and/or an ipython notebook? When I execute such a command, I see it's prompt, but no apparent way to provide it with input from my keyboard. An example could be an rsync command to a remote server (thus requiring a password). There are no doubt dangers secur...
Writing to log files in a non-blocking manner in Tornado/Python
18,950,083
1
1
501
0
python,tornado
Tornado uses the standard library's logging module, which is blocking in most configurations. Python 3.2 includes a QueueHandler class which can be used to move the actual I/O to a separate thread; prior to that there was no standard solution to non-blocking logging (but there's probably a package on PyPI with a 2.x-c...
0
1
0
0
2013-09-20T14:01:00.000
1
1.2
true
18,918,682
0
0
0
1
I am using Tornado for a websockets server and I am trying to figure out how to log to a file without blocking the main thread. Is tornado.log non-blocking? If not, is there a general pythonic way to log to a file without blocking the main thread? Thanks!
Suppressing windows command line PAUSE command
18,936,954
-1
3
2,666
0
batch-file,wix,continuous-integration,teamcity,python-2.5
First of all, there is no a well behaved way to supress the PAUSE command; however, it is possible to do that in a very simple way. The method consist in modify the cmd.exe file, that is, you may use a binary-hex editor to load cmd.exe file, look for the PAUSE command (that is encoded in two-bytes UNICODE characters), ...
0
1
0
0
2013-09-21T13:47:00.000
2
-0.099668
false
18,933,331
0
0
0
2
I have been tasked with consolidating out entire teams' build process. Including build servers, CI, etc. The way our project is structured is that each sub team is responsible for the development of their own code bases. Over time, each team has usually created their own python/sh/bat/Wix depending on the requirements ...
Suppressing windows command line PAUSE command
18,934,862
12
3
2,666
0
batch-file,wix,continuous-integration,teamcity,python-2.5
You can disable input by redirecting input to nul: <nul yourScrpt.bat. This will effectively disable any PAUSE commands, but it will also disable any SET /P or other command that prompts for input. If you disable input for a master bat script that calls other scripts, the child scripts will inherit the disabled input.
0
1
0
0
2013-09-21T13:47:00.000
2
1
false
18,933,331
0
0
0
2
I have been tasked with consolidating out entire teams' build process. Including build servers, CI, etc. The way our project is structured is that each sub team is responsible for the development of their own code bases. Over time, each team has usually created their own python/sh/bat/Wix depending on the requirements ...
Python App Engine's urllib2: works locally but not when deployed to GAE
18,948,829
0
1
225
0
python,google-app-engine,urllib2
We make no guarantees that urlfetch calls will all go out on the same IP address.
0
1
0
0
2013-09-22T19:59:00.000
1
1.2
true
18,948,174
0
0
1
1
I have an App that worked well on both GAE and test server till a few days ago. It connects to a remote site, logs in and browse pages and input information automatically. The remote site is using dynamic URLs to follow the session, each page gives the link for next call. The program is very basic : urllib2.urlopen the...
Use of shebang in shell scripts
18,964,952
2
3
704
0
python,linux,shell
There’a subtle distinction here. If the target is a binary or begins with a #! shebang line, then the shell calls execv successfully. If the target is a text file without a shebang, then the call to execv will fail, and the shell is free to try launching it under /bin/sh or something else.
0
1
0
0
2013-09-23T16:42:00.000
5
1.2
true
18,964,553
1
0
0
3
In Linux, we usually add a shebang in a script to invoke the respective interpreter. I tried the following example. I wrote a shell script without a shebang and with executable permission. I was able to execute it using ./. But if I write a similar python program, without shebang, I am not able to execute it. Why is th...
Use of shebang in shell scripts
18,964,586
4
3
704
0
python,linux,shell
shell scripts will only work if you are in the shell you targeted ... there is not python shell ... as such python will never work without explicity calling python (via shebang or command line)
0
1
0
0
2013-09-23T16:42:00.000
5
0.158649
false
18,964,553
1
0
0
3
In Linux, we usually add a shebang in a script to invoke the respective interpreter. I tried the following example. I wrote a shell script without a shebang and with executable permission. I was able to execute it using ./. But if I write a similar python program, without shebang, I am not able to execute it. Why is th...
Use of shebang in shell scripts
18,964,583
5
3
704
0
python,linux,shell
My assumption is that a script without a shebang is executed in the current environment, which at the command line is your default shell, e.g. /bin/bash.
0
1
0
0
2013-09-23T16:42:00.000
5
0.197375
false
18,964,553
1
0
0
3
In Linux, we usually add a shebang in a script to invoke the respective interpreter. I tried the following example. I wrote a shell script without a shebang and with executable permission. I was able to execute it using ./. But if I write a similar python program, without shebang, I am not able to execute it. Why is th...
GAE - updating structured properties ndb
18,994,112
-1
2
356
0
python,google-app-engine
Thank you for looking out but figured it out. Appending the object to a list did the trick but I am sure there is a better efficient way.
0
1
0
0
2013-09-23T23:08:00.000
1
-0.197375
false
18,970,356
0
0
1
1
Is there a way to update an object and its properties within an ndb StructuredProperty object instead of appending?
Getting PyDev suspend to work on threads other than MainThread
19,946,760
-2
5
2,402
0
python,multithreading,pydev
Given that Python doesn't really do threads properly (the GIL is bound to cock things up one way or another) I wouldn't be surprised if debugging them was a less than thrilling experience. If it comes to that it's not that good an experience either debugging C/C++ threads, even under the latest versions of GDB and CDT....
0
1
0
0
2013-09-23T23:16:00.000
3
-0.132549
false
18,970,452
1
0
0
1
I have a multithreaded Python application running on a Linux server. I can use PyDev's Debug Server to remotely debug into it, which seems like a very valuable debug resource. There is however a problem I'm seeing that's preventing it from being as helpful as I would like. While my application is running on the serve...
confusion with results of `python setup.py install --user`
18,973,151
1
1
2,255
0
python,installation,setup.py
Instead of using --user, why not use a virtualenv? they are much more flexible, and put its bin directory on the path when activated. Otherwise, manually putting ~/.local/bin on your PATH, as you did, is what you need to do.
0
1
0
0
2013-09-24T03:49:00.000
1
0.197375
false
18,972,662
1
0
0
1
Say I have a python application that I want to install and if I run python setup.py install --user, everything gets put into ~/.local as expected (on linux), and inside of that the stuff in ~/.local/lib/python2.7/site-packages/ gets seen by the PYTHONPATH as expected; however, my executables that are created by setup.p...
How to execute .exe file in a remote windows machine using python
18,977,803
0
0
1,224
0
python,windows,remote-access
use command line program psexec. if you need to control remote computer through python I recommend you install on the remote computer rpyc. on the website of rpyc there is documentation on how to use it.
0
1
0
0
2013-09-24T09:27:00.000
1
0
false
18,977,699
1
0
0
1
I have a Executable file in remote windows machines.How can I execute .exe file remotely using python? or How can I get access to remote windows command line?.Please help. I have credentials of remote windows machines? PS: All remote windows machines are in a same network
Do I need celery when I am using gevent?
18,992,940
6
5
2,856
0
python,django,celery,gevent
In short you do need a celery. Even if you use gevent and have concurrency, the problem becomes request timeout. Lets say your task takes 10 minutes to run however the typical request timeout is about up to a minute. So what will happen if you trigger the task directly within a view is that the server will start proces...
0
1
0
0
2013-09-24T21:26:00.000
1
1.2
true
18,992,369
0
0
1
1
I am working on a django web app that has functions (say for e.g. sync_files()) that take a long time to return. When I use gevent, my app does not block when sync_file() runs and other clients can connect and interact with the webapp just fine. My goal is to have the webapp responsive to other clients and not block. I...
Why python uppercases all environment variables in windows
51,057,133
1
6
2,886
0
python,windows
Windows case insensitivity is a pain. Why would they do that? You can understand why searches should be case insensitive, but in most cases defined content should keep the exact value. Why? Well from experience it causes so many problems. I've never come across an issue where I've thought, "oh why wasn't that uppercase...
0
1
0
0
2013-09-26T08:35:00.000
2
0.099668
false
19,023,238
1
0
0
1
Is there any reason why os.environ contains all environment variables uppercase on Windows?, I don't understand why (only on windows) it doesn't load them on using the same case as it is defined ? Is there an equivalent implementation of os.environment that loads the environment variable information without modifying ...
django celery: Import error - no module named task
25,423,925
0
4
2,154
0
django,python-2.7,celery
Try installing python-dev . This is a common error when python doesnt find the dependencies
0
1
0
0
2013-09-26T11:33:00.000
2
0
false
19,027,087
0
0
1
2
I am a beginner in django celery so unaware of the deep concepts of the celery. I have installed all the required packages like celery, rabbitMQ and permissions as well. after goin through the documentation of celery i have wrriten my code but when i am firing the command ./manage.py celery worker -c 2 I am getting--...
django celery: Import error - no module named task
19,028,425
0
4
2,154
0
django,python-2.7,celery
If you do ./manage.py startapp sitetasks and put your tasks.py inside the new app-directory (/sitetask/) and then add sitetaks to you install_apps in settings.py. Does that help?
0
1
0
0
2013-09-26T11:33:00.000
2
0
false
19,027,087
0
0
1
2
I am a beginner in django celery so unaware of the deep concepts of the celery. I have installed all the required packages like celery, rabbitMQ and permissions as well. after goin through the documentation of celery i have wrriten my code but when i am firing the command ./manage.py celery worker -c 2 I am getting--...
Find MAC address of system, using python (in chat system)
19,076,713
0
0
221
0
python,macos,chat
In general, it's not possible to get a MAC address of another host (computer) on the internet without running your own program on that host, and asking. It's possible to get the MAC addresses of the active hosts on the local network (up to the next router) from the ARP cache. It's possible to get your own MAC address(e...
0
1
0
1
2013-09-29T09:34:00.000
1
0
false
19,076,464
0
0
0
1
Is there any way to find MAC address of a device (in chat system) using Python? except uuid library
Celery default configuration file
19,090,686
0
0
407
0
python,celery
I prefer put configs to project root folder: One easy style to load config. One easy style to find and edit config. However you should load configs manually with one of next methods: config_from_object, config_from_envvar or config_from_cmdline.
0
1
0
0
2013-09-29T10:08:00.000
1
0
false
19,076,762
0
0
1
1
I am installing Celery through Puppet and I would like to also have a default configuration file to provide to Celery. The default name is celeryconfig.py, but I don't know where to copy it. I am NOT using Celery with Django. What is the location where I should copy celeryconfig.py in order for Celery to read it everyt...
How to load data in Python for which data is stored as a customized class
19,085,226
0
1
137
0
python
Check sys.path. Does it contain the location where utility.py is kept? Does it have current directory ( an empty string )? That could be the issue.
0
1
0
0
2013-09-30T00:27:00.000
1
0
false
19,084,860
1
0
0
1
I have a question with loading data in Python. Basically, I defined all Classes I need in a file called "utility.py". and I have one data file "result.data" which stores results in form of a specific class called "Solution" which is defined in "utility.py". What I want to do is to load "result.data" in another py. fil...
Pycharm Remote Python Interpreter over SSH Gateway, X11 forwarding
22,637,135
6
5
2,948
0
python,pycharm
I was able to the piggyback X11 forwarding through another ssh connection. Try setting the DISPLAY environment variable in your PyCharm run configuration like so: DISPLAY=localhost:102 Check the value of DISPLAY in the other connection to see exactly what the value should be.
0
1
0
0
2013-09-30T11:38:00.000
2
1
false
19,093,260
0
0
0
1
I want to configure PyCharm 3.0 to use a Remote Python Interpreter. The Problem is, I have to connect over a SSH Gateway: MyMachine -> Gateway -> Machine with Python When I connect via Cygwin I type the following: ssh -t user@gateway.com "ssh user@machineWithPython.com" Is there a way to achieve this in PyCharm? Anothe...
Why I do not see realtime output in the output file?
19,105,021
6
3
2,279
0
python,file,output
There are two points at which your file can buffer - Python's internal buffers and the buffers on the operating system. This is a performance boost that avoids system calls and disk writes while the buffer is filling up. Calling file.flush() will push the internal buffer to the operating system. You can additionally ca...
0
1
0
0
2013-09-30T22:12:00.000
1
1.2
true
19,104,798
1
0
0
1
I thought writing a file gives real-time output, since it is so when I use C/C++ to write files. But when I run python program it seems the output file is always 0 byte until the whole program finished running. Even for the nohup python xxx.py &, the print stuff in the file nohup.out isn't realtime, and can only be see...
get the list of programs currently running on Windows or Ubuntu
19,109,762
1
1
1,538
0
python,windows,qt,winapi,ubuntu
Afaik Qt itself will not allow you to do this, at least it did not in prior versions. To solve this for windows you will have to use win-api EnumProcesses while in linux you could use the /proc filesystem, which holds information about running processes
0
1
0
0
2013-10-01T06:36:00.000
3
0.066568
false
19,109,538
0
0
0
1
I want to get the list of programs that shows in the Applications tab of Windows Task Manager(include the application icon and its name) , I wonder which Windows APIs should I use ? If I want to do the same thing on Ubuntu ,then which Ubuntu APIs should I use ?
Wing101 - Configure python 3.3.2 from 2.7.2 on a mac
19,120,750
1
2
10,844
0
python,wing-ide
The location of the python.exe for Python 3.3 can vary depending on how you installed it. Probably the best bet is to search w/ Spotlight for python.exe, press "Show All" in the drop down menu, change to "File Name" instead of "Contents" search and then click on results to see the full path at the bottom of the search...
0
1
0
0
2013-10-01T15:30:00.000
1
1.2
true
19,120,229
0
0
0
1
I am relatively new to programming, and I am using Wing101 version: 5.0.0-b8 (rev 29847). The Python Shell within Wing101, is version 2.7.2, how do I configure it to open python 3.3.2. I have downloaded Python 3.3.2 and I need the custom Python Executable. I previously tried "/usr/bin/python" as my custom python execu...
Tests fail ran by gitlab-ci, but not ran in bash
27,779,548
0
2
1,059
0
python,unit-testing,continuous-integration,gitlab
-i usually replicate the problem by using a docker container only for the runner and running the tests inside it, dont know if you have it setup like this =(. -Normally the test doesnt actually fail if you log in the container you will see he actually does everything but doesnt report back to the Gilab CI, dont freak o...
0
1
0
1
2013-10-01T18:46:00.000
1
0
false
19,123,609
0
0
0
1
I'm using gitlab-ci to automatically build a C++ project and run unit-tests written in python (it runs the daemon, and then communicates via the network/socket based interface). The problem I'm finding is that when the tests are run by the GitLab-CI runner, they fail for various reasons (with one test, it stalls indefi...
Running a python script in background with raw_input command
19,143,751
1
1
1,513
0
python,background,raw-input
You probably want to run the script in the foreground, but then call os.fork() after the user has input the value.
0
1
0
0
2013-10-02T18:02:00.000
2
0.099668
false
19,143,658
0
0
0
1
I have a python script that has a raw input command, but I would like to run it in the background after the user inputs the raw_input part. The problem I have is if I try running the script in the background using &, the raw input pops up as a linux command and the python script doesn't recognize it. Any tips?
Is it possible to force ipengines to completely reset all local variables and imports?
19,647,089
0
2
182
0
ipython,ipython-parallel
My solution to this was to use the ipengine to start a new subprocess which completes the desired operations. This subprocess has its own memory. Not ideal, but provides the desired functionality.
0
1
0
0
2013-10-03T19:07:00.000
1
0
false
19,167,257
1
0
0
1
My workflow is: start ipcontroller/ipengines, then run 'python test_script.py' several times with different parameters. This script includes a map_async call. The ipengines don't recognize changes to the code between calls to the script, and static class variables are not reset to their defaults. It seems like a magic ...
Can Python program developed on 64-bit Windows run on all version of Windows?
19,173,661
4
0
111
0
python
Well-written pure Python programs (just .py files) are extraordinarily portable across all platforms. If you're using some way of packaging your program in a Windows executable (.exe file), then you have worlds of other possible problems. There are cases where a 64-bit program won't work on a 32-bit system, such as if...
0
1
0
0
2013-10-04T05:03:00.000
3
0.26052
false
19,173,616
1
0
0
2
I have developed a python application with 64-bit Windows 8 (the non metro version which looks like Windows 7 interface). I want to distribute it to all version of 64-bit Windows such as Windows XP, Windows 7 and etc. Is it possible for program developed with python to do that? Also, can the software run on 32-bit Wind...
Can Python program developed on 64-bit Windows run on all version of Windows?
19,173,646
0
0
111
0
python
If you have not used any 64 bit specific items the your code should run fine on all versions of windows from source code with a minimum installation of python and the dependencies.
0
1
0
0
2013-10-04T05:03:00.000
3
0
false
19,173,616
1
0
0
2
I have developed a python application with 64-bit Windows 8 (the non metro version which looks like Windows 7 interface). I want to distribute it to all version of 64-bit Windows such as Windows XP, Windows 7 and etc. Is it possible for program developed with python to do that? Also, can the software run on 32-bit Wind...
How to debug Python curses code using two terminal windows
19,185,691
0
2
459
0
python,debugging
IPython supports embedding a “kernel” which can then connect to an external front-end, such as a Qt one (qtconsole). For working with another tty, I’d suggest connecting the debugger with another tty either via a pair of pipes or a pty (pseudo terminal), although you’d probably have to write the “other half” to display...
0
1
0
0
2013-10-04T15:47:00.000
1
0
false
19,185,466
1
0
0
1
I am writing a Python code using curses library under Linux. Are there any debugger does not share the same terminal, so I can debug alone with the code running? EDIT: I tried WinPDB, but it works only with python 2.7, and I am using 3.3
How to check if a network port is open?
20,727,394
3
95
151,151
0
python,port,netstat
Netstat tool simply parses some /proc files like /proc/net/tcp and combines it with other files contents. Yep, it's highly platform specific, but for Linux-only solution you can stick with it. Linux kernel documentation describes these files in details so you can find there how to read them. Please also notice your que...
0
1
0
1
2013-10-05T09:24:00.000
13
0.046121
false
19,196,105
0
0
0
1
How can I know if a certain port is open/closed on linux ubuntu, not a remote system, using python? How can I list these open ports in python? Netstat: Is there a way to integrate netstat output with python?
How to use a library that imports memcache in App Engine
19,237,649
2
2
1,996
0
python,google-app-engine
To further clarify jayhendren's answer - if you are planning to use GAE's memcache service, you must use from google.appengine.api import memcache you cannot use an open source memcache library. The only scenario where you could use the standard python memcache lib is if you were running your own memcache service some...
0
1
0
0
2013-10-06T17:00:00.000
4
0.099668
false
19,211,444
0
0
1
1
I want to use a library (memorised) that uses memcache like this: import memcache Now on App Engine, memcache must be imported like this: from google.appengine.api import memcache So I get this error when running with dev_appserver.py: ImportError: No module named memcache Can I use this library without modifying it?
understanding python twisted asynchronicity in terms of operating system
19,211,645
5
6
394
0
python,asynchronous,twisted
It's hard to talk about this without defining a lot of terms more precisely and taking issue with your facts, but here's my attempt: Question 1: Try man select, which is approximately how Twisted is implemented - it's a way to ask the operating system to monitor several things at once and let the application know when ...
0
1
0
0
2013-10-06T17:14:00.000
3
1.2
true
19,211,578
1
0
0
1
I'm new to the twisted library and I'm trying to understand how it is done that operations in python/twisted are performed asynchronously. So far I thought that only GUI-alike (Qt or javascript) platforms use event-driven architecture extensively. facts: Twisted programs are run in one thread = no multithreading react...
How to load Cython compiled .so file on both Mac OS X and Linux?
19,223,474
5
2
1,310
0
python,linux,macos,cython
You can't. You'll have to compile a different library for each platform you need to support.
0
1
0
0
2013-10-07T11:16:00.000
1
0.761594
false
19,223,411
1
0
0
1
I compiled a module.pyx file to module.so under Mac OS X, and now I can use it with: from module import method1 However, the same .so file won't work on Linux, I have to compile a new module.so under Linux. So the problem is, how can I write a cross platform(Mac and Linux) module with Cython?
Why does powershell freeze for a bit when running my python scripts
19,229,832
6
6
1,655
0
python,powershell,windows-7
If it's intermittent with all other factors being unchanged, it sounds like you've inadvertently selected some text in the PowerShell console and it's halted updating output so that you can do something with it. Next time, be careful to look to see if you have something selected before clicking.
0
1
0
0
2013-10-07T15:04:00.000
2
1.2
true
19,228,271
1
0
0
1
Sometime I look back at my terminal when there is a python script running and the console output has frozen, then I right-click on the terminal and the console output (printing to screen) beings again. Its a bit disconcerting because sometimes I think my script has broken. Do others also experience this? Anybody kno...
How to tell uWSGI to prefer processes to threads for load balancing
19,326,373
11
14
9,291
0
python,multithreading,process,load-balancing,uwsgi
So, the solution is: Upgrade uWSGI to recent stable version (as roberto suggested). Use --thunder-lock option. Now I'm running with 50 threads per process and all requests are distributed between processes equally.
0
1
0
0
2013-10-07T19:37:00.000
2
1.2
true
19,233,132
0
0
1
2
I've installed Nginx + uWSGI + Django on a VDS with 3 CPU cores. uWSGI is configured for 6 processes and 5 threads per process. Now I want to tell uWSGI to use processes for load balancing until all processes are busy, and then to use threads if needed. It seems uWSGI prefer threads, and I have not found any config opt...
How to tell uWSGI to prefer processes to threads for load balancing
19,238,645
9
14
9,291
0
python,multithreading,process,load-balancing,uwsgi
Every process is effectively a thread, as threads are execution contexts of the same process. For such a reason there is nothing like "a process executes it instead of a thread". Even without threads your process has 1 execution context (a thread). What i would investigate is why you get (perceived) poor performances w...
0
1
0
0
2013-10-07T19:37:00.000
2
1
false
19,233,132
0
0
1
2
I've installed Nginx + uWSGI + Django on a VDS with 3 CPU cores. uWSGI is configured for 6 processes and 5 threads per process. Now I want to tell uWSGI to use processes for load balancing until all processes are busy, and then to use threads if needed. It seems uWSGI prefer threads, and I have not found any config opt...
GAE: is putting all handlers in main.py gonna make my app slow?
19,242,752
1
0
154
0
google-app-engine,python-2.7,webapp2
No, that doesn't affect the speed. Your code needs to be loaded anyway, so it makes no difference if it's all in one file or not. It will of course make the file more complex, but that's your problem, not GAE's.
0
1
0
0
2013-10-08T06:01:00.000
2
0.099668
false
19,240,218
0
0
1
2
I'm building a web application using GAE. I've been doing some research by my own on GAE python project structures, and found out that there isn't a set trend on how to place my handlers within the project. As of now, I'm putting all the handlers(controllers) in main.py, and make all urls (/.*) be directed to main.app...
GAE: is putting all handlers in main.py gonna make my app slow?
19,253,273
1
0
154
0
google-app-engine,python-2.7,webapp2
In general, this will not make your application slower, however it can potentially slow you down your instance start-up time, but it generally isn't a problem unless you have very large complicated apps. The instance start up time comes into play whenever GAE spins up a new instance for you. For example, if your app i...
0
1
0
0
2013-10-08T06:01:00.000
2
1.2
true
19,240,218
0
0
1
2
I'm building a web application using GAE. I've been doing some research by my own on GAE python project structures, and found out that there isn't a set trend on how to place my handlers within the project. As of now, I'm putting all the handlers(controllers) in main.py, and make all urls (/.*) be directed to main.app...
How to remove multiple versions of Python from the Windows registry
19,245,809
3
2
7,170
0
python,windows,registry,cx-freeze
I just resolved it but not sure if this is the right way to go about it. Here's what I did, In the cmd box, type regedit, and then click OK you will have the Registry editor. Right Clicked on the key name HKEY_LOCAL_MACHINE and searched for the wrong path name that kept showing up. In a few seconds it will take you t...
0
1
0
0
2013-10-08T10:33:00.000
1
1.2
true
19,245,329
1
0
0
1
I was trying to install cx_Freeze module and it gives me the could not locate network location error along with a non existent path name(supposedly pointing to python? but it wasnt). Then I tried installing another module py2exe, this time the installer was a bit more user friendly and informed that I got two mentions ...
Running web.py as a service on linux
19,256,882
1
0
855
0
python,centos,web.py
In general, there are two parts of this. The "remote and event-based" part: Service used remotely over network needs certain set of skills: to be able to accept (multiple) connections, read requests, process, reply, speak at least basic TCP/HTTP, handle dead connections, and if it's more than small private LAN, it ne...
0
1
0
0
2013-10-08T19:28:00.000
2
1.2
true
19,256,594
0
0
1
1
I've used web.py to create a web service that returns results in json. I run it on my local box as python scriptname.py 8888 However, I now want to run it on a linux box. How can I run it as a service on the linux box? update After the answers it seems like the question isn't right. I am aware of the deployment proc...
pytest is not parsing command line arguments on windows
19,256,758
0
0
552
0
python,command,pytest
I can't check this but what I'd do first would be check PATH for the pytest executable. I'd except a Windows batch script, and continue investigation in the code, maybe that's where the args are lost or passed (quoted?) incorrectly.
0
1
0
1
2013-10-08T19:30:00.000
1
0
false
19,256,629
0
0
0
1
I have 2.3.3 version of pytest running on windows. I have a test folder which contains bunch of test files like test1.py, test2.py, test3.py etc. If i open command prompt and navigate to this folder to run a particular test pytest test1.py Instead of just running test1.py, it is running all the tests in the folder. Li...
How to make shortcut work from PATH
19,271,370
0
1
2,981
0
python,windows,path
You could also work with Windows path: set path=C:\Python26;.;..;C:\windows;C:\windows\system32 prompt $ & start title Python26 Save this as Py26.bat and type Python in the screen that displays set path=C:\Python33;.;..;C:\windows;C:\windows\system32 prompt $ & start title Python33 Save this as Py33.bat and type Py...
0
1
0
0
2013-10-09T09:15:00.000
4
0
false
19,267,714
0
0
0
1
I have two versions of Python on Windows and want to use them through cmd. I tried to make shortcuts of their python.exe and renaming them to python26 and python33 (I also added their locations to PATH), but unfortunately this does not work. Calling python26 or python26.lnk outputs in not recognized as an internal comm...
Fast encrypt, slow decrypt method for NDB Datastore
19,318,479
1
0
560
0
python,google-app-engine,encryption
It sounds like conventional cryptographical methods should meet your needs, e.g. AES256. When it comes to crypto you should try to innovate as little as possible. Use well-established and well-trusted methods -- when "rolling your own" it's very easy to make mistakes, and you don't get the benefit of peer review from t...
0
1
0
0
2013-10-11T11:32:00.000
1
0.197375
false
19,317,126
0
0
1
1
I have unencrypted web request data (not under my jurisdiction) that I would like to quickly save into the Datastore so as not to slow down the request process. The sensitive data occasionally is required to be opened by system users via the web. When a user makes such a request, it will require them to complete a reCA...
Using Python and Vim within the Mac Terminal
19,331,487
2
1
3,871
0
python,macos,vim,terminal
You can't execute a file if that file doesn't exist. Write the file with :w filename.py (further writes only need :w) and execute your script with :!python %. Learning programming and Vim at the same time is not a very good idea: Vim is a complex beast and trying to handle both learning curves won't be easy. As much as...
0
1
0
0
2013-10-12T05:13:00.000
5
0.07983
false
19,330,790
0
0
0
2
I'm writing Python code using Vim inside Terminal (typing command "vim" to start up Vim). I've been trying to find a way to execute the code through the mac terminal in the same window. I'm trying to use :!python % but I get the following error message: E499: Empty file name for '%' or '#', only works with ":p:h" Anyo...
Using Python and Vim within the Mac Terminal
64,542,587
-1
1
3,871
0
python,macos,vim,terminal
in vim type :w yourfilenamehere.py and press enter
0
1
0
0
2013-10-12T05:13:00.000
5
-0.039979
false
19,330,790
0
0
0
2
I'm writing Python code using Vim inside Terminal (typing command "vim" to start up Vim). I've been trying to find a way to execute the code through the mac terminal in the same window. I'm trying to use :!python % but I get the following error message: E499: Empty file name for '%' or '#', only works with ":p:h" Anyo...
How to find orphan process's pid
19,361,844
2
1
947
0
python,linux,process
The information is lost when a process-in-the-middle terminates. So in your situation there is no way to find this out. You can, of course, invent your own infrastructure to store this information at forking time. The middle process (PID 3 in your example) can of course save the information which child PIDs it create...
0
1
0
1
2013-10-14T13:46:00.000
1
0.379949
false
19,361,740
0
0
0
1
How can I find child process pid after the parent process died. I have program that creates child process that continues running after it (the parent) terminates. i.e., I run a program from python script (PID = 2). The script calls program P (PID = 3, PPID = 2) P calls fork(), and now I have another instance of P named...
Python merging doc files into 1 doc file
19,363,269
0
1
999
0
python,merge,doc
You can open and read contents of each files and write them in a separate file. You can File I/O functions.
0
1
0
0
2013-10-14T15:00:00.000
2
0
false
19,363,207
1
0
0
1
In Python on Linux I would like to merge several .doc files into 1 .doc file? (The .doc file will be open in Windows machines). I have searched on internet but I don't find useful information. I know that this feature is working for PDF in GhostScript, but now it needs also working for doc files. Has somebody suggest...
Keymapping different between Python2.4 and Python2.7 on RedHat
32,932,552
-1
1
103
0
python,python-2.7,redhat,python-2.4
This page describes the main key differences between Python 2.4 and Python 2.7: Multithreading Python 2.4 : Not available. Python 2.7: You can use the Python 2.7 threading library. All threads in a request must finish before the request deadline (60 seconds for online requests and 10 minutes for offline). Concurrent...
0
1
0
0
2013-10-16T10:40:00.000
1
-0.197375
false
19,401,302
0
0
0
1
I am running SLC5 (RedHat 4 Linux). The distributed Python version is 2.4. I have installed Python 2.7 in addition manually (altinstall). Running in terminal mode (Runlevel 3), the key mapping in bash and the Python 2.4 interpreter are correct (backspace, key arrows, etc. are working fine). When running the Python 2.7 ...
Run terminal command as startup reacts different from manually (linux raspberry pi)
19,407,980
0
0
631
0
python,linux,terminal,raspberry-pi
What are you using to play the streams? Depending on how you boot up the second Raspberry it might not have started some daemons for audio/video playback?! You should (if you're not already doing) write a log (import logging ;)) and write a logfile which you can track for errors.
0
1
0
1
2013-10-16T14:42:00.000
2
0
false
19,406,444
0
0
0
2
Here's a short description of what I have: I have to raspberry pi's in a local net work. I one of them I have a .py script named watchdog.py that starts a stream and then uses a sshpass command to the other pi to display the video stream.It also has some signaling LEDs a some push buttons for control the problem is: ...
Run terminal command as startup reacts different from manually (linux raspberry pi)
42,814,929
0
0
631
0
python,linux,terminal,raspberry-pi
answer moved from OP's question itself: I found a way that seems to work so far. instead of running the python script as a service I tried running it as cron job at reboot, and it worked. now it all works straight from reboot and I have Audio and video.
0
1
0
1
2013-10-16T14:42:00.000
2
0
false
19,406,444
0
0
0
2
Here's a short description of what I have: I have to raspberry pi's in a local net work. I one of them I have a .py script named watchdog.py that starts a stream and then uses a sshpass command to the other pi to display the video stream.It also has some signaling LEDs a some push buttons for control the problem is: ...
How can I tell if Python setuptools is installed?
56,683,743
0
18
68,259
0
python,pip,setuptools
This will display the version of your setuptools if it is installed already $python -c "import sys; import setuptools; print(setuptools.version.__version__)"
0
1
0
0
2013-10-17T15:03:00.000
7
0
false
19,430,346
1
0
0
2
I'm writing a quick shell script to make it easier for some of our developers to run Fabric. (I'm also new to Python.) Part of installing Fabric is installing pip, and part of installing pip is installing setuptools. Is there any easy way to detect if setuptools is already installed? I'd like to make it possible to ...
How can I tell if Python setuptools is installed?
62,062,115
0
18
68,259
0
python,pip,setuptools
Depends with the python version installed. you can try "pip list" or "pip3 list" and check for the setuptools and version installed.
0
1
0
0
2013-10-17T15:03:00.000
7
0
false
19,430,346
1
0
0
2
I'm writing a quick shell script to make it easier for some of our developers to run Fabric. (I'm also new to Python.) Part of installing Fabric is installing pip, and part of installing pip is installing setuptools. Is there any easy way to detect if setuptools is already installed? I'd like to make it possible to ...
Modifying a crontab from a cron job
19,448,431
2
2
1,397
0
python,linux,ubuntu,cron
The GPL is not anti-commercial. python-crontab can be used in commercial products and services. You must only follow the copy-left rules witch state that the actual code itself can't be made proprietary. You can sell it as much as you like, and as the author I encourage you to make money from my work. Besides that erro...
0
1
0
1
2013-10-17T22:07:00.000
1
0.379949
false
19,438,160
0
0
0
1
I have a Python script that runs in several modes. One of those modes monitors certain files, and if those files have been modified, the script restores them. The way I do this is to run the script every minute via cron. Another cron job exists (actually the same script called with a different argument) to remove the s...
Why does my virtualenv inherit the system's old environment variables?
20,532,631
1
1
410
0
python,environment-variables,virtualenv
I discovered that the reason my virtual environment's environment variables were keeping their previous values was because I was still in the same terminal session. Restarting my terminal fixed the issue.
0
1
0
0
2013-10-17T22:43:00.000
1
1.2
true
19,438,580
1
0
0
1
When I created my virtual environment, it inherited all of the environment variables that were currently on my Windows machine. I have since changed many of those variables, and my virtual environment is now stuck with the old values. How can I change the environment variables within my virtual environment?
IntelliJ IDEA - unix python virtualenv on WIndows
19,448,864
0
1
426
0
python,windows-7,intellij-idea,virtualenv,python-2.6
Just install an appropriate python and virtualenv for that python directly on the windows 7 machine.
0
1
0
0
2013-10-18T11:26:00.000
2
0
false
19,448,553
1
0
0
2
I have Python application and virtualenv for it. I run it on Debian virtual machine. Is it possible to configure IntelliJ to start application and use IntelliJ debug tools? The problem is how to use virtualenv for debian in Windows 7 system.
IntelliJ IDEA - unix python virtualenv on WIndows
19,809,928
0
1
426
0
python,windows-7,intellij-idea,virtualenv,python-2.6
I solved it. If connect with my virtual machine by remote debug tool. I add one line with IntellJ/PyCharm generate to entry point of paster script. Before debug i run script (using IntelliJ remote tool) with run application on virtual machine.
0
1
0
0
2013-10-18T11:26:00.000
2
0
false
19,448,553
1
0
0
2
I have Python application and virtualenv for it. I run it on Debian virtual machine. Is it possible to configure IntelliJ to start application and use IntelliJ debug tools? The problem is how to use virtualenv for debian in Windows 7 system.
Hierarchy in Google App Engine NDB
19,454,685
5
3
1,057
0
python,google-app-engine
If you use the ancestor in the key you will create a big entity group (assuming a single root to the tree/hierarchy) which may in fact not be what you want from a write performance point of view. Also a deep hierarchy can mean very big keys. If you want to move nodes around using ancestor keys, you have to delete an...
0
1
0
0
2013-10-18T14:28:00.000
2
1.2
true
19,452,172
0
0
1
1
I'm trying to store a hierarchy in NDB and I'm confused about if I should use just the 'parent' parameter while constructing the keys to new entities or should I include an extra property in my models to hold the parent key?
Issue creating project with mezzanine - shared hosting
21,524,630
0
0
265
0
python,shared-hosting,mezzanine
Now supporting with Mezzanine 3.x
0
1
0
0
2013-10-19T10:44:00.000
2
0
false
19,465,158
0
0
1
1
I'm trying to use Mezzanine cms in a shared hosting at 1and1. I installed a recent python version 3.3.2. setup works well but when i try to create a project I got the following error message: ~/Mezzanine-1.4.16 > mezzanine-project blog Traceback (most recent call last): File "/kunden/homepages/x/dxxxxxxx/htdocs/custo...
How to make work in terminal.app on mac?
19,501,157
0
0
437
0
macos,terminal-emulator,python-mode,jedi-vim
Solved. I have "set paste" and it disabled all user-defined key mappings under insert mode. It didn't influence GUI macvim since pasted mode was unnecessary for GUI editors.
0
1
0
1
2013-10-20T02:48:00.000
1
0
false
19,473,378
0
0
0
1
I want to use python-mode and jedi for autocompletion in Vim for python. However under my environment (vim 7.3 in terminal.app on OSX 10.8), I just cannot have the key-combination work. I read many related articles and knows that it is because terminal.app interpret as and I tried to use inoremap to change it but it...
Does ndb.delete_multi with all keys from the same parent count as a single update to the entity group?
19,514,013
2
0
212
0
python,google-app-engine,app-engine-ndb
Inside the same transaction you can delete 200 entities/keys in one go. The 1/second limit (more likely 5/second) should be read as: How often can I start (and commit) an independent transaction on an entity group or x-group. T.i. because each transaction needs a lock on the root element you're commiting.
0
1
0
0
2013-10-20T11:48:00.000
1
1.2
true
19,476,982
0
0
0
1
I'm deciding whether or not to include a "fetch 200/delete 200" routine of a pipeline inside a transaction. If not included and the request/instance dies abruptly, the fetched entities would be lost. Since with xg=True, the entity group limit is 5, the 200 entities need to have the same parent to be included in the tra...
How to convert python code (.py) to an app on mac osx
19,920,734
3
1
4,091
0
python,macos,py2app,dmg
You can use py2app. It makes a standard app. All it needs is a python script and setup.py.
0
1
0
0
2013-10-21T06:06:00.000
2
1.2
true
19,487,291
1
0
0
1
I am making an app in python, which is able to open different file types. This code is running fine on eclipse while passing filename which I want to open and configuration file as arguments respectively selectedFileName=(sys.argv)[1] cfgFile=(sys.argv)[2]. Now I converted this into application by using py2app. So, the...
Get live stdout from gevent-subprocess?
19,500,240
3
5
3,089
0
python,subprocess,stdout,gevent
I solved this using a little hack. Just flush Pythons line-buffer w/ self.stream.flush() and a helper class whenever a line is written to stdout.
0
1
0
0
2013-10-21T14:43:00.000
3
1.2
true
19,497,587
0
0
0
1
I'm trying to get the stdout of a process via POPEN as soon as it's there. With gevent 1.0 readline() and read() still block process and wait for process to finish. Any clues? And yes, I searched high and low for a simple solution. It has to be possible without threading, right?
python write to a file that is open for reading by another program (TCL)
19,499,632
0
1
1,515
0
python,tcl,file-access
I tested writes and reads with Python and TCL and it looks like python will write when TCL has a file open for reading. TCL can write when python has a file open for reading.
0
1
0
0
2013-10-21T15:07:00.000
1
0
false
19,498,155
1
0
0
1
I have to concurrently run TCL and Python scripts which access the same files. I have decided to restrict each program so that they have exclusive write access to exactly one file. Each program has read access to all files (say two programs and two files). I don't care about dirty reads (ie reading a partially finis...
RedirectRoute in Google App Engine and url arguments
19,500,983
1
1
156
0
python,google-app-engine,webapp2
A RedirectRoute will issue a HTTP redirect telling the browser to go to the new URL, then the browser will make a new request at that URL. How this is implemented is that two routes are created - your original route, and one for redirecting. So, in your case, a route with /do/some/<action:.*>/ would be created that red...
0
1
0
0
2013-10-21T15:48:00.000
1
0.197375
false
19,499,079
0
0
1
1
I have a RESTful API like /do/some/<action:.*> so my app with get <action> and run it. My question is, if I use RedirectRoute and strict_slash=True, will my app keep getting <action> as argument or will it start getting <action>/ (notice the / at the end)? EDIT: I'm using webapp2
How can I get the current read position in a win32file file handle?
19,503,816
0
2
1,118
0
python,pywin32
Yes, SetFilePointer is less than obvious. The current file position is also found using SetFilePointer, specify a move method of FILE_CURRENT and a distance of zero.
0
1
0
0
2013-10-21T20:07:00.000
2
0
false
19,503,736
1
0
0
1
I am trying to use python to create a tail-like utility that can read from a file that is actively open and being written to in another process. It needs to work on windows so I am having to use the win32file module. I will need to open this file and seek to a previously saved location. I have found the SetFilePointer ...
How to avoid hitting App Engines free limits with tons of writes?
19,508,340
0
0
49
0
python,google-app-engine
Pack more data into an entity, and arrange to not index any fields you're never going to query on. That may interfere with querying your logs, but if writes predominate, pack more into each write, saving writes and index updates. You'll pay for it later when querying, but if queries are infrequent, it may be a net win.
0
1
0
0
2013-10-22T02:12:00.000
1
1.2
true
19,507,887
0
0
1
1
I'm trying to handle remote logging with app engine, but I find just by myself I'm exceeding the daily write limit. Are there any datastore tricks I can use to consume less of my write quota while posting data to the server constantly?
how to make python script executable when click on the file
22,898,338
1
2
12,507
0
python
It's Nautilus's fault. Open Nautilus (the file manager), go to Menu > Preferences. Select the "Behaviour" section. On the field titled "Executable text files", select the option "Execute executable text files when opened".
0
1
0
1
2013-10-22T05:47:00.000
7
0.028564
false
19,509,911
0
0
0
6
I am trying to make my python script executable without going through the terminal typing like python test.py I want to make it able to run when i click on the file. How i going to do this in my fedora machine.
how to make python script executable when click on the file
19,510,082
2
2
12,507
0
python
Add #!/usr/bin/env python at the very beginning of file. Make chmod u+x filename.py Change your extension from .py to .sh, so your linux distro's UI will recognize it as shell script and try to execute.
0
1
0
1
2013-10-22T05:47:00.000
7
0.057081
false
19,509,911
0
0
0
6
I am trying to make my python script executable without going through the terminal typing like python test.py I want to make it able to run when i click on the file. How i going to do this in my fedora machine.
how to make python script executable when click on the file
19,510,040
0
2
12,507
0
python
If you don't have any specific version requirement then using first line as #!/usr/bin/env python will be more efficient and give the execute permission chmod u+x test.py
0
1
0
1
2013-10-22T05:47:00.000
7
0
false
19,509,911
0
0
0
6
I am trying to make my python script executable without going through the terminal typing like python test.py I want to make it able to run when i click on the file. How i going to do this in my fedora machine.
how to make python script executable when click on the file
19,509,956
5
2
12,507
0
python
Add #!/bin/python as the very first line of your file. Or, if you don't know where your python executable is, type which python in a terminal; then copy the result of that and put it after the #!. Change the permissions of the file so that its executable chmod u+x test.py i try but it still open back as gedit Righ...
0
1
0
1
2013-10-22T05:47:00.000
7
0.141893
false
19,509,911
0
0
0
6
I am trying to make my python script executable without going through the terminal typing like python test.py I want to make it able to run when i click on the file. How i going to do this in my fedora machine.
how to make python script executable when click on the file
55,925,012
0
2
12,507
0
python
I use raspibian os (Linux) Add #!/usr/bin/python as the first line of the file.py right click file >> open with >> chose customize >> custom command line >> type python3 execute file with double click is working
0
1
0
1
2013-10-22T05:47:00.000
7
0
false
19,509,911
0
0
0
6
I am trying to make my python script executable without going through the terminal typing like python test.py I want to make it able to run when i click on the file. How i going to do this in my fedora machine.
how to make python script executable when click on the file
19,509,975
0
2
12,507
0
python
Add #!/usr/bin/python as the first line of the file and set the permission to executable chmod 755 yourfile.
0
1
0
1
2013-10-22T05:47:00.000
7
0
false
19,509,911
0
0
0
6
I am trying to make my python script executable without going through the terminal typing like python test.py I want to make it able to run when i click on the file. How i going to do this in my fedora machine.
Is Grok inactive?
19,538,042
1
1
141
0
python,zope,grok
No, the project has not been deprecated. Like many open source software projects there is a natural cycle in interest and activity, with the only difference being the speed in which the cycle progresses. Deprecation is an explicit choice by the maintainers; no such choice has been made. It's just that most interest in ...
0
1
0
0
2013-10-22T22:32:00.000
1
0.197375
false
19,529,573
0
0
0
1
Since the last version is 1.9, released on 2011, but the documentation only covers from 1.0 to 1.5. Also Windows Installers aren't available. It seems that there's poor activity around the framework, also in the mailing list and IRC channel. Edited the title because of the confusions. Thanks to everyone for the replies...
How to run python script on terminal (ubuntu)?
28,650,632
-8
15
205,865
0
python,linux,ubuntu
First create the file you want, with any editor like vi r gedit. And save with. Py extension.In that the first line should be !/usr/bin/env python
0
1
0
1
2013-10-22T23:17:00.000
5
-1
false
19,530,015
0
0
0
3
I'm new with python, I've been learning for a few weeks. However now I've just changed my OS and I'm now using ubuntu and I can't run any script on my terminal. I made sure to have the #!/usr/bin/env python but when I go to the terminal and type, for example python test.py the terminal shows an error message like this...
How to run python script on terminal (ubuntu)?
42,282,440
0
15
205,865
0
python,linux,ubuntu
Save your python file in a spot where you will be able to find it again. Then navigate to that spot using the command line (cd /home/[profile]/spot/you/saved/file) or go to that location with the file browser. If you use the latter, right click and select "Open In Terminal." When the terminal opens, type "sudo chmod +x...
0
1
0
1
2013-10-22T23:17:00.000
5
0
false
19,530,015
0
0
0
3
I'm new with python, I've been learning for a few weeks. However now I've just changed my OS and I'm now using ubuntu and I can't run any script on my terminal. I made sure to have the #!/usr/bin/env python but when I go to the terminal and type, for example python test.py the terminal shows an error message like this...
How to run python script on terminal (ubuntu)?
61,037,599
0
15
205,865
0
python,linux,ubuntu
Sorry, Im a newbie myself and I had this issue: ./hello.py: line 1: syntax error near unexpected token "Hello World"' ./hello.py: line 1:print("Hello World")' I added the file header for the python 'deal' as #!/usr/bin/python Then simple executed the program with './hello.py'
0
1
0
1
2013-10-22T23:17:00.000
5
0
false
19,530,015
0
0
0
3
I'm new with python, I've been learning for a few weeks. However now I've just changed my OS and I'm now using ubuntu and I can't run any script on my terminal. I made sure to have the #!/usr/bin/env python but when I go to the terminal and type, for example python test.py the terminal shows an error message like this...
Distributed Networked Applications (Python, Celery, 0MQ, etc)
20,719,307
0
0
299
0
python,celery,zeromq,pyinstaller,pyro
if the individual tasks dont need to communicate to other tasks then use Celery, otherwise Pyro as it allows communication between tasks/objects running parallely on worker nodes.
0
1
0
0
2013-10-23T03:51:00.000
1
1.2
true
19,532,445
0
0
0
1
Hi Everyone, I have been developing with python for about a year. Now i have a need to develop distributed applications which communicate with each other. I do not have an idea which modulue will be the best to learn, so i need your help and advise on this. My app needs are, Client Server must be able to ...