Title
stringlengths
15
150
A_Id
int64
2.98k
72.4M
Users Score
int64
-17
470
Q_Score
int64
0
5.69k
ViewCount
int64
18
4.06M
Database and SQL
int64
0
1
Tags
stringlengths
6
105
Answer
stringlengths
11
6.38k
GUI and Desktop Applications
int64
0
1
System Administration and DevOps
int64
1
1
Networking and APIs
int64
0
1
Other
int64
0
1
CreationDate
stringlengths
23
23
AnswerCount
int64
1
64
Score
float64
-1
1.2
is_accepted
bool
2 classes
Q_Id
int64
1.85k
44.1M
Python Basics and Environment
int64
0
1
Data Science and Machine Learning
int64
0
1
Web Development
int64
0
1
Available Count
int64
1
17
Question
stringlengths
41
29k
Python celery - tuples in arguments converted to lists
35,532,031
1
4
951
0
python,redis,celery
If you need to preserve the python native data structure I'd recommend using one of the serialization modules such a cPickle which will preserve the data structure but won't be readable outside of Python.
0
1
0
0
2016-02-19T20:16:00.000
2
1.2
true
35,514,183
1
0
0
1
I noticed this when using the delay() function to asynchronously send tasks. If I queue a task such as task.delay(("tuple",)), celery will store the argument as ["tuple"] and later the function will get the list back and not the tuple. Guessing this is because the data is being stored into json. This is fine for tuple...
Mulitple Python Consumer Threads on a Single Partition with Kafka 0.9.0
35,533,318
1
0
793
0
apache-kafka,kafka-python
I'm actually not sure for Kafka 0.9, haven't yet had the need to go over the new design thoroughly, but AFAIK this wasn't possible in v8. It certainly wasn't possible with the low-level consumer, but I also think that, if you assign more threads than you have partitions in the high-level consumer, only one thread per p...
0
1
0
0
2016-02-19T23:18:00.000
1
1.2
true
35,516,849
0
0
0
1
For context, I am trying to transfer our python worker processes over to a kafka (0.9.0) based architecture, but I am confused about the limitations of partitions with respect to the consumer threads. Will having multiple consumers on a partition cause the other threads on the same partition to wait for the current thr...
Django deployed project not running subprocess shell command
35,524,148
4
1
309
0
python,django,shell,subprocess,gunicorn
1) User who runs gunicorn has no permissions to run .sh files 2) Your .sh file has no rights to be runned 3) Try to user full path to the file Also, which error do you get when trying to run it on the production?
0
1
0
0
2016-02-20T13:37:00.000
1
1.2
true
35,524,022
0
0
1
1
I have a django 1.9 project deployed using gunicorn with a view contains a line subprocess.call(["xvfb-run ./stored/all_crawlers.sh "+outputfile+" " + url], shell=True, cwd= path_to_sh_file) which runs fine with ./manage.py runserver but fails on deployment and (deployed with gunicorn and wsgi). Any Suggestion how ...
Is there any way for lsof to show the entire argv array instead of just argv[0]
35,546,294
1
3
150
0
python,unix,lsof
If you know the PID (eg. 12345) of the process, you can determine the entire argv array by reading the special file /proc/12345/cmdline. It contains the argv array separated by NUL (\0) characters.
0
1
0
0
2016-02-22T02:39:00.000
1
0.197375
false
35,544,961
0
0
0
1
I currently have a python script that accomplishes a very useful task in a large network. What I do is use lsof -iTCP -F and a few other options to dump all listening TCP sockets. I am able to get argv[0], this is not a problem. But to get the full argv value, I need to then run a ps, and map the PIDs together, and the...
Celery worker not consuming task and not retrieving results
47,490,225
0
0
1,693
0
python,celery
Regarding the AttributeError message, adding a backend config setting similar to below should help resolve it: app = Celery('tasks', broker='pyamqp://guest@localhost//', backend='amqp://')
0
1
0
0
2016-02-22T18:32:00.000
2
0
false
35,561,176
0
0
0
1
I'm using Celery with RabbitMQ as the broker and redis as the result backend. I'm now manually dispatching tasks to the worker. I can get the task IDs as soon as I sent the tasks out. But actually Celery worker did not work on them. I cannot see the resulted files on my disk. And later when I want to use AsyncResult to...
Websocket client on linux cuts off response after 8192 bytes
37,220,484
0
1
91
0
python,linux,sockets
So it turns out the problem came from the provided websocket module from google cloud sdk. It has a bug where after 8192 bytes it will not continue to read from the socket. This can be fixed by supplying the websocket library maintained by Hiroki Ohtani earlier on your PYTHONPATH than the google cloud sdk.
0
1
1
0
2016-02-23T01:14:00.000
1
1.2
true
35,567,020
0
0
0
1
I've created a docker image based on Ubuntu 14.04 which runs a python websocket client to read from a 3rd party service that sends variable length JSON encoded strings down. I find that the service works well until the encoded string is longer than 8192 bytes and then the JSON is malformed, as everything past 8192 byte...
Is Python support for FreeBSD as good as for say CentOS/Ubuntu/other linux flavors?
35,946,582
2
5
982
0
python,pip,freebsd
The assumption that powerful and high-profile existing python tools use a lot of different python packages almost always holds true. We use FreeBSD in our company for quite some time together with a lot of python based tools (web frameworks, py-supervisor, etc.) and we never ran into the issue that a certain tool would...
0
1
0
1
2016-02-23T07:59:00.000
2
0.197375
false
35,571,862
0
0
0
1
The development environment, we use, is FreeBSD. We are evaluating Python for developing some tools/utilities. I am trying to figure out if all/most python packages are available for FreeBSD. I tried using a CentOS/Ubuntu and it was fairly easy to install python as well as packages (using pip). On FreeBSD, it was not ...
GDB Error Installation error: gdb.execute_unwinders function is missing
47,475,156
12
14
10,678
0
python-2.7,debugging,gdb
I have the same, with gdb 8.0.1 compiled on Ubunutu 14.04 LST. Turns out the installation misses the necessary Python files. One indication was that "make install" stopped complaining about makeinfo being missing - although I did not change any of the .texi sources. My fix was to go into into the build area, into gdb/d...
0
1
0
0
2016-02-23T10:49:00.000
2
1.2
true
35,575,425
1
0
0
1
I have suddenly started seeing this message on nearly every GDB output line whilst debugging: Python Exception Installation error: gdb.execute_unwinders function is missing What is this? How do I rectify it?
cannot import yaml on mac
35,584,960
1
1
2,463
0
python,import,module,pyyaml
You should be able to run import yaml if you installed pyyaml. Did you try pip install pyyaml?
0
1
0
0
2016-02-23T17:56:00.000
2
0.099668
false
35,584,780
1
0
0
2
The software I have requires yaml, based on the import yaml at the top. I installed pyyaml on the mac I am using and it still threw the import error. I tried to change the code in the program to import pyyaml but that still didn't help. Any idea what the module is called to import it? If you need more information just ...
cannot import yaml on mac
56,364,791
-1
1
2,463
0
python,import,module,pyyaml
For python2: sudo yum install python-yaml For python3: sudo yum install python3-yaml
0
1
0
0
2016-02-23T17:56:00.000
2
1.2
true
35,584,780
1
0
0
2
The software I have requires yaml, based on the import yaml at the top. I installed pyyaml on the mac I am using and it still threw the import error. I tried to change the code in the program to import pyyaml but that still didn't help. Any idea what the module is called to import it? If you need more information just ...
Python multiprocessing pool number of jobs not correct
35,588,384
0
1
1,011
0
python,parallel-processing,multiprocessing,pool
Python, before starts the execution of the process that you specify in applyasync/asyncmap of Pool, assigns to each worker a piece of the work. For example, lets say that you have 8 files to process and you start a Pool with 4 workers. Before starting the file processing, two specific files will be assigned to each w...
0
1
0
0
2016-02-23T21:06:00.000
2
0
false
35,588,159
1
0
0
1
I wrote a python program to launch parallel processes (16) using pool, to process some files. At the beginning of the run, the number of processes is maintained at 16 until almost all files get processed. Then, for some reasons which I don't understand, when there're only a few files left, only one process runs at a ti...
GVIM crashes when running python
35,620,795
10
7
1,440
0
python,vim,crash
Finally solved the problem. It turned out that Python uses PYTHONPATH variable to resolve the PYTHON folder (used to load python libraries and so on). Here is the default value for Python 2.7: C:\Python27\Lib;C:\Python27\DLLs;C:\Python27\Lib\lib-tk The variable can be set using one of the following: 1. Windows registry...
0
1
0
1
2016-02-24T08:41:00.000
2
1.2
true
35,597,157
0
0
0
1
I cannot use python in GVIM. When I type: :python print 1 it just closes GVIM without any message. I triend to run it with -V90logfile but I couldn't find any information about the crash. GVIM is compiled with python (:version shows +python/dyn +python3/dyn). GVIM version: 7.3.46 (32 bit with OLE). Python version: 2.7....
Django virtual environment disaster
35,637,631
2
1
108
0
python,django,bash
I assume you're using virtualenv. If so, do you know where it put the bin directory? If so, run source bin/activate. After that, when you try runserver, it should use the correct Python instance. More complete: source /path/to/bin/activate But I typically run source bin/activate from the directory that contains the ...
0
1
0
0
2016-02-25T20:20:00.000
2
0.197375
false
35,637,516
0
0
1
1
I am working on a django app on my macbook with Yosemite. My app was in a virtual environment. I restarted my terminal and when I cd'd to my app it was no longer in the virtual environment and now doesn't run. And all my virtual environment commands give me -bash: command not found. I fully recognize this is a very noo...
Python Code Line Endings
35,639,400
1
1
885
0
python,line-endings
In general newlines (as typically used in Linux) are more portable than carriage return and then newline (as used in Windows). Note also that if you store your code on GitHub or another Git repository, it will convert it properly without you having to do anything.
0
1
0
0
2016-02-25T22:06:00.000
1
0.197375
false
35,639,333
1
0
0
1
Which line endings should be used for platform independent code (not file access)? My next project must run on both Windows and Linux. I wrote code on Linux and used Hg to clone to Windows and it ran fine with Linux endings. The downside is that if you open the file in something other than a smart editor the line endin...
Using homebrew to install pyinstaller
36,139,384
9
1
3,559
0
python,python-2.7,homebrew,pyinstaller
The pyinstaller docs are poorly worded and you may be misunderstanding their meaning. PyInstaller works with the default Python 2.7 provided with current Mac OS X installations. However, if you plan to use a later version of Python, or if you use any of the major packages such as PyQt, Numpy, Matplotlib, Scipy, ...
0
1
0
0
2016-02-26T17:48:00.000
1
1.2
true
35,658,436
1
0
0
1
I am using python 2.7.0 and pygame 1.9.1, on OS X 10.10.5. The user guide for PyInstaller dictates that Mac users should use Homebrew, and I have it installed. I used it to install both Python and Pygame. But 'brew install PyInstaller' produces no formulae at all when typed into Terminal! So how can I use homebrew to i...
Python script with -m completes but errors out at very end
35,659,549
4
1
25
0
python,virtualenv
cron.knightly.py is not what you want. Python modules do not end with .py. Just as you wouldn't import math.py, you don't run python -m something.py. Change it to python -m cron.nightly
0
1
0
0
2016-02-26T18:50:00.000
1
1.2
true
35,659,462
1
0
0
1
I run a script with inside a virtual environment like so: python -m cron.nightly.py Everything runs fine, but after the last line completes, I get an error: /Users/user/.virtualenvs/vrn/bin/python: No module named cron.nightly.py Which is fine, except that because the script doesn't exit with a 0 (I think) every time i...
Uninstall different versions of python
35,667,217
-2
4
2,491
0
python,python-2.7,python-3.x,anaconda
You can try going to: /Library/Python and manually delete the versions you do not want. This isn't recommended though.
0
1
0
0
2016-02-27T07:50:00.000
2
-0.197375
false
35,667,182
1
0
0
1
I made a mistake and installed many different versions of python on my linux machine. I installed all the versions of python with the help of anaconda. My default python version shows 2.7.11. Now I want to remove all the versions of python and its dependencies from my linux system. What should I do?
Cannot upgrade pip in cygwing running on Windows 10: /usr/bin/python: No module named pip
39,111,999
0
1
136
0
python,cygwin,pip
Likely you don't need the python -m part. If pip is in your path, then just typing pip install --upgrade pip should work. Where is pip installed? which pip will tell you where it's located, if it's in your path
0
1
0
0
2016-02-28T18:31:00.000
1
0
false
35,686,522
1
0
0
1
In cygwin I can't upgrade pip, it worked find in cmd: $ python -m pip install --upgrade pip /usr/bin/python: No module named pip
.sh started by cron does not create file via python
35,688,902
0
1
43
0
python,shell,cron
Difficult to answer without more colour on your environment. Here's how to solve this though: do not redirect your output to /dev/null. Then read in your cron log what happened. It seems very likely that your script fails, and therefore does not return anything to standard out, so does not create a file. I highly suspe...
0
1
0
1
2016-02-28T21:37:00.000
1
0
false
35,688,599
0
0
0
1
I have this .sh which starts a python file. This python file generates a .txt when started via the commandline with sudo but doesn't when started via the .sh Why doesn't the pyhton file give me a .txt when started with the cron and .sh? When I use su -c "python /var/www/html/readdht.py > /var/www/html/dhtdata.txt" 2>&1...
How to check if it is a file or folder for an archive in python?
35,690,298
0
7
20,515
0
python,zip,archive
I got the answer. It is that we can use two commands: archive.getall_members() and archive.getfile_members(). We iterate over each of them and store the file/folder names in two arrays a1(contains file/folder names) and a2(contains file names only). If both the arrays contain that element, then it is a file otherwise ...
0
1
0
0
2016-02-29T00:19:00.000
4
0
false
35,690,072
1
0
0
1
I have an archive which I do not want to extract but check for each of its contents whether it is a file or a directory. os.path.isdir and os.path.isfile do not work because I am working on archive. The archive can be anyone of tar,bz2,zip or tar.gz(so I cannot use their specific libraries). Plus, the code should work ...
Celery task history
38,764,411
5
5
4,109
0
python,celery,flower
You can use the persisent option,eg: flower -A ctq.celery --persistent=True
0
1
0
0
2016-03-01T15:32:00.000
2
0.462117
false
35,726,948
0
0
1
1
I am building a framework for executing tasks on top of Celery framework. I would like to see the list of recently executed tasks (for the recent 2-7 days). Looking on the API I can find app.backend object, but cannot figure out how to make a query to fetch tasks. For example I can use backends like Redis or database. ...
Trying to install PyAudio on OS X ( 10.11.3)
35,867,245
2
2
345
0
python,macos,pip,homebrew,pyaudio
You can try export MACOSX_DEPLOYMENT_TARGET='desired value' in Terminal just before you run the installation process.
0
1
0
0
2016-03-02T14:39:00.000
2
1.2
true
35,750,276
0
0
0
1
I used brew to install port audio. I then tried pip install pyaudio. I get: error: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.9" but "10.11" during configure How can I set the MACOSX_DEPLOYMENT_TARGET so that I don't get this error?
Conversion from UNIX time to timestamp starting in January 1, 2000
35,763,677
3
9
13,703
0
python,datetime,unix,timestamp,epoch
Well, there are 946684800 seconds between 2000-01-01T00:00:00Z and 1970-01-01T00:00:00Z. So, you can just set a constant for 946684800 and add or subtract from your Unix timestamps. The variation you are seeing in your numbers has to do with the delay in sending and receiving the data, and could also be due to clock ...
0
1
0
1
2016-03-03T04:42:00.000
5
0.119427
false
35,763,357
0
0
0
1
I am trying to interact with an API that uses a timestamp that starts at a different time than UNIX epoch. It appears to start counting on 2000-01-01, but I'm not sure exactly how to do the conversion or what the name of this datetime format is. When I send a message at 1456979510 I get a response back saying it was re...
How can I remotely update a python script
35,783,966
0
0
214
0
python
A very good solution would be to build a web app. You can use django, bottle or flask for example. Your users just connect to your url with a browser. You are in complete control of the code, and can update whenever you want without any action on their part. They also do not need to install anything in the first place,...
0
1
0
0
2016-03-03T21:59:00.000
1
0
false
35,783,883
1
0
0
1
How can I update a python script remotely. I have a program which I would like to share, however it will be frequently updates, therefore I want to be able to remotely update it so that the users do not have to re-install it every day. I have already searched StackOverflow for an answer but I did not find anything I co...
Managing OpenCV python Cmake Studio Windows
35,806,266
1
0
102
0
python,visual-studio,opencv,cmake,cmake-gui
You should look for Python related variables in the CMake GUI. There may be some variables you could set to force paths to the python2.7 interpreter, libs and include dirs.
1
1
0
0
2016-03-04T20:58:00.000
1
0.197375
false
35,805,904
0
0
0
1
Recently , I wanted to install OpenCV (in Win10 64 bit ) using Cmake 3.5.0-rc3 and Visual studio 2015 . I have python 3.5 as root and 2.7 as python2 . The issue is while configuring it recognizes python 3.5 as main interpreter but i want it to be 2.7.Is there a possible way to make cmake recognize 2.7 as my main pyth...
Python hide already printed text
35,813,975
0
1
6,322
0
python,python-3.x,new-window,tui
You may not like this, it's a bit higher level than a basic two player board game, but there is always using some sort of GUI. I personally like tkinter myself. You don't want the option of people scrolling up to see printed text, but you can't remove what has been printed, that's like asking a printer to remove ink of...
0
1
0
0
2016-03-05T11:43:00.000
4
0
false
35,813,667
1
0
0
1
I'm creating a simple two-player board game where each player must place pieces on their own boards. What I would like to do is by either: opening a new terminal window (regardless which OS the program is run on) for both players so that the board is saved within a variable but the other player cannot scroll up to see...
Run python program on startup in background on Intel Galileo
35,972,324
1
2
259
0
python,linux,startup,intel-galileo
I made the myprogram.py run in background with python myprogram.py & and it worked. The & is used to run whatever process you want in background.
0
1
0
1
2016-03-05T18:26:00.000
1
1.2
true
35,818,003
0
0
0
1
I have a python program that is an infinity loop and send some data to my database. I want this python script to run when I power my Intel Galileo. I tried to make a sh script python myprogram.py and made it run on startup in etc/init.d. When I restarted my Galileo, nothing happened-Linux didn't load, Arduino sketch di...
Choosing between Python 2(.7.x) and Python 3(.5.x)
35,860,000
1
0
102
0
python,linux,scripting
use python 3. the number of packages that don't support python 3 is shrinking every day, and the vast majority of large/important frameworks out there already support both. there are even some projects which have dropped python 2 entirely, albeit those tend not to be large (since enterprise inertia tends to hold proj...
0
1
0
0
2016-03-08T05:07:00.000
3
0.066568
false
35,859,441
1
0
0
1
I am a Java developer with more than 10 years of experience. I started using python few months back when I had a requirement to create a script which pulls data from a REST service and then generates a report using this data. The fact that python is a multi purpose language (scripting, web applications, REST services ...
how to manually install the locally compiled python library (shared python library) to system?
35,872,702
0
0
170
0
python,linux,ubuntu,installation,environment-variables
Try installing the 2.7 version : apt-get install python2.7-dev
0
1
0
0
2016-03-08T16:24:00.000
1
0
false
35,872,623
1
0
0
1
I have the newest version of python (2.7.11) installed on my home director. To compile the YouCompleteMe plugin, I need the python-dev to be installed. However, the global python of my environment is 2.7.11, which means that if I install python-dev via apt-get, it would incompatible with python 2.7.11, because it is us...
How to make a Python script run a powershell script after it executes
35,894,316
3
0
163
0
python
Instead of calling the Powershell script from inside the Python script, you should run both the scripts using the task scheduler itself. Assuming that the command you gave to the scheduler was something like python script.py, you should change it to cmd_script.cmd where the contents of the cmd_script.cmd would be pyt...
0
1
0
0
2016-03-09T14:19:00.000
1
1.2
true
35,894,125
0
0
0
1
I have two scripts one is Python based and other is powershell based. My requirement is that I need to first run the Python script and then the powershell script on startup. Using Task Scheduler I can run the Python script but I need to find a way to run powershell script after the python script finishes. Some research...
Windows Task Scheduler running Python script: how to prevent taskeng.exe pop-up?
35,901,175
5
3
3,605
0
python,windows,scheduled-tasks
Simply save your script with .pyw extension. As far as I know, .pyw extension is the same as .py, only difference is that .pyw was implemented for GUI programs and therefore console window is not opened. If there is more to it than this I wouldn't know, perhaps somebody more informed can edit this post or provide their...
0
1
0
0
2016-03-09T19:15:00.000
2
1.2
true
35,900,622
0
0
0
1
Windows 7 Task Scheduler is running my Python script every 15 minutes. Command line is something like c:\Python\python.exe c:\mypath\myscript.py. It all works well, script is called every 15 minues, etc. However, the task scheduler pops up a huge console window titled taskeng.exe every time, blocking the view for a fe...
Run python3 in atom with atom-runner
35,900,933
0
0
4,265
0
python,windows,python-3.x,atom-editor
Right click the start menu, and select System. Then, hit "Advanced system settings" > "Environment Variables". Click on path, and hit edit. Select "New" and add the folder that your python executable is in. That should fix the problem. Your other option is to reinstall python and select "add PYTHON to PATH" as Carpets...
0
1
0
1
2016-03-09T19:16:00.000
2
1.2
true
35,900,628
0
0
0
2
I am trying to run simple python code in atom using atom-runner package, but I am getting following error: Unable to find command: python Are you sure PATH is configured correctly? How can I configure PATH. (path to my python is C:\Python34)
Run python3 in atom with atom-runner
37,861,176
0
0
4,265
0
python,windows,python-3.x,atom-editor
If this does not work guys uninstall Python and Atom. While reinstalling Python make sure you click on "Add Python to Path" so you will not have any problems with setting the paths at all!
0
1
0
1
2016-03-09T19:16:00.000
2
0
false
35,900,628
0
0
0
2
I am trying to run simple python code in atom using atom-runner package, but I am getting following error: Unable to find command: python Are you sure PATH is configured correctly? How can I configure PATH. (path to my python is C:\Python34)
cx_Freeze not working - no module named cx_Freeze
51,223,723
0
1
4,771
0
python,python-3.x,cx-freeze
Copy to the directory of the file to compile the following: re.py sre_compile.py sre_constants.py sre_parse.py from "...\Lib" and build: python <nameFileToBuild>.py build
0
1
0
0
2016-03-10T00:42:00.000
2
0
false
35,905,521
1
0
0
1
I've been trying to compile a game I'm writing with python into an exe with cx_Freeze so my friends can play it without the python interpreter. However, when I run the "build" command through cmd, I get an error saying "ImportError: No module named 'cx_Freeze'". I've done this every way in and out, changing the capital...
how to identify jobs running background on Windows 7-10?
35,906,151
0
1
293
0
python,windows,powershell,windows-7
Not actually a programming question, but: In Task Manager's Process page, choose View > Select Columns and add the Command Line column. Then you can see the actual command line for each process and you should be able to track down the ones you're interested in. This is for Windows 7; I know they made some changes to th...
0
1
0
0
2016-03-10T01:43:00.000
1
1.2
true
35,906,090
1
0
0
1
I want to run a Python process in background, and I use the following command in PowerShell. powershell > PowerShell.exe -windowstyle hidden python my_process.py But, How can I know whether it is running in background? The task manager can not show a process named python my_process.py that running in background, and ...
Uninstall Python 2.7 from Mac OS X El Capitan
35,922,700
1
6
24,535
0
python,macos,python-2.7
Set your an alias to use the python version that you want to use from inside your .bashrc (or zsh if you use it). Like: alias python='/usr/bin/python3.4'
0
1
0
0
2016-03-10T16:53:00.000
3
0.066568
false
35,922,553
1
0
0
1
I want to completely reinstall Python 2 but none of the guides I have found allow me to uninstall it. No matter what I do, python --version still returns 2.7.10, even after I run the Python 2.7.11 installer. All the other guides on StackOverflow tell me to remove a bunch of files, but python is still there.
Pass parameter through shell to python
35,935,344
0
0
373
0
android,python,shell,qpython
I don't have experience in Android programming, so I can only give a general recommendation: Of course the naive solution would be to explicitly pass the arguments from script to script, but I guess you can't or don't want to modify the scripts in between, otherwise you would not have asked. Another approach, which I s...
1
1
0
1
2016-03-10T21:58:00.000
2
1.2
true
35,928,155
0
0
0
2
I run python in my Android Terminal and want to run a .py file with: python /sdcard/myScript.py The problem is that python is called in my Android enviroment indirect with a shell in my /system/bin/ path (to get it direct accessable via Terminal emulator). My exact question, how the title tells how to pass parameter t...
Pass parameter through shell to python
36,178,959
0
0
373
0
android,python,shell,qpython
I have similar problem. Runing my script from Python console /storage/emulator/0/Download/.last_tmp.py -s && exit I am getting "Permission denied". No matter if i am calling last_tmp or edited script itself. Is there perhaps any way to pass the params in editor?
1
1
0
1
2016-03-10T21:58:00.000
2
0
false
35,928,155
0
0
0
2
I run python in my Android Terminal and want to run a .py file with: python /sdcard/myScript.py The problem is that python is called in my Android enviroment indirect with a shell in my /system/bin/ path (to get it direct accessable via Terminal emulator). My exact question, how the title tells how to pass parameter t...
python - print to stdout and redirect output to file
35,941,617
0
2
838
0
python,redirect,stdout
You want to use 'tee'. stdbuf -oL python mycode.py | tee out.txt
0
1
0
0
2016-03-11T13:28:00.000
2
0
false
35,941,506
0
0
0
1
I can run my python scripts on the terminal and get the print results on the stdout e.g. python myprog.py or simply redirect it to a file: python myprog.py > out.txt My question is how could I do both solutions at the same time. My linux experience will tell me something like: python myprog.py |& tee out.txt This is...
How to install 'adium-theme-ubuntu' (virtualenv)
39,074,990
2
4
2,119
0
python,ubuntu
I might have a similar issue here. Got the same error while trying to import a requirement.txt into a virtualenv. something like "No matching distribution found for adium-theme-ubuntu==0.3.4" Solved it by include --system-site-packages when creating the virtualenv. Hope it helps
0
1
0
0
2016-03-11T14:12:00.000
1
0.379949
false
35,942,424
1
0
0
1
I'm working on a Appium Python test script for AWS Device Farm. I get error while building the script as; Could not find any downloads that satisfy the requirement package-name (like PAM, Twisted-Core etc) I've already solved almost all of them, but still have problem with adium-theme-ubuntu. This package is already i...
Wingware Python IDE: How do I change from Python 2.7.10 to the latest version?
35,998,142
0
0
882
0
python,ide,version
Install latest Python. Go to your Project menu and Project Properties. Change the Python Executable to use Python 3.5 or whatever. Press OK. You might need to restart Wing's Python Shell, but other than that, you should be set. If you want all projects to default to the latest, you will have to set up your OS to defaul...
0
1
0
0
2016-03-12T10:45:00.000
1
0
false
35,956,650
1
0
0
1
How do I change from Python 2.7.10 to the latest version in Wingware Python IDE?
Unable to install python-recsys module
36,860,451
2
1
490
0
python-3.x
Recsys is not supported by python 3.X but only python 2.7.
0
1
0
0
2016-03-12T11:08:00.000
1
0.379949
false
35,956,868
1
0
0
1
I am trying to install python-recsys module. But i get this error Could not find a version that satisfies the requirement python-recsys (from versions: ) No matching distribution found for python-recsys I am using Python 3.4 The code that i am using to install the module is: pip.exe install python-recsys
Non ascii file name issue with os.walk
35,959,633
8
2
1,175
0
python,python-2.7
Listing directories using a bytestring path on Windows produces directory entries encoded to your system locale. This encoding (done by Windows), can fail if the system locale cannot actually represent those characters, resulting in placeholder characters instead. The underlying filesystem, however, can handle the full...
0
1
0
0
2016-03-12T15:30:00.000
1
1.2
true
35,959,580
1
0
0
1
I am using os.walk to traverse a folder. There are some non-ascii named files in there. For these files, os.walk gives me something like ???.txt. I cannot call open with such file names. It complains [Errno 22] invalid mode ('rb') or filename. How should I work this out? I am using Windows 7, python 2.7.11. My system ...
Installing iPython Notebook - opening a $HOME file from editor
35,972,367
1
1
48
0
ipython-notebook,jupyter-notebook
maybe it's not there? you can create it first, in Mac's terminal touch $HOME/.ipython/profile_default/ipython_notebook_config.py and then open it in TextWranggler open -a /Applications/TextWrangler.app $HOME/.ipython/profile_default/ipython_notebook_config.py
0
1
0
0
2016-03-13T15:37:00.000
1
1.2
true
35,972,196
1
0
0
1
I am attempting to install ipython notebook based on some instructions. However, while I tried to execute this 'In your favorite editor, open the file $HOME/.ipython/profile_default/ipython_notebook_config.py', I can't really open a file from TextWrangler. I am not familiar with this. Could anyone help me out there? Th...
Using Scikit-learn google app engine
52,134,247
0
8
1,664
0
python,python-2.7,google-app-engine,scikit-learn
The newly-released 2nd Generation Python 3.7 Standard Environment (experimental) can run all modules. It's still in beta, though.
0
1
0
0
2016-03-14T12:39:00.000
3
0
false
35,987,785
0
1
0
1
I am trying to deploy a python2.7 application on google app engine. It uses few modules like numpy,flask,pandas and scikit-learn. Though I am able to install and use other modules. Installing scikit-learn in lib folder of project give following error:- Traceback (most recent call last): File "/base/data/home/runtimes/p...
why is my program using system cpu time?
36,002,334
1
2
215
0
python,fortran,profiling,cpu-usage,lapack
Operating systems are constantly switching out what is running at any given moment. Your program will run for a while, but eventually there will be an interrupt, and the system will switch to something else, or it may just decide to run something else for a second or two, then switch back. It is difficult to force an o...
0
1
0
0
2016-03-14T13:40:00.000
1
1.2
true
35,989,119
1
0
0
1
I wrote a time-consuming python program. Basically, the python program spends most of its time in a fortran routine wrapped by f2py and the fortran routine spends most of its time in lapack. However, when I ran this program in my workstation, I found 80% of the cpu time was user time and 20% of cpu time was system time...
How to determine what version of python3 tkinter is installed on my linux machine?
35,999,383
4
27
40,994
0
python-3.x,tkinter
Run Tkinter.TclVersion or Tkinter.TkVersion and if both are not working, try Tkinter.__version__
1
1
0
0
2016-03-14T22:30:00.000
6
0.132549
false
35,999,344
0
0
0
2
Hi have been scavenging the web for answers on how to do this but there was no direct answer. Does anyone know how I can find the version number of tkinter?
How to determine what version of python3 tkinter is installed on my linux machine?
63,566,647
5
27
40,994
0
python-3.x,tkinter
Type this command on the Terminal and run it. python -m tkinter A small window will appear with the heading tk and two buttons: Click Me! and QUIT. There will be a text that goes like This is Tcl/Tk version ___. The version number will be displayed in the place of the underscores.
1
1
0
0
2016-03-14T22:30:00.000
6
0.16514
false
35,999,344
0
0
0
2
Hi have been scavenging the web for answers on how to do this but there was no direct answer. Does anyone know how I can find the version number of tkinter?
Is there a way to determine how long has an Amazon AWS EC2 Instance been running for?
36,037,353
4
4
3,416
0
python,amazon-web-services,amazon-ec2,cron,aws-cli
The EC2 service stores a LaunchTime value for each instance which you can find by doing a DescribeInstances call. However, if you stop the instance and then restart it, this value will be updated with the new launch time so it's not really a reliable way to determine how long the instance has been running since it's o...
0
1
0
1
2016-03-15T18:21:00.000
2
0.379949
false
36,019,161
0
0
1
1
I am looking for a way to programmatically kill long running AWS EC2 Instances. I did some googling around but I don't seem to find a way to find how long has an instance been running for, so that I then can write a script to delete the instances that have been running longer than a certain time period... Anybody deal...
Is there a way to install cx_oracle without root access in linux environment?
36,050,958
1
0
1,472
0
python,linux,python-2.7,cx-oracle
Yes, you can simply follow these steps: Download the source archive and unpack it somewhere. Run the command "python setup.py build" Copy the library to a location of your choice where you do have access (or you can simply leave it in the build location, too, if you prefer) Set the environment variable PYTHONPATH to p...
0
1
0
0
2016-03-16T15:01:00.000
3
0.066568
false
36,039,397
0
0
0
2
Im trying to install cx_oracle with python2.7.11. all the tutorials i found for installing cx_oracle needs root access, however on the vm i dont have root access on the /usr or /etc folders. Is there any way to install cx_oracle in my user directory?
Is there a way to install cx_oracle without root access in linux environment?
36,051,557
0
0
1,472
0
python,linux,python-2.7,cx-oracle
You a Python virtual environment - this way you do not ever need to use System Privs for adding new functionality to your Python Dev Environment. Look for the command pyvenv - there is lots of info on this.
0
1
0
0
2016-03-16T15:01:00.000
3
0
false
36,039,397
0
0
0
2
Im trying to install cx_oracle with python2.7.11. all the tutorials i found for installing cx_oracle needs root access, however on the vm i dont have root access on the /usr or /etc folders. Is there any way to install cx_oracle in my user directory?
do you want ssh for your instance?
36,051,700
2
0
35
0
python,django,amazon-web-services,ssh
The advice against using ssh comes from a well-meaning bunch that wants us all to create reproducible configurations that don't require administrators to login in order to periodically tweak the config. It also becomes another interface that must be secured. Ideally, everything you need is independent of ssh because y...
0
1
1
0
2016-03-17T04:17:00.000
1
0.379949
false
36,051,581
0
0
0
1
as I'm using aws I'm looking into two tutorials just to make sure I do it right. and I'm at a step to do eb init, and it asks "do you want ssh for your instance?" one tutorial says I should say yes and the other says i should put no...isn't ssh the one that connects my laptop with amazon's network shouldn't I put yes f...
Why does Python's IDLE crash when I type a parenthesis on Mac?
47,341,459
1
1
1,732
0
python,macos,tkinter,crash,python-idle
I found a fix! One that doesn't require changing monitor settings. In IDLE: Options Menu > Configure Extensions > CallTips > set to FALSE Then restart. Took much research to find that super simple solution... the problem is caused not by an error in IDLE but by an error in the mac's Tcl/Tk code when calltips are called...
0
1
0
0
2016-03-17T06:28:00.000
3
0.066568
false
36,053,119
1
0
0
1
Ok, I realize this may be an extremely nuanced question, but it has been bugging me for a while. I like the simple scripting interface of IDLE, but it keeps crashing on me when: (1) I am coding on an external monitor and (2) I type the parenthesis button, "(". IDLE never crashes for me for any other reason than this v...
How do I set Anaconda's python as my default python command?
36,079,150
20
18
63,145
0
python-2.7,anaconda
Your PATH is pointing to the original Python executable. You have to update your PATH. (Assuming Windows 7) Right-click on Computer, the Properties, the Advanced system settings, then click the Environment Variables... button. The lower window has the system variables. Scroll down until you find Path, select it, and cl...
0
1
0
0
2016-03-18T02:35:00.000
2
1.2
true
36,075,166
1
0
0
1
I have both Anaconda and Python 2.7 installed on my Windows machine. Right now the command "python" points to Python 2.7, but I'd like instead for it to point to Anaconda's python. How do I set this up?
How to create controlled CPU load on Linux?
36,087,597
0
1
151
0
python,linux,cpu
Maybe try to to use time.sleep() and play around with how long to sleep in between calculations?
0
1
0
0
2016-03-18T14:53:00.000
1
0
false
36,087,488
0
0
0
1
I'd like to know how to generate a controlled CPU load on Linux using shell or python script. By controlled load I mean creating a process that consumes a specified amount of CPU cycles (e.g., 20% of available CPU cycles). I wrote a python script that does some dummy computation like generating N random integers and s...
Flask-Babel won't translate text on AWS within a docker container, but does locally
36,165,474
0
0
163
0
python,amazon-web-services,flask,docker,docker-compose
I found the problem. Locally i am running it on a vagrant virtual machine on a windows computer. It looks like because windows is not a case sensitive file system, when the python gettext() function was looking for en_US, i was passing it en_us, which it found on windows. But on AWS, it did not because it was running l...
0
1
0
0
2016-03-19T01:11:00.000
1
1.2
true
36,096,703
0
0
1
1
I have a flask app that is using flask-babel to translate text. I have created a docker container for it all to run in. And i have verified multiple times that both are being run and built exactly the same way. When i put the app on my local docker container (using a vagrant linux machine). The translations work fine. ...
Optimizing Celery for third party HTTP calls
36,731,024
5
9
894
0
python,rabbitmq,celery,scalability
First of all - GIL - that should not be a case, since more machines should go faster. But - please check if load goes only on one core of the server... I'm not sure if whole Celery is good idea in your case. That is great software, with a lot of functionality. But, if that is not needed, it is better to use something ...
0
1
0
0
2016-03-19T19:33:00.000
1
1.2
true
36,106,216
0
0
0
1
We are using celery to make third party http calls. We have around 100+ of tasks which simply calls the third party HTTP API calls. Some tasks call the API's in bulk, for example half a million requests at 4 AM in morning, while some are continuous stream of API calls receiving requests almost once or twice per second....
Installing cPickle fails
36,156,896
4
1
7,478
0
python-2.7,pickle
Actually, I tried importing cPickle and it worked. But I don't know why the error "could not find any downloads that satisfy the requirement cPickle". I will appreciate if someone can provide reason. Also as commented by mike cleared my doubt. "cPickle is installed when python itself is installed -- it's part of the...
0
1
0
0
2016-03-22T13:55:00.000
1
1.2
true
36,156,353
1
0
0
1
I am working on ubuntu 14.04. Python version: 2.7.6. I am trying to install cPickle, but I am getting error: "could not find any downloads that satisfy the requirement cPickle" I tried via, pip and apt-get as well. What might be reason, has this package been removed completely?
How to set application path in music21
36,364,217
2
2
1,301
0
python,linux,anaconda,midi,music21
First of all, are you sure you have a midi player? Timidity is a good option. Check if you have it installed, and if you doesn't, just use sudo apt-get install timidity Once installed, the path you need should be '/usr/bin/timidity'
0
1
0
0
2016-03-22T22:31:00.000
1
0.379949
false
36,166,485
0
0
1
1
I'm using Ubuntu 14.04 64bit. I don't know what to set on path to application. I have installed music21 in anaconda3, but I got output as follows: music21.converter.subConverters.SubConverterException: Cannot find a valid application path for format midi. Specify this in your Environment by calling environment.set(No...
How to change Python default compiler to GCC?
36,189,588
2
1
3,595
0
python,gcc,theano
Edit Distutils config file C:\Python2.7\Lib\distutils\distutils.cfg (Create the file if it already does not exist). Add the following to the file: [build] compiler = mingw32 This should work.
0
1
0
0
2016-03-23T21:55:00.000
1
0.379949
false
36,189,453
1
0
0
1
I have Windows 10 and Python 2.7 installed. When I run IDLE I find this: Python 2.7.10 (default, Oct 14 2015, 16:09:02) [MSC v.1500 32 bit (Intel)] I want the default compiler here to be MinGW's GCC (I already installed MinGW) becaue I cannot import Theano with the MSC compiler I tried all the tutorials out there and ...
How can I run my own shell from elisp?
36,212,585
0
0
154
0
python,shell,emacs,elisp
Emacs has a number of different ways to interact with external program. From your text, I suspect you need to look at comint in the emacs manual and the elisp reference manual. Comint is the low level general shell in a buffer functionality (it is what shell mode uses). Reading between the lines of your post, I would ...
0
1
0
0
2016-03-24T06:19:00.000
4
1.2
true
36,194,303
0
0
0
2
I written a simple shell in python and compiled it with nuitka. My shell as some simple commands, such as "say string", "braille string", "stop" etc. This program uses python accessible_output package to communicate with screen reader in windows. Ok, this works well froma a normal shell, or executing it from windows. N...
How can I run my own shell from elisp?
36,230,312
0
0
154
0
python,shell,emacs,elisp
What about just launching your script from inside an emacs shell buffer? M-x shell RET /path/to/my/script RET
0
1
0
0
2016-03-24T06:19:00.000
4
0
false
36,194,303
0
0
0
2
I written a simple shell in python and compiled it with nuitka. My shell as some simple commands, such as "say string", "braille string", "stop" etc. This program uses python accessible_output package to communicate with screen reader in windows. Ok, this works well froma a normal shell, or executing it from windows. N...
How to start python simpleHTTPServer on Windows 10
36,223,473
10
5
25,052
0
python,windows-10,simplehttpserver
Ok, so different commands is apparently needed. This works: C:\pathToIndexfile\py -m http.server As pointed out in a comment, the change to "http.server" is not because of windows, but because I changed from python 2 to python 3.
0
1
1
0
2016-03-25T15:55:00.000
3
1.2
true
36,223,345
0
0
0
1
I recently bought a Windows 10 machine and now I want to run a server locally for testing a webpage I am developing. On Windows 7 it was always very simple to start a HTTP Server via python and the command prompt. Fx writing the below code would fire up a HTTP server and I could watch the website through localhost. C:...
How to perform sql schema migrations in app engine managed vm?
36,407,336
-2
1
180
1
python,google-app-engine,google-cloud-sql,gcloud
SQL schema migration is a well-known branch of SQL DB administration which is not specific to Cloud SQL, which is mainly different to other SQL systems in how it is deployed and networked. Other than this, you should look up schema migration documentation and articles online to learn how to approach your specific situa...
0
1
0
0
2016-03-26T02:54:00.000
1
1.2
true
36,231,114
0
0
1
1
I'm currently using google cloud sql 2nd generation instances to host my database. I need to make a schema change to a table but Im not sure what the best way to do this. Ideally, before I deploy using gcloud preview app deploy my migrations will run so the new version of the code is using the latest schema. Also, if ...
couldn't delete file.dll using python script
36,264,203
2
0
531
0
python,dll
Because it is .dll that you are trying to delete there is a big chance that the file is in use, and therefore can't be deleted. Try to see if you can delete it manually first.
0
1
0
0
2016-03-28T14:09:00.000
1
0.379949
false
36,264,081
1
0
0
1
I wrote a simple script to delete a few files from some directories, I have to delete all the .exe files and all the .dll files. I manage to delete the .exe files using os.remove("path_name") but when I am trying to delete the .dll files I get "Windows Error: [Error 267] The directory name is invalid". I am adding my c...
`virtualenv` with Python 3.5 on Ubuntu 15.04
36,312,213
2
2
906
0
python,virtualenv,python-3.5,ubuntu-15.04
You can just install the latest version of python. You can also download and install the different versions in your user's home dir. In case you are planning to have multiple versions installed manually. This is from the offical python README file. Installing multiple versions On Unix and Mac systems if you intend to ...
0
1
0
0
2016-03-30T14:34:00.000
1
0.379949
false
36,312,022
1
0
0
1
I've never used virtualenv, I'm working on Ubuntu 15.04 (remotely via ssh), and I've been told I can't make any changes to system the Pythons. Ubuntu 15.04 comes with Pythons 2.7 and 3.4.3, but I want Python 3.5 in my virtualenv. I've tried virtualenv -p python3.5 my_env and it gives The executable python3.5 (from --py...
How to Enable Scrolling for Python Console Application
36,342,079
0
1
4,402
0
python,python-2.7,scroll,console-application,windows-console
You can not do it from you python script (OK, it is possible, but most probably you don't want to do it). Scrolling depends on environment (Windows or Linux terminal, doesn't matter). So it is up to users to set it up in a way that is good for them. On Linux you can use less or more: python script.py | less it will b...
0
1
0
0
2016-03-31T19:18:00.000
2
0
false
36,341,867
1
0
0
1
I have a Python (2.7) console application that I have written on Windows (8.1). I have used argparse.ArgumentParser() for handling the parameters when executing the program. The application has quite a few parameters, so when the --help parameter is used the documentation greatly exceeds the size of the console window...
'pip' is not recognized as a command
36,357,798
0
0
629
0
python,command,pip
Try opening a new command prompt and run pip from that. Sometimes changes to environment variables don't propagate to already-open prompts.
0
1
0
0
2016-04-01T13:12:00.000
1
0
false
36,357,301
1
0
0
1
I installed pip-8.1.1. The windows prompted that it was successfully installed. After I added 'C:\Python27\Scripts;' to Path in System Variables, the system still couldn't recognize 'pip' as a command. Here is the error message: 'pip' is not recognized as an internal or external command, operable program or batch file....
How do I run a python script using an already running blender?
37,028,985
2
6
1,547
0
python,process,blender
My solution was to launch Blender via console with a python script (blender --python script.py) that contains a while loop and creates a server socket to receive requests to process some specific code. The loop will prevent blender from opening the GUI, and the socket will handle the multiple requests inside the same b...
0
1
0
0
2016-04-01T16:03:00.000
2
0.197375
false
36,360,876
1
0
0
1
Normally, I would use "blender -P script.py" to run a python script. In this case, a new blender process is started to execute the script. What I am trying to do now is to run a script using a blender process that is already running, instead of starting a new one. I have not seen any source on this issue so far, which ...
tail a log file in Robot Framework
36,364,642
3
2
1,238
0
python,testing,robotframework
There's no need to do tail -f. At the start of your test you can get the number of bytes in the file. Let the test run, and then read the file starting at the byte offset that you calculated earlier (or read the whole file, and use a slice to look at the new data)
0
1
0
0
2016-04-01T17:22:00.000
2
1.2
true
36,362,294
0
0
0
1
I want to open a file and tail -f the output. I'd like to be able to open the file at the beginning of my test in a subprocess, execute the test, then process the output starting from the beginning of the tail. I've tried using Run Process, but that just spins, as the process never terminates. I tried using Start Pro...
How to disable/enable device using devcon.exe in python for some iteration
43,858,051
-1
2
992
0
python,windows,devcon
I know this is very late. But your problem can be solved by the subprocess module. Let me know if you are unable to find what you need, and I will then post the code. Thanks
0
1
0
0
2016-04-02T18:57:00.000
1
-0.197375
false
36,377,506
0
0
0
1
I am looking for solution, I want to disable/enable the particular device in windows system using devcon.exe in python script. I am able to disable/enable using devcon.exe windows cmd.exe separately but i am looking for this activity to done using python script to verify 10 iteration. I need to automate one test case w...
Estimated Cost field is missing in Appengine's new Developer Console
36,388,402
1
0
18
0
google-app-engine,google-app-engine-python
App Engine > Dashboard This view shows how much you are charged so far during the current billing day, and how many hours you still have until the reset of the day. This is equivalent to what the old console was showing, except there is no "total" line under all charges. App Engine > Quotas This view shows how much of ...
0
1
0
0
2016-04-03T14:16:00.000
1
0.197375
false
36,386,528
0
0
1
1
In the old (non-Ajax) Google Appengine's Developer Console Dashboard - showed estimated cost for the last 'n' hours. This was useful to quickly tell how the App engine is doing vis-a-vis the daily budget. This field seems to be missing in the new Appengine Developer Console. I have tried to search various tabs on the C...
Start a process with python and get the PID (Linux)
36,391,683
4
2
451
0
python,linux,alsa
The pid attribute of the subprocess.Popen object contains its PID, but if you need to terminate the subprocess then you should just use the terminate() method. You should consider using pyao or pygst/gst-python instead though, if you need finer control over audio.
0
1
0
1
2016-04-03T21:50:00.000
2
1.2
true
36,391,651
0
0
0
1
I'm working with Iot on the Intel Galileo with a Yocto image, I have it that a python script will execute 'aplay audio.wav', But I want it to also get the PID of that aplay proccess in case the program will have to stop it. Sorry for being very short and brief.
How to check whether someone enters a Path directory on Windows or Mac?
36,409,314
0
1
32
0
python-3.x,file-io,path
Actually, unless you are using the new pathlib, the thing returned in both cases is just a str. Also, NT accepts / as a path delimeter and to posix \ is just another character. So -- no, you can't tell, at least not without trying to use the path; and that will only tell you if something is wrong, not if something can...
0
1
0
0
2016-04-04T16:43:00.000
2
0
false
36,408,297
0
0
0
2
Macs return a Posixpath when the user enters a path. Windows returns a WindowsPath object when the user does the same thing. Is there a way for me to check whether the input is valid depending on the machine?
How to check whether someone enters a Path directory on Windows or Mac?
36,408,579
1
1
32
0
python-3.x,file-io,path
os.path.sep gives you the path separator for the platform, \\ for windows and / for unix. But the thing is if you need this to implement a if else, then don't do that way. The os.path functions are aware of platform specific behavior and they will take care of it.
0
1
0
0
2016-04-04T16:43:00.000
2
1.2
true
36,408,297
0
0
0
2
Macs return a Posixpath when the user enters a path. Windows returns a WindowsPath object when the user does the same thing. Is there a way for me to check whether the input is valid depending on the machine?
dynamic routing , tornado deployment in production
36,427,016
1
1
412
0
python,nginx,dynamic,routing,tornado
When updating your python code you can start a new set of python processes on different ports (say 8001-8004 for the previous set and 8011-8014 for the new set) then modify you nginx config to redirect to 8011-8014 instead 8001-8004 and run service nginx reload (or equivalent for your OS). This way, nginx will redirect...
0
1
0
0
2016-04-05T10:06:00.000
1
1.2
true
36,423,257
0
0
0
1
I have 4 python tornado threads running on different ports on different machines. I used nginx to route and load balance. The code is the same for all of them. It is a asynchronous code. I also have a local file, lets say function.py on each machine that gets called by the python thread, does some computation and retur...
Jupyter: "notebook" is not a jupyter command
36,457,255
1
1
2,769
0
python,ipython,jupyter
After trying a bunch of solution, I found the quickest solution: using conda instead of pip. Or just use anaconda, which provides jupyter, too.
0
1
0
0
2016-04-06T02:58:00.000
4
0.049958
false
36,440,682
1
0
0
4
I want to have jupyter notebook installed. But on my MacBook Pro (OS X El Capitan) and my web server (Debian 7), I get the same error: jupyter notebook is not a jupyter command. I just follow the official installation instruction. And no error occurs during installation. I searched for solutions but none of them work...
Jupyter: "notebook" is not a jupyter command
41,560,474
0
1
2,769
0
python,ipython,jupyter
I meet withe the same problem when I use fish,when I switch to bash,everything works well!
0
1
0
0
2016-04-06T02:58:00.000
4
0
false
36,440,682
1
0
0
4
I want to have jupyter notebook installed. But on my MacBook Pro (OS X El Capitan) and my web server (Debian 7), I get the same error: jupyter notebook is not a jupyter command. I just follow the official installation instruction. And no error occurs during installation. I searched for solutions but none of them work...
Jupyter: "notebook" is not a jupyter command
41,647,660
0
1
2,769
0
python,ipython,jupyter
In my case, it was a matter of agreeing to the Xcode License Agreement with: sudo xcodebuild -license, before running sudo pip install notebook.
0
1
0
0
2016-04-06T02:58:00.000
4
0
false
36,440,682
1
0
0
4
I want to have jupyter notebook installed. But on my MacBook Pro (OS X El Capitan) and my web server (Debian 7), I get the same error: jupyter notebook is not a jupyter command. I just follow the official installation instruction. And no error occurs during installation. I searched for solutions but none of them work...
Jupyter: "notebook" is not a jupyter command
48,656,548
0
1
2,769
0
python,ipython,jupyter
What worked for me was to use the following command in MacOS High Sierra 10.13. $HOME/anaconda3/bin/activate
0
1
0
0
2016-04-06T02:58:00.000
4
0
false
36,440,682
1
0
0
4
I want to have jupyter notebook installed. But on my MacBook Pro (OS X El Capitan) and my web server (Debian 7), I get the same error: jupyter notebook is not a jupyter command. I just follow the official installation instruction. And no error occurs during installation. I searched for solutions but none of them work...
using os.system() to run a command without root
36,445,985
4
2
1,614
0
python,root,python-2.x
Try to use os.seteuid(some_user_id) before os.system("some bash command").
0
1
0
0
2016-04-06T08:42:00.000
2
1.2
true
36,445,861
0
0
0
2
I have a python 2 script that is run as root. I want to use os.system("some bash command") without root privileges, how do I go about this?
using os.system() to run a command without root
47,768,790
-1
2
1,614
0
python,root,python-2.x
I have test on my PC. If you run the python script like 'sudo test.py' and the question is resolved.
0
1
0
0
2016-04-06T08:42:00.000
2
-0.099668
false
36,445,861
0
0
0
2
I have a python 2 script that is run as root. I want to use os.system("some bash command") without root privileges, how do I go about this?
Python struct on windows
36,464,750
0
0
50
0
php,python,struct
It ended up being python gzip, that shiftet all bytes. Destroying the data.
0
1
0
1
2016-04-06T21:43:00.000
1
0
false
36,462,908
0
0
0
1
I have created a python program using struct, that saves data in files. The data consists of a header (300 chars) and data (36000 int float pairs). On ubuntu this works and i can unpack the data for my php setup. I unpack the data in php by loading the content into a string and using unpack. I quickly found that 1 pair...
How to serve Beaker Notebook from different directory
37,124,128
0
2
178
0
ipython,beaker-notebook
If you want to change the current working directory, I don't think that's possible. But if you want to serve files as in make them available to the web server that creates the page, use ~/.beaker/v1/web as described in the "Generating and accessing web content" tutorial.
0
1
0
0
2016-04-07T19:25:00.000
2
0
false
36,485,392
1
0
0
1
Trying to experiment with Beaker Notebooks, but I can not figure out how to launch from a specified directory. I've downloaded the .zip file (I'm on Windows 10), and can launch from that directory using the beaker.command batch file, but cannot figure out where to configure or set a separate launch directory for a spec...
Permission denied or Host key problems
36,502,436
0
0
39
0
python,bash,apache,server,pyramid
Well you changed the owner of the files to root, and then you ran as root, and it worked, so that makes sense. The problem is that root isn't necessarily the user executing the script in your webapp. You need to find which user is trying to execute the script, and then change the files' ownership to that user (depend...
0
1
0
1
2016-04-08T08:05:00.000
2
0
false
36,494,553
0
0
0
1
I have a web application which is written with python (Pyramid) and in the apache server, inside of the one of the Python we are launching a SH file which is a service to sending SMS. The problem is always the permission is denied. we tried the run the SH file by login into the root and it works. we changed the owner o...
Asynchronous task queues and asynchronous IO
36,518,663
3
7
2,039
0
python,asynchronous,concurrency,celery
Asynchronous IO is a way to use sockets (or more generally file descriptors) without blocking. This term is specific to one process or even one thread. You can even imagine mixing threads with asynchronous calls. It would be completely fine, yet somewhat complicated. Now I have no idea what asynchronous task queue mean...
0
1
0
0
2016-04-09T14:50:00.000
2
0.291313
false
36,518,400
0
0
0
1
As I understand, asynchronous networking frameworks/libraries like twisted, tornado, and asyncio provide asynchronous IO through implementing nonblocking sockets and an event loop. Gevent achieves essentially the same thing through monkey patching the standard library, so explicit asynchronous programming via callbacks...
Share an Intellij Python Project Between Windows and OSX
36,536,584
0
0
22
0
python,intellij-idea
You can always put your .idea folder into .gitignore (or equivalent for your VS) file and prevent sharing it between systems and developers. If you don't have project-specific settings there - it's recommended way to do it.
0
1
0
0
2016-04-10T21:58:00.000
1
0
false
36,536,019
0
0
0
1
I have an Intellij 15 Python project created using the Python plugin. I'm on OSX and have the Project Python SDK set to /usr/bin/python. I've got another developer on my team that is on Windows and his SDK is at C:\Python27\Python.exe Is there any way I can share this project via source control without us both stepping...
de-Bazel-ing TensorFlow Serving
37,579,943
0
4
443
0
python,tensorflow,tensorflow-serving
You are close, you need to update the environment as they do in this script .../serving/bazel-bin/tensorflow_serving/example/mnist_export I printed out the environment update, did it manually export PYTHONPATH=... then I was able to import tensorflow_serving
0
1
0
0
2016-04-11T23:47:00.000
1
0
false
36,561,231
0
1
0
1
While I admire, and am somewhat baffled by, the documentation's commitment to mediating everything related to TensorFlow Serving through Bazel, my understanding of it is tenuous at best. I'd like to minimize my interaction with it. I'm implementing my own TF Serving server by adapting code from the Inception + TF Servi...
If I have a python program running, can I edit the .py file that it is running from?
36,563,699
4
3
264
0
python
Yes, Python is not constantly reading the file, the file is only interpreted once per run. The current instance that is already running will not be affected by changes in the script.
0
1
0
0
2016-04-12T04:33:00.000
2
1.2
true
36,563,679
1
0
0
2
If I have a long running process that is running from file.py, can I edit file.py while it is running and run it again, starting a new process and not affect the already running process?
If I have a python program running, can I edit the .py file that it is running from?
36,563,817
0
3
264
0
python
Of course you can. When you are running the first process, the unmodified code is loaded into memory,like a copy in memory. When you edit the running code, it makes another copy into memory, you won't change the original one. And even though you click save, it won't make any change to the code in the memory that the ...
0
1
0
0
2016-04-12T04:33:00.000
2
0
false
36,563,679
1
0
0
2
If I have a long running process that is running from file.py, can I edit file.py while it is running and run it again, starting a new process and not affect the already running process?
How to make the command-line / interpreter pane/window bigger in pudb?
36,564,003
29
18
1,627
0
python,pudb
Put the focus in the command-line / interpreter pane (using Ctrl-x). Use the right-arrow key to put the focus on the Clear button. (the background changes color to indicate it is selected) Now use any of the following commands: _ (underscore; makes that pane the smallest size possible) = (equals; makes that pane the ...
0
1
0
0
2016-04-12T05:04:00.000
1
1.2
true
36,564,002
0
0
0
1
Is there any way to resize the command-line / interpreter window/pane in pudb, just like the size of the side pane can be adjusted?
How to make IDLE window more readable? Font too small for me to see
37,742,333
4
2
8,590
0
python,window,python-idle
On the top menu, choose Options, then Configure IDLE. The Fonts/Tabs tab will be displayed. There is a Size button. Click on it and select a bigger size than the default of 10. At present, this only only affects the font in Shell, editor, and output windows, but that is the main issue for me. EDIT: correct Options ...
0
1
0
0
2016-04-14T07:42:00.000
2
0.379949
false
36,616,705
1
0
0
1
I can't seem to figure out how to zoom in or anything, and the font is so small. Thank you for your help. I'm using a mac if that helps
set permission(777) for all the files, subdirectories of a directory in python without any loop
36,621,405
0
0
317
0
python-2.7,permissions
You can call subprocess and run normal system command from there: did not test but I think this should work: subprocess.call(["chmod", "-R 777 /PATH"])
0
1
0
0
2016-04-14T11:07:00.000
1
0
false
36,621,256
1
0
0
1
I want to set permission (777) to my directory ( including all the files and subdirectories ) in one line, don't want to use any os.walk or for loop
Running processes (mainly python) over several machines
36,626,600
1
1
157
0
python,multithreading,parallel-processing,job-scheduling
In addition to your "organiser-script" you will need some program/script on each of the other machines, that listens on the network for commands from the "organiser-script", starts "workers" and reports when "workers" have finished. But there are existing solutions for your task. Take a good look around before you star...
0
1
0
0
2016-04-14T14:31:00.000
1
0.197375
false
36,626,267
1
0
0
1
I would like to be able to run multiple, typically long processes, over different machines connected over a local network. Processes would generally be python scripts. In other words, suppose that I have 100 processes and 5 machines, and I don't want to run more than 10 processes on each machine at the same time. My "o...
Streaming values in a python script to a wep app
36,669,596
0
0
63
0
python,azure,web-applications,azure-webjobs
You would need to provide some more information about what kind of interface your web app exposes. Does it only handle normal HTTP1 requests or does it have a web socket or HTTP2 type interface? If it has only HTTP1 requests that it can handle then you just need to make multiple requests or try and do long polling. Oth...
0
1
0
0
2016-04-16T20:42:00.000
2
0
false
36,669,500
0
0
1
2
I have a python script that runs continuously as a WebJob (using Microsoft Azure), it generates some values (heart beat rate) continuously, and I want to display those values in my Web App. I don't know how to proceed to link the WebJob to the web app. Any ideas ?
Streaming values in a python script to a wep app
36,671,291
1
0
63
0
python,azure,web-applications,azure-webjobs
You have two main options: You can have the WebJobs write the values to a database or to Azure Storage (e.g. a queue), and have the Web App read them from there. Or if the WebJob and App are in the same Web App, you can use the file system. e.g. have the WebJob write things into %home%\data\SomeFolderYouChoose, and hav...
0
1
0
0
2016-04-16T20:42:00.000
2
1.2
true
36,669,500
0
0
1
2
I have a python script that runs continuously as a WebJob (using Microsoft Azure), it generates some values (heart beat rate) continuously, and I want to display those values in my Web App. I don't know how to proceed to link the WebJob to the web app. Any ideas ?
Build and use Python without make install
36,673,452
1
1
1,409
0
python,python-3.x,makefile,installation
If you don't want to copy the binaries you built into a shared location for system-wide use, you should not make install at all. If the build was successful, it will have produced binaries you can run. You may need to set up an environment for making them use local run-time files instead of the system-wide ones, but th...
0
1
0
0
2016-04-17T05:55:00.000
1
0.197375
false
36,673,170
1
0
0
1
I just downloaded Python sources, unpacked them to /usr/local/src/Python-3.5.1/, run ./configure and make there. Now, according to documentation, I should run make install. But I don't want to install it somewhere in common system folders, create any links, change or add environment variables, doing anything outside th...
Certificate Error while Deploying python code in Google App Engine
36,673,729
1
0
97
0
python,google-app-engine
Upgrading Python to 2.7.8 or later versions fixed the issue. EDIT: Also check if you are using google app engine SDK 1.8.1 or later version. As of version SDK 1.8.1 the cacerts.txt has been renamed to urlfetch_cacerts.txt. You can try removing cacerts.txt file to fix the problem.
0
1
0
0
2016-04-17T07:07:00.000
1
1.2
true
36,673,670
0
0
1
1
I tried deploying python code using google app engine. But I got Error Below: certificate verify failed I had included proxy certificate in urlfetch_cacerts.py and enabled 'validate_certificate' in urlfetch_stub.py by _API_CALL_VALIDATE_CERTIFICATE_DEFAULT = True.But I still get the error.. Can you suggest any soluti...
Eclipse pydev warning - "Debugger speedups using cython not found."
37,348,293
5
18
20,938
0
eclipse,python-3.x,cython,pydev
simply copy all the command "/usr/bin/python3.5" "/root/.p2/pool/plugins/org.python.pydev_4.5.5.201603221110/pysrc/setup_cython.py" build_ext --inplace , paste in a command line terminal (tipically bash shell) and press return :)
0
1
0
0
2016-04-17T18:23:00.000
9
0.110656
false
36,680,422
1
0
0
5
I get this warning while running a python program (some basic web automation using selenium): warning: Debugger speedups using cython not found. Run '"/usr/bin/python3.5" "/root/.p2/pool/plugins/org.python.pydev_4.5.5.201603221110/pysrc/setup_cython.py" build_ext --inplace' to build. pydev debugger: starting (pi...
Eclipse pydev warning - "Debugger speedups using cython not found."
50,884,895
1
18
20,938
0
eclipse,python-3.x,cython,pydev
I faced a similar issue while using Python3.5 and Eclipse Pydev for debugging. when I tried >"/usr/bin/python3.5" "/home/frodo/eclipse/plugins/org.python.pydev.core_6.3.3.201805051638/pysrc/setup_cython.py" build_ext --inplace Traceback (most recent call last): File "/home/frodo/eclipse/plugins/org.python.pydev.core...
0
1
0
0
2016-04-17T18:23:00.000
9
0.022219
false
36,680,422
1
0
0
5
I get this warning while running a python program (some basic web automation using selenium): warning: Debugger speedups using cython not found. Run '"/usr/bin/python3.5" "/root/.p2/pool/plugins/org.python.pydev_4.5.5.201603221110/pysrc/setup_cython.py" build_ext --inplace' to build. pydev debugger: starting (pi...