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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
How to remove anaconda from windows completely? | 56,087,895 | 3 | 102 | 368,077 | 0 | python,windows,anaconda | On my machine (Win10), the uninstaller was located at C:\ProgramData\Anaconda3\Uninstall-Anaconda3.exe. | 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? | 54,453,907 | 1 | 102 | 368,077 | 0 | python,windows,anaconda | Go to C:\Users\username\Anaconda3 and search for Uninstall-Anaconda3.exe which will remove all the components of Anaconda. | 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? | 37,898,464 | 19 | 102 | 368,077 | 0 | python,windows,anaconda | In my computer there wasn't a uninstaller in the Start Menu as well. But it worked it the Control Panel > Programs > Uninstall a Program, and selecting Python(Anaconda64bits) in the menu.
(Note that I'm using Win10) | 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? | 39,490,516 | 184 | 102 | 368,077 | 0 | python,windows,anaconda | In the folder where you installed Anaconda (Example: C:\Users\username\Anaconda3) there should be an executable called Uninstall-Anaconda.exe. Double click on this file to start uninstall Anaconda.
That should do the trick as well. | 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? | 29,377,301 | 8 | 102 | 368,077 | 0 | python,windows,anaconda | Anaconda comes with an uninstaller, which should have been installed in the Start menu. | 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? | 29,377,433 | 15 | 102 | 368,077 | 0 | python,windows,anaconda | Since I didn't have the uninstaller listed - the solution turned out to be to reinstall Anaconda and then uninstall it. | 0 | 1 | 0 | 0 | 2015-03-30T03:25:00.000 | 14 | 1.2 | true | 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? | 56,794,491 | 4 | 102 | 368,077 | 0 | python,windows,anaconda | Method1:
To uninstall Anaconda3 go to the Anaconda3 folder, there u will be able to find an executable called Uninstall-Anaconda3.exe, double click on it. This should uninstall ur application.
There are times when the shortcut of anaconda command prompt,jupyter notebook, spyder, etc exists, so delete those files too.
... | 0 | 1 | 0 | 0 | 2015-03-30T03:25:00.000 | 14 | 0.057081 | 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 ... |
Installed python 2.7.9 instead of 3.4.3 and can't run pip install in cmd anymore | 29,346,753 | 0 | 0 | 517 | 0 | python,python-2.7,cmd | Pip is not in C:\Python27.
It's in C:\Python27\Scripts.
Check that folder to make sure there is a pip.exe, if there is then it should have installed fine, and make sure that C:\Python27\Scripts is in your PATH. | 0 | 1 | 0 | 0 | 2015-03-30T12:42:00.000 | 1 | 1.2 | true | 29,346,545 | 1 | 0 | 0 | 1 | I installed python 2.7.9 instead of 3.4.3 due to module xlutils not working on 3.4.3 and from the time I installed python 2.7.9 and I just can't install the related modules to it by using pip install and I added the ;C:\Python27 to the system path.
what am I missing here coz it keeps on telling me this error:
'pip is n... |
change date/time using python in linux | 37,574,931 | 1 | 1 | 6,022 | 0 | python,linux,date,time | You did a lower case -s it is meant to be -S so that is why it isn't working. | 0 | 1 | 0 | 0 | 2015-03-30T13:51:00.000 | 2 | 0.099668 | false | 29,347,981 | 0 | 0 | 0 | 1 | I tried using date command to change the system time in debian linux:
os.system("echo passwd | "sudo date -s \"Thu Aug 9 21:31:26 UTC 2012\")
and I set the python file permission to 777 and also chown as root. But it does not work and says date: cannot set date: Operation not permitted. Any Ideas?
Thanks |
Python 3.5 Port Binding Error | 29,353,947 | 0 | 2 | 1,571 | 0 | python | Assumptions:
You're running on Windows and installed the basic python for windows (which includes idle) and probably stuck with the defaults (so you should have python in c:\python35)
Related assumptions: Windows doesn't have an out of the box loopback interface and trying to enable one is going to be more painful th... | 0 | 1 | 0 | 0 | 2015-03-30T18:29:00.000 | 2 | 0 | false | 29,353,557 | 0 | 0 | 0 | 2 | I need some help. Im trying to run Python IDLE on my computer but I get the following error:
IDLE can't bind to a TCP/IP port, which is necessary to communicate with its Python execution server. This might be because no networking is installed on this computer. Run IDLE with the -n command line switch to start withou... |
Python 3.5 Port Binding Error | 58,263,324 | 0 | 2 | 1,571 | 0 | python | By using -n flag, you can use it for one time only. It means closing python idle, I'll have to redo -n flag process whenever I want to open . | 0 | 1 | 0 | 0 | 2015-03-30T18:29:00.000 | 2 | 0 | false | 29,353,557 | 0 | 0 | 0 | 2 | I need some help. Im trying to run Python IDLE on my computer but I get the following error:
IDLE can't bind to a TCP/IP port, which is necessary to communicate with its Python execution server. This might be because no networking is installed on this computer. Run IDLE with the -n command line switch to start withou... |
Gsutil - How can I check if a file exists in a GCS bucket (a sub-directory) using Gsutil | 59,030,743 | 0 | 18 | 24,723 | 0 | python,google-cloud-storage,gsutil | If for whatever reason you want to do something depending on the result of that listing (if there are for example parquet files on a directory load a bq table):
gsutil -q stat gs://dir/*.parquet; if [ $? == 0 ]; then bq load ... ; fi | 0 | 1 | 0 | 0 | 2015-03-30T22:24:00.000 | 6 | 0 | false | 29,357,420 | 0 | 0 | 0 | 1 | I have a GCS bucket containing some files in the path
gs://main-bucket/sub-directory-bucket/object1.gz
I would like to programmatically check if the sub-directory bucket contains one specific file. I would like to do this using gsutil.
How could this be done? |
Root access in Python3 | 29,383,623 | 0 | 0 | 518 | 0 | python-3.x,root | Don't you need to just launch the program as sudo (root not recommended), I am not sure you can run partial code as root.
Alternately split the program into a and with some messaging schema between them | 0 | 1 | 0 | 0 | 2015-04-01T04:49:00.000 | 1 | 0 | false | 29,383,061 | 0 | 0 | 0 | 1 | I want to write a simple program to manage the screen brightness on my laptop, running Python3 under Ubuntu Linux.
To directly change the screen brightness levels, I can deal with a single file in the folder /sys/class/backlight/acpi_video0, called brightness.
(the maximum brightness is another text file called max_bri... |
Using 3rd party packages on remote machine without download/install rights | 29,398,092 | 1 | 0 | 33 | 0 | python | It is basically useless if you don't have executable permission in the remote machine. You need to contact your administrator to obtain an executable permission.
In the case for the SCP files to the remote server, you may still be able to cp you files but you may not be able to execute it. | 0 | 1 | 0 | 0 | 2015-04-01T18:11:00.000 | 2 | 0.099668 | false | 29,397,839 | 0 | 0 | 0 | 1 | I am SSHed into a remote machine and I do not have rights to download python packages but I want to use 3rd party applications for my project. I found cx_freeze but I'm not sure if that is what I need.
What I want to achieve is to be able to run different parts of my project (will mains everywhere) with command line ar... |
Python delete lines of text line #1 till regex | 29,452,916 | 0 | 2 | 1,429 | 0 | python,regex | Set a flag false.
Iterate over each line.
For each line,
1) When you match your pattern, set a flag.
2) If the flag is currently set set, print the line. | 0 | 1 | 0 | 0 | 2015-04-05T00:28:00.000 | 3 | 0 | false | 29,452,879 | 1 | 0 | 0 | 1 | I have an issue that I can't seem to find a solution within python.
From command line I can do this by:
sed '1,/COMMANDS/d' /var/tmp/newFile
This delete everything from line #1 till regex "COMMANDS". Simple
But I can't do the same with Python that I can find.
The re.sub and multiline doesn't seem to work.
So I have ... |
Command window popping up when running a Python executable? | 29,453,760 | 1 | 0 | 2,357 | 0 | python,exe,executable,py2exe,command-window | If all your program does is print something and you run it by double-clicking the executable, then it simply closes the console when it finishes running. If you want the window to stay open, run your program from the command line. You can also create a batch file that runs your program and then pauses the console, so t... | 0 | 1 | 0 | 0 | 2015-04-05T03:14:00.000 | 1 | 1.2 | true | 29,453,737 | 1 | 0 | 0 | 1 | I recently made an executable of a Python program with py2exe, and when I ran the executable, a command window appeared for a split second and then disappeared. My program itself never actually ran at all. Everything is still inside the dist folder, so I'm not sure what's actually wrong. Is there a solution for this? |
Can I use a linux-based ORM from multiple languages? | 29,479,399 | 0 | 0 | 124 | 0 | python,ruby,database,oop,orm | This question doesn't really make sense. Presumably LINQ, like any .NET library, can be used in any language that runs in the CLR: C#, VB, IronPython, IronRuby, etc.
The most common cross-language runtime that works on Linux is the Java VM, and you can use Java libraries - including ORMs like JDO - in any language that... | 0 | 1 | 0 | 0 | 2015-04-06T20:26:00.000 | 2 | 0 | false | 29,479,112 | 1 | 0 | 0 | 2 | The predominant ORMs that run in a linux-based environment seem to be written around a specific language.
Microsoft LINQ, however, supports access from a number of languages. Can I do this in linux-land (i.e. non-LINQ-land, non-JVM-land), for example between native versions of Python and Ruby? |
Can I use a linux-based ORM from multiple languages? | 29,481,003 | 1 | 0 | 124 | 0 | python,ruby,database,oop,orm | It seems that the only way to do this is to use languages which share a common VM, such as .NET CLR (and LINQ) or the Java JVM (Hibernate, Eclipse Link, etc).
So for the various languages running in their native implementation, the answer is no. | 0 | 1 | 0 | 0 | 2015-04-06T20:26:00.000 | 2 | 1.2 | true | 29,479,112 | 1 | 0 | 0 | 2 | The predominant ORMs that run in a linux-based environment seem to be written around a specific language.
Microsoft LINQ, however, supports access from a number of languages. Can I do this in linux-land (i.e. non-LINQ-land, non-JVM-land), for example between native versions of Python and Ruby? |
PIP Python Installation weird error | 29,558,245 | 0 | 0 | 57 | 0 | python,pip | You can try this.
sudo mv /var/lib/dpkg/info /var/lib/dpkg/info.bak
sudo mkdir /var/lib/dpkg/info
sudo apt-get update
Hope it can help you(and others). | 0 | 1 | 0 | 0 | 2015-04-07T19:05:00.000 | 1 | 0 | false | 29,499,285 | 1 | 0 | 0 | 1 | I am trying to install PIP for Python3, but no matter what I try at some point I always end up with:
E: Sub-pricess /usr/bin/dpkg returned an error code(1)
E: Failed to process build dependencies.
I tried with :
python get-pip.py from the official PIP page.
sudo apt-get install python3-pip
sudo apt-get build-dep pytho... |
easy_install not working on OS X | 29,546,275 | 0 | 0 | 314 | 0 | python-2.7,easy-install | Have you recently upgraded your OS? Sometimes the X-Code Command Line Tools need to be re-installed after an OS upgrade. | 0 | 1 | 0 | 0 | 2015-04-09T18:30:00.000 | 1 | 0 | false | 29,546,225 | 0 | 0 | 0 | 1 | I seem to have screwed up my Python install on my Mac (running OSX 10.10.3), I can run python but not easy_install. Running easy_install just gives me
sudo: easy_install: command not found
However, sudo easy_install-3.4 pip doesn't give me any error but when I then try to use pip using pip install gevent I get
-bash... |
Get IO Wait time as % in python | 29,548,863 | 1 | 1 | 1,680 | 0 | python,psutil,iowait | %wa is giving your the iowait of the CPU, and if you are using times = psutil.cpu_times() or times = psutil.cpu_times_percent() then it is under the times.iowait variable of the returned value (Assuming you are on a Linux system) | 0 | 1 | 0 | 1 | 2015-04-09T20:51:00.000 | 1 | 1.2 | true | 29,548,735 | 0 | 0 | 0 | 1 | I am writing a python script to get some basic system stats. I am using psutil for most of it and it is working fine except for one thing that I need.
I'd like to log the average cpu wait time at the moment.
from top output it would be in CPU section under %wa.
I can't seem to find how to get that in psutil, does an... |
Which will give the best performance Hive or Pig or Python Mapreduce with text file and oracle table as source? | 29,991,069 | 3 | 2 | 2,382 | 0 | python,hadoop,mapreduce,hive,apache-pig | Python Map Reduce or anything using Hadoop Streaming interface will most likely be slower. That is due to the overhead of passing data through stdin and stdout and the implementation of the streaming API consumer (in your case python). Python UDF's in Hive and Pig do the same thing.
You might not want to compress data ... | 0 | 1 | 0 | 0 | 2015-04-10T03:30:00.000 | 1 | 0.53705 | false | 29,552,853 | 0 | 1 | 0 | 1 | I have the below requirements and confused about which one to choose for high performance. I am not java developer. I am comfort with Hive, Pig and Python.
I am using HDP2.1 with tez engine. Data sources are text files(80 GB) and Oracle table(15GB). Both are structured data. I heard Hive will suite for structure data ... |
Python | Python.exe- Entry point not found | 35,697,811 | 1 | 5 | 12,725 | 0 | python-3.x,system,kivy | This happened to me because an old zlib1.dll was being loaded from somewhere in my PATH. I copied a new version to system32 and it solved the problem. | 1 | 1 | 0 | 0 | 2015-04-10T17:03:00.000 | 4 | 0.049958 | false | 29,566,947 | 0 | 0 | 0 | 2 | I installed (extracted) Kivy (Kivy-1.9.0-py3.4-win32-x86.exe) on my PC (Win7 32bit). Now whenever trying to run a file using kivy-3.4.bat getting an error message within a window...
python.exe- Entry point not found
The procedure entry point inflateReset2 could not be located in the dynamic link library zlib1.dll.
On... |
Python | Python.exe- Entry point not found | 34,912,630 | 4 | 5 | 12,725 | 0 | python-3.x,system,kivy | Yes, I know this post is a bit old, but maybe someone else searches this.
I got the same error. And really, I just tried to start the python script via MS Powershell instead of CMD. I just wanted to use the PS one time.
And it worked, at least for me.
So, if you encounter this error, try to use the Powershell :) | 1 | 1 | 0 | 0 | 2015-04-10T17:03:00.000 | 4 | 0.197375 | false | 29,566,947 | 0 | 0 | 0 | 2 | I installed (extracted) Kivy (Kivy-1.9.0-py3.4-win32-x86.exe) on my PC (Win7 32bit). Now whenever trying to run a file using kivy-3.4.bat getting an error message within a window...
python.exe- Entry point not found
The procedure entry point inflateReset2 could not be located in the dynamic link library zlib1.dll.
On... |
Is it possible to run java command line app from python in AWS EC2? | 29,572,952 | 0 | 1 | 211 | 0 | java,python,amazon-web-services,amazon-ec2 | Since you're just making a command line call to the Java app, the path of least resistance would just be to make that call from another server using ssh. You can easily adapt the command you've been using with subprocess.call to use ssh -- more or less, subprocess.call(['ssh', '{user}@{server}', command]) (although hav... | 0 | 1 | 0 | 0 | 2015-04-11T00:22:00.000 | 1 | 0 | false | 29,572,608 | 0 | 0 | 1 | 1 | I am working on some machine learning for chemical modelling in python. I need to run a java app (from command line through python subprocess.call) and a python webserver. Is this possible on AWS EC2?
I currently have this setup running on my mac but I am curious on how to set it up on aws.
Thanks in advance! |
Pycharm (Ubuntu) program not opening | 29,581,633 | 0 | 0 | 3,197 | 0 | python,linux,pycharm,ubuntu-14.04 | hi Pedro in ubuntu you need to install the files using the command prompt even if you downloaded the files you need to install them using command, unlike windows in linux when some software is downloaded you need to install them manually by using commands like sudo apt-get python install..
for further help you can cons... | 0 | 1 | 0 | 0 | 2015-04-11T18:19:00.000 | 2 | 1.2 | true | 29,581,436 | 1 | 0 | 0 | 1 | I am running Ubuntu 14.04/GNOME 3.8.4 on 15 MBP Duel Boot.
I am new to Linux and Python(Pycharm ide)
I have downloaded the Pycharm "files" from the software center
but cannot run the program.The icon comes up in the side bar but when i click it nothing happens. I have tried "./" and only the code appers in "gedit" Ple... |
How do you make a Python executable file on Mac? | 29,584,289 | 1 | 8 | 17,211 | 0 | python,macos,exe | You can run python scripts through OS X Terminal. You just have to write a python script with an editor, open your Terminal and enter python path_to_my_script/my_script.py | 0 | 1 | 0 | 0 | 2015-04-11T23:33:00.000 | 2 | 0.099668 | false | 29,584,270 | 0 | 0 | 0 | 1 | My google searching has failed me. I'd like to know how to make an executable Python file on OS X, that is, how to go about making an .exe file that can launch a Python script with a double click (not from the shell). For that matter I'd assume the solution for this would be similar between different scripting language... |
I don't know how to update my Python version to 3.4? | 37,517,408 | 0 | 0 | 113 | 0 | macos,python-3.x | I have found that making the 'python' alias replace the default version of python that the system comes with is a bad idea.
When you install a new version of python (3.4 for instance),
these two new commands are installed, specifically for the version you installed:
pip3.4
python3.4
If you're using an IDE that wants y... | 0 | 1 | 0 | 0 | 2015-04-12T01:10:00.000 | 3 | 0 | false | 29,584,840 | 1 | 0 | 0 | 2 | I'm on OSX, and I installed IDLE for Python 3.4. However, in Terminal my python -V and pip --version are both Python 2.7.
How do I fix this? I really have no idea how any of this works, so please bear with my lack of knowledge. |
I don't know how to update my Python version to 3.4? | 29,584,868 | 0 | 0 | 113 | 0 | macos,python-3.x | Try python3 or python3.4. It should print out the right version if correctly installed.
Python 3.4 already has pip with it. You can use python3 -m pip to access pip. Or python3 -m ensurepip to make sure that it's correctly installed. | 0 | 1 | 0 | 0 | 2015-04-12T01:10:00.000 | 3 | 0 | false | 29,584,840 | 1 | 0 | 0 | 2 | I'm on OSX, and I installed IDLE for Python 3.4. However, in Terminal my python -V and pip --version are both Python 2.7.
How do I fix this? I really have no idea how any of this works, so please bear with my lack of knowledge. |
Webapp2 redirect 404 error | 29,591,301 | 1 | 2 | 237 | 0 | python,google-app-engine,redirect,webapp2 | Redirect takes a URL. You probably want to self.redirect("/") but without knowing your URL mappings, that's just a guess. | 0 | 1 | 0 | 0 | 2015-04-12T15:34:00.000 | 1 | 0.197375 | false | 29,591,189 | 0 | 0 | 1 | 1 | I'm having troubles with redirect function. When I call it with self.redirect("/index.html") the server goes to http://localhost:10080/index.html and alert 404 page not found.
Log:
HTTP/1.1" 304 -
INFO 2015-04-12 12:32:39,029 module.py:737] default: "POST /subscribe HTTP/1.1" 302 -
INFO 2015-04-12 12:32:39,046 ... |
install python pygame on ubuntu 14.10 | 30,444,254 | 1 | 0 | 386 | 0 | python-2.7,pygame,ubuntu-14.10 | If you open up the terminal
type in
sudo apt-get install python-pygame
It should download and install the dependencies required for pygame. | 1 | 1 | 0 | 0 | 2015-04-12T18:46:00.000 | 1 | 0.197375 | false | 29,593,223 | 1 | 0 | 0 | 1 | I want to install pygame library on Ubunbu 14.10. I am using Python 2.7.x. At this time I found dependences problems with python-numpy dependence., because it uses a previous version of gcc that 14.10 uses that's why I am stuck with this, my question is: is there any way to install pygame on 14.10?
best |
kombu producer and celery consumer | 50,602,825 | 0 | 1 | 673 | 0 | python,rabbitmq,celery,kombu | I understand that to communicate with RabbitMQ, you would require any lib that abides by AMQP specification.
Kombu is one such lib which can bind to the RabbitMQ exchange, listen and process messages by spawning numerous consumers.
Celery is nothing but an asynchronous task generator which has numerous add-ons like in... | 0 | 1 | 0 | 0 | 2015-04-13T16:53:00.000 | 1 | 0 | false | 29,610,806 | 0 | 0 | 0 | 1 | Is it possible for a kombu producer to queue a message on rabbitmq to be processed by celery workers? It seems the celery workers do not understand the message put by the kombu producer. |
how to execute shell script in the same process in python | 29,621,377 | 1 | 0 | 1,004 | 0 | python,shell | What if you make a 'master' shell script that would execute all the others in sequence? This way you'll only have to create a single sub-process yourself, and the individual scripts will share the same environment.
If, however, you would like to interleave script executions with Python code, then you would probably ha... | 0 | 1 | 0 | 0 | 2015-04-14T07:08:00.000 | 2 | 1.2 | true | 29,621,193 | 1 | 0 | 0 | 2 | I need to execute several shell scripts with python, some scripts would export environment parameters, so I need to execute them in the same process, otherwise, other scripts can't see the new environment parameters
in one word, I want to let the shell script change the environment of the python process
so I should not... |
how to execute shell script in the same process in python | 29,621,636 | 1 | 0 | 1,004 | 0 | python,shell | No, you cannot run more than one program (bash, python) in the same process at the same time.
But you can run them in sequence using exec in bash or one of the exec commands in python, like os.execve. Several things survive the "exec boundary", one of which is the environment block. So in each bash script you exec... | 0 | 1 | 0 | 0 | 2015-04-14T07:08:00.000 | 2 | 0.099668 | false | 29,621,193 | 1 | 0 | 0 | 2 | I need to execute several shell scripts with python, some scripts would export environment parameters, so I need to execute them in the same process, otherwise, other scripts can't see the new environment parameters
in one word, I want to let the shell script change the environment of the python process
so I should not... |
python3 not linked with idle | 29,668,903 | 2 | 0 | 267 | 0 | python-3.x,pandas,pip,python-idle | I asked some questions in a comments. However, starting Idle with python3 -m idlelib will start Idle with whatever python is started with python3. Since you say that python3 starts 3.4.3, the above should run Idle 3.4.3. | 0 | 1 | 0 | 0 | 2015-04-14T08:16:00.000 | 1 | 1.2 | true | 29,622,322 | 1 | 0 | 0 | 1 | I have python3.4.0 installed on my system.
Today, I want to install python3.4.3, so I download the source code and install it.
However, my idle is still python3.4.0
while when I type python3 in terminal, it shows python3.4.3.
I also have pandas installed on my old version, it still can be used on my idle (linked with 3... |
Maximum Whoosh Index size? | 29,650,121 | 0 | 1 | 677 | 0 | python,indexing,whoosh | Is it possible that Whoosh overflows to RAM of your computer by loading the 27Gb file? | 0 | 1 | 0 | 1 | 2015-04-15T11:35:00.000 | 1 | 0 | false | 29,649,147 | 0 | 0 | 0 | 1 | I'm using a 32-bit Ubuntu machine. I'm trying to create a Whoosh index of a 27GB file. But my system is crashing after index size of 3GB. Is there any size constraint on Whoosh index size? If not then what can be the problem. |
How to cleanly pass command-line parameters when test-running my Python script? | 29,657,355 | 1 | 0 | 1,305 | 0 | workflow,argparse,python-idle | With some editors you can define the 'execute' command,
For example with Geany, for Python files, F5 is python2.7 %f. That could be modified to something like python2.7 %f dummy parameters. But I use an attached terminal window and its line history more than F5 like commands.
I'm an Ipython user, so don't remember m... | 0 | 1 | 0 | 0 | 2015-04-15T17:02:00.000 | 3 | 0.066568 | false | 29,656,381 | 1 | 0 | 0 | 2 | So I'm writing Python with IDLE and my usual workflow is to have two windows (an editor and a console), and run my script with F5 to quickly test it.
My script has some non-optional command line parameters, and I have two conflicting desires:
If someone launches my script without passing any parameters, I'd like him t... |
How to cleanly pass command-line parameters when test-running my Python script? | 39,773,753 | 1 | 0 | 1,305 | 0 | workflow,argparse,python-idle | Thanks for your question. I also searched for a way to do this. I found that Spyder which is the IDE I use has an option under Run/Configure to enter the command line parameters for running the program. You can even configure different ones for the different editors you have open. | 0 | 1 | 0 | 0 | 2015-04-15T17:02:00.000 | 3 | 0.066568 | false | 29,656,381 | 1 | 0 | 0 | 2 | So I'm writing Python with IDLE and my usual workflow is to have two windows (an editor and a console), and run my script with F5 to quickly test it.
My script has some non-optional command line parameters, and I have two conflicting desires:
If someone launches my script without passing any parameters, I'd like him t... |
How/where to store temp files and logs for a cloud app? | 29,656,524 | -1 | 11 | 976 | 1 | python,mysql,redis,cloud,storage | Store your logs in MySQL. Just make a table like this:
x***time*****source*****action
----------------------------
****unixtime*somemodule*error/event
Your temporary storage should be enough for temporary files :) | 0 | 1 | 0 | 0 | 2015-04-15T17:04:00.000 | 3 | -0.066568 | false | 29,656,422 | 0 | 0 | 0 | 1 | I am working on a Python/MySQL cloud app with a fairly complex architecture. Operating this system (currently) generates temporary files (plain text, YAML) and log files and I had intended to store them on the filesystem.
However, our prospective cloud operator only provides a temporary, non-persistent filesystem to ap... |
Questions on Twisted Protocols and loopingCall | 29,664,919 | 0 | 1 | 174 | 0 | python,twisted | Things get garbage collected when there are no more references to them, so I can't say when objects in your program will be collected.
However, I can tell you about the references kept from Twisted.
A Protocol connected to a Transport will have a reference that goes globals→reactor→transport→protocol. When the transpo... | 0 | 1 | 0 | 0 | 2015-04-15T20:00:00.000 | 1 | 0 | false | 29,659,755 | 0 | 0 | 0 | 1 | Suppose I have a python twisted app with the standard Factory and Protocol subclasses. My Protocol subclass connectionMade() method launches a loopingCall that runs (say) every 5 minutes. I have two questions:
Suppose the connection gets lost. Yes I know that this will result in the connectionLost() method being calle... |
Python imports in Hadoop | 29,679,539 | 0 | 0 | 77 | 0 | java,python,hadoop,import | Ok, I figured this one out by myself.
The problem the python process runs into is that the HDFS uses symlinks. Python on the other hand does not accept symlinks as valid files so will not import from them if in the same directory.
Instead of adding each file to the Distributed Cache, you can add the directory to the ca... | 0 | 1 | 0 | 0 | 2015-04-15T20:40:00.000 | 1 | 0 | false | 29,660,487 | 0 | 0 | 0 | 1 | Ok, I am writing a java based Hadoop MR task. Part of the task is calling an outside python script as a new Process, passing it information and reading it back the resut. I have done this a few times before without problems when not working with hadoop.
I can also call a single python script as a new process in hadoop ... |
Where to put a virtualenv directory on Mac OS X? | 29,683,947 | 1 | 0 | 3,129 | 0 | python,macos,bash,virtualenv | You can have as many as you like and put them where it's convenient. A common arrangement is to have a dedicated environment for each project; then if each project is in ~/projects/<project> you could have a virtualenv directory in each project's respective root directory. So ~/projects/foo/.env for the virtualenv fo... | 0 | 1 | 0 | 0 | 2015-04-16T18:56:00.000 | 2 | 0.099668 | false | 29,683,652 | 1 | 0 | 0 | 1 | I am transferring a Python based development system from PC to Mac. I need to create a virtualenv / directory to store this system. Where is a good place to put the directory (somewhere easily accessible from a terminal window)? I am not so savvy on the Mac as the PC, although I could probably write a bash script to... |
Shell: Prompt user to enter a directory path | 29,691,432 | 1 | 1 | 1,873 | 0 | python,linux,bash,shell,unix | You might be looking for the readlink command. You can use readlink -m "some/path" to convert a path to the canonical path format. It's not quite path.join but it does provide similar functionality.
Edit: As someone pointed out to me readlink is actually more like os.path.realpath. It is also a GNU extension and not av... | 0 | 1 | 0 | 0 | 2015-04-17T05:50:00.000 | 2 | 0.099668 | false | 29,691,344 | 0 | 0 | 0 | 1 | I'm looking for a Bash equivalent of Python's os.path.join. I'm trying to prompt the user for a directory path, which then will be used (with the help of path join equivalent) to do other stuff. |
Whats the best way to implement python TCP client? | 29,695,958 | 1 | 0 | 78 | 0 | python,multithreading,tcpclient | Calling for a best way or code examples is rather off topic, but this is too long to be a comment.
There are three general ways to build those terminal emulator like applications :
multiple processes - the way the good old Unix cu worked with a fork
multiple threads - a variant from the above using light way threads i... | 0 | 1 | 1 | 0 | 2015-04-17T08:41:00.000 | 1 | 0.197375 | false | 29,694,344 | 0 | 0 | 0 | 1 | I need to write python script which performs several tasks:
read commands from console and send to server over tcp/ip
receive server response, process and make output to console.
What is the best way to create such a script? Do I have to create separate thread to listen to server response, while interacting with use... |
python copying directory and reading text files Remotely | 29,705,179 | 0 | 1 | 693 | 0 | python,windows,file,wmi,remote-access | I've done some work with WMI before (though not from Python) and I would not try to use it for a project like this. As you said WMI tends to be obscure and my experience says such things are hard to support long-term.
I would either work at the Windows API level, or possibly design a service that performs the desired a... | 0 | 1 | 0 | 1 | 2015-04-17T16:30:00.000 | 2 | 0 | false | 29,704,766 | 0 | 0 | 0 | 1 | I'm about to start working on a project where a Python script is able to remote into a Windows Server and read a bunch of text files in a certain directory. I was planning on using a module called WMI as that is the only way I have been able to successfully remotely access a windows server using Python, But upon furthe... |
Which Python Environment Does Pydev Use? | 29,908,351 | 0 | 0 | 45 | 0 | python,eclipse,pydev | It'll be either the default interpreter (the top one at the preferences > pydev > interpreter) or the one that's configured for the project (if you select the project > alt+enter > pydev-interpreter/grammar you can let 'default' or select a different one).
After you've done a launch, you can go to run > run configurati... | 0 | 1 | 0 | 0 | 2015-04-18T11:14:00.000 | 3 | 0 | false | 29,716,502 | 1 | 0 | 0 | 1 | When I press CTRL+F9 to run tests in Pydev, which interpreter does it use?
For example, I have Python 2.7 and Python 3.3 installed.
When I run scripts in the console by pressing CTRL+Shift+Enter, a window pops up that lets me choose interpreter. But this does not happen when running tests. |
How to disable creation of $VIRTUAL_ENV/bin/python for python3 virtualenvs? | 56,749,854 | 0 | 0 | 160 | 0 | python-3.x,virtualenv | The purpose of the virtual env is to allow the use of required version as default. That's why you see the symbolic link created.
If you want both (i.e no symbolic link python -> /usr/bin/python3) then do not create virtual env | 0 | 1 | 0 | 0 | 2015-04-19T09:34:00.000 | 1 | 0 | false | 29,728,131 | 1 | 0 | 0 | 1 | I develop Python3 on GNU/Linux, but my system has two interpreters installed:
python2 -> /usr/bin/python
python3 -> /usr/bin/python3
(AFAIK: This is normal on a Linux box, other installed applications frequently depend upon different versions of Python: either 2 or 3.)
When I create new virtual environments for Pytho... |
Multiple versions of Python in Ubuntu | 29,730,474 | 1 | 1 | 14,313 | 0 | python,python-2.7,ubuntu,ubuntu-14.04 | Version 2.x and 3.x happily live together - that is no problem.
But the versions in /usr/bin and /usr/local/bin will give you problems:
The 'home'compiled version always installs in /usr/local/bin unless you specify the prefix on compilation. System-installed version normally install in /usr/bin. If you call python3, ... | 0 | 1 | 0 | 0 | 2015-04-19T13:13:00.000 | 2 | 0.099668 | false | 29,730,330 | 1 | 0 | 0 | 2 | In Ubuntu, I used to have (two hours ago) three versions of python :
2.7 and 3.4.0 installed by default in 'usr/bin'
3.4.3 that I built manually from the official source-code, which I found was in 'usr/local/bin'
(that means, at a certain point i was able to run the tree versions of python at the same time)
But now, ... |
Multiple versions of Python in Ubuntu | 29,730,405 | 0 | 1 | 14,313 | 0 | python,python-2.7,ubuntu,ubuntu-14.04 | The version 2.7 and 3.4 are your distribution official pythons. To upgrade their versions, Ubuntu should release new packages for them.
When you install a new python by yourself it goes to /usr/local/bin.
I don't recommend having two similar pythons on your system, it will probably be difficult to know whether a packa... | 0 | 1 | 0 | 0 | 2015-04-19T13:13:00.000 | 2 | 0 | false | 29,730,330 | 1 | 0 | 0 | 2 | In Ubuntu, I used to have (two hours ago) three versions of python :
2.7 and 3.4.0 installed by default in 'usr/bin'
3.4.3 that I built manually from the official source-code, which I found was in 'usr/local/bin'
(that means, at a certain point i was able to run the tree versions of python at the same time)
But now, ... |
svn 0.3.33 module : Windows Error: [Error 2] : The system cannot find the file specified | 29,740,532 | 0 | 0 | 1,099 | 0 | python,svn | You need to recheck that the files on your laptop and make sure:
The files actually exist / are the correct files.
They are in the directory you are trying to access them from.
The file names are spelled correctly.
If the system could not find the file specified it means something is missing / misplaced, or the file ... | 0 | 1 | 0 | 0 | 2015-04-20T05:55:00.000 | 2 | 0 | false | 29,740,212 | 0 | 0 | 0 | 2 | I have checked out a folder from SVN to my desktop. Actually I need to extract the information like SVN revision no, URL and status for the specific file in the local working copy. Here is the line of code which I am using to extract those info.
file = svn.local.LocalClient(filePath[i][j])
fileInfo = file.info()
This w... |
svn 0.3.33 module : Windows Error: [Error 2] : The system cannot find the file specified | 29,762,407 | 0 | 0 | 1,099 | 0 | python,svn | I got the solution for this. Actually the problem was with subversion command line client version. The client version need to be higher than the TortoiseSVN server version, whereas mine was a lower version which created this problem. Now it works fine :) | 0 | 1 | 0 | 0 | 2015-04-20T05:55:00.000 | 2 | 0 | false | 29,740,212 | 0 | 0 | 0 | 2 | I have checked out a folder from SVN to my desktop. Actually I need to extract the information like SVN revision no, URL and status for the specific file in the local working copy. Here is the line of code which I am using to extract those info.
file = svn.local.LocalClient(filePath[i][j])
fileInfo = file.info()
This w... |
Python change Windows Path (refresh Shell) | 29,747,013 | 2 | 1 | 2,683 | 0 | python,windows,variables | Each process has its own environment. When a process starts another process, the new process gets a (eventually modified) copy of its parent environment.
The rule is :
a process can modify its own environment - this modifications will be inherited by child processes started later
a process can modify (at start time) t... | 0 | 1 | 0 | 0 | 2015-04-20T10:09:00.000 | 2 | 0.197375 | false | 29,744,940 | 1 | 0 | 0 | 2 | i have a Python script here and it is called from the Windows CMD.
It is executing some commands and also changing the Windows environment variables. Now after i changed them with the command "setx". I have to restart another Shell so the new variables are loaded into it.
Is it possible that the main shell from which... |
Python change Windows Path (refresh Shell) | 29,746,276 | 1 | 1 | 2,683 | 0 | python,windows,variables | You can't change the value of a environment variable.
Allow me to clarify: environment variables represent the variables set on the environment of a process when that process starts.
From the point-of-view of the new process, its environment is unchanging. Changing a variable on the environment (the process' parent) w... | 0 | 1 | 0 | 0 | 2015-04-20T10:09:00.000 | 2 | 1.2 | true | 29,744,940 | 1 | 0 | 0 | 2 | i have a Python script here and it is called from the Windows CMD.
It is executing some commands and also changing the Windows environment variables. Now after i changed them with the command "setx". I have to restart another Shell so the new variables are loaded into it.
Is it possible that the main shell from which... |
Python: Open and read remote text files on Windows | 29,755,645 | 1 | 1 | 2,454 | 0 | python,windows,text-files,remote-access,readfile | You can use powershell for this.
first Open powershell by admin previlage.
Enter this command
Enable-PSRemoting -Force
Enter this command also on both computer so they trust eachother.
Set-Item wsman:\localhost\client\trustedhosts *
then restart winrm service on both pc by this command.
Restart-Service WinRM
test... | 0 | 1 | 0 | 1 | 2015-04-20T18:09:00.000 | 1 | 0.197375 | false | 29,755,274 | 0 | 0 | 0 | 1 | Im trying to find a module that will allow me to run a script locally that will:
1. Open a text file on a remote Windows Machine
2. Read the lines of the text file
3. Store the lines in a variable and be able to process the data.
This is absolutely no problem on a Linux machine via SSH, but I have no clue what module t... |
Easy install is not recognized | 29,761,891 | 0 | 0 | 913 | 0 | python-2.7,easy-install | I figured it out I needed to cd c:\python27\scripts, then use the pip install tmx command. Nothing I read anywhere suggested I had to run cmd from the directory that pip was in. | 0 | 1 | 0 | 0 | 2015-04-21T00:54:00.000 | 2 | 1.2 | true | 29,761,006 | 1 | 0 | 0 | 2 | I installed easy install it is in my scripts folder. I set my path variable. When I type python in cmd it works, but no matter what I try if I type easy_install it says it is not recognized. I am trying to install pip and then pytmx. is there an easier way to install pytmx? or can someone please walk me through this so... |
Easy install is not recognized | 29,761,326 | 0 | 0 | 913 | 0 | python-2.7,easy-install | If you install python 2.7.9 pip is included.
Then just pip install pytmx | 0 | 1 | 0 | 0 | 2015-04-21T00:54:00.000 | 2 | 0 | false | 29,761,006 | 1 | 0 | 0 | 2 | I installed easy install it is in my scripts folder. I set my path variable. When I type python in cmd it works, but no matter what I try if I type easy_install it says it is not recognized. I am trying to install pip and then pytmx. is there an easier way to install pytmx? or can someone please walk me through this so... |
How to uninstall and/or manage multiple versions of python in OS X 10.10.3 | 29,841,327 | 3 | 4 | 9,789 | 0 | python,spyder,osx-yosemite | (Spyder dev here) There is no simple way to do what you ask for, at least for the Python version that comes with Spyder.
I imagine you downloaded and installed our DMG package. That package comes with its own Python version as part of the application (along with several important scientific packages), so it can't be re... | 0 | 1 | 0 | 0 | 2015-04-21T02:17:00.000 | 1 | 0.53705 | false | 29,761,728 | 1 | 0 | 0 | 1 | I have installed the Python IDE Spyder. For me it's a great development environment.
Some how in this process I have managed to install three versions of Python on my system.These can be located as following:
Version 2.7.6 from the OS X Terminal;
Version 2.7.8 from the Spyder Console; and
Version 2.7.9rc1 from an IDL ... |
How can I check whether the script started with cron job is completed? | 29,769,403 | 0 | 0 | 45 | 0 | python,cron,cron-task | You can use a lock file to indicate that the first script is still running. | 0 | 1 | 0 | 1 | 2015-04-21T09:43:00.000 | 2 | 0 | false | 29,768,499 | 0 | 0 | 0 | 1 | I start a script and I want to start second one immediately after the first one is completed successfully?
The problem here is that this script can take 10min or 10hours according to specific cases and I do not want to fix the start of the second script.
Also, I am using python to develop the script, so if you can pro... |
Can't install python selenium on Ubuntu 14.10/15.04(pre-release) | 29,772,531 | 0 | 0 | 361 | 0 | python,ubuntu,selenium | Solved upgrading six
pip install --upgrade six | 0 | 1 | 1 | 0 | 2015-04-21T12:41:00.000 | 1 | 1.2 | true | 29,772,530 | 0 | 0 | 0 | 1 | I'm trying to install selenium library for python on my Ubuntu machine using pip installer.
I receive the following error:
pip install selenium
Exception: Traceback (most recent call last): File
"/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in
main
status = self.run(options, args) File... |
How to open a shortcut with windows command line and parameters | 29,775,325 | 0 | 1 | 4,374 | 0 | python,windows,command-line | Change the shortcut target to "cmd filename" (i.e. add "cmd" before the target) | 0 | 1 | 0 | 0 | 2015-04-21T14:30:00.000 | 2 | 0 | false | 29,775,174 | 1 | 0 | 0 | 1 | I made a shortcut of a python script on my desktop.
Now I want to open this with the command line and parameters.
If I open the properties of the shortcut, I can add the parameters, but I can't force to be opened with the command line.
The default program for these files is notepad++, but if I change it to "command lin... |
How to attach to PyCharm debugger when executing python script from bash? | 37,883,146 | 1 | 4 | 1,147 | 0 | python,bash,debugging,pycharm,pdb | You can attach the debugger to a python process launched from terminal:
Use Menu Tools --> Attach to process then select python process to debug.
If you want to debug a file installed in site-packages you may need to open the file from its original location.
You can to pause the program manually from debugger and insp... | 0 | 1 | 0 | 0 | 2015-04-22T00:24:00.000 | 1 | 0.197375 | false | 29,785,534 | 1 | 0 | 0 | 1 | I know how to set-up run configurations to pass parameters to a specific python script. There are several entry points, I don't want a run configuration for each one do I? What I want to do instead is launch a python script from a command line shell script and be able to attach the PyCharm debugger to the python scri... |
Why does esky create 2 executables? | 30,921,894 | 1 | 1 | 54 | 0 | python,esky | Esky uses a bootstrapping mechanism that keeps the app safe in the face of failed or partial updates.
The top level executable is the one you should be running, it does all the business of managing what version to run. Once it has decided what to run it will open up the exe for the correct version. | 0 | 1 | 0 | 0 | 2015-04-22T10:13:00.000 | 1 | 0.197375 | false | 29,794,354 | 0 | 0 | 0 | 1 | esky 0.9.8 creates 2 executables of my application.
There is an inner executable that weights less then the outer executable.
I would like to know if esky is supposed to create 2 executables and if there are any drawbacks or advantages in creating 2 executables.
I would also like to know which executable should I be ca... |
Installing to virtual env doesn't work | 29,906,180 | 0 | 0 | 768 | 0 | python,pip,virtualenv,virtualenvwrapper | Seems by realiasing pip and starting over and using --force-installed to install everything all over (including venv) it worked. | 0 | 1 | 0 | 0 | 2015-04-22T16:44:00.000 | 1 | 1.2 | true | 29,803,949 | 1 | 0 | 0 | 1 | I install to virtualenv, yet it still runs the versions from C:\Python27\site-packages or C:\Python34\site-packages. When I try to install with pip in my venv I get already installed and the location is the global site-packages.
Any idea why that could be??
Also my virtualenv wrapper commands work but when i do workon... |
Will using memcache reduce my instance memory? | 29,806,800 | 3 | 0 | 130 | 1 | python-2.7,google-app-engine,memcached | Moving objects to and from Memcache will have no impact on your memory unless you destroy these objects in your Java code or empty collections.
A bigger problem is that memcache entities are limited to 1MB, and memcache is not guaranteed. The first of these limitations means that you cannot push very large objects into... | 0 | 1 | 0 | 0 | 2015-04-22T18:48:00.000 | 1 | 1.2 | true | 29,806,384 | 0 | 0 | 1 | 1 | I'm currently running into soft memory errors on my Google App Engine app because of high memory usage. A number of large objects are driving memory usage sky high.
I thought perhaps if I set and recalled them from memcache maybe that might reduce overall memory usage. Reading through the docs this doesn't seem to ... |
Possible to Kill Processes using WMI Python | 29,809,058 | 1 | 2 | 2,587 | 0 | python,windows,process,wmi,remote-access | I figured out the answer in case anybody else runs into a similar issue; You actually dont even need WMI and can be run directly from command prompt:
if you are in the same network you can issue a command via command prompt with the following format:
taskkill /s [Computer name or IP] /u [USER or DOMAIN\USER] /p Passwor... | 0 | 1 | 0 | 0 | 2015-04-22T19:45:00.000 | 3 | 1.2 | true | 29,807,381 | 1 | 0 | 0 | 1 | I know it is possible to create a process on a remote windows machine using the WMI module but I wish to know if the same can be said for ending a process. I havent been able to find a thread or any documentation for this so please if you can help me It would be greatly appreciated. |
Do I need mysql-client for PHP/Python etc interactions? | 29,814,988 | 0 | 1 | 35 | 0 | php,python,mysql,linux,webserver | If you expect code running on the production server to connect to a mysql db, then yes. | 0 | 1 | 0 | 0 | 2015-04-23T02:07:00.000 | 1 | 0 | false | 29,812,355 | 0 | 0 | 0 | 1 | I am setting up a production server for the first time and would like to make sure I only have what I need for security prepress.
By "interactions" since I'm also new to programming, I think I mean "API calls".
Do I need mysql-client on a Linux (Debian) server to be able to 'talk' to mysql with any programming langua... |
Recommended way to build cross platform desktop application using linux development machine | 29,815,298 | 1 | 2 | 1,133 | 0 | python,linux,windows | What you are looking for is a GUI tool-kit with bindings to python. Tkinter is the de facto standard for python GUI and is cross platform. Qt is also a popular choice but the license is more restrictive then Tkinter but will allow you to transition into C++ programming with Qt easier if that is something you may want t... | 0 | 1 | 0 | 0 | 2015-04-23T04:57:00.000 | 2 | 0.099668 | false | 29,814,020 | 0 | 0 | 1 | 1 | I am pretty familiar with building web based apps using python django on my linux machine. But when I decided to try my hand at building desktop applications that can run on windows/linux I didn't know where to begin.
I know I can surely build windows desktop application on windows machine. But I am pretty comfortable ... |
I can't install eyeD3 0.7.5 into Python in windows | 29,851,171 | 0 | 2 | 641 | 0 | python,python-2.7,pip,anaconda,eyed3 | The problem is that this file is only written for Python 2 but you are using Python 3. You should use Anaconda (vs. Anaconda3), or create a Python 2 environment with conda with conda create -n py2 anaconda python=2 and activate it with activate py2. | 0 | 1 | 0 | 0 | 2015-04-23T14:19:00.000 | 1 | 0 | false | 29,826,237 | 1 | 0 | 0 | 1 | could you help me with that. I can't manage to install this plugin. I tried:
1) install it through pip
2) through setup.py in win console
3) through anaconda3 but still no.
4) I searched about it in web and here, but insructions are made to older versions.
5) and also through the installation page of eyeD3.
Could you ... |
plain Password is logged via my python script | 29,938,376 | 0 | 2 | 446 | 0 | python,linux,passwords | I figured out the best way is to disable it via sudo command:
Cmnd_Alias SCRIPT =
Defaults!SCRIPT !syslog
The above lines in sudoers.conf should help from preventing the logging in syslog. | 0 | 1 | 0 | 1 | 2015-04-24T09:28:00.000 | 4 | 1.2 | true | 29,843,710 | 0 | 0 | 0 | 1 | I have a sample python script: sample.py. The script takes the argument as the user name and password to connect to some remote server. When I run the script sample.py --username --password , the password is being logged in linux messages files. I understand this is a linux behavior, but wondering if we can do anythin... |
App engine Datastore cache or memcache | 29,846,381 | 1 | 0 | 290 | 0 | python,google-app-engine | The 'Datastore caching' you refer to is implemented using memcache under the hood anyway, so you won't gain from additional explicit caching of these entities.
Python's ndb API and Java's Objectify both provide memcache-based automated caching for exactly this scenario. Of course, you can still use memcache independen... | 0 | 1 | 0 | 0 | 2015-04-24T10:56:00.000 | 1 | 1.2 | true | 29,845,685 | 0 | 0 | 1 | 1 | I have read that the datastore read request in the App engine get cached and subsequent reads performed on the same entity are fast.
So if i read an entity from datastore, are there any tangible benefits of storing the entity in the memcache explicitly for later fetches? Or would the datastore caching serve with suffic... |
GAE: how to get current server IP? | 29,846,170 | 0 | 0 | 157 | 0 | python,google-app-engine | I'm not entirely clear on what you're looking for, but you can retrieve that type of information from the WSGI environmental variables. The method of retrieving them varies with WSGI servers, and the number of variables made available to your application depends on the web server configuration.
That being said, gettin... | 0 | 1 | 0 | 0 | 2015-04-24T11:08:00.000 | 1 | 0 | false | 29,845,940 | 0 | 0 | 1 | 1 | I'm hosting my app on Google App Engine. Is there any posibility to get server IP of my app for current request?
More info:
GAE has a specific IP addressing. All http requests go to my 3-level domain, and IP of this domain isn't fixed, it changes rather frequently and can be different on different computers at the same... |
Nginx/Uwsgi log showing duplicate requests | 29,899,664 | 0 | 1 | 602 | 0 | python,flask,uwsgi | Sorry false alarm. This was my Devops incorrectly pinging my actual application route for heartbeat. Sorry for the confusion. | 0 | 1 | 0 | 0 | 2015-04-24T14:49:00.000 | 1 | 1.2 | true | 29,850,613 | 0 | 0 | 1 | 1 | I'm running a flask application using nginx and uwsgi and I noticed when I tail the logs for uwsgi it looks like its just constantly polling my app when I'm doing nothing. It also seems like it's cycling through the cores on my machine with each request so I see this in the logs.
[pid: 27182|app: 0|req: 557/784] {26 v... |
Passing dictionary values in python as command line inputs to c++ code | 29,858,319 | 0 | 0 | 211 | 0 | python,c++ | You can't do that unless you relax one of the restrictions.
Relax the python dict requirement: The command line has a well defined text arguments interface, which can easily handle all the info. You can pass the json filename, the str representation of the dict, or pass name-value pairs as command line arguments.
Re... | 0 | 1 | 0 | 0 | 2015-04-24T21:13:00.000 | 1 | 1.2 | true | 29,857,593 | 1 | 0 | 0 | 1 | I have a wrapper file that is reading a JSON file into a dictionary.
I am using the os.system("command") command to run a C++ code in this python file.
The C++ code takes command line inputs which are key values in the parsed dictionary.
How can i pass a python variable as a command line input for a C++ code using t... |
Webapp2 Redirect Method | 29,866,631 | 2 | 1 | 177 | 0 | python,google-app-engine,webapp2 | Use a 307 redirect. A 307 will not change the method of the redirect.
Wikipedia: 307 temporary redirect (provides a new URL for the browser to resubmit a GET or POST request) | 0 | 1 | 0 | 0 | 2015-04-25T14:09:00.000 | 1 | 1.2 | true | 29,866,234 | 0 | 0 | 1 | 1 | I am trying to redirect a POST request from an Google App Engine Python Handler to another URL. The Problem is that it seems the method is changed to GET. Is there any way to set the POST method when redirecting? |
Python/Eclipse/wxPython -- CallAfter undefined variable? callAfter is as well -- confused | 29,873,332 | 0 | 0 | 94 | 0 | python,eclipse,wxpython,pydev | I figured it out on my own. I deleted the wx and wxPython forced builtins and then loaded wx as an external library. Everything worked fine after that. | 0 | 1 | 0 | 0 | 2015-04-25T23:40:00.000 | 1 | 1.2 | true | 29,871,970 | 0 | 0 | 0 | 1 | I'm using Eclipse Luna and the latest pydev with it. I have wxpython 3.0 installed. First, I could import wx and I tried in the console to print version, perfect, but then I do import wx.lib.pubsub -- it says unresolved. I try other variations, no dice, so I have to go into the properties of my project and add wx ma... |
I use os.system to run executable file, but it need a .so file, it can't find library | 29,888,758 | 0 | 2 | 926 | 0 | python,ubuntu-12.04,dynamic-library | If I remember correctly, executing export ... via os.system will only set that shell variable within the scope, thus it's not available in the following os.system scopes. You should set the LD_LIBRARY_PATH in the shell, before executing the Python script.
Btw. also avoid setting relative paths… | 0 | 1 | 0 | 1 | 2015-04-27T06:32:00.000 | 3 | 0 | false | 29,888,716 | 0 | 0 | 0 | 1 | When I call a executable in python using os.system("./mydemo") in Ubuntu, it can't find the .so file (libmsc.so) needed for mydemo. I used os.system("export LD_LIBRARY_PATH=pwd:$LD_LIBRARY_PATH;"), but it still can't find libmsc.so.
The libmsc.so is in the current directory. and shouldn't be global. |
Simple way for message passing in distributed system | 29,904,422 | 0 | 2 | 1,745 | 0 | python,message-queue,messaging,distributed,distributed-system | I would recommend RabbitMQ or Redis (RabbitMQ preferred because it is a very mature technology and insanely reliable). ZMQ is an option if you want a single hop messaging system instead of a brokered messaging system such as RabbitMQ but ZMQ is harder to use than RabbitMQ. Depending on how you want to utilize the messa... | 0 | 1 | 1 | 1 | 2015-04-27T17:15:00.000 | 3 | 0 | false | 29,902,069 | 0 | 0 | 0 | 1 | I am implementing a small distributed system (in Python) with nodes behind firewalls. What is the easiest way to pass messages between the nodes under the following restrictions:
I don't want to open any ports or punch holes in the firewall
Also, I don't want to export/forward any internal ports outside my network
Ti... |
Cannot upload to an app ID though I have the correct permissions | 29,906,509 | 0 | 0 | 30 | 0 | python,google-app-engine,console,cloud | Most likely, you are logged into Gmail under a different account. Go to Gmail, and click Sign Out. Then go to the developer console. It should ask you to log in or select from several accounts. | 0 | 1 | 0 | 0 | 2015-04-27T19:01:00.000 | 1 | 0 | false | 29,903,889 | 0 | 0 | 1 | 1 | (I've been using appengine since 2009 and haven't needed support until now.) I've been added to a new project from the cloud console. When I try to upload the app, AppEngine launcher says "This application does not exist". Furthermore, in Cloud console, nothing appears under the appengine heading. At the same time, h... |
Upgrade Python 3.2 to Python 3.4 on linux | 29,975,297 | 2 | 1 | 5,897 | 0 | python,python-3.x,debian,apt | I'm going to answer my own question, since I have found a solution to my problem. I had previously run apt-get upgrade on my system after setting my debian release to jessie. This did not replace python 3.2 though. What did replace it was running apt-get dist-upgrade; after that apt-get autoremove removed python 3.2. I... | 0 | 1 | 0 | 1 | 2015-04-27T20:24:00.000 | 2 | 0.197375 | false | 29,905,262 | 1 | 0 | 0 | 1 | I have Python 3.2 installed by default on my Raspbian Linux, but I want Python 3.4 (time.perf_counter, yield from, etc.). Installing Python 3.4 via apt-get is no problem, but when i type python3 in my shell I still get Python 3.2 (since /usr/bin/python3 still links to it). Should I change the Symlink, or is there a bet... |
Avoid duplicate entries in Datastore | 29,918,649 | 2 | 1 | 456 | 0 | python-2.7,google-app-engine,google-cloud-datastore,webapp2 | Hash the entities and use the hash value as the key for your Entity. | 0 | 1 | 0 | 0 | 2015-04-28T09:34:00.000 | 1 | 0.379949 | false | 29,915,632 | 0 | 0 | 1 | 1 | I am trying to send the data to google app engine in python using Webapp2, But when I check the entries in the data in console I found duplicate entries which means except Id everything is same.I want to avoid those duplicate entries.Please suggest me if there is anyway to find the duplicate values to avoid.Thanks in a... |
GAE module: "Request attempted to contact a stopped backend." | 29,928,760 | 0 | 2 | 607 | 0 | python,google-app-engine | Fixed by shutting down all instances (on all modules/versions just to be safe). | 0 | 1 | 0 | 0 | 2015-04-28T19:42:00.000 | 1 | 1.2 | true | 29,928,477 | 0 | 0 | 1 | 1 | I am currently experiencing an issue in my GAE app with sending requests to non-default modules. Every request throws an error in the logs saying:
Request attempted to contact a stopped backend.
When I try to access the module directly through the browser, I get:
The requested URL / was not found on this server.
I... |
Supervisor and directory option | 30,126,084 | 0 | 2 | 498 | 0 | python,celery | Directory option in supervisord = where we mention our project directory path.
Example:
directory="/home/celery/pictures/myapp" | 0 | 1 | 0 | 0 | 2015-04-28T21:11:00.000 | 1 | 0 | false | 29,930,029 | 0 | 0 | 0 | 1 | I was configuring supervisor daemon to be able to start/stop Celery.
It did not work. After debuging back and forth I realized that the problem was that it did not change the working directory to the one mentioned in the directory option in supervisord.conf under program:celery configuration.
Hopefully there is a workd... |
How to Install Private Python Package as Part of Build | 29,936,384 | 11 | 13 | 7,187 | 0 | python,docker,pip,git-submodules | If you use github with a private repo you will have to create a SSH deploy key and add the private key to your app folder for builds.
pip install git+git://github.com/myuser/foo.git@v123
Alternatively, you can mount a pip-cache folder from host into container and do pip install from that folder. You'd have to keep the ... | 0 | 1 | 0 | 0 | 2015-04-29T04:35:00.000 | 5 | 1 | false | 29,934,451 | 1 | 0 | 0 | 1 | I have a fairly large private python package I just finished creating. I'd like to install it as part of my build process for an app in a Docker container (though this isn't so important). The package source is quite large, so ideally I'd avoid downloading/keeping the whole source.
Right now, I've been just passing aro... |
What is the relationship between virtualenv and pyenv? | 46,344,026 | 33 | 209 | 58,878 | 0 | python,virtualenv,virtualenvwrapper,pyenv | Short version:
virtualenv allows you to create local (per-directory), independent python installations by cloning from existing ones
pyenv allows you to install (build from source) different versions of Python alongside each other; you can then clone them with virtualenv or use pyenv to select which one to run at any ... | 0 | 1 | 0 | 0 | 2015-04-29T17:13:00.000 | 2 | 1 | false | 29,950,300 | 1 | 0 | 0 | 1 | I recently learned how to use virtualenv and virtualenvwrapper in my workflow but I've seen pyenv mentioned in a few guides but I can't seem to get an understanding of what pyenv is and how it is different/similar to virtualenv. Is pyenv a better/newer replacement for virtualenv or a complimentary tool? If the latter w... |
Celery, find the task caller from the task? | 29,971,218 | 1 | 0 | 249 | 0 | python,celery | Short answer is no and that is by design.
Long answer is yes, you can always send in unneeded information to the worker whose sole purpose is to identify the caller and the caller's state. | 0 | 1 | 0 | 0 | 2015-04-29T19:35:00.000 | 1 | 1.2 | true | 29,952,975 | 0 | 0 | 0 | 1 | Is it possible to lookup what code called (delay(), apply_async(), apply(), etc.) a task from within the task's code? Strings would be fine. Ideally, I would like to get the caller's stack trace. |
Will installing Anaconda3 change Mac OS X default Python version to 3.4? | 29,989,510 | 2 | 2 | 2,423 | 0 | python,python-2.7,python-3.x,anaconda | No it won't, you can have multiple python installs, once you don't remove your system python or manually change the default you will be fine. | 0 | 1 | 0 | 0 | 2015-05-01T14:13:00.000 | 2 | 0.197375 | false | 29,988,504 | 1 | 0 | 0 | 1 | I'm planning to install Anaconda3 for Python 3.4. Since by default, Mac OS X uses Python2, will install Anaconda3 change the default Python version for the system? I don't want that to happen since Python3 can break backwards compatibility. If it does change the default Python version, how can I avoid that? |
icu4c + Mapnik - I want to switch icu4c from 55.1 to 54.1 to get Mapnik to work | 30,045,778 | 2 | 0 | 824 | 0 | python-2.7,osx-mavericks,homebrew,icu,mapnik | This was Homebrew's fault and should be fixed after brew update && brew upgrade mapnik; sorry! | 0 | 1 | 0 | 0 | 2015-05-01T14:37:00.000 | 2 | 0.197375 | false | 29,988,923 | 0 | 0 | 0 | 1 | What is the best way to downgrade icu4c from 55.1 to 54.1 on Mac OS X Mavericks.
I tried brew switch icu4c 54.1 and failed.
Reason to switch back to 54.1
I am trying to setup and use Mapnik.
I was able to install Mapnik from homebrew - brew install mapnik
But, I get the following error when I try to import mapnik in p... |
install numpy for python 3.4 in ubuntu | 30,000,588 | 3 | 2 | 5,372 | 0 | python,ubuntu,python-3.x,numpy | You're close, to update a package for python3.4 you have to sudo pip3 install -U numpy (note the pip3).
It might be the case that you still have to install pip3 first (not sure if it is bundled). Probably for that you have to sudo apt-get install python-pip3 or something. If you have a recent Ubuntu (I believe startin... | 0 | 1 | 0 | 0 | 2015-05-02T08:51:00.000 | 2 | 1.2 | true | 30,000,294 | 1 | 0 | 0 | 1 | I have python 2.7, and I installed beside it python 3.4, but python 3.4 has not numpy package. When I use sudo pip install -U numpy, it install it in python2.7 location. How can I install numpy for python 3.4 in a machine that has already python 2.7? |
Python script fallback to second server | 30,035,305 | 1 | 1 | 104 | 0 | python,pushbullet | Could you shutdown the script on your VPS, copy the cache files over the the Pi and run the script there? Then do the reverse when you want to move it back to the VPS.
You could possibly run the script on both systems, but then you'd need to synchronize between them which sounds like a lot of unnecessary work. For in... | 0 | 1 | 0 | 1 | 2015-05-03T02:24:00.000 | 1 | 0.197375 | false | 30,009,595 | 0 | 0 | 1 | 1 | I have a Python script that manages Pushbullet channels for Nexus Android device factory images. It runs on my VPS (cron job that runs every 10 minutes), but my provider has warned that there may be intermittent downtime over the next several days. The VPS is running Ubuntu Server 15.04.
I have a Raspberry Pi that's al... |
Try to run Python 3.4.3 but still shows Python 2.7.9 | 30,020,231 | 0 | 1 | 1,024 | 0 | python,python-2.7,python-3.x | Probably the links are not working
To solve this, backup your current python link:
cp /usr/bin/python ~/Desktop
Remove the old soft link and create a new soft link pointing to Python 3.4.3 installation:
rm -f /usr/bin/python
ln -s /System/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 /usr/bin/python | 0 | 1 | 0 | 0 | 2015-05-03T22:16:00.000 | 1 | 0 | false | 30,020,044 | 1 | 0 | 0 | 1 | I installed Python 3.4.3 and then installed Python 2.7.9 on Mac Air. If I run Python on a command line, it shows Python 2.7.9. I removed Python 2.7.9, it still shows Python 2.7.9. What is the problem? Thanks. |
Celery worker: periodic local background task | 30,047,898 | 0 | 1 | 541 | 0 | python,scheduled-tasks,celery,background-process | One possible method I thought of, though not ideal, is to patch the celery.worker.heartbeat Heart() class.
Since we already use heartbeats, the class allows for a simple modification to its start() method (add another self.timer.call_repeatedly() entry), or an additional self.eventer.on_enabled.add() __init__ entry wh... | 0 | 1 | 0 | 0 | 2015-05-04T18:15:00.000 | 2 | 0 | false | 30,037,065 | 0 | 0 | 0 | 1 | Is there any Celery functionality or preferred way of executing periodic background tasks locally when using a single worker? Sort of like a background thread, but scheduled and handled by Celery?
celery.beat doesn't seem suitable as it appears to be simply tied to a consumer (so could run on any server) - that's the ... |
Python shell in linux | 30,049,734 | 0 | 2 | 4,968 | 0 | python,linux,python-idle | Install the "idle" package. Many distros break the core python installation into several pieces, and idle is usually one that is packaged separately. | 0 | 1 | 0 | 0 | 2015-05-05T09:50:00.000 | 3 | 0 | false | 30,049,608 | 1 | 0 | 0 | 2 | Is there a way to have a python IDLE shell, like how it is seen on windows? Sorry if this topic has been raised before, I did not find it.
Using Linux mint 17.1 rebecca, Cinnamon 32 bit |
Python shell in linux | 30,049,783 | 0 | 2 | 4,968 | 0 | python,linux,python-idle | If you really want IDLE, just run python -m idlelib.idle | 0 | 1 | 0 | 0 | 2015-05-05T09:50:00.000 | 3 | 0 | false | 30,049,608 | 1 | 0 | 0 | 2 | Is there a way to have a python IDLE shell, like how it is seen on windows? Sorry if this topic has been raised before, I did not find it.
Using Linux mint 17.1 rebecca, Cinnamon 32 bit |
IIS access to a remote server in same domain | 30,057,339 | 0 | 0 | 78 | 0 | php,python,iis | Since you provide no example code or describe what you are doing... There are a few things to consider.
Anything running in the context of a webpage in IIS is running in a different context than a logged in user.
The first part of that is simply what file system level permissions might be different for the IIS user a... | 0 | 1 | 0 | 1 | 2015-05-05T15:11:00.000 | 2 | 0 | false | 30,056,836 | 0 | 0 | 0 | 2 | I have a server A where some logs are saved, and another server B with a web server (IIS) on it.
I can access serverA from Windows Explorer with zero problems, but when I want to access it from serverB with some PHP code, it doesn't work.
I made a python script that accesses the file from serverA on serverB. It works ... |
IIS access to a remote server in same domain | 30,117,742 | 0 | 0 | 78 | 0 | php,python,iis | Resolved.
Uninstall IIS and use XAMPP.
No problem found till now, everything works okay.
So use XAMPP/WAMP! | 0 | 1 | 0 | 1 | 2015-05-05T15:11:00.000 | 2 | 1.2 | true | 30,056,836 | 0 | 0 | 0 | 2 | I have a server A where some logs are saved, and another server B with a web server (IIS) on it.
I can access serverA from Windows Explorer with zero problems, but when I want to access it from serverB with some PHP code, it doesn't work.
I made a python script that accesses the file from serverA on serverB. It works ... |
OPENSHIFT Cron job just stop working | 30,107,482 | 0 | 0 | 567 | 0 | python,django,openshift | This issue should be fixed now. Please open a request at help.openshift.com if you continue to have issues with it. | 0 | 1 | 0 | 1 | 2015-05-06T11:20:00.000 | 2 | 0 | false | 30,075,234 | 0 | 0 | 0 | 1 | I have an hourly cron job which has been running in Openshift free gear for almost a year and has been no problem. But the past 2 days, cron job stops running automatically. I have been googling around and still cannot find what went wrong. Here are what I have checked/done to date
the service I use to keep the sit... |
What should the Python start command look like in Bluemix? | 30,096,077 | 3 | 1 | 2,739 | 0 | python-3.x,ibm-cloud | You can define the start command in a file called Procfile. Create the Procfile in the root of your app code that you push to Bluemix. The contents of the Procfile should look like this:
web: python3 appname.py
where appname.py is the nameof your python script to run | 0 | 1 | 0 | 0 | 2015-05-06T23:27:00.000 | 3 | 1.2 | true | 30,089,374 | 0 | 0 | 0 | 1 | I am trying to push a python3 app to Bluemix, but get the error msg "missing start command". I have tried to add -c "python appname.py" as Python usually has in Windows and -c "python3 appname.py" as in Python in Linux, but neither works for me. Can anyone give me the right start command to use? |
is there any possible way to run a python script on boot in windows operating system? | 30,090,978 | 1 | 0 | 111 | 0 | python,windows | You don't need to create a py2exe executable for this, you can simply run the Python executable itself (assuming it's installed of course), passing the name of your script as an argument.
And one way to do that is to use the task scheduler, which can create tasks to be run at boot time, under any user account you have ... | 0 | 1 | 0 | 0 | 2015-05-07T02:30:00.000 | 1 | 1.2 | true | 30,090,942 | 1 | 0 | 0 | 1 | I want to run a python script which should always start when windows boot.
i believe i can create an executable windows executable file from python by using py2exe... But how to make as a start up service which will be triggered while boot
Is there any way ? |
about close a file in Python | 30,092,316 | 3 | 9 | 2,274 | 0 | python,file | There are two good reasons.
If your program crashes or is unexpectedly terminated, then output files may be corrupted.
It's good practice to close what you open. | 0 | 1 | 0 | 0 | 2015-05-07T04:55:00.000 | 5 | 0.119427 | false | 30,092,249 | 1 | 0 | 0 | 1 | I know it is a good habit of using close to close a file if not used any more in Python. I have tried to open a large number of open files, and not close them (in the same Python process), but not see any exceptions or errors. I have tried both Mac and Linux. So, just wondering if Python is smart enough to manage file ... |
Python Default Confusion | 31,082,418 | 0 | 0 | 51 | 0 | python,python-2.7,amazon-ec2,config,python-2.6 | Creating an alias in your ~/bashrc is a good approach.
It sounds like you have not run source ~/.bashrc after you have edited it. Make sure to run this command.
Also keep it mind that when you run sudo python your_script.py it will not use your alias (because you are running as the root, not at the ec2-user).
Make sure... | 0 | 1 | 0 | 1 | 2015-05-11T00:29:00.000 | 1 | 0 | false | 30,158,068 | 0 | 0 | 0 | 1 | Upon running python in any dir in my amazon EC2 instance, I get the following printout on first line: Python 2.6.9 (unknown, todays_date). Upon going to /usr/bin and running python27, I get this printout on first line: Python 2.7.9 (default, todays_date).
This is a problem because the code that I have only works with ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.