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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Dataflow Python SDK Avro Source/Sync | 37,866,731 | 0 | 1 | 761 | 0 | python,avro,google-cloud-dataflow | You are correct: the Python SDK does not yet support this, but it will soon. | 0 | 1 | 0 | 0 | 2016-06-13T21:03:00.000 | 2 | 1.2 | true | 37,799,065 | 1 | 0 | 0 | 1 | I am looking to ingest and write Avro files in GCS with the Python SDK. Is this currently possible with Avro leveraging the Python SDK? If so how would I do this? I see TODO comments in the source regarding this so I am not too optimistic. |
How to plot data while it's being processed | 37,839,374 | 0 | 1 | 67 | 0 | python,plot,gnuplot | You can plot the data as it is being processed, but there's a couple of issues that come along with it in terms of efficiency.
Gnuplot needs to do work each time to process your data
Gnuplot needs to wait for your operating system to paint your screen whenever it updates
Your program needs to wait for Gnuplot to do an... | 0 | 1 | 0 | 0 | 2016-06-15T15:08:00.000 | 1 | 0 | false | 37,839,265 | 0 | 1 | 0 | 1 | I'm in the process of converting a large (several GBs) bin file to csv format using Python so the resulting data can be plotted. I'm doing this conversion because the bin file is not in a format that a plotting tool/module could understand, so there needs to be some decoding/translation. Right now it seems like Gnuplot... |
How to install a library using homebrew | 37,862,696 | 1 | 1 | 1,993 | 0 | python,homebrew | As others mentioned already: It's not the best idea - at least not in general - to install python packages via your systems package manager. It's better to use pip (ideally in conjunction with virtualenvs).
Apart from that, it should be possible to use the package you installed using homebrew from pycharm / python in g... | 0 | 1 | 0 | 0 | 2016-06-16T13:52:00.000 | 2 | 1.2 | true | 37,861,296 | 1 | 0 | 0 | 1 | I downloaded the QJson python library using brew install qjson.
What are the next steps I need to take in order to be able to work with it in PyCharm? |
What's the best way to rename files with the same modified date and time? | 37,871,733 | 0 | 0 | 49 | 0 | python,windows,file,rename | In pseudocode:
Find all files in locations Source and Target.
For each file in Source, calculate (checksum, size), and use this as a key in a dict, where the value is the filename.
For each file in Target, calculate (checksum, size), and look it up in the dict created previously. If it exists, rename it. | 0 | 1 | 0 | 0 | 2016-06-16T22:26:00.000 | 1 | 0 | false | 37,870,371 | 1 | 0 | 0 | 1 | Path a/b/c/d where folder d has a bunch of files and folders, something like this.
Folder E which has abc.txt, def.jpg, and ghi.pst
Folder D also has loose files like jkl.pst, mno.jpg, pqr.txt
Path w/x/y/z where folder z has a bunch of folders named like
a3cj85zblahblahblah
asdfljklqwpeoriu833
Each of these folders... |
Faster Google App Engine Managed VM deploys (Python compat env)? | 37,896,863 | 0 | 1 | 36 | 0 | google-app-engine,docker,google-app-engine-python | Well, in general, 10 minute deployment isn't that bad. I use AWS Elastic Beanstalk and it's about the same for a full deployment of a production environment. However, this is totally unacceptable for your everyday development.
Since you use docker, I really don't understand, why not to spin up the same container on y... | 0 | 1 | 0 | 0 | 2016-06-18T08:20:00.000 | 1 | 0 | false | 37,894,857 | 0 | 0 | 1 | 1 | We're using Google App Engine (GAE) with Managed VMs for a Python compat environment, and deployments take too much time. I haven't done strict calculations, but I'm sure each deployment takes over 10 mins.
What can we do to accelerate this? Is this more a GAE or a Docker issue? Haven't tried deploying Docker in other ... |
the difference between os.mkdir() and os.makedirs() | 63,333,069 | -2 | 6 | 21,297 | 0 | python-2.7,pycharm | Difference between os.mkdir(dirname) and os.mkdirs(dirname)
mkdir() will create only neaded directory. If some of parent directories was not existing, mkdir() will return false. mkdirs() will create the last directory with all missing parent directories.so mkdirs() is more handy. | 0 | 1 | 0 | 0 | 2016-06-21T15:14:00.000 | 2 | -0.197375 | false | 37,948,294 | 1 | 0 | 0 | 2 | I use python 2.7 to create a spider in Pycharm to get data from website.
In the first spider I create a spider in the project folder and use os.mkdir('home/img/') to create a folder to save data. There is no error.
In the second spider I create the spider with RedisQueue which is in the project folder and put the Spide... |
the difference between os.mkdir() and os.makedirs() | 37,948,589 | 14 | 6 | 21,297 | 0 | python-2.7,pycharm | os.makedirs() : Recursive directory creation function. Like os.mkdir(), but makes all intermediate-level directories needed to contain the leaf directory.
What this means is that you should not try to create nested directories with os.mkdir() but use os.makedirs() instead.
In your case, I am guessing that you want to... | 0 | 1 | 0 | 0 | 2016-06-21T15:14:00.000 | 2 | 1.2 | true | 37,948,294 | 1 | 0 | 0 | 2 | I use python 2.7 to create a spider in Pycharm to get data from website.
In the first spider I create a spider in the project folder and use os.mkdir('home/img/') to create a folder to save data. There is no error.
In the second spider I create the spider with RedisQueue which is in the project folder and put the Spide... |
Fatal error C1083: Cannot open include file: 'openssl/opensslv.h' | 38,144,434 | 7 | 20 | 26,978 | 0 | python,openssl,cryptography,scrapy | Copy "openssl" folder from C:\OpenSSL-Win32\include\ to C:\Pyhton27\include\
and copy all libs from C:\OpenSSL-win32\lib to C:\Python27\Libs\ | 0 | 1 | 0 | 0 | 2016-06-21T17:52:00.000 | 2 | 1 | false | 37,951,303 | 0 | 0 | 1 | 1 | I'm trying to install Scrapy, but got this error during installing: build\temp.win-amd64-2.7\Release_openssl.c(429) : fatal error C1083: Cannot open include file: 'openssl/opensslv.h': No such file or directory
I've checked that the file "opensslv.h" is in here "C:\OpenSSL-Win64\include\openssl". And I've also included... |
How do I have a bash script continually run during business hours? | 37,951,458 | 0 | 0 | 191 | 0 | python,bash,crontab,ubuntu-server | You could create a cronjob that starts the script every 5 minutes (or whatever often you want it to run) and additionally modify the script such that it creates a .lock file which it removes on exiting, but if it encounters it at the beginning it won't do anything (this way you don't have a long-running script active m... | 0 | 1 | 0 | 1 | 2016-06-21T17:55:00.000 | 1 | 0 | false | 37,951,368 | 0 | 0 | 0 | 1 | I have a Python program I run at all times of the day that alerts me when something I am looking for online is posted. I want to give this to my employees but I only want to have it email them during business hours.
I have a Ubuntu server and use a .sh. I have a command in crontab that runs on startup.
How do I make my... |
Xcode gives error while using Python.framework in iOS ,undefined symbol for architecture i386 | 38,047,376 | 1 | 1 | 295 | 0 | python,ios,objective-c,xcode | Replacing
PyUnicode_AsUTF8 or PyUnicode_FromString for _PyString_FromString
PyLong_AsLong for _PyInt_AsLong
PyLong_FromLong for _PyInt_FromLong
solved my problem. | 0 | 1 | 0 | 0 | 2016-06-22T06:58:00.000 | 1 | 1.2 | true | 37,960,704 | 1 | 0 | 0 | 1 | Undefined symbols for architecture i386:
"_PyInt_AsLong", referenced from:
_main in main.o
"_PyInt_FromLong", referenced from:
_main in main.o
"_PyString_FromString", referenced from:
_main in main.o
ld: symbol(s) not found for architecture i386
clang: error:
linker command failed with exit ... |
Using CodeDeploy ValidateService Hook with Python Application | 37,980,335 | 2 | 1 | 1,608 | 0 | python,amazon-web-services,amazon-ec2,aws-code-deploy,aws-codepipeline | I would loop in the ValidateService hook, checking for the condition you expect, OR just sleep for 60 seconds, assuming that is the normal initialization time.
The ValidateService hook should do just that: make sure the service is fully running before continuing/finalizing the deployment. That depends on your app of c... | 0 | 1 | 0 | 0 | 2016-06-22T12:19:00.000 | 1 | 0.379949 | false | 37,967,838 | 0 | 0 | 1 | 1 | I have an heavy app hosted on AWS.
I use CodeDeploy & Code Pipeline (updating from github) to update the servers when a new release is ready (currently running 6 ec2 instances on production environment).
I've setup the codedeploy to operate one-by-one and also defined a 300 seconds connection draining on the load balan... |
Execute python script on Jenkins with variables | 38,075,436 | 1 | 0 | 3,572 | 0 | python,jenkins | Solution:
from os import environ
Type = environ['Type'] | 0 | 1 | 0 | 0 | 2016-06-22T20:19:00.000 | 1 | 0.197375 | false | 37,977,531 | 0 | 0 | 0 | 1 | I have created a job in Jenkins, for which user provides the value of a specific parameter, let's say PYTHON_PARM, as an input. On this job I execute a python script (using Python Plugin). The problem is that I want to use as a variable the user input $PYTHON_PARM parameter. This is not considered as an environment var... |
Pyinstaller-compiled exe can't find file with absolute path | 37,997,430 | 0 | 1 | 2,621 | 0 | python,python-2.7,windows-10,exe,pyinstaller | Solved by adding --onedir which will put everything needed to run the program in one directory in the dist folder. | 0 | 1 | 0 | 0 | 2016-06-23T01:45:00.000 | 1 | 1.2 | true | 37,980,970 | 1 | 0 | 0 | 1 | I compiled my Python GUI with Pyinstaller on Windows 10 but it seems like it cannot find my other script even though I provided the hard-coded absolute path to it (with r'"C:\Program Files...script path..."'). I even tried os.isfile (script path) but it returns False. The python script was compiled with pyinstaller --o... |
PyCharm cannot catch breakpoints if the python code is running in Maya's Script Editor | 37,991,894 | 0 | 0 | 434 | 0 | python-2.7,pycharm,remote-debugging,maya | The break points are for the ide to catch only. Maya's script editor is just a text box with fancy things | 0 | 1 | 0 | 0 | 2016-06-23T05:21:00.000 | 2 | 0 | false | 37,982,930 | 1 | 0 | 0 | 1 | I am debugging a Python code for Maya through the remote debugger in PyCharm.
The remote debugger can catch breakpoints as expected if the code is run at the command line, but it fails to do that if the Python code is running inside Maya's Script Editor.
The Python code is running on a Ubuntu machine while the PyChar... |
How to control a Windows application from Python | 38,046,259 | 13 | 5 | 30,343 | 0 | python,windows,ui-automation | Normally, an application exposes a user interface (UI) for users, and an application programming interface (API) for programming.
A human being uses keyboard and mouse to work with the user interface (UI)
An application uses programming to work with the application programming interface (API)
The UI is designed for h... | 0 | 1 | 0 | 0 | 2016-06-23T11:37:00.000 | 3 | 1 | false | 37,990,545 | 0 | 0 | 0 | 1 | I have the application installed on my windows PC, I want to launch that application using python and select dropdown options and do some other activities in that application.
I was able to launch the application using the os.system command, but I am not able to proceed further.
I want my program to do things like:
* ... |
How to use pyramid cookie to authenticate user in tornado web framework? | 38,032,565 | 1 | 2 | 83 | 0 | python,session,cookies,tornado,pyramid | The two locations are separate origins in HTTP language. By default, they should not share cookies.
Before trying to figure out how to pass cookies around I'd try to set up a front end web server like Nginx that would proxy requests between two different backend servers. Both applications could get their own path, serv... | 0 | 1 | 0 | 1 | 2016-06-23T12:52:00.000 | 1 | 0.197375 | false | 37,992,209 | 0 | 0 | 1 | 1 | In a server, I have a pyramid app running and I plan to have another tornado app running in parallel in the same machine. Let's say the pyramid app is available in www.abcd.com, then the tornado app will be available in www.abcd.com:9000.
I want only the authenticated users in the pyramid webapp to be able to access t... |
Pyside fail to show tooltip and specific events in Linux | 38,057,871 | 0 | 0 | 70 | 0 | python-2.7,docker,ubuntu-14.04,pyside | Ok, after several days of trying figure that this is what was needed:
For the tooltip problem:
Adding WA_AlwaysShowToolTips
Change the stylesheet show that the transparent feature will work only for the QPushButton background and not the entire widget.
For the event problem:
Add the attribute: WA_Hover
Everything ... | 1 | 1 | 0 | 0 | 2016-06-23T13:37:00.000 | 1 | 0 | false | 37,993,285 | 0 | 0 | 0 | 1 | I wrote a PySide application that should run on python2.7, on window,Linux and Docker container. The application contains Qtooltip and specific eventFilter that catches HoverEnter\HoverLeave.
The application works well on windows 10 and ubuntu 14.04 desktop but when trying to run it inside Ubuntu 14.04 container both f... |
IDLE's subprocess didn't make a connection. Either IDLE can't start or personal firewall software is blocking connection | 59,004,916 | 1 | 2 | 15,720 | 0 | python,python-idle | In Windows 10
1. Type in "Controlled folder Access"
2. Select "Allow an app through Controlled folder access" Select yes to "UAC"
3. Click on "+ Add an allowed app"
4. Select "recently blocked apps"
5. Find the executable for the C:\Python27
6. Click the + to add it.
7. Select Close
Then try running the Python Shell ag... | 0 | 1 | 1 | 0 | 2016-06-23T17:02:00.000 | 5 | 0.039979 | false | 37,997,715 | 0 | 0 | 0 | 4 | I have tried uninstalling it and have searched other answers. None of them have worked; IDLE opens, but I can't run anything I write. |
IDLE's subprocess didn't make a connection. Either IDLE can't start or personal firewall software is blocking connection | 49,338,940 | 0 | 2 | 15,720 | 0 | python,python-idle | First uninstall the application.Then reinstall it BUT at the time of reinstallation try -n at the end of location adress. It worked for me, you can copy the below text and paste it at the location while installing it.
“C:\Program Files\Python32\pythonw.exe” lib\idlelib\idle.py -n | 0 | 1 | 1 | 0 | 2016-06-23T17:02:00.000 | 5 | 0 | false | 37,997,715 | 0 | 0 | 0 | 4 | I have tried uninstalling it and have searched other answers. None of them have worked; IDLE opens, but I can't run anything I write. |
IDLE's subprocess didn't make a connection. Either IDLE can't start or personal firewall software is blocking connection | 46,725,394 | 0 | 2 | 15,720 | 0 | python,python-idle | IDLE's subprocess didn't make a connection. Either IDLE can't start or a personal firewall software is blocking the connection.
Having had this problem myself I did an uninstall and created a new directory in the C drive and reinstalled in that folder, which worked for me. | 0 | 1 | 1 | 0 | 2016-06-23T17:02:00.000 | 5 | 0 | false | 37,997,715 | 0 | 0 | 0 | 4 | I have tried uninstalling it and have searched other answers. None of them have worked; IDLE opens, but I can't run anything I write. |
IDLE's subprocess didn't make a connection. Either IDLE can't start or personal firewall software is blocking connection | 44,459,007 | 0 | 2 | 15,720 | 0 | python,python-idle | If you at the network environment then check on the secure Group (SG), to see if the user is listed under that group.
else as other had been suggested you have to have the (right click on the program the login as Admin right to enable the IDLE to run. | 0 | 1 | 1 | 0 | 2016-06-23T17:02:00.000 | 5 | 0 | false | 37,997,715 | 0 | 0 | 0 | 4 | I have tried uninstalling it and have searched other answers. None of them have worked; IDLE opens, but I can't run anything I write. |
How to set path to python (venv) executable in atom editor | 38,010,189 | 0 | 0 | 1,646 | 0 | python,virtualenv,atom-editor | It seems that python-autocomplete plugin is all we need in atom python coding. Just set your virtualenv from the console, then type atom . and editor (accompanied with aforementioned plugin) will pick that up. No other configuration is necessary. | 0 | 1 | 0 | 0 | 2016-06-23T18:40:00.000 | 1 | 1.2 | true | 37,999,400 | 1 | 0 | 0 | 1 | I'm trying to switch to Atom Editor for my python projects. I have several of those and each is set up using virtualenv.
How do I set up this editor, so that when I open up one project it will be using python.exe from its path and not some other?
I don't want to add anything to the init script because, as far as I un... |
How to get source packages from dir in /usr/lib/python2.7/dist-packages/ | 38,004,576 | 1 | 0 | 117 | 0 | python,python-2.7,ubuntu,pip | Use dpkg -S <path...> for installed packages, or apt-file search <paths...> for packages that might not be installed. | 0 | 1 | 0 | 1 | 2016-06-23T19:39:00.000 | 1 | 1.2 | true | 38,000,416 | 1 | 0 | 0 | 1 | What is the way to get the name of the package which creates specific dir under /usr/lib/python2.7/dist-packages/ on Ubuntu
For example I am trying to get the package name which installs /usr/lib/python2.7/dist-packages/hdinsight_common/ or /usr/lib/python2.7/dist-packages/hdinsight_common/decrypt.sh
can anyone help m... |
Do tornado AsyncHTTPClient fetch callbacks get called in order of request or response? | 38,003,009 | 0 | 0 | 211 | 0 | python,python-3.x,http,tornado | Callbacks are executed as soon as possible after the event for which they're waiting is complete. So, they are called in response order. | 0 | 1 | 0 | 0 | 2016-06-23T20:15:00.000 | 1 | 1.2 | true | 38,000,992 | 0 | 0 | 0 | 1 | I'm using Tornado's AsyncHTTPClient to fetch a URL multiple times. I pass in a different callback with each request.
If I send requests A, B (with associated callbacks Callback_A and Callback_B) to a URL, but the responses come back in the opposite order B, A. Should I expect the callbacks to be called in the order of ... |
How to install pygame, cv2, anaconda, pip etc to any one version of python in ubuntu 14.04 | 38,035,454 | 0 | 0 | 180 | 0 | python,pygame,ubuntu-14.04 | First of all I want to thanks Bennet for responding to my question so that I was able to figure out what the problem was. Actually the problem was with aliasing. When I installed cv2 or pygame using apt-get, they were installed for default version but when I installed any package by downloading the installer first (lik... | 0 | 1 | 0 | 0 | 2016-06-24T16:26:00.000 | 2 | 0 | false | 38,018,045 | 1 | 0 | 0 | 1 | I have Ubuntu 14.04 LTS. I guess different versions of python are pre-installed in Ubuntu 14.04. Right now when I type 'python' in terminal it opens python 2.7.11, but I guess the default version of Ubuntu 14.04 is 2.7.6. When I type /usr/bin/python it opens the default version. I know this can be done with making alia... |
what exactly is .bash_profile.pysave? | 38,021,808 | 16 | 11 | 3,075 | 0 | python,bash | When python is installed, some installers will modify your .bash_profile. They save your previous version in .bash_profile.pysave. | 0 | 1 | 0 | 0 | 2016-06-24T20:27:00.000 | 1 | 1.2 | true | 38,021,598 | 0 | 0 | 0 | 1 | I just noticed that I have a .bash_profile and a .bash_profile.pysave and I was wondering what the .pysave was, if I can delete it and how/why it came into existence. |
python packages with dependencies in windows system | 38,023,476 | 0 | 0 | 802 | 0 | python,windows,pyffmpeg | You're basically asking how to quickly set up a development environment to compile a given project. You're generally at the mercy of the project developers and how well they documented the build process.
On linux, you often have a package manager to make the installing and resolving of dependencies easy.
Since Window... | 0 | 1 | 0 | 0 | 2016-06-24T23:02:00.000 | 1 | 1.2 | true | 38,023,256 | 1 | 0 | 0 | 1 | I am trying to work with python on a new project in my windows system. The project uses ffmpeg and pyrabin among others. I find it extremely difficult to move forward with pip installing these packages as they constantly keep on asking for missing dependencies. Following are some errors:
ffvideo\ffvideo.c(254) : fatal... |
How do I install PIP in python 3.5? | 38,039,181 | 0 | 0 | 1,881 | 0 | python-3.x | Go to the directory {Your python root dir}\Scripts
Then press Shift + Right CLick > Open CMD here
Then type in pip install {package name} | 0 | 1 | 0 | 0 | 2016-06-26T07:51:00.000 | 1 | 0 | false | 38,036,339 | 1 | 0 | 0 | 1 | I have a fresh install of python 3.5 on my windows PC
and here is my directory of my installation:
C:\Users*PCNAME*\AppData\Local\Programs\Python\Python35-32
I have installed it entering python get-pip.py in CMD, it says it is installed successfully but when I enter pip in CMD it says it is not recognized?
Please kindl... |
Key bindings for interrupt execution in Python Sublime REPL | 53,070,278 | 0 | 3 | 1,773 | 0 | python,sublimetext3,sublimerepl | As mentioned above (a long time ago) the key bindings aren't present for Windows. However, one can Mouse Right Click to open a context menu. From here there are menu options for Kill and Restart. You can also open a sub-menu which allows you send those and other signals including SIGINT. | 0 | 1 | 0 | 0 | 2016-06-26T21:25:00.000 | 2 | 0 | false | 38,043,336 | 1 | 0 | 0 | 1 | I'm using REPL extension for Sublime text 3 for my python projects. Currently when I want to interrupt a running script I have to close to close the REPL window to stop execution and all computations are so far are lost.
I was wondering if anybody knows how to interrupt an execution and have a short cut or key binding... |
Uninstalling Python3.5 from Linux RHEL | 38,384,650 | 0 | 0 | 3,916 | 0 | python,linux,python-3.x,rhel,make-install | Because python is integral into the RHEL OS, please explain what you mean by:
"and made it default over existing Python2.6 ." Otherwise attempts to "uninstall" your working python install might leave you with a broken RHEL install. | 0 | 1 | 0 | 0 | 2016-06-27T09:14:00.000 | 3 | 0 | false | 38,050,053 | 1 | 0 | 0 | 2 | I installed Python3.5 in Linux machine using configure, make, make install and made it default over existing Python2.6 . Now I want to uninstall Python 3.5 as it is not supporting zlib. How do I uninstall default Python 3.5. Linux is RHEL6.7. |
Uninstalling Python3.5 from Linux RHEL | 38,050,633 | 0 | 0 | 3,916 | 0 | python,linux,python-3.x,rhel,make-install | you probably can remove the directory that contain the new installation.
but the main thing is to remove it from the $PATH. | 0 | 1 | 0 | 0 | 2016-06-27T09:14:00.000 | 3 | 0 | false | 38,050,053 | 1 | 0 | 0 | 2 | I installed Python3.5 in Linux machine using configure, make, make install and made it default over existing Python2.6 . Now I want to uninstall Python 3.5 as it is not supporting zlib. How do I uninstall default Python 3.5. Linux is RHEL6.7. |
PyCharm is not able find app.yaml when pushing to GAE | 38,060,684 | 0 | 0 | 98 | 0 | python,google-app-engine | The parameter to the appcfg update command is the yaml file or directory containing yaml file | 0 | 1 | 0 | 0 | 2016-06-27T16:53:00.000 | 1 | 0 | false | 38,059,310 | 0 | 0 | 1 | 1 | I wrote a simple pymongo code insert a few values in MongoDB instance on GAE and My app got deployed properly from Pycharm but,
I am getting the same error while running following command
appcfg.py -A login-services-1354 -V v1 update . on my cloud shell
The following is the error I got Usage: appcfg.py [options] update... |
How can I create a region cache in gem5 | 43,447,954 | 0 | 1 | 228 | 0 | python,c++,caching,memory-management,gem5 | IIUC, you are trying to track misses to a phyAddr across cache levels. I think you can do that by modifying appropriate Request/Response in /src/mem/protocol/*-msg.sm | 0 | 1 | 0 | 1 | 2016-06-29T08:56:00.000 | 1 | 0 | false | 38,094,764 | 0 | 0 | 0 | 1 | Im trying to modify the ~/src/mem/cache/ scripts and code to make a region base cache system for the ARM architecture. so far I have managed to change the SConscript so that a copy of cache.cc,cache.hh and Cache.py is built in the scons but I dont know where I should redirect the memory accessees to the region caches. ... |
Can't import Pyperclip | 65,168,753 | 1 | 3 | 18,433 | 0 | python,python-3.x,python-3.5,pyperclip | For those working in a venv, make sure that you have pyperclip installed in the directory that your venv is running in.
Eg. C:\MY_PROJECT\venv\Lib\site-packages should include the pyperclip module. If you don't find it here, have a look at where you installed Python and you'll find it there.
Eg. C:\Users\Username\App... | 0 | 1 | 0 | 0 | 2016-06-29T22:54:00.000 | 3 | 0.066568 | false | 38,111,340 | 1 | 0 | 0 | 2 | I am having trouble importing Pyperclip in IDLE.
I am running windows 7 (64-bit).
I have Python 3.5.2 Installed on: C:\Python\Python35.
I opened command prompt and initiated the install by typing pip install pyperclip after changing directory to C:\Python\Python35\Scripts.
It successfully installed Pyperclip-1.5.27.
... |
Can't import Pyperclip | 38,127,468 | 6 | 3 | 18,433 | 0 | python,python-3.x,python-3.5,pyperclip | It unpacked pyperclip in the wrong directory. I copied the entire pyperclip folder and put it in C:/python/python35, now it works as it should. Seems like a noob mistake on my part, but it took me a long time to figure this out. I hope this helps someone in the future. | 0 | 1 | 0 | 0 | 2016-06-29T22:54:00.000 | 3 | 1.2 | true | 38,111,340 | 1 | 0 | 0 | 2 | I am having trouble importing Pyperclip in IDLE.
I am running windows 7 (64-bit).
I have Python 3.5.2 Installed on: C:\Python\Python35.
I opened command prompt and initiated the install by typing pip install pyperclip after changing directory to C:\Python\Python35\Scripts.
It successfully installed Pyperclip-1.5.27.
... |
Receiving an UDP Packet from Arduino in a CrossbarServer in Python | 38,119,608 | 0 | 0 | 130 | 0 | python-2.7,sockets,arduino-uno,crossbar,wamp-protocol | Unfortunately you cannot do so directly at the moment. For the time being, you need to connect the Uno to some component which accepts messages from the Uno and can talk WAMP as well.
We are working on a C library for lower-end devices, but as far as I can tell (I'm not directly involved) something with the specs of th... | 0 | 1 | 1 | 0 | 2016-06-30T03:47:00.000 | 1 | 1.2 | true | 38,113,656 | 0 | 0 | 0 | 1 | I'm new using WAMP protocol and CrossbarIO servers that are based on the WAMP protocol. The problem is. I have and Arduino Uno + EthernetShield and I want to send the information to the CrossbarServer.
The Arduino Uno has not support for Autobahn or WAMP or Crossbar. I just can send normal packages via UDP and websock... |
cannot get pip to be recognized as a command | 38,127,300 | 1 | 0 | 729 | 0 | python,pip | You need to add C:\Python27\Scripts to your path as well. That is where the pip executable lives by default.
Also, remember to close and reopen your command shell after you change your path variable to make sure that the update is loaded. | 0 | 1 | 0 | 0 | 2016-06-30T13:54:00.000 | 1 | 1.2 | true | 38,125,246 | 1 | 0 | 0 | 1 | I am trying to install matplotlib into python27 but am running into issues with pip. As stated when I try any 'pip' command I get
'pip' is not recognized as an internal or external command.
I checked my path variables and they point to the location of my OSGeo4W Python27 install. get-pip.py works and it even says I... |
How to run python without including ~/.local/lib/pythonX.Y/site-packages in its module search path | 38,129,078 | 1 | 0 | 645 | 0 | python,anaconda | Well, there is a -s flag in python executable to disable searching the user site directory (`~/.local/lib/python2.7/site-packages etc). That solves the problem above! | 0 | 1 | 0 | 1 | 2016-06-30T16:47:00.000 | 1 | 0.197375 | false | 38,129,077 | 1 | 0 | 0 | 1 | I have some packages installed under my ~/.local/lib/python2.7/site-packages/ subdir, which was for use with system python (/usr/bin/python). Now I have just installed Anaconda python (which is also python 2.7, but minor version 11). The whole idea of Anaconda distro is to have a self-containing python environment, suc... |
Error while installing Airflow using pip in windows- Unable to find vcvarsall.bat | 38,182,957 | 0 | 0 | 689 | 0 | python,visual-studio,visual-c++,pip,setup.py | Instead of setting VS100COMNTOOLS=%VS110COMNTOOLS% in cmd, i did
SET VS100COMNTOOLS=C:\Program Files\Microsoft Visual Studio 11.0\Common7\Tools\ and it was picking correctly but again thrown another pile of errors as VS11 compiler is different and cannot compile Python 3.4 code properly.
I uninstalled VS11, Installed V... | 0 | 1 | 0 | 0 | 2016-06-30T18:12:00.000 | 1 | 0 | false | 38,130,483 | 1 | 0 | 0 | 1 | I was trying to install Airflow in windows through command prompt using pip.
The python is 3.4.2, pip included. I am getting the below error.
distutils.errors.DistutilsError: Setup script exited with error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
I have installed Visual studio 2012 but Py... |
Where can i cache pandas dataframe in tornado requesthandler | 38,439,059 | 0 | 0 | 906 | 0 | python,caching,tornado,requesthandler | Depends on how and where you want to be able to access this cache in the future, and how you want to handle invalidation. If the CSV files don't change then this could be as simple as @functools.lru_cache or a global dict. If you need one cache shared across multiple processes then you could use something like memcache... | 0 | 1 | 0 | 0 | 2016-07-01T13:23:00.000 | 2 | 1.2 | true | 38,146,607 | 0 | 1 | 0 | 1 | I want to cache a pandas dataframe into tornado requesthandler. So i don't want to repeat the pd.read_csv() for every hit to that particular url. |
How to access the cURL executable with Python subprocess module | 38,149,152 | 2 | 0 | 196 | 0 | python,windows,curl | Take a step back and do some sanity checks. Here are some steps to try.
Copy the path in your script, and paste it into the file explorer (remove the escape characters) and verify that the path is indeed correct.
Verify that you have proper permissions to the path
* Copy the executable (curl.exe) to a same location yo... | 0 | 1 | 0 | 0 | 2016-07-01T13:47:00.000 | 1 | 0.379949 | false | 38,147,124 | 0 | 0 | 0 | 1 | I am trying to access the curl executable on my computer using a subprocess call, but when I do so, I get the following error:
WindowsError: [Error 2] The system cannot find the file specified
my code looks as follows
path = 'C:\\Users\\Username\\AppData\\Local\\Continuum\\Anaconda2\\Library\\bin\\curl.exe
subprocess.c... |
mido on Python 3.5.1: No module named 'mido' | 38,149,378 | 1 | 4 | 2,563 | 0 | python,midi,python-3.5 | Installing a module for one python version does not install it for the others.
If you're using pip, run something like pip3 install mido. pip defaults to installing for Python 2, so you'll need to explicitly call pip3. | 0 | 1 | 0 | 0 | 2016-07-01T15:44:00.000 | 1 | 0.197375 | false | 38,149,341 | 1 | 0 | 0 | 1 | I'm trying to use mido with Python 3.5.1. I have successfully installed it (it says "successfully installed mido-1.1.14" in command prompt) but when I tried to import it in python, it gives me the message
ImportError: No module named 'mido'
I understand that mido targets Python 2.7 and 3.2, but does it really not w... |
Create .msg file with task without having outlook installed | 38,212,655 | 1 | 1 | 2,600 | 0 | python,django,outlook,msg | Why not create an EML file? It is MIME, so there are hundreds of libraries out there. Outlook will be able to open an EML file just fine.
In your particular case, create a MIME file with the vTodo MIME part as the primary MIME part. | 0 | 1 | 0 | 0 | 2016-07-04T08:52:00.000 | 2 | 0.099668 | false | 38,180,458 | 0 | 0 | 1 | 1 | Is there any chance to create a outlook .msg file without having outlook installed.
We use a django backend and need to create a msg file containing a task for importing in outlook. Since we use unix-based servers we dont have any chance to get outlook installed (except wine etc..)
Is there a component to generate su... |
php exec not working along with wapiti | 38,191,469 | 0 | 0 | 72 | 0 | php,python-2.7,exec,wapiti | Look at the php.ini to see if there's anything set for disable_functions. If you're using PHP CLI for the script, you can execute the following command in the shell:
php -i | grep disable_functions
Also make sure wap.py has execute permissions. | 0 | 1 | 0 | 1 | 2016-07-04T19:49:00.000 | 1 | 0 | false | 38,191,403 | 0 | 0 | 0 | 1 | I have a python script (wap.py) from which I am calling wapiti asynchronously using Popen. Command for it in wap.py:
p = Popen("python wapiti domainName", shell = True)
When I am running wap.py, it is executing completely fine.
But when I am running it using php exec, it doesn't work.
Command from php file : exec("pyt... |
ImportError: No module named win32service | 38,198,005 | 25 | 5 | 32,335 | 0 | python,openerp,odoo-8 | You need to install pywin32.
Either use pip install pywin32 or download from GitHub https://github.com/mhammond/pywin32/releases | 0 | 1 | 0 | 0 | 2016-07-05T07:43:00.000 | 2 | 1.2 | true | 38,197,879 | 0 | 0 | 1 | 1 | I am using odoo8 with python 2.7.9 (64 bit) on eclipse IDE. Python software got corrupted so I had to reinstall it.Now I am facing this new problem ImportError: No module named win32service |
Change git hook credentials in Windows | 38,217,644 | 0 | 1 | 70 | 0 | python,windows,git,clearcase | Since a git hook executes itself in a git bash, check if that affect how the parameters are passed to the windows executable clearfsimport (especially the path)
One simple test: wrap your clearfsimport call in a .bat script, and set the source and destination path in that script, then make your git hook call said scrip... | 0 | 1 | 0 | 0 | 2016-07-05T22:13:00.000 | 1 | 0 | false | 38,213,691 | 0 | 0 | 0 | 1 | I am running in Windows and have a git post-receive hook that calls a python 3 script. This Python script does a number of things. One of these is to output the username running the git hook. This username is MACHINENAME$ (where the machine name is MACHINENAME), which I think is the Network Service account, but I could... |
How to add a production config when deploying a docker container? | 38,221,268 | 0 | 0 | 38 | 0 | python,docker | You should copy your production-ready config file into the docker container as part of your image-building process (COPY directive in your dockerfile), and then proceed with the same deployment steps you would normally use. | 0 | 1 | 0 | 0 | 2016-07-06T09:25:00.000 | 1 | 0 | false | 38,220,530 | 0 | 0 | 1 | 1 | I used to deploy Python web applications on AWS EC2 instances with Ansible.
In my development environment, I use config from a module local_config.py, but in the deployment process, I use an Ansible task to replace this file with a production-ready config.
How do I do something similar when building a Docker image? |
ipython from windows command line | 38,227,674 | 3 | 2 | 6,717 | 0 | ipython | So I figured out a solution - I changed the environment variable PATH to the subfolder with the .exe files. Although the path including this subfolder was listed under %env, it did not work without being referred directly in the System setting. | 0 | 1 | 0 | 0 | 2016-07-06T15:11:00.000 | 2 | 0.291313 | false | 38,227,501 | 1 | 0 | 0 | 1 | I changed the environment variable PATH, to a new value and then back to what I believe was the original one. But now I can't open a .ipynb file through the Windows command line the was I was used to.
After changing the directory in command line and running
ipython notebook notebook_name.ipynb
I get the following mess... |
Integration openstack &opendaylight | 38,247,806 | 0 | 0 | 69 | 0 | python,openstack,openflow,opendaylight | Hmm, well, you could consult the OPNFV (Open Platform for Network Function Virtualization) project. OPNFV builds an integrated release of OpenStack with OpenDaylight as the SDN controller. | 0 | 1 | 0 | 0 | 2016-07-07T09:05:00.000 | 2 | 0 | false | 38,241,463 | 0 | 0 | 0 | 1 | strong texti need your help , i would like to do intergartion between openstack liberty(devstack) and opendaylight Beryllium. some one who know whow? i check lot of in internet but always the same documentation . |
Python Network Projects | 38,258,777 | 1 | 1 | 411 | 0 | python,network-programming | Backing up and copying configs to server. Automate certain config changes to adhere to standards. Scripts to copy run start on all devices at will. Finding various config entries on all devices that may need to be altered.
There are so many possibilities.
Search github and pastebin and the overflow sites for anything u... | 0 | 1 | 0 | 1 | 2016-07-07T23:57:00.000 | 2 | 0.099668 | false | 38,257,055 | 0 | 0 | 0 | 1 | I originally posted on his on Network Engineering but it was suggested that o post it on here.
I've been learning Python and since I work in networking I'd like to start writing a few scripts that I can use in my day to day work tasks with switches. So my question is this, what network projects have you used python in... |
Is it okay to work on Ubuntu while another person working on the same project is working on Windows 7? | 38,276,238 | 0 | 0 | 26 | 0 | python-2.7,flask,windows-7,ubuntu-14.04 | Are you accessing/manipulating Operating system specific information ?
For example, some file attributes, other than the basic attributes, are different on both systems. | 0 | 1 | 0 | 0 | 2016-07-08T22:23:00.000 | 1 | 0 | false | 38,276,184 | 1 | 0 | 0 | 1 | Is it fine to work on Ubuntu while another person working with me on the same project is working on Windows 7?
We are using Python 2.7, and Flask, and have set up matching virtual environments. |
Linking /usr/local/Cellar/python3/3.5.1... Error: Permission denied - /usr/local/Frameworks | 71,665,360 | 0 | 1 | 1,544 | 0 | python,macos | I [believe I] resolved this by chown'ing and chgrp'ing everything in /usr/local/Cellar and then unlinking and relinking:
------
% brew link python3
Linking /usr/local/Cellar/python/3.6.5...
Error: Could not symlink bin/2to3
Target /usr/local/bin/2to3
is a symlink belonging to python@3.9. You can unlink it:
brew unlink ... | 0 | 1 | 0 | 0 | 2016-07-11T03:31:00.000 | 3 | 0 | false | 38,298,752 | 0 | 0 | 0 | 1 | I am trying to re-install python3 on my mac using brew by
brew install python3.
But when proceeding to the the link step, it threw an error:
The brew link step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3-3.5
Target /usr/local/bin/2to3-3.5
already ... |
Python SSH Server(twisted.conch) change the password prompt | 38,324,034 | 0 | 0 | 122 | 0 | python,ssh,twisted.conch,password-prompt | The password prompt is part of keyboard-authentication which is part of the ssh protocol and thus cannot be changed. Technically, the prompt is actually client side. However, you can bypass security (very bad idea) and then output "your codes is"[sic] via the channel | 0 | 1 | 0 | 1 | 2016-07-12T06:49:00.000 | 1 | 0 | false | 38,321,820 | 0 | 0 | 0 | 1 | I wrote a SSH server with Twisted Conch. When I execute "ssh username@xx.xx.xx.xx" command on the client side. My twisted SSH server will return a prompt requesting password that like "username@xx.xx.xx.xx's password: ".
But now I want to change this password prompt that like "your codes is:". Dose anyone know how t... |
PyCluster unable to install package | 58,928,704 | 0 | 2 | 4,769 | 0 | python,python-2.7,packages,installation-package | install with pip:
pip3 install pyclustering
it even works with Anaconda prompt | 0 | 1 | 0 | 0 | 2016-07-12T08:16:00.000 | 3 | 0 | false | 38,323,412 | 1 | 0 | 0 | 1 | This is the error I am getting when trying to install PyCluster. I am using python 2.7 with anaconda in spyder IDE and on windows.
Downloading/unpacking PyCluster
Getting page http://pypi.python.org/simple/PyCluster
URLs to search for versions for PyCluster:
* httpss://pypi.python.org/simple/PyCluster/
Getting page h... |
Determine if script is being piped to in Python 3 | 38,340,837 | -1 | 0 | 172 | 0 | python,python-3.x,stdin,piping | You can test if your program's input is connected to a tty, which may help, depending on your use case:
$ python -c 'import sys; print(sys.stdin.isatty())'
True
$ echo hi | python -c 'import sys; print(sys.stdin.isatty())'
False
$ python -c 'import sys; print(sys.stdin.isatty())' < foo
False | 0 | 1 | 0 | 0 | 2016-07-13T00:12:00.000 | 1 | -0.197375 | false | 38,340,729 | 1 | 0 | 0 | 1 | If my script needs to behave differently when it is being piped to versus when it is being called normally, how can I determine whether or not it is being piped to? This is necessary for avoiding hanging. I am not talking about merely checking whether or not stdin is empty or not. |
Moving a bound ZMQ socket to another process | 38,349,487 | 1 | 0 | 324 | 0 | python,sockets,zeromq | The simplest is to create a logic for a pool-of-ports manager ( rather avoid attempts to share / pass ZeroMQ sockets to / among other processes )
One may create a persistent, a-priori known, tcp://A.B.C.D:8765-transport-class based .bind() access-point, exposed to all client processes as a port-assignment service, to ... | 0 | 1 | 0 | 0 | 2016-07-13T09:52:00.000 | 1 | 1.2 | true | 38,348,268 | 0 | 0 | 0 | 1 | I have a Python program which spawns several other Python programs as subprocesses. One of these subprocesses is supposed to open and bind a ZMQ publisher socket, such that other subprocesses can subscribe to it.
I cannot give guarantees about which tcp ports will be available, so when I bind to a random port in the su... |
Move .keras directory in Ubuntu | 38,408,813 | 2 | 2 | 680 | 0 | ipython,keras | I don't think keras is the only problem. If you are using theano as a backend, it will create $HOME/.theano/ as well.
One dirty trick is to export HOME=/data/username/, but other program than keras or ipython will also treat /data/username/ as $HONE. To avoid that, you can do this locally by calling HOME=/data/username... | 0 | 1 | 0 | 0 | 2016-07-13T16:44:00.000 | 1 | 0.379949 | false | 38,357,398 | 1 | 0 | 0 | 1 | When I'm in ipython and try to import keras, I get the error No space left on device: /home/username/.keras. How can I change this so that Keras does not use my HOME directory, and instead use /data/username/? I did the same for the directory ~/.ipython. I moved it to the desired location and then did export IPYTHONDIR... |
Install imutils using conda in Ubuntu 16.04 LTS | 48,430,119 | 1 | 0 | 3,202 | 0 | python-3.x,image-processing,anaconda,conda,ubuntu-16.04 | You can try this
conda install -c mlgill imutils | 0 | 1 | 0 | 0 | 2016-07-14T05:13:00.000 | 4 | 0.049958 | false | 38,365,948 | 1 | 0 | 0 | 1 | Hi, I am working in computer vision projects, I installed python 3.5 using anaconda in my laptop (Ubunut16.04 LTS). Can you please tell me, How I install imutils using conda in my ubuntu 16.04 LTS.?????? |
Python: How to Install gdbm for dbm.gnu | 70,973,357 | 0 | 5 | 2,327 | 1 | python-3.x,gdbm | I got similar issue though I am not sure which platform you are using.
Steps are:
look for file _gdbm.cpython-"python version"-.so example file: _gdbm.cpython-39-darwin.so
Once you find the path check which python version in directory path.
Try creating same python venv.
Execute your code.
Before this make sure you h... | 0 | 1 | 0 | 0 | 2016-07-14T23:13:00.000 | 1 | 0 | false | 38,385,630 | 1 | 0 | 0 | 1 | In the Python 3 docs, it states that the dbm module will use gdbm if it's installed. In my script I use from dbm.gnu import open as dbm_open to try and import the module. It always returns with the exception ImportError: No module named '_gdbm'. I've gone to the gnu website and have downloaded the latest version. I ins... |
While Mac OSX has the say command to speak, or so to say, is there any command that is similar for Python? | 38,387,870 | 0 | 0 | 449 | 0 | python,macos,subprocess,osx-elcapitan | Thank you everyone for the quick replies. I have been playing with the subprocess module, and I have gotten this to work:import subprocess
m=subprocess.Popen(["say","hello"])
print(m)
The .Popen command is also a quick way to get this to work. However, this is only working on my Mac and I need it to work on my Raspber... | 0 | 1 | 0 | 0 | 2016-07-15T04:03:00.000 | 3 | 0 | false | 38,387,676 | 0 | 0 | 0 | 1 | While Mac OSX 10.11.5 (El Capitan) has the "say" command to speak in a system generated voice, or so to say, is there any command that is similar for Python that can be used in Python? If Subprocess is utilized, please explain on how to use that. |
python subprocess pipe unbuffered behaviour | 38,433,285 | 1 | 0 | 546 | 0 | python,pipe,subprocess,buffer | Answering to your questions:
No, it will not be stored in memory. The child process will stuck on write operation after exceeding pipe-max-size limit (cat /proc/sys/fs/pipe-max-size);
The child process will write about 1M before it will stuck, until the parent process read block of data. After this child process will ... | 0 | 1 | 0 | 0 | 2016-07-18T08:51:00.000 | 1 | 0.197375 | false | 38,432,336 | 0 | 0 | 0 | 1 | I've the below piece of code to read data from a child process as its generated and write to a file.
from subprocess import Popen, PIPE
proc = Popen('..some_shell_command..', shell=True, stdout=PIPE)
fd = open("/tmp/procout", "wb")
while True:
data = proc.stdout.read(1024)
if len(data) == 0:
break
... |
Set a Subdirectory's File's Working Path Relative to A Parent Directory in Python | 38,439,753 | 1 | 0 | 192 | 0 | python,filepath | If you are running from Project folder, set a variable(PRJ_PATH) to os.getcwd() and use it for opening the file like open(os.path.join(PRJ_PATH, 'data', 'data.txt'))
If you are running from subdirectories, set a variable(PRJ_PATH) to os.path.join(os.getcwd(), '..') and then use it for opening the file like open(os.path... | 0 | 1 | 0 | 0 | 2016-07-18T14:36:00.000 | 2 | 1.2 | true | 38,439,493 | 1 | 0 | 0 | 2 | I have a project folder, PythonProject.
Within that Project folder I have a 2 subdirectories: SubDirectory & DataSubDirectory.
Within SubDirectory, I have a python file, TestFile.py which opens an external file, datafile.txt, contained in DataSubDirectory.
Currently, I open this file as such; open(..\\DataSubDirector... |
Set a Subdirectory's File's Working Path Relative to A Parent Directory in Python | 38,439,755 | 0 | 0 | 192 | 0 | python,filepath | You can use PythonProject = os.path.dirname(os.path.realpath(sys.argv[0])) to set the PythonProject Path | 0 | 1 | 0 | 0 | 2016-07-18T14:36:00.000 | 2 | 0 | false | 38,439,493 | 1 | 0 | 0 | 2 | I have a project folder, PythonProject.
Within that Project folder I have a 2 subdirectories: SubDirectory & DataSubDirectory.
Within SubDirectory, I have a python file, TestFile.py which opens an external file, datafile.txt, contained in DataSubDirectory.
Currently, I open this file as such; open(..\\DataSubDirector... |
Archiving a group of gzipped files | 38,442,022 | 1 | 0 | 147 | 0 | python,compression,gzip,tar,gzipstream | A gzipped tar archive is not an archive of compressed files. It is a compressed archive of files. In contrast, a zip archive is an archive of compressed files.
An archive of compressed files is a better archive format, if you want to be able to extract (or update) individual files. But it is an inferior compression tec... | 0 | 1 | 0 | 0 | 2016-07-18T15:43:00.000 | 2 | 0.099668 | false | 38,440,916 | 1 | 0 | 0 | 1 | I have a group of about 10 gzipped files that I would like to archive into a single file in order for a user to download. I am wondering what the best approach to this would be.
Gunzip everything, then tar-gz the complete set of files into a myfiles.tar.gz?
Tar the set of gz files into a myfiles.tar.
Option 1 seems ... |
Remove old Python Installation in MAC OS | 38,447,997 | 1 | 0 | 1,355 | 0 | python,macos | Don't! The name /Library and /System suggest that they are OS-level directories. Nobody installed them. Instead, Mac and other linux-based systems use them by default for system-level services (and they should not be even manually upgraded or system stability may suffer).
For all what matters, you should just prepend y... | 0 | 1 | 0 | 0 | 2016-07-18T16:50:00.000 | 2 | 0.099668 | false | 38,442,104 | 1 | 0 | 0 | 2 | I installed python using MacPort and I am satisfied with the result, but found that there are other versions of Python installed in other directories, and can not remember how they were instaldas, it's been five years that use this notebook and perhaps installed by other means a few years.
I tried to remove all referen... |
Remove old Python Installation in MAC OS | 38,442,289 | 1 | 0 | 1,355 | 0 | python,macos | Don't remove the system Pythons. They may be used by other programs. (I don't know if anything on OS X actually uses them, but it's best to keep them.)
Instead, just make sure that your MacPorts bin directory (at /opt/local/bin) is first on your $PATH. | 0 | 1 | 0 | 0 | 2016-07-18T16:50:00.000 | 2 | 1.2 | true | 38,442,104 | 1 | 0 | 0 | 2 | I installed python using MacPort and I am satisfied with the result, but found that there are other versions of Python installed in other directories, and can not remember how they were instaldas, it's been five years that use this notebook and perhaps installed by other means a few years.
I tried to remove all referen... |
From the terminal verify if python 3 is installed | 38,485,489 | 4 | 24 | 34,436 | 0 | bash,python-3.x,terminal | execute the following command.
which python3 and check the exit status of the command $?. it will be 0 if user has python 3 installed, 1 otherwise. | 0 | 1 | 0 | 0 | 2016-07-20T15:58:00.000 | 3 | 0.26052 | false | 38,485,373 | 0 | 0 | 0 | 1 | I am writing a shell script, and before the script runs I want to verify that the user has Python 3 installed. Does anyone know or have any ideas of how I could check that, and the output be a boolean value? |
how can i restore the backup.py plugin data of errbot running in a docker container | 38,557,886 | 1 | 2 | 75 | 0 | python,docker,errbot | I think the best if you run Errbot in a container is to run it with a real database for the persistence (redis for example).
Then you can simply run backup.py from anywhere (including your dev machine).
Even better, you can just do a backup of your redis directly. | 0 | 1 | 0 | 0 | 2016-07-20T19:12:00.000 | 1 | 1.2 | true | 38,488,977 | 0 | 0 | 1 | 1 | I'm running errbot in a docker container, we did the !backup and we have the backup.py, but when i start the docker container it just run /app/venv/bin/run.sh
but i cannot pass -r /srv/backup.py to have all my data restored.
any ideas?
all the data is safe since the /srv is a mounted volume |
Pyspark command in terminal launches Jupyter notebook | 38,510,399 | 11 | 2 | 3,753 | 0 | python,pyspark,jupyter,jupyter-notebook | The PYSPARK_DRIVER_PYTHON variable is set to start ipython/jupyter automatically (probably as intended.) Run unset PYSPARK_DRIVER_PYTHON and then try pyspark again.
If you wish this to be the default, you'll probably need to modify your profile scripts. | 0 | 1 | 0 | 0 | 2016-07-20T21:13:00.000 | 1 | 1.2 | true | 38,490,946 | 1 | 0 | 1 | 1 | I have run into an issue with spark-submit , throws an error is not a Jupyter Command i.e, pyspark launches a web ui instead of pyspark shell
Background info:
Installed Scala , Spark using brew on MAC
Installed Conda Python 3.5
Spark commands work on Jupyter Notebook
'pyspark' on terminal launches notebook instead of... |
What will be the Hadoop Streaming Run Command to access the files in the Sub Directory | 38,517,426 | 0 | 0 | 136 | 0 | python,python-2.7,hadoop,hadoop-streaming | Use regular expressions:
inputfile/* - will work for 1 level of sub directories
inputfile/*/* - will work for 2 level of sub directories
Run As:
hadoop jar /usr/hdp/2.3.2.0-2950/hadoop-mapreduce/hadoop-streaming.jar -mapper "python wordcount_mapper.py" -file wordcount_mapper.py -input inputfile/* -output outputfile... | 0 | 1 | 0 | 0 | 2016-07-20T22:11:00.000 | 1 | 1.2 | true | 38,491,716 | 0 | 0 | 0 | 1 | I have written a mapper program in python for hadoop Map-Reduce framework.
And I am executing it through the command:
hadoop jar /usr/hdp/2.3.2.0-2950/hadoop-mapreduce/hadoop-streaming.jar -mapper "python wordcount_mapper.py" -file wordcount_mapper.py -input inputfile -output outputfile3
It is working properly if the ... |
module error in multi-node spark job on google cloud cluster | 38,572,975 | 0 | 0 | 206 | 0 | python-3.x,numpy,pyspark,google-cloud-platform,gcp | Not sure if this qualifies as a solution. I submitted the same job using dataproc on google platform and it worked without any problem. I believe the best way to run jobs on google cluster is via the utilities offered on google platform. The dataproc utility seems to iron out any issues related to the environment. | 0 | 1 | 0 | 0 | 2016-07-21T22:03:00.000 | 1 | 0 | false | 38,515,096 | 0 | 1 | 0 | 1 | This code runs perfect when I set master to localhost. The problem occurs when I submit on a cluster with two worker nodes.
All the machines have same version of python and packages. I have also set the path to point to the desired python version i.e. 3.5.1. when I submit my spark job on the master ssh session. I get ... |
Jenkins with Windows slave with Python - Setting environment variables while building and using them when running a python script | 38,527,694 | 0 | 0 | 766 | 0 | python,jenkins,jenkins-plugins | What I usually do is going on the build output, on the left you will find "Build environment Variables" or something similar and check if you can see them there, but the solution cited on the other SO post works usually for me as well | 0 | 1 | 0 | 0 | 2016-07-22T13:18:00.000 | 1 | 0 | false | 38,527,505 | 0 | 0 | 0 | 1 | I'm currently using a Jenkins build to run a bash command that activates a Python script. The build is parametrised, and i need to be able to set environment variables containing those parameters on the Windows slave to be used by the Python script.
So, my question is: How do i set temporary env. variables for the curr... |
AWS IOT with DynamoDB logging service issue | 38,537,832 | 0 | 1 | 66 | 0 | python,amazon-web-services,amazon-dynamodb,iot | No, it does not. I have done similar setup and it is working fine. Are you sure that your IoT device does not go into some kind of sleep mode after a while ? | 0 | 1 | 0 | 1 | 2016-07-22T13:21:00.000 | 1 | 0 | false | 38,527,573 | 0 | 0 | 1 | 1 | We have implemented a simple DynamoDB database that is updated by a remote IoT device that does not have a user (i.e. root) constantly logged in to the device. We have experience issues in logging data as the database is not updated if a user (i.e. root) is not logged into the device (we log in via a ssh session). We a... |
CGI: Execute python script as root | 38,529,657 | 0 | 0 | 690 | 0 | python,apache,cgi | Have you tried chmod 777 foo.py or chmod +x foo.py? Those are generally the commands used to give file permission to run. | 0 | 1 | 0 | 1 | 2016-07-22T14:57:00.000 | 1 | 0 | false | 38,529,591 | 0 | 0 | 0 | 1 | I'm attempting to execute foo.py from mysite.com/foo.py, however the script requires access to directories that would normally require sudo -i root access first. chmod u+s foo.py still doesn't give the script enough permission. What can I do so the script has root access? Thank you! |
access jupyter notebook running on vm | 57,043,893 | 0 | 9 | 20,157 | 0 | python,vagrant,jupyter-notebook | Looks like that in newer versions of Jupyter the changes that should be done in the configuration is a little different from the above answers (otherwise you can get error "'' does not appear to be an IPv4 or IPv6 address").
The entire solution:
Run:
jupyter notebook --generate-config
Change in the config the bellow:... | 0 | 1 | 0 | 0 | 2016-07-23T18:32:00.000 | 5 | 0 | false | 38,545,198 | 1 | 0 | 0 | 2 | I want to run jupyter notebook running on my ubuntu vm which i fired using vagrant.
$ jupyter notebook --no-browser --port 8004
[I 18:26:10.152 NotebookApp] Serving notebooks from local directory: /home/vagrant/path/to/jupyter/notebook/directory
[I 18:26:10.153 NotebookApp] 0 active kernels
[I 18:26:10.154 NotebookAp... |
access jupyter notebook running on vm | 70,621,757 | 1 | 9 | 20,157 | 0 | python,vagrant,jupyter-notebook | For my case (using VMware with Ubuntu), the solution was very simple.
By default, the network adapter was already in NAT mode. If not, adjust this in the settings of your VM instance.
Type ifconfig in a VM terminal to get your local IP, e.g. 192.168.124.131.
Start the notebook: jupyter notebook --ip=192.168.124.131 --n... | 0 | 1 | 0 | 0 | 2016-07-23T18:32:00.000 | 5 | 0.039979 | false | 38,545,198 | 1 | 0 | 0 | 2 | I want to run jupyter notebook running on my ubuntu vm which i fired using vagrant.
$ jupyter notebook --no-browser --port 8004
[I 18:26:10.152 NotebookApp] Serving notebooks from local directory: /home/vagrant/path/to/jupyter/notebook/directory
[I 18:26:10.153 NotebookApp] 0 active kernels
[I 18:26:10.154 NotebookAp... |
How to find which version of TensorFlow is installed in my system? | 62,434,345 | 1 | 367 | 1,109,737 | 0 | python,ubuntu,tensorflow,command-line,version | Another variation, i guess :P
python3 -c 'print(__import__("tensorflow").__version__)' | 0 | 1 | 0 | 0 | 2016-07-24T06:06:00.000 | 18 | 0.011111 | false | 38,549,253 | 0 | 0 | 0 | 3 | I need to find which version of TensorFlow I have installed. I'm using Ubuntu 16.04 Long Term Support. |
How to find which version of TensorFlow is installed in my system? | 62,218,233 | 2 | 367 | 1,109,737 | 0 | python,ubuntu,tensorflow,command-line,version | If you have TensorFlow 2.x:
sess = tf.compat.v1.Session(config=tf.compat.v1.ConfigProto(log_device_placement=True)) | 0 | 1 | 0 | 0 | 2016-07-24T06:06:00.000 | 18 | 0.022219 | false | 38,549,253 | 0 | 0 | 0 | 3 | I need to find which version of TensorFlow I have installed. I'm using Ubuntu 16.04 Long Term Support. |
How to find which version of TensorFlow is installed in my system? | 55,177,324 | 4 | 367 | 1,109,737 | 0 | python,ubuntu,tensorflow,command-line,version | Easily get KERAS and TENSORFLOW version number -->
Run this command in terminal:
[username@usrnm:~] python3
>>import keras; print(keras.__version__)
Using TensorFlow backend.
2.2.4
>>import tensorflow as tf; print(tf.__version__)
1.12.0 | 0 | 1 | 0 | 0 | 2016-07-24T06:06:00.000 | 18 | 0.044415 | false | 38,549,253 | 0 | 0 | 0 | 3 | I need to find which version of TensorFlow I have installed. I'm using Ubuntu 16.04 Long Term Support. |
Celery: How to get the task completed time from AsyncResult | 38,587,766 | 1 | 1 | 696 | 0 | python,celery | You can get it from the _cache object of the AsyncResult after you have called res.result
for example
res._cache['date_done'] | 0 | 1 | 0 | 0 | 2016-07-26T09:59:00.000 | 1 | 1.2 | true | 38,586,767 | 0 | 0 | 1 | 1 | I need to trace the status for the tasks. i could get the 'state', 'info' attribute from the AsyncResult obj. however, it looks there's no way to get the 'done_date'. I use MySQL as result backend so i could find the date_done column in the taskmeta table, but how could i get the task done date directly from AysncResul... |
Unable to submit python files to HTCondor- placed in 'held' | 38,618,691 | 0 | 0 | 197 | 1 | python,ubuntu | Update, managed to solve my problem. I needed to make sure that all directory paths were correct as I found that HTCondor was looking within its own files for the resources my submission program used. I therefore needed to define a variable in the .py file that contains the directory to the resource | 0 | 1 | 0 | 0 | 2016-07-26T15:03:00.000 | 1 | 0 | false | 38,593,488 | 0 | 0 | 0 | 1 | I am attempting to run a python 2.7 program on HTCondor, however after submitting the job and using 'condor_q' to assess the job status, I see that the job is put in 'held'.
After querying using 'condor_q -analyse jobNo.' the error message is "Hold reason: Error from Ubuntu: Failed to execute '/var/lib/condor/execute/... |
Unexpected socket.getaddrinfo behavior in Python using SOCK_STREAM | 38,660,201 | 0 | 0 | 175 | 0 | python,sockets,python-3.x,getaddrinfo | socket.SOCK_STREAM should be passed in the type field. Using it in the proto field probably has a very random effect, which is what you're seeing. Proto only takes the IPPROTO constants. For a raw socket, you should use type = socket.SOCK_RAW. I'm not sure getaddrinfo supports that though, it's mostly for TCP and UDP.
... | 0 | 1 | 1 | 0 | 2016-07-26T15:14:00.000 | 1 | 0 | false | 38,593,744 | 0 | 0 | 0 | 1 | I'm busy trying to use socket.getaddrinfo() to resolve a domain name. When I pass in:
host = 'www.google.com', port = 80, family = socket.AF_INET, type = 0, proto = 0, flags = 0
I get a pair of socket infos like you'd expect, one with SocketKind.SOCK_DGRAM (for UDP) and and the other with SocketKind.SOCK_STREAM (TCP)... |
Anaconda3 install PATH issue | 38,609,999 | 0 | 0 | 3,692 | 0 | python,ubuntu,path,anaconda | Fixed the issue with a simple restart. Still not sure where the original PATH without the 3 in it came from as I hadn't restarted before. | 0 | 1 | 0 | 0 | 2016-07-27T09:52:00.000 | 1 | 0 | false | 38,609,561 | 1 | 0 | 0 | 1 | ISSUE FIXED: Restart fixed the issue.
I've just finished installing Anaconda3 on Ubuntu 16.04. It automatically added the following line to .bashrc.
export PATH="/home/username/anaconda3/bin:$PATH"
However when I run python I still get the default python 2 version.
printenv PATH
gives me
/home/username/anaconda/bi... |
How to run a Python script without Windows console appearing | 62,245,111 | 0 | 4 | 15,470 | 0 | python,windows | The simple answer is to copy the "LazyLibrarian.py" to "LazyLibraryian.pyw" and create a shortcut to Desktop. Then put the shortcut in your startup folder. | 0 | 1 | 0 | 0 | 2016-07-27T12:07:00.000 | 4 | 0 | false | 38,612,509 | 1 | 0 | 0 | 1 | Is there any way to run a Python script without a command shell momentarily appearing?
Naming my files with the ".pyw" extension doesn't work. |
cx_freeze freezed python program doesn't run - no time to see the error message on executing | 38,618,295 | 0 | 0 | 205 | 0 | python,cx-freeze | Executing the exe from the console works out fine. Thanks. | 0 | 1 | 0 | 1 | 2016-07-27T14:42:00.000 | 1 | 0 | false | 38,616,200 | 0 | 0 | 0 | 1 | so I made that python program using several module including os, zipfile, time, datetime, shutil, shelve and ftplib. I froze it with cx_freeze, it won't run on the target machine (but it run on mine). I'm super new to cx_freeze, but I've poked around a bit and I suspect it's a module ot found error. Trouble is, when I ... |
Using command line args from different files in python | 38,621,007 | 2 | 0 | 275 | 0 | python,command-line-arguments | As for the how/why, sys is only imported once (when python starts up). When sys is imported, it's argv member gets populated with the commandline arguements. Subsequent import statements return the same sys module object so no matter where you import sys from, you'll always get the same object and therefore sys.argv ... | 0 | 1 | 0 | 0 | 2016-07-27T18:46:00.000 | 1 | 1.2 | true | 38,620,899 | 1 | 0 | 0 | 1 | I recently discovered (Much to my surprised) you can call command line args in files other than the one that is explicitly called when you enter it.
So, you can run python file1.py abc in command line, and use sys.argv[1] to get the string 'abc' from within file2.py or file3.py.
I still feel like this shouldn't work, ... |
Maven build with Java: How to execute script located in resources? | 38,622,730 | 1 | 1 | 1,406 | 0 | java,python,shell,maven | The maven path for all the artifacts is not the same that gets generated when you run it or export the project. You can check this by exporting the project as Jar/War/Ear file and viewing it via winRAR or any other tool.
The resources should be in jar parallel to com directory if its a jar project, but you can double c... | 0 | 1 | 0 | 0 | 2016-07-27T20:22:00.000 | 1 | 0.197375 | false | 38,622,523 | 0 | 0 | 1 | 1 | I am building my Java project with Maven and I have a script file that ends up in the target/classes/resources folder. While I can access the file itself via this.getClass.getResource("/lookUpScript.py").getPath(), I cannot execute a shell command with "." + this.getClass.getResource("/lookUpScript.py").getPath(); this... |
What does "== RESTART ==" in the IDLE Shell mean? | 38,867,924 | 0 | 1 | 17,105 | 0 | python,python-idle | The same thing is happening with my shell. In the older versions, this does not happen. I've also noticed that when I press Python 3.5.2 Module Docs, I have my Internet browser open up and I see my directory being displayed onscreen. It looks like:
C:\Users\mycomputername\AppData\Local\Programs\Python\Python35-32\DLLs.... | 0 | 1 | 0 | 0 | 2016-07-28T05:07:00.000 | 4 | 0 | false | 38,627,504 | 1 | 0 | 0 | 4 | I have a simple script I wrote, and when trying to run it (F5) , I get this msg:
================== RESTART: C:\Users\***\Desktop\tst.py ==================
I restarted the shell, reopened the script, but still, the same msg appears.
I use python 3.5.1 and I tried to simplify the script as much as possible, but I stil... |
What does "== RESTART ==" in the IDLE Shell mean? | 38,627,619 | 1 | 1 | 17,105 | 0 | python,python-idle | I have a simple script I wrote, and when trying to run it (F5)
That's the hotkey for IDLE to run a file. It is not ordering to do anything. It's a log statement to explicitly declare that your namespace is being cleared and the file is going to be ran fresh again.
no, I didn't tell it to restart
But you did... You... | 0 | 1 | 0 | 0 | 2016-07-28T05:07:00.000 | 4 | 1.2 | true | 38,627,504 | 1 | 0 | 0 | 4 | I have a simple script I wrote, and when trying to run it (F5) , I get this msg:
================== RESTART: C:\Users\***\Desktop\tst.py ==================
I restarted the shell, reopened the script, but still, the same msg appears.
I use python 3.5.1 and I tried to simplify the script as much as possible, but I stil... |
What does "== RESTART ==" in the IDLE Shell mean? | 57,694,797 | 0 | 1 | 17,105 | 0 | python,python-idle | CIsForCookies, my guess is that you don't actually have a complete script; maybe you have just a function definition and you haven't included a line to run that function. (I had this problem and then remembered to call the function I defined; the problem went away.) | 0 | 1 | 0 | 0 | 2016-07-28T05:07:00.000 | 4 | 0 | false | 38,627,504 | 1 | 0 | 0 | 4 | I have a simple script I wrote, and when trying to run it (F5) , I get this msg:
================== RESTART: C:\Users\***\Desktop\tst.py ==================
I restarted the shell, reopened the script, but still, the same msg appears.
I use python 3.5.1 and I tried to simplify the script as much as possible, but I stil... |
What does "== RESTART ==" in the IDLE Shell mean? | 64,823,524 | 0 | 1 | 17,105 | 0 | python,python-idle | You may have made the same mistake as me and ran a program and then you wonder why RESTART is all that shows up. My program was working perfectly I just did not print anything or ask for any input so it ran and was done with the program and nothing showed up. | 0 | 1 | 0 | 0 | 2016-07-28T05:07:00.000 | 4 | 0 | false | 38,627,504 | 1 | 0 | 0 | 4 | I have a simple script I wrote, and when trying to run it (F5) , I get this msg:
================== RESTART: C:\Users\***\Desktop\tst.py ==================
I restarted the shell, reopened the script, but still, the same msg appears.
I use python 3.5.1 and I tried to simplify the script as much as possible, but I stil... |
What's the advantage of making your appengine app thread safe? | 38,665,116 | 0 | 1 | 171 | 0 | python,multithreading,google-app-engine | Multithreading is not related to billing in any way - you still pay for one instance even if 10 threads are running in parallel on that instance. | 0 | 1 | 0 | 0 | 2016-07-29T17:54:00.000 | 1 | 0 | false | 38,664,788 | 0 | 0 | 1 | 1 | I have an appserver that is getting painfully complicated in that it has to buffer data from incoming requests then push those buffers out, via pubsub, after enough has been received. The buffering isn't the problem, but efficient locking is... hairy, and I'm concerned that it's slowing down my service. I'm considering... |
Can I use Hendrix to run Falcon app? | 38,676,247 | 2 | 2 | 52 | 0 | python,tornado,wsgi,falcon,hendrix | So found the solution. Created a python file according to hendrix's docs. And imported my app's wsgi callable there. | 0 | 1 | 0 | 0 | 2016-07-30T11:42:00.000 | 1 | 0.379949 | false | 38,673,550 | 0 | 0 | 1 | 1 | Hendrix is a WSGI compatible server written in Tornado. I was wondering if it can be used to run an app written in Falcon ? |
Where is python folder? Python install problems | 38,686,576 | 0 | 0 | 2,715 | 0 | python,installation | You may try to use which python to find out the location of python in your computer. If it doesn't work and you cannot find where is the your installed directory, you may need to reinstall and make sure you remember the installation directory and add it as a environment variable in windows system. | 0 | 1 | 0 | 0 | 2016-07-31T17:14:00.000 | 3 | 0 | false | 38,686,493 | 1 | 0 | 0 | 2 | I have installed Python 3.5.2 on my windows 8 computer, I tried in cmd python --version and it gave me that stupid error:
"python is not recognized as an internal or external command..."
I also have no files named python on my computer anywhere. I used the search feature on file explorer and I've search manually. I ev... |
Where is python folder? Python install problems | 38,686,608 | 4 | 0 | 2,715 | 0 | python,installation | In Windows 8 for Python 3.* I believe it is:
C:\Users\yourusername\AppData\Local\Programs\Python\
To use that from the Windows command line you will need to add it to your path.
Control Panel -> Advanced System Settings -> Environment Variables -> System Variables -> Path
Add in the Python path at the end after a sem... | 0 | 1 | 0 | 0 | 2016-07-31T17:14:00.000 | 3 | 1.2 | true | 38,686,493 | 1 | 0 | 0 | 2 | I have installed Python 3.5.2 on my windows 8 computer, I tried in cmd python --version and it gave me that stupid error:
"python is not recognized as an internal or external command..."
I also have no files named python on my computer anywhere. I used the search feature on file explorer and I've search manually. I ev... |
Django: Know when a file is already saved after usign storage.save() | 38,701,216 | 0 | 0 | 49 | 0 | python,django,amazon-web-services,amazon-s3 | No magic solution here. You have to manage states on your model, specially when working with celery tasks. You might need another field called state with the states: NONE (no action is beeing done), PROCESSING (task was sent to celery to process) and DONE (image was rotated)
NONE is the default state. you should set th... | 0 | 1 | 0 | 0 | 2016-08-01T13:15:00.000 | 1 | 0 | false | 38,699,927 | 0 | 0 | 1 | 1 | So I've a Django model which has a FileField. This FileField, contains generally an image. After I receipt the picture from a request, I need to run some picture analysis processes.
The problem is that sometimes, I need to rotate the picture before running the analysis (which runs in celery, loading the model again ge... |
Send commands to running script by running it with flags | 38,707,485 | 1 | 0 | 1,144 | 0 | python,subprocess,command-line-arguments | There are two things this needs to do: you need to handle command-line flags, and you need to send signals to another process. For the flags, you could use the argparse library, or simply sys.argv.
For sending signals, you will need the Process ID (pid) of the already running process. Under Linux you can call ps, and c... | 0 | 1 | 0 | 0 | 2016-08-01T20:14:00.000 | 2 | 0.099668 | false | 38,707,350 | 0 | 0 | 0 | 1 | I'm trying to make a python script run in the background, and listen to commands. For example if I run my script:
python my_script.py it will start running (and wait for commands).
Then I wish to run:
python my_script.py --do_something, open a different python process, and it will run a function do_something() in the p... |
Service inside docker container stops after some time | 38,712,037 | 1 | 0 | 1,799 | 0 | python,rest,nginx,docker | Consider doing a docker ps -a to get the stopped container's identifier.
-a here just means listing all of the containers you got on your machine.
Then do docker inspect and look for the LogPath attribute.
Open up the container's log file and see if you could identify the root cause on why the process died inside the ... | 0 | 1 | 0 | 0 | 2016-08-02T04:14:00.000 | 1 | 0.197375 | false | 38,711,658 | 0 | 0 | 1 | 1 | I have deployed a rest service inside a docker container using uwsgi and nginx.
When I run this python flask rest service inside docker container, for first one hour service works fine but after sometime somehow nginx and rest service stops for some reason.
Has anyone faced similar issue?
Is there any know fix for this... |
Google App Engine - run task on publish | 38,742,762 | 0 | 1 | 66 | 0 | python,google-app-engine | The main question will be how to ensure it only runs once for a particular version.
Here is an outline on how you might approach it.
You create a HasRun module, which you use store each the version of the deployed app and this indicates if the one time code has been run.
Then make sure you increment your version, when... | 0 | 1 | 0 | 0 | 2016-08-02T14:46:00.000 | 2 | 0 | false | 38,723,681 | 0 | 0 | 1 | 2 | I have been looking for a solution for my app that does not seem to be directly discussed anywhere. My goal is to publish an app and have it reach out, automatically, to a server I am working with. This just needs to be a simple Post. I have everything working fine, and am currently solving this problem with a cron job... |
Google App Engine - run task on publish | 38,794,445 | 2 | 1 | 66 | 0 | python,google-app-engine | Personally, this makes more sense to me as a responsibility of your deploy process, rather than of the app itself. If you have your own deploy script, add the post request there (after a successful deploy). If you use google's command line tools, you could wrap that in a script. If you use a 3rd party tool for somethin... | 0 | 1 | 0 | 0 | 2016-08-02T14:46:00.000 | 2 | 0.197375 | false | 38,723,681 | 0 | 0 | 1 | 2 | I have been looking for a solution for my app that does not seem to be directly discussed anywhere. My goal is to publish an app and have it reach out, automatically, to a server I am working with. This just needs to be a simple Post. I have everything working fine, and am currently solving this problem with a cron job... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.