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
Why records about python command-line launches do not saved in history
28,583,843
1
0
45
0
python,bash,ubuntu,command-line,history
Bash usually saves all your commands in the history buffer except if you specifically mark them to be excluded. There is an environment variable HISTIGNORE which might be configured to ignore python invocations altogether, although this is somewhat unlikely; or you may be marking them for exclusion by typing a space b...
0
1
0
1
2015-02-18T12:23:00.000
1
0.197375
false
28,583,633
0
0
0
1
I quiet often launch python scripts from command-line, like python somescript.py --with-arguments Now I'm wondering why that does not saved in output of history command? And if there is a way to see history of it
error in opening Ulipad for python
37,771,773
0
0
336
0
python,python-2.7
I had the same problem and the solution was: uninstall Ulipad install Ulipad on a different disk, e.g. D:\Ulipad
0
1
0
0
2015-02-18T15:52:00.000
2
0
false
28,587,843
0
0
0
2
I am familiar with R but new to Python. To use python, I installed Python 2.7, set environment variables and installed wxPython. And then, after installing Ulipad I opened Ulipad but an error message showed this: The logfile 'C:\program file(x86)\Ulipad\Ulipad.exe.log' could not be opened:[Errno13] Permission denied...
error in opening Ulipad for python
29,441,423
0
0
336
0
python,python-2.7
This is happening because under newer Windows OS(Vista, 7, 8) programs do not have write access to "C:\program file(x86)\" for security reasons. Easiest fix for your problem would be to uninstall the current installation and re-install it at a different location e.g. C:\Ulipad. Alternative is to run Ulipad using "Run a...
0
1
0
0
2015-02-18T15:52:00.000
2
0
false
28,587,843
0
0
0
2
I am familiar with R but new to Python. To use python, I installed Python 2.7, set environment variables and installed wxPython. And then, after installing Ulipad I opened Ulipad but an error message showed this: The logfile 'C:\program file(x86)\Ulipad\Ulipad.exe.log' could not be opened:[Errno13] Permission denied...
How to auto-refresh a log.txt file
28,593,395
0
0
1,704
0
python,updates
The data isn't written to the latest.log file until the process writing it (probably the server) fills or flushes the buffer. There probably isn't any way to change that from within Python. The best bet is to see if you can configure the writing process to flush after each line.
0
1
0
0
2015-02-18T18:15:00.000
2
0
false
28,590,903
0
0
0
1
I am making a python program for a Minecraft server that automatically bids on items up to a certain price. In appdata/roaming/.minecraft/logs there is a chat log called "latest.log". This log is constantly being updated with what everyone on my server is saying over chat. If I open it and view the text, the log doesn'...
Vim python-mode plugin picks up system python and not anaconda
28,592,881
2
0
513
0
vim,python-mode
Not trivial. Python-mode uses the Python interpreter Vim is linked against; you'll have to recompile Vim and link it against Anaconda.
0
1
0
1
2015-02-18T19:51:00.000
1
1.2
true
28,592,624
1
0
0
1
When i use python-mode it uses my system (mac python), I have anaconda installed and want Vim to autocomplete etc with that version of python As it stands now, python-mode will only autocomplete modules in from system python and not any other modules e.g. pandas that is installed in the anaconda distro. thanx Tobie
Using Python Shell with any text editor
28,593,838
5
1
240
0
python,sublimetext
You can use ctrl-b to run your python in sublime. If you want to use a different interpreter you can customise under Tools -> Build System
0
1
0
0
2015-02-18T20:53:00.000
3
1.2
true
28,593,711
1
0
0
2
I use Sublime Text and am using the terminal to run my code. I would prefer to use the Python Shell to run my code, as it has color and is not so hard to look at. Is there any easy way to do this other than saving then opening in IDLE?
Using Python Shell with any text editor
28,593,841
3
1
240
0
python,sublimetext
Stick with Sublime text. It's a popular text editor with syntax highlighting for several different programming languages. Here's what you need to do: Press Ctrl + Shift + P to bring up command palette and enter "python". Choose the option that says something like "Set syntax to Python". Enter Python code then Ctrl + S...
0
1
0
0
2015-02-18T20:53:00.000
3
0.197375
false
28,593,711
1
0
0
2
I use Sublime Text and am using the terminal to run my code. I would prefer to use the Python Shell to run my code, as it has color and is not so hard to look at. Is there any easy way to do this other than saving then opening in IDLE?
Django app - deploy using UWSGI or Phusion Passenger
28,599,998
2
1
760
0
python,django,deployment,passenger,uwsgi
Production performance is pretty the same, so I wouldn't worry about that. uWSGI has some advanced builtin features like clustering and a cron API while Phusion Passenger is more minimalist, but Phusion Passenger provides more friendly tools for administration and inspection (e.g. passenger-status, passenger-memory-sta...
0
1
0
0
2015-02-19T01:27:00.000
1
0.379949
false
28,597,205
0
0
1
1
Which way of deploying Django app is better (or maybe the better question would be what are pros and cons): using UWSGI, using Phusion Passenger? In my particular case the most important advantage for using Passenger is ease of use (on my hosting I need to place single file in project directory and it's done), but wh...
Opening Python program from Anaconda
28,635,473
0
0
407
0
python,anaconda
%run is a command that's run from inside of IPython. To use it, you should start ipython first. Or just run python program.py (if your program is named program.py).
0
1
0
0
2015-02-19T07:17:00.000
1
0
false
28,600,606
1
0
0
1
I have opened Anaconda - then i maneuvered to the directory where a certain python program i want to run actually lies. I then tried the %run command. But the command does not seem to work! So how am i to run that program? Does anyone know the right command that one has to use in the black colored Anaconda console co...
Django's "call_command" hangs the application
28,642,118
1
1
347
0
python,django,parallel-processing,celery,mongoengine
When you make the synchronous calls to external systems it will tie up a thread in the application server, so depending on application server you choose and how many concurrent threads/users you have will determine whether doing it that way will work for you. Usually when you have long running requests like that it is ...
0
1
0
0
2015-02-19T11:50:00.000
1
1.2
true
28,605,646
0
0
1
1
I'm working on a project that uses Django and mongoengine. When a user presses a button, a trigger to a call_command (django.core.management - just calls a script it seems to me) is made which sshs to multiple servers in parallel, copies some files, parses them and stores them in the database. The problem is that when ...
Deleting Contents of a folder selevtively with python
28,608,827
0
1
897
0
python,shutil
rmtree does not appear to have any kind of filtering mechanism that you could use; further, since part of its functionality is to remove the directory itself, and not just its contents, it wouldn't make sense to. If you could do something to the file so that rmtree's attempt to delete it fails, you can have rmtree igno...
0
1
0
0
2015-02-19T14:15:00.000
3
0
false
28,608,641
1
0
0
1
I would periodically like to delete the contents of a Windows directory which includes files and sub directories that contain more files. However I do not there is one specific file that I do not want to remove (it is the same file every time). I am using shutil.rmtree to delete the contents of a folder but I am delet...
Syntax errors for keywords in pydev plugin for Eclipse
28,972,434
0
0
303
0
eclipse,python-3.x,pydev
It seems like Eclipse Luna does not provide support for PyDev when it's installed with Aptana. I was able to install Aptana without PyDev and do a separate install of Pydev on its own and this solved the problem.
0
1
0
1
2015-02-19T19:39:00.000
1
0
false
28,615,418
0
0
0
1
I'm using the Pydev plugin for Eclipse Luna for Java EE. The python code runs correctly, but errors are showing up for built in keywords like print. Error: Undefined Variable: print I looked on stackoverflow for other answers, and the suggestions have all been to manually configure an interpreter. I changed my interpr...
DOS Batch multicore affinity not working
28,848,968
1
0
632
0
python,batch-file,cmd,dos,affinity
This is more of an answer to a question that arose in comments, but I hope it might help. I have to add it as an answer only because it grew too large for the comment limits: There seems to be a misconception about two things here: what "processor affinity" actually means, and how the Windows scheduler actually works....
0
1
0
0
2015-02-20T13:39:00.000
2
1.2
true
28,630,336
1
0
0
1
I have a batch that launches a few executables .exe and .py (python) to process some data. With start /affinity X mybatch.bat it will work as it should only if X equals to 0, 2, 4 or 8 (the individual cores) But if I will use a multicore X like 15 or F or 0xF (meaning in my opinion all 4 cores) it will still run only ...
Ubuntu and Ironpython: What paths to add to sys.path AND how to import fcntl module?
28,673,847
3
1
456
0
python-2.7,ubuntu,mono,ironpython,fcntl
As far as I can see, the fcntl module of cPython is a builtin module (implemented in C) - those modules need to be explicitly implemented for most alternative Python interpreters like IronPython (in contrast to the modules implemented in plain Python), as they cannot natively load Python C extensions. Additionally, it ...
0
1
0
1
2015-02-21T16:41:00.000
1
1.2
true
28,648,230
0
0
0
1
I have latest IronPython version built and running in Ubuntu 14.04 through Mono. Building Ironpython and running with Mono seems trivial but I am not convinced I have proper sys.paths or permissions for Ironpython to import modules, especially modules like fcntl. Running ensurepip runs subprocess, and wants to import ...
Extract python script from exe generated with cx_Freeze
28,671,674
0
0
916
0
python,exe,cx-freeze
Seems like using cython will make it impossible to get script back.
0
1
0
0
2015-02-22T01:35:00.000
1
1.2
true
28,653,502
1
0
0
1
Is it possible to get .py text file from .exe file generated with cx_Freeze? If yes, how can I prevent it when I generate exe? I don't want that somebody see my python code. Of course anybody will have access to bytecode, but it much harder to disasemblate it.
Python & MapReduce: beyond basics -- how to do more tasks on one database
28,762,585
1
2
107
0
python,hadoop,mapreduce,hadoop-streaming
This question seems very generic to me. Chain of many map-reduce jobs are the most common pattern for the production ready solutions. But as programmer, we should always try to use less number of MR jobs to get the best performance (You have to be smart in selecting your key-value pairs for the jobs in order to do this...
0
1
0
0
2015-02-23T07:18:00.000
1
1.2
true
28,668,641
0
0
0
1
I have a huge txt data store on which I want to gather some stats. Using Hadoop-streaming and Python I know how to implement a MapReduce for gathering stats on a single column, e.g. count how many records there are for each of a 100 categories. I create a simple mapper.py and reducer.py, and plug them into the hadoop-s...
EndpointNotFound: public endpoint for hpext:dns service in RegionOne region not found
28,739,765
0
1
961
0
python-2.7,openstack-neutron
I was able to solve this. This was my mistake. I have exported hpext:dns in keystone_admin and .bashrc file. This value is very much specific if anyone is using hp cloud and they are logging into their geos.
0
1
0
0
2015-02-24T10:02:00.000
2
0
false
28,692,809
0
0
0
2
I have installed designate client on the same box where designate server is running with OpenStack Juno. After setting environment by issuing . .venv/bin/activate and keystone variables by issuing this command keystonerc_admin. When I try to run designate --debug server-list command I am getting this error: EndpointNot...
EndpointNotFound: public endpoint for hpext:dns service in RegionOne region not found
28,767,745
0
1
961
0
python-2.7,openstack-neutron
Yes, that value is from before designate was an incubated project, but was running in HP Cloud. The standard 'dns' service should be used for anyone not using the HP Public Cloud service (it is the default in python-designateclient, so you shouldn't have to do anything)
0
1
0
0
2015-02-24T10:02:00.000
2
0
false
28,692,809
0
0
0
2
I have installed designate client on the same box where designate server is running with OpenStack Juno. After setting environment by issuing . .venv/bin/activate and keystone variables by issuing this command keystonerc_admin. When I try to run designate --debug server-list command I am getting this error: EndpointNot...
Elastic Load Balancing with Tornado
28,732,773
0
0
808
0
python,amazon-web-services,tornado,amazon-elb
It is possible. For example our setup is ELB->nginx->tornado. nginx is used for app specific proxy, cache and header magic, but can be thrown out of this chain or replaced with something else.
0
1
0
0
2015-02-25T01:22:00.000
1
0
false
28,709,535
0
0
0
1
I haven't been able to find any solid information online. I'm curious to know if its possible (and how) to use the Elastic Load Balancing (ELB) service with Tornado. If it isn't, whats the best alternative to using AWS as a scalable option with Tornado?
Python bottle: iterate through folder in app's route or in template?
28,722,748
1
1
105
0
python,bottle
In general, a best practice is to do the work in the app, and do (only) presentation in the template. This keeps your so-called business logic as separate as possible from your rendering. Even if it wasn't a bad idea, I don't even know how you could walk through a directory of files from within a template. The subset...
0
1
0
0
2015-02-25T08:17:00.000
1
0.197375
false
28,714,197
0
0
1
1
I'm beginning to work on a Python 3.4 app to serve a little website (mostly media galleries) with the bottle framework. I'm using bottle's 'simple template engine' I have a YAML file pointing to a folder which contains images and other YAML files (with metadata for videos). The app or the template should then grab all ...
Rounding up Dependencies for PyQt
30,196,277
1
0
191
0
python,qt,pyqt,cups
I got around the CUPS sandboxing by having the backend send the information to a listening server on localhost that then processed the job as I needed it. I made sure that the server listening would only accept connections from localhost. I never was able to get pyinstaller or cx_freeze to work with PyQt, but this work...
1
1
0
0
2015-02-25T15:42:00.000
1
1.2
true
28,723,232
0
0
0
1
I have been trying to get a program I wrote in PyQt to work being called from a CUPS backend on OS X. The problem is that CUPS sandboxing keeps the program from being able to access the PyQt python modules which I have brewed in /usr/local/Cellar. Is there any way to grab those files, as well as the Qt files in the Cel...
Installed python-mode; now I only see class names in my file
35,023,398
0
0
132
0
python,vim,python-mode
If you are not happy with folding, you might like to disable python-mode folding by keeping let g:pymode_folding = 0 in ~/.vimrc. What I usually do is enable folding and use space bar to open it. I also set set foldclose=all to automatically fold unfolded fold
0
1
0
1
2015-02-25T16:49:00.000
2
0
false
28,724,782
1
0
0
2
I installed python-mode for vim on my Mac OSX system. I decided to try one of the python motion commands. I hit [C which I thought would go to the next class. But the screen also switched, to show ONLY class names in gray highlighting. I've searched the python-mode documentation, and I can't see anything about this hap...
Installed python-mode; now I only see class names in my file
28,724,868
1
0
132
0
python,vim,python-mode
It sounds like you've discovered the "folding" feature of Vim. Press zo to open one fold under the cursor. zO opens all folds under the cursor. zv opens just enough folds to see the cursor line. zR opens all folds. See :help folding for details.
0
1
0
1
2015-02-25T16:49:00.000
2
0.099668
false
28,724,782
1
0
0
2
I installed python-mode for vim on my Mac OSX system. I decided to try one of the python motion commands. I hit [C which I thought would go to the next class. But the screen also switched, to show ONLY class names in gray highlighting. I've searched the python-mode documentation, and I can't see anything about this hap...
How do I get python to recognize a module from any directory?
28,770,249
1
2
1,420
0
python,installation,anaconda,packages,pydicom
You shouldn't copy the source to site-packages directly. Rather, use python setup.py install in the source directory, or use pip install .. Make sure your Python is indeed the one in /usr/local/anaconda, especially if you use sudo (which in general is not necessary and not recommended with Anaconda).
0
1
0
1
2015-02-26T20:06:00.000
1
1.2
true
28,751,764
1
0
0
1
I'm installing some additional packages to anaconda and I can't get them to work. One such package is pydicom which I downloaded, unziped, and moved to /usr/local/anaconda/lib/python2.7/site-package/pydicom. In the pydicom folder the is a subfolder called source which contains both ez_setup.py and setup.py. I ran sudo ...
Can I have GCS private isolated buckets with a unique api key per bucket?
28,754,390
1
1
56
0
google-app-engine,google-cloud-storage,google-app-engine-python
Unfortunately you only have two good options here: Have a service which authenticates the individial app according to whatever scheme you like (some installation license, a random GUID assigned at creation time, whatever) and vends GCS signed URLs, which the end user could then use for a single operation, like uploadi...
0
1
1
0
2015-02-26T21:26:00.000
1
0.197375
false
28,753,061
0
0
0
1
I'd like to give to each of my customers access to their own bucket under my GCS enabled app. I also need to make sure that a user's bucket is safe from other users' actions. Last but not least, the customer will be a client application, so the whole process needs to be done transparently without asking the user to l...
How do I show a list of processes for the current user using python?
28,756,912
-2
3
4,574
0
python,process
popen works great because you can run things through grep, cut, etc. So you can tailor the info to exactly what you want.
0
1
0
0
2015-02-27T02:09:00.000
6
-0.066568
false
28,756,362
0
0
0
1
I know it has something to do with /proc but I'm not really familiar with it.
How to share memcache items across 2 apps locally using google app eninge sdk
28,804,617
2
1
63
0
python,google-app-engine
Actually two different App Engine apps cannot see the same items in memcache. Their memcache spaces are totally isolated from each other. However two different modules of the same app use the same memcache space and can read and write the same items. Modules act like sub-apps. Is that what you meant? It is also possib...
0
1
0
0
2015-03-01T13:04:00.000
1
1.2
true
28,793,857
0
0
1
1
I have 2 Google App Engine applications which share memcache items, one app writes the items and the other apps reads them. This works in production. however - locally using the SDK, items written by one app are not available to the other. Is there a way to make this work?
Best way to stop a Python script even if there are Threads running in the script
28,799,878
2
0
238
0
python,multithreading
To me, this looks like a pristine application for the subprocess module. I.e. do not run the test-scripts from within the same python interpreter, rather spawn a new process for each test-script. Do you have any particular reason why you would not want to spawn a new process and run them in the same interpreter instead...
0
1
0
1
2015-03-01T22:02:00.000
2
1.2
true
28,799,663
1
0
0
1
I have a python program run_tests.py that executes test scripts (also written in python) one by one. Each test script may use threading. The problem is that when a test script unexpectedly crashes, it may not have a chance to tidy up all open threads (if any), hence the test script cannot actually complete due to the t...
Multiple executables as a single file
28,828,064
0
0
202
0
python,bash,scripting,path,packing
Thanks for the answers! Of course this is not a good approach for providing a published code! Sorry if it was confusing. But this is a good approach if you are developing some e.g. scientific idea, and you wish to obtain a proof of concept result fast and you wish to do similar tasks several times but replacing fast so...
0
1
0
1
2015-03-02T15:44:00.000
2
0
false
28,813,775
0
0
0
1
For some routine work I found that combining different scripting languages can be the fastest way to do. Like I have some main bash script which calles some awk, pyton and bash scripts or even some compiled fortran executables. I can put all the files into a folder that is in the paths, but it makes modification is a b...
only run python script if it is git committed
28,814,943
1
1
132
0
python,git
You could consider running your script from a separate checkout to where you do your development. That way you would need to commit, push locally, and pull in the 'deployment' location before you could run the updated script. You could probably automate those steps with a shell script or even a git commit hook.
0
1
0
1
2015-03-02T16:34:00.000
2
1.2
true
28,814,845
1
0
0
1
I have a slightly unusually situation: I have scripts that I make small changes to frequently, and that take hours to execute. I save output logs, but more importantly I need to make sure that the code which produced a given log will not be lost. Committing changes before each run will work, but I'd like to enforce thi...
GAE blobstore upload fails with CSRF token missing
28,857,208
0
0
228
0
python,google-app-engine,flask,blobstore,flask-wtforms
Okey, so the real problem was that I was giving an absolute url to the successpath argument (i.e. the first) of blobstore.create_upload_url(), causing the request notifying about the success caused a csrf error when loading the root path (/). I changed it to a path relative to the root and now just using @csrf.exempt ...
0
1
0
0
2015-03-03T22:27:00.000
2
0
false
28,843,234
0
0
1
1
I'm running flask on app engine. I need to let users upload some files. For security reasons I have csrf = CsrfProtect(app) on the whole app, with specific url's exempted using the @csrf.exempt decorator in flask_wtf. (Better to implicitly deny than to implicitly allow.) Getting an upload url from blobstore with blobst...
Task queue: Allow only one task at a time per user
28,849,410
1
2
406
0
python,google-app-engine,task-queue
You can specify as many queues as you like in queue.yaml rather than just using the default push queue. If you feel that no more than, say, five users at once are likely to contest for simultaneous use of them then simply define five queues. Have a global counter that increases by one and wraps back to 1 when it exceed...
0
1
0
0
2015-03-04T07:27:00.000
1
0.197375
false
28,848,740
0
0
1
1
In my application, I need to allow only one task at a time per user. I have seen that we can set max_concurrent_requests: 1 in queue.yaml. but this will allows only one task at a time in a queue. When a user click a button, a task will be initiated and it will add 50 task to the queue. If 2 user click the button in alm...
Python Subprocess for Notepad
28,854,681
0
2
1,546
0
python,subprocess,popen,notepad
Found the exact solution from Alex K's comment. I used pywinauto to perform this task.
0
1
0
0
2015-03-04T11:59:00.000
3
0
false
28,853,923
1
0
0
1
I am trying to open Notepad using popen and write something into it. I can't get my head around it. I can open Notepad using command: notepadprocess=subprocess.Popen('notepad.exe') I am trying to identify how can I write anything in the text file using python. Any help is appreciated.
Bloomberg API Python 3.5.5 with C++ 3.8.1.1. on Mac OS X import blpapi referencing
29,039,670
7
3
3,384
0
python,c++,macos,installation,blpapi
There is a missing step in the Python SDK README file; it instructs you to set BLPAPI_ROOT in order to build the API wrapper, but this doesn't provide the information needed at runtime to be able to load it. If you unpacked the C/C++ SDK into '/home/foo/blpapi-sdk' (for example), you will need to set DYLD_LIBRARY_PATH ...
0
1
0
0
2015-03-05T09:32:00.000
1
1
false
28,874,356
0
0
0
1
I am trying to install and run successfully Bloomberg API Python 3.5.5 and I have also downloaded and unpacked C++ library 3.8.1.1., both for the Mac OS X. I'm running Mac OS X 10.10.2. I am using the Python native to Mac OS X, Python 2.7.6 and I had already installed, via Xcode, the Command line gcc compiler, GCC 4....
Is it possible to use Celery to run an already compiled (py2exe) python script
28,878,537
0
0
94
0
python,python-2.7,celery,py2exe
if __name__ == '__main__': app.start() should be added to the entry point of the script.
0
1
0
0
2015-03-05T12:14:00.000
1
0
false
28,877,646
0
0
0
1
Is it possible to use Celery to run an already compiled (py2exe) python script, if yes, how I can invoke it ?
How to open process again in linux terminal?
28,891,431
0
1
1,139
0
python,linux,ssh,terminal
Things to try: nohup, or screen
0
1
0
1
2015-03-06T02:13:00.000
2
0
false
28,891,305
0
0
0
1
From my home pc using putty, I ssh'ed into a remote server, and I ran a python program that takes hours to complete, and as it runs it prints stuff. Now after a while, my internet disconnected, and I had to close and re-open putty and ssh back in. If I type 'top' I can see the python program running in the background w...
How to create multiple entities dynamically in google app engine using google data storage(python)
29,608,781
1
0
165
0
python,google-app-engine,google-cloud-datastore
It's not recommended to dynamically create a new table. You need to redesign your database relation structure. For example in a user messaging app instead of making a new table for every new message [ which contains message and user name] , you should rather create a User table and Messagestable separately and impleme...
0
1
0
0
2015-03-06T12:29:00.000
1
1.2
true
28,898,827
0
0
1
1
I wish to implement this: There should be an entity A with column 1 having values a,b,c...[dynamically increases by user's input] There should be another entity B for each values of a , b , c.. How should I approach this problem? Should I dynamically generate other entities as user creates more [a,b,c,d... ] ? If yes ...
Change hostname in mininet host
29,895,418
1
2
1,568
0
python,ubuntu,networking,hostname,mininet
I don't think you can get different names by running the "hostname" on each host. Only networking-related commands will produce different results on different hosts because the hosts run on separated namespaces. So perhaps one way to get the hostname is to run ifconfig and intepret the hostname from the interfaces' nam...
0
1
0
0
2015-03-06T16:44:00.000
2
0.099668
false
28,903,499
0
0
0
2
I need to emulate a network with n hosts connected by a switch. The perfect tool for this seems to be mininet. The problem is that I need to run a python script in every host that makes use of the hostname. The skript acts different depending on the hostname, so this is very important for me :) But the hostname seems t...
Change hostname in mininet host
43,475,651
1
2
1,568
0
python,ubuntu,networking,hostname,mininet
I finally figure out how to do it , first you need to run the "ifconfig" command from inside the program and storing it in a variable , second you use regular expressions 're' to grab the text , I use it to grab the addressees of my hosts...you can do the same for the hostname code: getip(): ifconfig_output=...
0
1
0
0
2015-03-06T16:44:00.000
2
0.099668
false
28,903,499
0
0
0
2
I need to emulate a network with n hosts connected by a switch. The perfect tool for this seems to be mininet. The problem is that I need to run a python script in every host that makes use of the hostname. The skript acts different depending on the hostname, so this is very important for me :) But the hostname seems t...
Bloomberg API SDK not compatible with Anaconda Python
28,947,897
4
1
1,122
0
python,api,anaconda,blpapi
This is not true. The Anaconda Python and Python extension modules are built using Visual Studio (2008 for Python 2 and 2010 for Python 3, the same as the Python installers from python.org).
0
1
0
0
2015-03-06T17:15:00.000
1
0.664037
false
28,904,066
1
0
0
1
I spent hours yesterday trying to get the blapi up and running and finally gave in and emailed their support, this is the response: "Unfortunately our BLPAPI SDKs are not compatible with the Anaconda distribution of Python. That Python is built using GCC, and it is not capable of loading DLLs that were built using...
Create executable that uses admin rights with Pyinstaller
35,067,170
17
5
7,070
0
python,pyinstaller
PyInstaller 3.0 includes the --uac-admin option!
0
1
0
0
2015-03-07T23:58:00.000
1
1
false
28,921,545
1
0
0
1
I need to create an executable for windows 8.1 and lower, so I tried Py2Exe (no success) and then PyInstaller, and damn it, it worked. Now I need to run it as admin (everytime since that uses admin tasks). My actual compiling script looks like this : python pyinstaller.py --onefile --noconsole --icon=C:\Python27\my_di...
-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: Permission denied
37,664,878
-1
5
45,325
0
python,linux,centos
-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: Permission denied then first remove python follow command line -- sudo rpm -e python second check which package install this command line -- sudo rpm -q python then install package -- sudo yum install python* i think this problem solve
0
1
0
1
2015-03-08T05:24:00.000
5
-0.039979
false
28,923,393
0
0
0
3
I am new in centos.I am try to do an application on it.For my application I need to install python 2.7.But the default one on server was python 2.6. So tried to upgrade the version .And accidentally I deleted the folder /usr/bin/python.After that I Installed python 2.7 through make install.I created the folder again /u...
-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: Permission denied
40,200,244
3
5
45,325
0
python,linux,centos
yum doesn't work with python2.7. You should do the following vim /usr/bin/yum change #!/usr/bin/python to #!/usr/bin/python2.6 If your python2.6 was deleted, then reinstall them and point the directory in /usr/bin/yum to your python2.6 directory.
0
1
0
1
2015-03-08T05:24:00.000
5
0.119427
false
28,923,393
0
0
0
3
I am new in centos.I am try to do an application on it.For my application I need to install python 2.7.But the default one on server was python 2.6. So tried to upgrade the version .And accidentally I deleted the folder /usr/bin/python.After that I Installed python 2.7 through make install.I created the folder again /u...
-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: Permission denied
62,297,081
0
5
45,325
0
python,linux,centos
this problem is that yum file start head write #!/usr/local/bin/python2.6, write binary file, is not dir, is python binary file
0
1
0
1
2015-03-08T05:24:00.000
5
0
false
28,923,393
0
0
0
3
I am new in centos.I am try to do an application on it.For my application I need to install python 2.7.But the default one on server was python 2.6. So tried to upgrade the version .And accidentally I deleted the folder /usr/bin/python.After that I Installed python 2.7 through make install.I created the folder again /u...
distutils setup script under linux - permission issue
28,951,788
1
0
36
0
python,linux,distutils,setup.py
The immediate solution is to invoke setup.py with --prefix=/the/path/you/want. A better approach would be to include the data as package_data. This way they will be installed along side your python package and you'll find it much easier to manage it (find paths etc).
0
1
0
1
2015-03-09T20:56:00.000
1
0.197375
false
28,951,588
0
0
0
1
So I created a setup.py script for my python program with distutils and I think it behaves a bit strange. First off it installs all data_files into /usr/local/my_directory by default which is a bit weird since this isn't a really common place to store data, is it? I changed the path to /usr/share/my_directory/. But now...
REPL error with Sublime Text 3
29,251,327
3
2
15,816
0
python,sublimetext3,sublimerepl
I had the same problem, when I installed REPL for the first time. Now, that could sound crazy, but the way to solve the problem (at least, the trick worked for me!) is to restart once Sublime Text 3. Update: As pointed out by Mark in the comments, apparently you could have to restart Sublime more than once to solve the...
0
1
0
0
2015-03-09T21:41:00.000
2
0.291313
false
28,952,282
1
0
0
1
I'm using REPL with sublime text 3 (latest version as of today) and I'm coding in python 3.4. As far as I understand the documentation on REPL if do: tools>sublimeREPL>python>python-RUN current file then I should run the code I have typed in using REPL. However when I do this I get an error pop up saying: FileNotFoundE...
twisted run local shell commands with pipeline
31,752,497
0
1
700
0
python,twisted,twisted.internet
use getProcessOutput('/bin/sh', ('-c', cmd)). cmd is your shell command. try it :-)
0
1
0
0
2015-03-10T06:16:00.000
1
1.2
true
28,957,258
0
0
0
1
In twisted, getProcessOutput method could get 'ps' shell command ouput by using getProcessOutupt('ps', 'aux') and return a defer. my question is how to run command like "ps aux | grep 'some keyword' | awk '{...}'" in getProcessOutput. for example getProcessOutput("ps aux | grep 'some keyword' | awk '{...}'"). any sugge...
celery beat schedule: run task instantly when start celery beat?
30,854,981
-1
12
5,063
0
python,celery,celerybeat
The best idea is create an implementation which schedules the task itself after completing the task. Also, create an entrance lock so the task cannot be executed multiple times per moment. Trigger the execution once. In this case, you don't need a celerybeat process the task is guaranteed to execute
0
1
0
0
2015-03-10T10:39:00.000
3
-0.066568
false
28,961,517
0
0
1
1
If I create a celery beat schedule, using timedelta(days=1), the first task will be carried out after 24 hours, quote celery beat documentation: Using a timedelta for the schedule means the task will be sent in 30 second intervals (the first task will be sent 30 seconds after celery beat starts, and then every 30 seco...
How to run one command on multiple terminals?
28,966,597
2
3
1,086
0
python,shell,terminal,command,conemu
Apps+G groups input for all visible panes.
0
1
0
0
2015-03-10T13:36:00.000
1
1.2
true
28,965,230
0
0
0
1
I am using ConEmu windows emulator and I would like to run one simple command on more terminals at the same time. Is there any way to do that?
Open SSH connection on exit Python
28,971,821
0
1
1,186
0
python,ssh
If you want the python script to exit, I think your best bet would be to continue doing a similar thing to what you're doing; print the credentials in the form of arguments to the ssh command and run python myscript.py | xargs ssh. As tdelaney pointed out, though, subprocess.call(['ssh', args]) will let you run the ss...
0
1
1
1
2015-03-10T18:17:00.000
3
1.2
true
28,971,180
0
0
0
1
I am writing a little script which picks the best machine out of a few dozen to connect to. It gets a users name and password, and then picks the best machine and gets a hostname. Right now all the script does is print the hostname. What I want is for the script to find a good machine, and open an ssh connection to it ...
How can i point pip to VCForPython27 in order to prevent "Unable to find vcvarsall.bat" error
36,624,566
2
1
3,358
0
python,pip
Use the command prompt shortcut provided from installing the MSI. This will launch the prompt with VCVarsall.bat activated for the targeted environment. Depending on your installation, you can find this in the Start Menu under All Program -> Microsoft Visual C++ For Python -> then pick the command prompt based on x64 o...
0
1
0
0
2015-03-11T06:21:00.000
3
0.132549
false
28,979,898
1
0
0
1
I downloaded Microsoft Visual C++ Compiler for Python 2.7 and it installed in C:\Users\user\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\vcvarsall.bat However, I am getting the error: Unable to find vcvarsall.bat error when attempting to install "MySQL-python". I added C:\Users\user\AppData\Local\P...
how to install python packages for brew installed pythons
29,003,811
10
8
12,370
0
python,homebrew
Use pip3. The "caveats" text you see when you run brew info python3 was printed for you after python3 was installed; that text is frequently helpful! It reads: You can install Python packages with pip3 install <package> They will install into the site-package directory /usr/local/lib/python3.4/site-packages
0
1
0
0
2015-03-11T15:24:00.000
1
1
false
28,990,639
1
0
0
1
I just finished installing the latest stable version of python via Homebrew. $ brew install python3 Everything works fine. I would like to install packages, for example PyMongo. I don't have pip. $ pip -bash: pip: command not found and there is no Homebrew formulae for it: $ brew install PyMongo brew install PyMongo E...
Close port on killing python the process with children
28,993,604
0
0
352
0
python,port,popen,kill
ok I've got it seems like close_fds=True while doing Popen solves the issue.
0
1
0
0
2015-03-11T17:34:00.000
1
0
false
28,993,486
0
0
0
1
When my python program is killed with -9 normally it also closes the port it's listening. BUT when it has some child processes running created with Popen (which I don't really need to kill on killing parent), while killing -9 the parent it seems to leave the port in use. How can I force to close the port even if there...
Python igraph for windows 64bit
29,264,918
1
0
852
0
python,igraph,python-3.4
As suggested by @Tamas, you should download wheel packages from the link and use pip to install them.
0
1
0
0
2015-03-11T21:31:00.000
2
0.099668
false
28,997,764
1
0
0
1
I am looking for python-igraph package for windows 64bits. I have installed python 3.4 and it seems that I can not find proper igraph installation package for it. I have crawled all webpages and still could not find what I am looking for. Can anyone help me please? Thanks
How to run a shell script placed in different folder from python
29,032,085
0
2
1,696
0
python
You could use an absolute, as opposed to relative, file path to your script.
0
1
0
0
2015-03-13T12:17:00.000
3
0
false
29,032,051
0
0
0
1
I am using the subprocess.call like below: subprocess.call(['sudo ./order_fc_prioritizer/run.sh']) But its saying no such file or directory
How to point LLVM_CONFIG environment variable to the path for llvm-config
29,104,989
5
9
23,428
0
python,osx-mountain-lion,numba
Ok, I needed to install llvm first. My problem was that I was installing LLVMLITE not LLVM. So brew install llvm and then locating llvm-config in the Cellar directory solved my problem.
0
1
0
0
2015-03-13T20:26:00.000
2
0.462117
false
29,041,356
1
0
0
1
I am trying to install numba on an OS X Mountain Lion. I had tried the pip install way but didn't work, so I have downloaded from the GIT respositories the zip files. When trying to install numba I realized that I need LLVM first. I downloaded and unpacked llvm into the Download folder. The README instructions are: "I...
Cron job on google cloud managed virtual machine
29,050,842
1
0
1,243
1
python,google-app-engine,cron,virtual-machine,google-compute-engine
The finest resolution of a cron job is 1 minute, so you cannot run a cron job once every 10 seconds. In your place, I'd run a Python script that starts a new thread every 10 seconds to do your MySQL work, accompanied by a cronjob that runs every minute. If the cronjob finds that the Python script is not running, it wou...
0
1
0
0
2015-03-14T01:06:00.000
2
1.2
true
29,044,322
0
0
1
1
I have a python script that queries some data from several web APIs and after some processing writes it to MySQL. This process must be repeated every 10 seconds. The data needs to be available to Google Compute instances that read MySQL and perform CPU-intensive work. For this workflow I thought about using GCloud SQL ...
Is there another way, other than the "depends_on" list, for a Property to become a dependency of another Property?
31,955,940
0
2
154
0
python,enthought
I'm not sure this directly answers your question, but you may get what you're after by using the @cached_property decorator to reduce the number of time the property is computed. I think there may be elements of "push" and "pull" style computations with properties.
0
1
0
0
2015-03-16T01:00:00.000
1
0
false
29,068,146
0
0
0
1
In the Enthought Traits/UI system, is there another way, other than being included in another Property's depends_on list, that a Property can become a dependency of another Property? I have a HasTraits subclass, which has a property, chnl_h, which doesn't appear in any other Property's depends_on list, but is behaving ...
Python 3 can't find homebrew pyqt installation
29,091,698
2
0
562
0
python,homebrew
brew reinstall pyqt --with-python3 will get you sorted!
1
1
0
0
2015-03-16T03:47:00.000
2
0.197375
false
29,069,364
1
0
0
1
I recently used homebrew to install pyqt (along with qt & sip), but get an import error whenever I try to import PyQt4 in Python 3 (which was also installed using homebrew). To confuse matters more, I am able to import PyQt4 on Python 2 via the terminal. I'm totally new to working with Python packages and, with that, t...
Spin up VM using Ansible without Vagrant
29,079,838
2
1
561
0
python,ansible,kvm,libvirt
Of course - if you have SSH access to it. Yes, you can run Ansible using its Python API or through command-line call. About passing YAML file - also - yes.
0
1
0
0
2015-03-16T14:45:00.000
1
0.379949
false
29,079,698
1
0
0
1
I have a specific requirement where I can use only Ansible in my host machine without vagrant. Two questions associated with it: Is it possible to spin up a VM over the host machine with libvirt/KVM as hypervisor using ansible ? I know there is a module called virt in ansible which is capable of doing this. But I c...
How do I fix my anaconda python distribution?
37,975,575
-1
9
14,137
0
python,anaconda
I had a similar problem - was able to use conda from an anaconda prompt (found in the anaconda folder) and install packages I needed
0
1
0
0
2015-03-16T23:51:00.000
3
-0.066568
false
29,088,972
1
0
0
2
All seemed to be working fine in my anaconda distribution on Mac. Then I tried to install the postgres library psycopg2 with conda install psycopg2. That threw an error. Something about permissions. But now nothing works. Now it can't even find the conda executable or start ipython. -bash: conda: command not found Sho...
How do I fix my anaconda python distribution?
29,105,951
5
9
14,137
0
python,anaconda
You're going to have to reinstall Anaconda to fix this. Without conda, there's not much you can do to clean up the broken install.
0
1
0
0
2015-03-16T23:51:00.000
3
0.321513
false
29,088,972
1
0
0
2
All seemed to be working fine in my anaconda distribution on Mac. Then I tried to install the postgres library psycopg2 with conda install psycopg2. That threw an error. Something about permissions. But now nothing works. Now it can't even find the conda executable or start ipython. -bash: conda: command not found Sho...
Python: What happens when main process is terminated.
39,339,970
0
1
780
0
python,python-multiprocessing
You can just run your program and see if there is python processes alive after the main process terminated. The correct way to terminate your program is making all the subprocesses terminated before the main process end. (Try to use Process.terminate() and Process.join() methods for all subprocesses before the main pro...
0
1
0
0
2015-03-17T01:16:00.000
2
0
false
29,089,753
1
0
0
1
I am working with the multiprocessing module on a Unix system. I have noticed memory leaks when I terminate one of my programs. I was thinking that this might be because the processes that were started in the main process kept running. Is this correct?
Is there a difference between RotatingFileHandler and logrotate.d + WatchedFileHandler for Python log rotation?
29,104,883
3
12
4,420
0
python,logrotate,log-rotation
RotatingFileHandler allows a log file to grow up to size N, and then immediately and automatically rotates to a new file. logrotate.d runs once per day usually. If you want to limit a log file's size, logrotate.d is not the most helpful because it only runs periodically.
0
1
0
0
2015-03-17T16:34:00.000
2
0.291313
false
29,104,675
0
0
0
1
Python has its own RotatingFileHandler which is supposed to automatically rotate log files. As part of a linux application which would need to rotate it's log file every couple of weeks/months, I am wondering if it is any different than having a config file in logrotate.d and using a WatchedFileHandler instead. Is ther...
Chromium build gclient runhooks error number 13
29,161,669
0
0
769
0
python,build,permissions,chromium
Actually the directory was not mounted with execution permission. So I remounted the directory with execution permission using mount -o exec /dev/sda5 /media/usrname and it worked fine.
0
1
1
0
2015-03-17T17:22:00.000
2
1.2
true
29,105,684
0
0
0
1
I am getting the following error while running gclient runhooks for building chromium. running '/usr/bin/python src/tools/clang/scripts/update.py --if-needed' in '/media/usrname/!!ChiLL out!!' Traceback (most recent call last): File "src/tools/clang/scripts/update.py", line 283, in sys.exit(main()) File "src/to...
Docker not run in debian wheezy
29,106,853
0
0
72
0
java,javascript,android,python,ios
Add #!/bin/bash or #!/usr/bin/env bash as the very first line of the script that you're executing.
0
1
0
0
2015-03-17T18:06:00.000
1
0
false
29,106,586
0
0
0
1
i installed Docker in debian wheezy 64bit and when i try to run it these error are displayed: /usr/local/bin/docker: line 1: --2015-03-17: command not found /usr/local/bin/docker: line 2: syntax error near unexpected token (' /usr/local/bin/docker: line 2:Resolving get.docker.io (get.docker.io)...162.242.195.84' how to...
Python packaging for hive/hadoop streaming
34,297,373
0
0
496
0
python,hadoop,mapreduce,hadoop-streaming
This may be done by packaging the dependencies and the reducer script in a zip, and adding this zip as a resource in Hive. Let's say the Python reducer script depends on package D1, which in turn depends on D2 (thus resolving OP's query on transitive dependencies), and both D1 and D2 are not installed on any machine in...
0
1
0
0
2015-03-17T19:28:00.000
1
0
false
29,108,020
0
0
0
1
I have a hive query with custom mapper and reducer written in python. The mapper and reducer modules depend on some 3rd party modules/packages which are not installed on my cluster (installing them on the cluster is not an option). I realized this problem only after running the hive query when it failed saying that the...
Is there any benefit to using python2.7 multiprocessing to copy files
29,111,506
1
0
53
0
python,multiprocessing
I/O goes to the system cache in RAM before hitting a hard drive. Fro writes, you may find the copies are fast until you exhaust RAM and then slows down and that multiple reads of the same data are fast. If you copy the same file to several places, there is an advantage to do the copies of that file before moving to the...
0
1
0
0
2015-03-17T23:09:00.000
1
0.197375
false
29,111,407
1
0
0
1
I would like to know if there is any benefit to using python2.7's multiprocessing module to asynchronously copy files from one folder to another. Is diskio always forced to be in serial? Does this change if you are copying from one hard disk to a different hard disk? Does this change depending on operating system (win...
Do I need to use Tornado Futures with Motorengine?
29,156,089
0
0
113
0
python,mongodb,tornado
You need to understand how Tornado works asynchronously. Everytime you yield a Future object, Tornado suspends current coroutine and jumps to the next coroutine. Doing queries synchronous or asynchronous depends on the situation. If your query is fast enough, you can use synchronous driver. Also, keep in mind, jumping ...
0
1
0
0
2015-03-18T14:16:00.000
1
0
false
29,124,446
0
0
0
1
Basically, what is a Futures on Tornado's approach? I've read on some stackoverflow threads that a tornado coroutine must return a Future, but returning a Future how do my db queries work? Using Futures will my Tornado app be waiting for the query to return anything like a blocking i/o or it will just dispatch the requ...
How to feed information to a Python daemon?
30,587,524
4
9
2,615
0
python,linux,queue,pipe,fifo
There are several options 1) If the daemon should accept messages from other systems, make the daemon an RPC server - Use xmlrpc/jsonrpc. 2) If it is all local, you can use either TCP sockets or Named PIPEs. 3) If there will be a huge set of clients connecting concurrently, you can use select.epoll.
0
1
0
0
2015-03-18T16:22:00.000
8
0.099668
false
29,127,341
0
0
0
2
I have a Python daemon running on a Linux system. I would like to feed information such as "Bob", "Alice", etc. and have the daemon print "Hello Bob." and "Hello Alice" to a file. This has to be asynchronous. The Python daemon has to wait for information and print it whenever it receives something. What would be the be...
How to feed information to a Python daemon?
30,565,140
0
9
2,615
0
python,linux,queue,pipe,fifo
Why not use signals? I am not a python programmer but presumably you can register a signal handler within your daemon and then signal it from the terminal. Just use SIGUSR or SIGHUP or similar. This is the usual method you use to rotate logfiles or similar.
0
1
0
0
2015-03-18T16:22:00.000
8
0
false
29,127,341
0
0
0
2
I have a Python daemon running on a Linux system. I would like to feed information such as "Bob", "Alice", etc. and have the daemon print "Hello Bob." and "Hello Alice" to a file. This has to be asynchronous. The Python daemon has to wait for information and print it whenever it receives something. What would be the be...
simplest way to make two python scripts talk to each other?
29,135,637
1
1
1,235
0
python
If I were a beginner, I would have my remote script periodically check the value of the variable in a text file. When I needed to update the variable, I would just ssh to my remote machine and update the text file.
0
1
0
0
2015-03-18T22:12:00.000
2
0.099668
false
29,133,682
1
0
0
1
I have a python script running on a vps. Now i just want to change 1 variable in the running script using my desktop computer. What is the simplest way to that for a beginner?
Why do people create virtualenv in a docker container?
53,656,409
21
27
11,721
0
python,docker,virtualenv
Here is my two cents, or rather comments on @gru 's answer and some of the comments. Neither docker nor virtual environments are virtual machines every line in your docker file produces overhead. But it's true that at runtime virtual environments have zero impact the idea of docker containers is that you have one proc...
0
1
0
0
2015-03-19T14:08:00.000
3
1
false
29,146,792
1
0
0
2
You can build a container with Dockerfile in a few seconds. Then why do people need to install a virtual enviroment inside the docker container? It's like a "virtual machine" in a virtual machine ?
Why do people create virtualenv in a docker container?
33,150,800
30
27
11,721
0
python,docker,virtualenv
I am working with virtualenvs in Docker and I think there are several reasons: you may want to isolate your app from system's python packages you may want to run a custom version of python but still keep the system's packages untouched you may need fine grain control on the packages installed for a specific app you ma...
0
1
0
0
2015-03-19T14:08:00.000
3
1.2
true
29,146,792
1
0
0
2
You can build a container with Dockerfile in a few seconds. Then why do people need to install a virtual enviroment inside the docker container? It's like a "virtual machine" in a virtual machine ?
MPI_Sendrecv with operation on recvbuf?
29,256,366
1
2
127
0
python,c,mpi,mpi4py
MPI_Recvreduce is what you're looking for. Unfortunately, it doesn't exist yet. It's something that the MPI Forum has been looking at adding to a future version of the standard, but hasn't yet been adopted and won't be in the upcoming MPI 3.1.
0
1
0
0
2015-03-19T23:50:00.000
1
1.2
true
29,157,039
0
1
0
1
I use the MPI_Sendrecv MPI function to communicate arrays of data between processes. I do this in Python using mpi4py, but I'm pretty sure my question is independent of the language used. What I really want is to add an array residing on another process to an existing local array. This should be done for all processes,...
Orientation error for images uploaded to GAE (GCS + get_serving_url)
29,222,762
-1
1
218
0
google-app-engine,google-cloud-storage,google-app-engine-python
I think it happens because when get_serving_url service resize the image, it always resize the image from the longest side of the Image, keeping the aspect ration same. If you have a image of 1600x2400, then the resize image is 106x160 to keep the aspect ratio is same. In your case one of the image is 306x408 (which is...
0
1
0
0
2015-03-23T04:31:00.000
1
-0.197375
false
29,203,302
0
0
1
1
We are developing an image sharing service using GAE. Many users have reported since last week that "portrait images are oriented in landscape". We found out that from a specific timing, the specification of images uploaded and distributed through GAE has changed. So the specs seem to have changed around 3/18 03:25(UTC...
Where to store Dockerized python application configuration
29,226,897
1
1
58
0
python,configuration,docker
I guess that will very much depend. It might be useful to distinguish between two types of configuration: the one which define the way the container (application code contained) functions and the one which defines infrastructure (db credentials, collaborators endpoints, etc.). The functional configuration would more n...
0
1
0
0
2015-03-23T21:27:00.000
1
1.2
true
29,220,747
1
0
0
1
Much like data volumne, the configuration for a python app should persist across changes in the app container. A file in a separate data container? Database in a separate data container? I realize there are multiple ways to store the configuration information. But what patterns are being used in today's Dockerized ...
How to install dependencies in OpenShift?
29,236,634
0
0
461
0
python,openshift
You can not use the "yum" command to install packages on OpenShift. What specific issue are you having? I am sure that at least some of those packages are already installed in OpenShift online already (such as wget). Have you tried running your project to see what specific errors you get about what is missing?
0
1
0
1
2015-03-23T22:44:00.000
2
0
false
29,221,836
0
0
0
1
Hello i want to install these dependencies in OpenShift for my App yum -y install wget gcc zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel libffi-devel libxslt libxslt-devel libxml2 libxml2-devel openldap-devel libjpeg-turbo-devel openjpeg-devel libtiff-devel libyaml-d...
Impossible to set python.exe to *.py scripts on Win7
36,078,931
3
3
1,995
0
python,windows,python-2.7
Here is another check to make, which helped me figure out what was going on. I switched from the 32bit Anaconda to the 64bit version. I deinstalled, downloaded then reinstalled, but several things didn't get cleaned up properly (quick launch stuff, and some registry keys). The problem on my side was that the default in...
0
1
0
1
2015-03-24T09:42:00.000
5
0.119427
false
29,229,273
0
0
0
2
i've installed py 2.7 (64bit) on my PC with Win7 (64bit) without problem but I'm not able to run *.py scripts via DOS shell without declare python full path. Let me better explain : If I type D:\ myscript.py it doesn't work. The script is open with wordpad If I type D:\ C:\Python27 myscript.py it works and run correct...
Impossible to set python.exe to *.py scripts on Win7
56,543,680
0
3
1,995
0
python,windows,python-2.7
@slv 's answer is good and helped me a bit with solving this problem. Anyhow, since I had previous installations of Python before this error occured for me, I might have to add something to this. One of the main problems hereby was that the directory of my python-installation changed. So, I opened regedit.exe and follo...
0
1
0
1
2015-03-24T09:42:00.000
5
0
false
29,229,273
0
0
0
2
i've installed py 2.7 (64bit) on my PC with Win7 (64bit) without problem but I'm not able to run *.py scripts via DOS shell without declare python full path. Let me better explain : If I type D:\ myscript.py it doesn't work. The script is open with wordpad If I type D:\ C:\Python27 myscript.py it works and run correct...
How to write a stress test script for asynchronous processes in python
29,233,194
0
0
988
0
python,django,web-applications,stress-testing,djcelery
I think there is no need to write your own stress testing script. I have used www.blitz.io for stress testing. It is set up in minutes, easy to use and it makes beautiful graphs. It has a 14 day trial so you just can test the heck out of your system for 14 days for free. This should be enough to find all your bottlen...
0
1
0
0
2015-03-24T10:36:00.000
1
0
false
29,230,333
0
0
1
1
I have a web application running on django, wherein an end user can enter a URL to process. All the processing tasks are offloaded to a celery queue which sends notification to the user when the task is completed. I need to stress test this app with the goals. to determine breaking points or safe usage limits to confi...
Create Kivy package for Windows from OSX
29,239,289
1
1
327
0
python,linux,windows,macos,kivy
Your best bet will be to setup a VM for Windows and a VM for Linux, then create the packages for each OS within those VMs. You might be able to use pyinstaller with Wine to make the Windows package directly on OSX - I have read that this can be done on Linux, so in theory it could work on OSX. But you will probably get...
0
1
0
0
2015-03-24T17:21:00.000
1
1.2
true
29,239,033
1
0
0
1
I've packaged a Kivy program that I made on OSX, but I also want to be able to distribute it for Windows and Linux. Is there currently a way of creating a Windows or Linux package from OSX? Or is there an ETA on when Buildozer will be able to create Windows packages?
How to create a virtualenv with Python3 while my system is OsX 10 with Python2
29,287,001
2
0
62
0
python,macos,virtualenvwrapper
You can use the -p arg like so -- virtualenv -p $(which python3)
0
1
0
0
2015-03-24T18:08:00.000
1
1.2
true
29,239,877
1
0
0
1
My machine is OsX 10.10.2 and I have Python 2 installed. It is possible to create a virtualenv using virtualenvwrapper command mkvirtualenv to run on Python 3? I am reluctant to install Python3 in my system as the last time I did that, python on the whole stopped working. Not sure why, I am a new. May I screwed up. I a...
Google App Engine Faceted Search in production has to be enabled / activated?
29,302,041
1
1
223
0
python,google-app-engine,faceted-search
Facet value cannot be empty string. You can workaround it by not including facets with empty values or have a special value for your empty facets. The local implementation of faceted search (python) currently accepts empty facets that is a bug and will be fixed.
0
1
0
0
2015-03-24T20:01:00.000
2
1.2
true
29,241,797
0
0
1
1
I've just created locally on my machine a perfectly running faceted search service using Google App Engine Faceted Search, written in Python. As soon as I deploy to our production server, it throws an error during the index creation, specifically when the code try to execute index.put(docs), where docs is an array of [...
why is Java Processbuilder 4000 times slower at running commands then Python Subprocess.check_output
29,289,687
0
2
1,183
0
java,python,performance,subprocess,processbuilder
It seems like python doesn't spawn subprocess. Which is why it was faster. I am sorry with confusion. thank you
0
1
0
1
2015-03-24T22:03:00.000
1
0
false
29,243,748
0
0
1
1
I was trying to write a wrapper for a third party C tool using Java processbuilder. I need to run this process builder millions of times. But, I found something weird about the speed. I already have a wrapper for this third party tool C tool for python. In python, the wrapper uses the python subprocess.check_output. So...
Installing Python devel on centos
29,283,004
2
0
3,455
0
python,linux,oracle,centos,cx-oracle
You have a newer version of python installed than the corresponding source package you're trying to install. You have python 2.6.6-37 installed but the latest available source package from your repos (that you can successfully connect to) is 2.6.6-36. But it looks like the python you have installed came from your "upda...
0
1
0
1
2015-03-26T15:40:00.000
1
0.379949
false
29,282,771
0
0
0
1
bash-4.1# yum install python-devel Loaded plugins: fastestmirror, rhnplugin This system is receiving updates from RHN Classic or RHN Satellite. Loading mirror speeds from cached hostfile * rpmforge: mirror.smartmedia.net.id * webtatic-el5: uk.repo.webtatic.com http://192.168.210.26/centos/6/updates/i386/repodata/repo...
How to install in python 3.4 - .whl files
33,483,629
8
5
22,006
0
python,numpy,module
See the easiest solution is to unzip the .whl file using 7-zip. Then in the unzipped directory you will find the module which you can copy and paste in the directory C:/Python34/Lib/site-packages/ (or wherever else you have installed Python).
0
1
0
0
2015-03-26T16:48:00.000
2
1
false
29,284,282
1
0
0
2
I recently tried to re-install numpy for python 3.4, since I got a new computer, and am struggling. I am on windows 8.1, and from what I remember I previously used a .exe file that did everything for me. However, this time I was given a .whl file (apparently this is a "Wheel" file), which I cannot figure out how to ins...
How to install in python 3.4 - .whl files
29,286,276
6
5
22,006
0
python,numpy,module
Python 3.4 comes with PIP already included in the package, so you should be able to start using PIP immediately after installing Python 3.4. Commands like pip install <packagename> only work if the path to PIP is included in your path environment variable. If it's not, and you'd rather not edit your environment variabl...
0
1
0
0
2015-03-26T16:48:00.000
2
1.2
true
29,284,282
1
0
0
2
I recently tried to re-install numpy for python 3.4, since I got a new computer, and am struggling. I am on windows 8.1, and from what I remember I previously used a .exe file that did everything for me. However, this time I was given a .whl file (apparently this is a "Wheel" file), which I cannot figure out how to ins...
Use pdb to debug into subprocess?
29,286,660
0
3
3,428
0
python,debugging,subprocess,pdb
You will have to step through the code if you have a pdb. If you have the source files, leave a breakpoint in the line of your interest and use pdb to automatically stop at your line of interest. This is what we do in .net. Hopefully it should work for python too..
0
1
0
0
2015-03-26T18:45:00.000
2
0
false
29,286,485
1
0
0
1
I have some python code with many calls to subprocess (for example, subprocess.check_call()). It apparently can't debug into the subprocess. Is there any way (e.g. adding code) to make it do that, or must I use a different debugger?
How to use custom authentication with the login: required attribute in app.yaml ( Google app engine, python )
29,311,398
2
0
648
0
python,google-app-engine,authentication,yaml
Essentially, you have the following alternatives: either give up on static file / dir serving directly from App Engine infrastructure (transparently to your application), or give up on using your custom user class for authentication. I suspect you'll pick the first alternative, serving all files from your app (at least...
0
1
0
0
2015-03-27T15:29:00.000
1
1.2
true
29,304,395
0
0
1
1
On Google app engine I use a custom user class with methods. ( Not the class and functions provided by webapp2 ) However, I still need to block users from accessing certain static directory url's with html pages behind them. The current solution I have is that the user authentication happens after the user visits the p...
Openshift custom env vars not available in Python
29,305,330
1
0
37
0
python,openshift,django-1.7
You probably just need to stop & start (not restart) your application via the rhc command line so that your python environment can pick them up.
0
1
0
0
2015-03-27T16:14:00.000
1
1.2
true
29,305,308
0
0
1
1
I'm trying to get a Python 2.7, Django 1.7 web gear up and running. I have hot_deploy activated. However, after setting my required env vars (via rhc), and I see them set in the gear ('env | grep MY_VAR' is OK), when running the WSGI script the vars are NOT SET. os.environ['MY_VAR'] yields KeyError. Is this somehow r...
Build a buffer in file for stream of TCP packets
29,309,592
0
0
261
0
python,tcp,proxy,buffer
I recommend you join the two scripts into one and just use memory. If you can't join the scripts for some reason, create a unix-domain socket to pass the raw, binary data directly from one to the other. These fifos have limited size so you'll still have to do in-memory buffering on one side or another, probably the B ...
0
1
1
0
2015-03-27T17:45:00.000
1
0
false
29,306,962
0
0
0
1
I am trying to build a proxy to buffer some packets according to some schedules. I have two TCP connections, one from host A to the proxy and the other one from the proxy to host B. The proxy forwards the packets between A and B. The proxy will buffer the packets according to the scheduled instructions. At certain time...
Can I upload a binary wheel to a local devpi on Linux?
29,356,362
0
3
2,736
0
python,python-wheel,devpi
I wound up using twine for the upload. The devpi interfacing script ("devpi") is interesting, but I don't think we want it installed on all the boxes I'd need it on. Thanks.
0
1
0
0
2015-03-27T21:59:00.000
2
1.2
true
29,310,849
0
0
0
1
Is it possible to use "pip wheel" to upload a binary wheel on Linux, to a local devpi server? Or do I need to get to a setup.py and do an upload from there? It seems a shame to build the wheel without need of a setup.py (it's taken care of behind the scenes), only to need a setup.py to upload the result. This makes m...
DataStax OpsCenter 5.1.0 fails to start due to python 'ImportError'
29,364,698
1
0
334
0
python,cassandra,datastax,opscenter
The problem was due to missing symbolic links between the bundled python libraries. In particular, in /lib/py-debian/2.7/amd64/twisted the symoblic links to the contents of the py-unpure directory for the files _version.py, plugin.py, init.py and copyright.py were missing. Originally, I used gradle's copy from tarTree...
0
1
0
0
2015-03-29T13:01:00.000
1
1.2
true
29,329,425
1
0
0
1
Trying to start a tarball installation of OpsCenter 5.1.0 on Ubuntu 14.04 64-bit by running ./opscenter in /opt/opscenter-5.1.0/bin fails with the following error: Traceback (most recent call last): File "./bin/twistd", line 28, in <module> from twisted.scripts.twistd import run ImportError: cannot import name ru...
How to remove anaconda from windows completely?
50,202,529
3
102
368,077
0
python,windows,anaconda
It looks that some files are still left and some registry keys are left. So you can run revocleaner tool to remove those entries as well. Do a reboot and install again it should be doing it now. I also faced issue and by complete cleaning I got Rid of it.
0
1
0
0
2015-03-30T03:25:00.000
14
0.042831
false
29,337,928
1
0
0
13
I installed Anaconda a while ago but recently decided to uninstall it and just install basic python 2.7. I removed Anaconda and deleted all the directories and installed python 2.7. But when I go to install PyGTK for Windows it says it will install it to the c:/users/.../Anaconda directory - this doesn't even exist. I ...
How to remove anaconda from windows completely?
45,360,960
18
102
368,077
0
python,windows,anaconda
If a clean re-install/uninstall did not work, this is because the Anaconda install is still listed in the registry. Start -> Run -> Regedit Navigate to HKEY_CURRENT_USER -> Software -> Python You may see 2 subfolders, Anaconda and PythonCore. Expand both and check the "Install Location" in the Install folder, it will ...
0
1
0
0
2015-03-30T03:25:00.000
14
1
false
29,337,928
1
0
0
13
I installed Anaconda a while ago but recently decided to uninstall it and just install basic python 2.7. I removed Anaconda and deleted all the directories and installed python 2.7. But when I go to install PyGTK for Windows it says it will install it to the c:/users/.../Anaconda directory - this doesn't even exist. I ...
How to remove anaconda from windows completely?
61,464,989
3
102
368,077
0
python,windows,anaconda
For windows- In the Control Panel, choose Add or Remove Programs or Uninstall a program, and then select Python 3.6 (Anaconda) or your version of Python. Use Windows Explorer to delete the envs and pkgs folders prior to Running the uninstall in the root of your installation.
0
1
0
0
2015-03-30T03:25:00.000
14
0.042831
false
29,337,928
1
0
0
13
I installed Anaconda a while ago but recently decided to uninstall it and just install basic python 2.7. I removed Anaconda and deleted all the directories and installed python 2.7. But when I go to install PyGTK for Windows it says it will install it to the c:/users/.../Anaconda directory - this doesn't even exist. I ...
How to remove anaconda from windows completely?
48,980,402
7
102
368,077
0
python,windows,anaconda
To use Uninstall-Anaconda.exe in C:\Users\username\Anaconda3 is a good way.
0
1
0
0
2015-03-30T03:25:00.000
14
1
false
29,337,928
1
0
0
13
I installed Anaconda a while ago but recently decided to uninstall it and just install basic python 2.7. I removed Anaconda and deleted all the directories and installed python 2.7. But when I go to install PyGTK for Windows it says it will install it to the c:/users/.../Anaconda directory - this doesn't even exist. I ...
How to remove anaconda from windows completely?
58,889,740
1
102
368,077
0
python,windows,anaconda
Uninstall Anaconda from control Panel Delete related folders, cache data and configurations from Users/user Delete from AppData folder from hidden list To remove start menu entry -> Go to C:/ProgramsData/Microsoft/Windows/ and delete Anaconda folder or search for anaconda in start menu and right click on anaconda promp...
0
1
0
0
2015-03-30T03:25:00.000
14
0.014285
false
29,337,928
1
0
0
13
I installed Anaconda a while ago but recently decided to uninstall it and just install basic python 2.7. I removed Anaconda and deleted all the directories and installed python 2.7. But when I go to install PyGTK for Windows it says it will install it to the c:/users/.../Anaconda directory - this doesn't even exist. I ...
How to remove anaconda from windows completely?
63,536,711
3
102
368,077
0
python,windows,anaconda
there is a start item folder in C:\ drive. Remove ur anaconda3 folder there, simple and you are good to go. In my case I found here "C:\Users\pravu\AppData\Roaming\Microsoft\Windows\Start Menu\Programs"
0
1
0
0
2015-03-30T03:25:00.000
14
0.042831
false
29,337,928
1
0
0
13
I installed Anaconda a while ago but recently decided to uninstall it and just install basic python 2.7. I removed Anaconda and deleted all the directories and installed python 2.7. But when I go to install PyGTK for Windows it says it will install it to the c:/users/.../Anaconda directory - this doesn't even exist. I ...