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
Run Python script when I log into my system? [xubuntu 15.04]
30,175,033
0
1
517
0
python,linux,python-3.x,xubuntu
Found the answer. You have to go Configuration/Systemsettings/Session and Startup, and add the program.
0
1
0
1
2015-05-11T18:03:00.000
1
1.2
true
30,174,585
0
0
0
1
How can i run a python script at startup with xubuntu 15.04? I want to run a script that reminds me of things,like backup,buying thing,calling somebody. I already have the script,i just need it to start at startup. (Python 3.4) As far i know, xubuntu 15.04 uses systemd. All the tutorials i found,are for init.d or upst...
Unabe to Get OpenStack Login prompt
30,254,113
0
0
808
0
python,openstack,openstack-horizon
if you are running on Horizon on Apache then you need to check apache logs to identify issue. Horizon logs will not contains anything if apache was not able to execute WSGI script for Horizon.
0
1
1
0
2015-05-11T18:21:00.000
2
0
false
30,174,910
0
0
0
2
I have OpenStack UI running. I made some changes in the local-setting.py file and restarted the Horizon service using service httpd restart and try to hit OpenStack UI but it returns an error: "HTTP 400 Bad request". When I revert back all changes, restart the service and try again the error is still there. Please help...
Unabe to Get OpenStack Login prompt
52,743,233
1
0
808
0
python,openstack,openstack-horizon
Total agree with above comments, check your apache or httpd log files. Most probably error cause due to improper info. added (for centos) under below file. /etc/openstack-dashboard/local_settings ALLOWED_HOSTS = ['XX.XX.XX.XX', 'ControllerName', 'localhost'] Hopefully this will resolve issue.
0
1
1
0
2015-05-11T18:21:00.000
2
0.099668
false
30,174,910
0
0
0
2
I have OpenStack UI running. I made some changes in the local-setting.py file and restarted the Horizon service using service httpd restart and try to hit OpenStack UI but it returns an error: "HTTP 400 Bad request". When I revert back all changes, restart the service and try again the error is still there. Please help...
subprocess window disappear quickly
30,195,117
0
1
425
0
python,windows
In windows, the common way of keeping cmd windows opened after the end of a console process is to use cmd /k Example : in a cmd window, typing start cmd /k echo foo opens a new window (per start) displays the output foo leave the command window opened
0
1
0
0
2015-05-12T14:49:00.000
2
0
false
30,194,383
0
0
0
1
In python, I use subprocess.Popen() to launch several processes, I want to debug those processes, but the windows of those processes disappeared quickly and I got no chance to see the error message. I would like to know whether there is any way I can stop the window from disappearing or write the contents in the window...
How do I run the python files from command shell/command prompt?
30,197,578
6
1
1,174
0
python,shell
import name is a python keyword for use within a python script and/or the python interactive interpreter (repl). python filename.py is a shell command for use at a command prompt or within a shell script to run the python interpreter on a given python script file. The working directory does not matter other than for wh...
0
1
0
0
2015-05-12T17:18:00.000
2
1.2
true
30,197,523
1
0
0
2
Really frustrated with this as one thing works at one time. Sometimes import filename.py works. But in the tutorials all I see is python filename.py. But when I try to give that, I am facing an error like invalid syntax. I have edited all the environment variables and I have C:\Python27 folder in the same location. To ...
How do I run the python files from command shell/command prompt?
30,197,771
0
1
1,174
0
python,shell
Just to be clear, typing python filename.py only works from the Terminal (i.e. cmd.exe, Windows PowerShell, the "Terminal" application on a Linux kernel, etc.), not from the Python interpreter (i.e. python.exe), and only works if you have used the cd command to change into the directory in which the file is saved (so t...
0
1
0
0
2015-05-12T17:18:00.000
2
0
false
30,197,523
1
0
0
2
Really frustrated with this as one thing works at one time. Sometimes import filename.py works. But in the tutorials all I see is python filename.py. But when I try to give that, I am facing an error like invalid syntax. I have edited all the environment variables and I have C:\Python27 folder in the same location. To ...
how to upload the existing app in to web2py environment
30,356,551
0
2
724
0
python,web2py
Just use the file system. GUI: Copy your application folder to your new instance of web2py (/web2py/applications). Command line: scp -r /home/username/oldarea/web2py/application/myApp /home/username/newarea/web2py/applications
0
1
0
0
2015-05-13T07:31:00.000
1
0
false
30,208,421
0
0
1
1
I am new to web2py I have web2py application in my local system i want to upload this application into web2py environment throught admin interface option present in web2py Upload & install packed application and do some modifications and run the application but i am unable to uploded the app please give the suggesatio...
how to configure celery executing tasks concurrently from on queue
30,216,495
3
3
1,110
0
python,concurrency,celery
To put it simply concurrency is the number of jobs running on a worker. Prefetch is the number of job sitting in a queue on a worker itself. You have 1 of 2 options here. The first is to set the prefetch multiplier down to 1. This will mean the worker will only keep, in your case, 8 additional jobs in it's queue. ...
0
1
0
0
2015-05-13T11:22:00.000
1
1.2
true
30,213,356
0
0
0
1
In an environment with 8 cores, celery should be able to process 8 incoming tasks in parallel by default. But sometimes when new tasks are received celery place them behind a long running process. I played around with default configuration, letting one worker consume from one queue. celery -A proj worker --loglevel=INF...
python changing keyboard language in Mac OS X
66,572,892
0
2
765
0
python,macos,keyboard
Calling xkbswitch from python using subprocess would probably be easier than the other solutions you find here.
0
1
0
0
2015-05-13T18:50:00.000
3
0
false
30,223,012
1
0
0
1
I wrote python software that requires both german and english input. Currently, I am using the Mac shortcut cmd-space to quickly change keyboard layouts, but I need to do this hundreds of times, which slows things down. Since I know exactly when English vs German input is needed, is there a way to programmatically chan...
debian wheezy console application set font size
30,232,512
0
0
153
0
python,debian,raspberry-pi
you can not do this. font size is determined by terminal emulator not program output.
0
1
0
1
2015-05-14T07:06:00.000
2
0
false
30,231,345
0
0
0
1
How do I set font size for Python console application? I'm running Debian Wheezy on a Raspberry Pi. When the program is exited return to default size.
Select python version to execute from prompt
30,237,541
0
0
79
0
python,command-prompt,prompt
There are multiple ways to go about this. As Sir_FZ pointed out, the executables are already named python2.7, etc, so what you want already exists. If for some really odd reason you have more than one python2.7 in your $PATH, you can explicitly call /my/other/python2.7 etc. If you're lazy, you can even create alias'...
0
1
0
0
2015-05-14T10:49:00.000
2
0
false
30,235,427
1
0
0
1
I have several python versions installed (and working properly on my machines). Isn't there a way to execute a specific version of python from the command line. Say I want to use python 3.1. I am after something a SIMPLE COMMAND such as python3.1 or python31 that would be used as follows :python3.1 setup.py install, fo...
Run multiple Celery chains at the same time
30,300,802
1
0
678
0
python,django,celery
If you want to run chains at once you will need to run more than one worker.
0
1
0
0
2015-05-15T19:21:00.000
1
1.2
true
30,267,236
0
0
1
1
I have Celery tasks chain that I call with apply_async. Each task in chain depends on the result from previous task. Basically the worklof looks like this: Fetch data from DB. For each fetched row run chain with tasks. Behaviour that I want to achieve is to run multiple chains at one time. But it seems like it runs t...
Distributed Task Queue Based on Sets as a Data Structure instead of Lists
30,282,486
1
8
656
0
python,redis,rabbitmq,celery,message-queue
Can your tasks in stage 2 check whether the work has already been done and, if it has, then not do the work again? That way, even though your task list will grow, the amount of work you need to do won't. I haven't come across a solution re the sets / lists, and I'd think there were lots of other ways of getting around ...
0
1
0
0
2015-05-16T16:26:00.000
3
0.066568
false
30,278,054
0
0
1
1
I'm wondering if there's a way to set up RabbitMQ or Redis to work with Celery so that when I send a task to the queue, it doesn't go into a list of tasks, but rather into a Set of tasks keyed based on the payload of my task, in order to avoid duplicates. Here's my setup for more context: Python + Celery. I've tried Ra...
Is there a way to run a Google App engine cron task without hitting an endpoint but rather pointing cron.yaml at a python script?
30,280,609
2
0
622
0
python,google-app-engine,google-cloud-storage
A cron job in GAE has to hit a URL, there's no other way to do it. That's just how the system is designed. But since you have control over app.yaml anyway, you can easily assign your script to a URL there.
0
1
0
1
2015-05-16T20:32:00.000
2
0.197375
false
30,280,460
0
0
1
1
my end goal is to update Google cloud storage with some json data and I would rather it run a script rather than hitting a url endpoint. What would be the proper configuration of cron.yaml if, let's say the script were to sit right next to app.yaml?
Running python script on Microsoft Azure
30,571,753
2
2
4,731
0
python,azure,cloud,bigdata,azure-virtual-machine
There is no additional steps to do in comparison to Your own. local server. Linux on Azure is a standard Linux machine. If You are looking for step-by-step hopw to on running Linux VM on Azure, just search on azure.com and You will find it. I think You will not have any problems even without documentation. Azure portal...
0
1
0
0
2015-05-17T22:39:00.000
1
1.2
true
30,292,884
1
0
0
1
I'll have a linux machine with a virtual machine installed for Microsoft azure soon. I need to run some data mining/graph analysis algorithms on the azure because I work with big data. I don't want to use azure machine learning stuff. just want to run my own python code. What are the steps? If needed, hoe can I install...
How to remove .pyo anc .pyc from an RPM?
30,325,775
4
3
5,993
0
python,rpm
The *.pyc and *.pyo are being automagically compiled by helper scripts in rpm. The simplest way to disable is to add "exit 0" at the end of the %install section to disable the running of the helper scripts Otherwise you will need to change your build configuration and redefine the macros that are being appended to the ...
0
1
0
0
2015-05-19T05:12:00.000
2
0.379949
false
30,317,213
1
0
0
1
I have a proxy written in python. I want to create an RPM for this. This rpm will just place the appropriate files at their location. and then some python server will pick them. Now my question is that whenever I generate the rpm, I am getting .pyo and .pyc files as well for every .py file. I don't need those pyc and p...
Python: How to handle 'crontab' command?
30,319,952
0
2
6,083
0
python,linux,ubuntu,cron,crontab
If all you want to do is reset the content of user crontab file , then just remove the crontab file (or overwrite with your default) , and reload the cron service .
0
1
0
0
2015-05-19T06:24:00.000
5
0
false
30,318,168
0
0
0
2
We know the crontab command is used for scheduled tasks in Linux. I want to write a Python script. Its function is to receive some data (these data are related to crontab setting) and execute a 'crontab' command in order to reset the content of the user's crontab file. I know how to execute external Linux commands in P...
Python: How to handle 'crontab' command?
30,319,851
0
2
6,083
0
python,linux,ubuntu,cron,crontab
You could/should first dump your current crontab with crontab -l, edit it the way you want (e. g. add some lines, or modify) and then install the new one. This usually works with crontab <filename>, but should as well work with crontab - and then piping the new contents into the process's stdin.
0
1
0
0
2015-05-19T06:24:00.000
5
0
false
30,318,168
0
0
0
2
We know the crontab command is used for scheduled tasks in Linux. I want to write a Python script. Its function is to receive some data (these data are related to crontab setting) and execute a 'crontab' command in order to reset the content of the user's crontab file. I know how to execute external Linux commands in P...
Pip.exe from Python on Windows 10
31,065,211
18
7
18,024
0
python,windows,python-3.x,windows-10
You can use python -m pip install package
0
1
0
0
2015-05-19T20:04:00.000
2
1
false
30,335,122
1
0
0
1
I installed the latest version of Python from www.python.org. Python 3.4.3. I then go to run pip and I get "Fatal error in launcher: Job information querying failed" Searching for this error message points me to similar issues running Python under wine. If you grab a pre-compiled pip.exe it will work but it seems ...
How can I monitor a python scrypt and restart it in the event of a crash? (Windows)
30,358,001
0
0
403
0
python,windows,monitoring
If there are no other mitigating factors in your design or requirements, my suggestion would be to simplify the script so that it doesn't do the polling; it simply sends the file when invoked, and use Windows Scheduler to invoke the script on whatever schedule you need. By relying on a core Windows service, you can fac...
0
1
0
1
2015-05-20T15:52:00.000
2
1.2
true
30,354,621
0
0
0
1
I have a simple python script to send data from a Windows 7 box to a remote computer via SFTP. The script is set to continuously send a single file every 5 minutes. This all works fine but I'm worried about the off chance that the process stops or fails and the customer doesn't notice the data files have stopped coming...
Tornado ioloop + threading
30,362,810
3
5
4,428
0
python,http,tornado,web-frameworks
The vast majority of Tornado apps should have only one IOLoop, running in the main thread. You can run multiple HTTPServers (or other servers) on the same IOLoop. It is possible to create multiple IOLoops and give each one its own thread, but this is rarely useful, because the GIL ensures that only one thread is runnin...
0
1
0
0
2015-05-20T18:28:00.000
1
1.2
true
30,357,663
1
0
0
1
i have been working on tornado web framework from sometime, but still i didnt understood the ioloop functionality clearly, especially how to use it in multithreading. Is it possible to create separate instance of ioloop for multiple server ??
How to install requests module in Python 3.4, instead of 2.7
53,805,505
0
51
316,112
0
python-3.x,pip,python-requests
i just reinstalled the pip and it works, but I still wanna know why it happened... i used the apt-get remove --purge python-pip after I just apt-get install pyhton-pip and it works, but don't ask me why...
0
1
1
0
2015-05-21T00:29:00.000
6
0
false
30,362,600
1
0
0
2
I have both Python 2.7 and 3.4 installed on my Ubuntu 14.04 machine. I want to install the 'requests' module so it is accessible from Py3.4. When I issued pip install requests on my terminal cmd line I got back: "Requirement already satisfied (use --upgrade to upgrade): requests in /usr/lib/python2.7/dist-packages" ...
How to install requests module in Python 3.4, instead of 2.7
53,132,450
0
51
316,112
0
python-3.x,pip,python-requests
i was facing same issue in beautiful soup , I solved this issue by this command , your issue will also get rectified . You are unable to install requests in python 3.4 because your python libraries are not updated . use this command apt-get install python3-requests Just run it will ask you to add 222 MB space in you...
0
1
1
0
2015-05-21T00:29:00.000
6
0
false
30,362,600
1
0
0
2
I have both Python 2.7 and 3.4 installed on my Ubuntu 14.04 machine. I want to install the 'requests' module so it is accessible from Py3.4. When I issued pip install requests on my terminal cmd line I got back: "Requirement already satisfied (use --upgrade to upgrade): requests in /usr/lib/python2.7/dist-packages" ...
Python kill parent script (subprocess)
30,365,032
1
0
650
0
python,subprocess
You are doing this backwards, and shouldn't be using the child process to kill the parent process. Instead, you will want a parent process of your "perpetually running" script (which will now be the subprocess). When an update is detected, the subprocess kills itself, and requests that the parent implement your changes...
0
1
0
0
2015-05-21T05:04:00.000
1
1.2
true
30,364,981
1
0
0
1
Im working on two scripts. One script is perpetually running. When it senses an update to itself, it will run the second script as a subprocess. The second script should kill the first script, implement the changes and run the updated script. However, I cant find a way to kill the first script. How does the child pr...
Long-running Python process that accepts inputs from another non-Python process
30,365,943
1
0
25
0
python,objective-c,ipc
I would argue it's not the HTTP that adds a lot of overhead, but the TCP 3-way connection handshake. Having said that, a lot of systems use TCP for inter-process communication, so if you want to use HTTP, it's only a very small extra load on top. Of course with HTTP, you are creating a new connection with each request,...
0
1
0
0
2015-05-21T06:10:00.000
1
0.197375
false
30,365,807
1
0
0
1
I'm designing a system like this: a Python process (let's call it "server") accepts inputs from another process ("client", written in Objective-C) on the same machine and returns outputs to the client. What's a good architecture for this system? I mean, what's a good protocol for server/client communication? I think ma...
virtualenv does not get activated in new bash shell
30,397,334
2
1
580
0
linux,python-2.7,terminal,virtualenv
You have to activate the virtualenv in every shell, or, as 0range suggested, activate it in your .bashrc or any script running before your shell displays the prompt. To add it to your .bashrc : Edit /home/youruser/.bashrc and add the line : source /path/to/bin/activate Open a new shell or source ~/.bashrc Everything ...
0
1
0
0
2015-05-22T12:12:00.000
1
1.2
true
30,396,430
1
0
0
1
I activate python virtualenv in one bash and tries to use in another bash shell. virtualenv simply does not work. I opened a terminal, activate the virtualenv through sourcing activate file. It got activated in my terminal it shows () in front of terminal address. I opened a new terminal. The effect is not visible in...
How can I run python in terminal on a mac?
30,408,184
1
3
35,838
0
python,macos
python command will open a Python interpreter, where you can't run the python hello.py command so you got the syntax error (to run hello.py in python shell you need execfile(hello.py)) to quit the Python interpreter, type ctrl+d and than python hello.py to execute your hello world script.
0
1
0
0
2015-05-23T01:57:00.000
3
0.066568
false
30,408,127
0
0
0
1
I'm extremely new to programming, in fact I'm trying to learn Python now as a first language. I found that Google has a python course and it said to download python 2 from python's website, which I did, and I now realize that python was already installed on my mac by apple. Anyways, I also had to download some exercise...
Python/ Apache Help needed
30,408,643
0
1
28
0
python,apache
Here is how I would take the approach based on what you just asked. Server: Apache + mod_wsgi for front-end web server (allows for using flask or django); there's not much here, it's a pretty easy configuration. I would use Django for the web framework. Client: Client would poll the server at some kind of interval (...
0
1
0
1
2015-05-23T03:19:00.000
1
0
false
30,408,568
0
0
0
1
I am trying to make a program (well more like two programs that work together) A. The server(host): which is connected to the Apache server and sends commands to it and B. The Client(client): which is also connected but cant send commands only receive them. Example: If I typed in the server(host). Log time it would se...
Debugging ANT script initiated via a Python script
30,913,800
0
0
112
0
python,eclipse,debugging,ant,pydev
When dealing with multiple languages, the way for debugging is regular debugging in one and remote debugging in the other... I'm guessing the ant debug uses the regular java debug which supports remote debugging, so, you can probably try that (although I haven't tried it here to confirm).
0
1
0
1
2015-05-23T12:06:00.000
1
0
false
30,412,458
0
0
1
1
I have a set of Python scripts that sets up various parameters/properties for ANT script based on various conditions that are checked in the Python scripts and then invokes/executes the appropriate ANT build script. I initiate the Python script from my Eclipse IDE. I have the PyDev plug-in installed in Eclipse. I am ab...
how do you disable a text command from another text command in Sublimetext
30,431,423
0
0
65
0
python,sublimetext3,sublimetext,sublime-text-plugin
After another 5 hours of reading, I figured it out. As I assumed, it was a lack of Python knowledge on my part. All I needed to do was create a module level variable to use as a flag.
0
1
0
0
2015-05-24T21:01:00.000
1
0
false
30,428,292
0
0
0
1
I'm creating a plugin in sublime Text 3, and I've hit a snag that I can't figure out. This is my first using python, and the first time I've done even driven desktop development in over a decade, so hopefully this is just a lack of knowledge on my part. The plugin I'm writing uses text commands to gather data and then ...
Is there a more efficient way to satisfy project dependencies than pip?
30,434,337
2
1
55
0
python,linux,django,dependencies,pip
For god's sake, please do not fall back to using the distribution's package manager just because your hosting guys do not understand what pip+virtualenv is good for. Python packages in Linux distribution repositories are often outdated and may come with quirks that other Python package authors did not plan for. This is...
0
1
0
1
2015-05-25T08:31:00.000
1
1.2
true
30,434,106
1
0
0
1
I work on a system and the hosting guys don't want to use an install script that uses pip. Now we have a large pip requirements file that install the dependencies. Is there any other way to do it than using pip? Can it be done using yum or apt-get ? We are using Linux.
pty.fork() error python pexpect
32,283,501
0
1
731
0
python,cgi,pexpect
ExceptionPexpect(\'Error! pty.fork() failed: \' + str(e))\npexpect.ExceptionPexpect: Error! pty.fork() failed: out of pty devices\')') your system has reached the max # of pty devs. your should increase those according to your needs. keep in mind, for resource & security reasons it shall be useful to limit access ...
0
1
0
1
2015-05-26T12:19:00.000
1
0
false
30,458,394
0
0
0
1
I am using pexpect with cgi to ssh into remote machine, Whenever i run a script which does ssh using pexpect from the linux terminal it gives me the correct result, but when i call the script using commands module from the cgi program i am getting the following error. (0, '(256, \'Traceback (most recent call last):\n...
How to check all versions of python installed on osx and centos
30,465,953
4
75
184,308
0
python,linux,macos,centos,version
As someone mentioned in a comment, you can use which python if it is supported by CentOS. Another command that could work is whereis python. In the event neither of these work, you can start the Python interpreter, and it will show you the version, or you could look in /usr/bin for the Python files (python, python3 etc...
0
1
0
1
2015-05-26T17:18:00.000
12
0.066568
false
30,464,980
0
0
0
4
I just started setting up a centos server today and noticed that the default version of python on centos is set to 2.6.6. I want to use python 2.7 instead. I googled around and found that 2.6.6 is used by system tools such as YUM so I should not tamper with it. Then I opened up a terminal on my mac and found that I had...
How to check all versions of python installed on osx and centos
58,172,493
4
75
184,308
0
python,linux,macos,centos,version
COMMAND: python --version && python3 --version OUTPUT: Python 2.7.10 Python 3.7.1 ALIAS COMMAND: pyver OUTPUT: Python 2.7.10 Python 3.7.1 You can make an alias like "pyver" in your .bashrc file or else using a text accelerator like AText maybe.
0
1
0
1
2015-05-26T17:18:00.000
12
0.066568
false
30,464,980
0
0
0
4
I just started setting up a centos server today and noticed that the default version of python on centos is set to 2.6.6. I want to use python 2.7 instead. I googled around and found that 2.6.6 is used by system tools such as YUM so I should not tamper with it. Then I opened up a terminal on my mac and found that I had...
How to check all versions of python installed on osx and centos
56,606,519
20
75
184,308
0
python,linux,macos,centos,version
we can directly use this to see all the pythons installed both by current user and the root by the following: whereis python
0
1
0
1
2015-05-26T17:18:00.000
12
1
false
30,464,980
0
0
0
4
I just started setting up a centos server today and noticed that the default version of python on centos is set to 2.6.6. I want to use python 2.7 instead. I googled around and found that 2.6.6 is used by system tools such as YUM so I should not tamper with it. Then I opened up a terminal on my mac and found that I had...
How to check all versions of python installed on osx and centos
30,466,232
7
75
184,308
0
python,linux,macos,centos,version
Use, yum list installed command to find the packages you installed.
0
1
0
1
2015-05-26T17:18:00.000
12
1.2
true
30,464,980
0
0
0
4
I just started setting up a centos server today and noticed that the default version of python on centos is set to 2.6.6. I want to use python 2.7 instead. I googled around and found that 2.6.6 is used by system tools such as YUM so I should not tamper with it. Then I opened up a terminal on my mac and found that I had...
importing Twilio on google app engine
30,514,752
0
0
275
0
python,google-app-engine,twilio
Thanks for the input. I had already tried all of these things. When I ran the app on a local host I saw in the console that the error I was facing was with 'pytz' Turns out that Twilio requires the Pytz dependency to be in the root directory of Google App Engine. They have not updated the documentation yet. Hope that...
0
1
0
1
2015-05-27T09:39:00.000
3
1.2
true
30,478,647
0
0
1
1
I've seen other similar questions but none of the solutions are working for me. I am trying to get Twilio working with Google App Engine. I am using the python API and can't seem to get it to work. I tried a few tactics: used pip install twilio downloaded the twilio file directly into my root directory sym linked the...
Remote Debug of Celery using rdb
34,818,641
2
1
666
0
python,celery
For anyone who has this problem and finds their way here from google, I can't explain why rdb drops you into the middle of contextlib but I have found that if you execute the r(eturn) command a couple times you'll work your way back into the function you made your rdb.set_trace() call from.
0
1
1
0
2015-05-27T15:25:00.000
1
1.2
true
30,486,773
0
0
0
1
I'm trying to do some debuging on celery task using rdb but despite the fact that I can connect to the socket using telnet it doesn't give me any data, looks like Pdb is broken and doesn't have any data to inspect It starts with this lane c:\python27\lib\contextlib.py(21)exit()-> def exit(self, type, value, traceback)...
Powershell not finding a file with a .py extension
30,516,327
0
1
173
0
python,powershell
I got it to work finally, I had it in a folder under the path C:\Users\MyUser\PythonTest\ex1.py This was wrong, however when I made it C:\Users\MyUser\ex1.py It worked, thanks for all the help!
0
1
0
1
2015-05-27T23:56:00.000
2
0
false
30,495,055
1
0
0
1
I am using Zed Shaw's "Learn Python the Hard Way" and have gotten Python to work. I made a file and saved it as ex1.py. I type the command python ex1.py This does not recognize the file like it should and instead gives me this can't open file 'ex1.py': [Errno 2] No such file or directory I have checked and double-che...
Convert script to executable, python not in registry
30,521,807
0
0
297
0
python,windows,exe
I fixed the issue. Apparently I accidentally installed 32-bit Python on a 64-bit machine. So I have to use the 32-bit installer because it installs the registry key in a different place. Thanks for the help anyways.
0
1
0
1
2015-05-28T05:44:00.000
2
0
false
30,498,106
1
0
0
1
I am trying to convert a python script to an executable file. I have tried cxFreeze and py2exe, but both told me that Python27 are not in the registry. I found several other questions that tell me to go to regedit and find the python folder, but it is not there. I tried going to HKEY_CURRENT_USER/Software and Python27 ...
VIM + netrw: open multiple files/buffers in the same window
30,533,662
3
2
3,905
0
python,vim,nerdtree,python-mode,netrw
But having a file opened, if I open netrw by typing :E and open another file by hitting <enter> VIM closes the old one and opens the new one in the same window. [...] How can I open multiple files/buffers in the same window using netrw? Buffers are added to a list, the buffer list, and facultatively displayed in one ...
0
1
0
0
2015-05-29T15:18:00.000
3
1.2
true
30,533,263
1
0
0
1
I have recently switched to VIM using NERDTree and python-mode. As NERDTree seems to have a conflict with python-mode and breaks my layout if I close one out of multiple buffers, I decided to switch to netrw since it is shipped with VIM anyway. But having a file opened, if I open netrw by typing :E and open another fil...
How can i install python on OSX?
30,543,046
1
1
36
0
python,macos
python is installed on OSX by default and you just need to open terminal and write ‘python’ command, then you can start your python coding
0
1
0
0
2015-05-30T06:23:00.000
1
1.2
true
30,543,041
1
0
0
1
I'm new to computer programming! I want to learn python and write my program and run it on my mac OS X machine. How can i setup python programming tools on OS X and how can i use that ? I before this never use any other programming language.
GAE - Share user authentication across apps
30,570,660
1
0
51
0
python,google-app-engine,flask,google-authentication,google-app-engine-python
You can't reuse the Users service authentication across different applications. A possible solution could be using a OAuth2 (or a similar mechanism) - create an application (or use one of you existing applications) which will be the authentication provider. Each application will redirect to the authentication provider ...
0
1
0
0
2015-06-01T08:17:00.000
1
0.197375
false
30,568,702
0
0
1
1
Let's say I run two different apps on different domains, coded in Python flask and running as GAE instances; one is site.co.uk and one is site.us. If I use the GAE authentication on one site is it possible to have them authenticated for the other site too? I don't really want to make them have to authenticate for each ...
Is Python 3.4 backwards compatible for 2.7 programs/libraries?
30,603,317
1
1
2,376
0
python,python-2.7,python-3.x
Minor versions of python are mostly backwards compatible, however major versions do not maintain backwards compatibility. There are many libraries that work with both, but the language itself does not make that guarantee.
0
1
0
0
2015-06-02T17:52:00.000
2
1.2
true
30,603,175
1
0
0
2
I am deciding whether to install python 3.4 or 2.7 on my home server running Ubuntu Server 14.04.2. I want to ensure that it has support from all the most used python libraries (scipy, numpy, requests, etc) but I am not sure how many of these packages fully support 3.4. Do all 2.7 packages work on 3.4? If no, what are ...
Is Python 3.4 backwards compatible for 2.7 programs/libraries?
30,603,204
4
1
2,376
0
python,python-2.7,python-3.x
No, only packages specifically written to support both Python 2 and 3 will run on either. It is possible to write polyglot Python, but this requires effort from the library author. Code written for Python 2.7 will not automatically work on Python 3.
0
1
0
0
2015-06-02T17:52:00.000
2
0.379949
false
30,603,175
1
0
0
2
I am deciding whether to install python 3.4 or 2.7 on my home server running Ubuntu Server 14.04.2. I want to ensure that it has support from all the most used python libraries (scipy, numpy, requests, etc) but I am not sure how many of these packages fully support 3.4. Do all 2.7 packages work on 3.4? If no, what are ...
Python Embed Web Server in Data Processing Node
32,857,200
0
0
124
0
python,python-2.7,flask,tornado,bottle
I would recommend you use a separate process for your app that will receive REST commands (use Pyramid or Flask), and have it send messages over RabbitMQ to the real time part. I like Kombu myself for interfacing with RabbitMQ, and your message bus will nicely decouple your web/rest needs from your event driven needs. ...
0
1
0
0
2015-06-03T04:28:00.000
1
0
false
30,610,850
0
0
1
1
I am working on a Python 2.7 project with a simple event loop that checks a variety of data sources (rabbitmq, mongodb, postgres, etc) for new data, processes the data and writes data to the next stage. I would like to embed a web server in the application so it can receive simple REST commands, for shutting it down,...
How to run python from a network machine to local host?
30,611,798
0
1
2,012
0
python
The good part is: you have read access on the script. What you need is a python installation on your local machine and preferably a drive letter mapping to the script's folder. If not already mapped, this can be scripted with net use <letter>: \\<remote host>\<shared folder>. Then it's as easy as cd <letter>:\<path>\ ;...
0
1
1
0
2015-06-03T05:39:00.000
1
0
false
30,611,649
0
0
0
1
I've a python script in the network machine, I can open the network through explorer and have access to the script. Through that script from network,I want to create some folders/files and write/read some files in my localhost. Is there a way to do this in python?
Timing packets on a traffic server
30,647,917
1
0
57
0
python,unix,networking,network-programming,server
I always found it easier to utilize a switch's 'port mirror' to copy all data in and out of the proxy's switchport to a separate port that connects to a dedicated capture box, which does the tcpdump work for you. If your switch(es) have this capability, it reduces the load on the busy proxy. If they don't, then yes, tc...
0
1
1
0
2015-06-04T14:57:00.000
2
1.2
true
30,647,336
0
0
0
1
I have a proxy traffic server which is an extra hop on a network and is handling large quantity's of traffic. I would like to calculate the cost in seconds of how long it takes for the proxy server to handle the incoming request, process them and forward it on. I had been playing to write a python script to perform a t...
Serve dynamic data to many clients
30,648,878
0
0
29
0
python,vb.net
1) I am not very familiar with Python, but for the .net application you will likely want to push change notifications to it, rather than pull. The system.net.webclient.downloadstring is a request (pull). As I am not a Python developer I cannot assist in that. 3) As you are requesting data, it is possible to create som...
0
1
0
0
2015-06-04T15:24:00.000
1
0
false
30,647,952
1
0
1
1
I am writing a client-server type application. The server side gathers constantly changing data from other hardware and then needs to pass it to multiple clients (say about 10) for display. The server data gathering program will be written in Python 3.4 and run on Debian. The clients will be built with VB Winforms o...
Python Anaconda - "import cx_Oracle" error in command window
30,736,055
1
4
6,717
0
python,32bit-64bit,python-import,cx-oracle
I had the 32-bit version of oracle client installed. Once I installed the 64-bit version it worked fine.
0
1
0
0
2015-06-05T14:02:00.000
3
0.066568
false
30,668,532
0
0
0
1
I installed Python 2.7.7 :: Anaconda 2.0.1 (64-bit). Currently I am trying to run the command "import cx_Oracle". I ran easy_install which successfully add the cx_Oracle egg to the "site_packages" folder the anaconda directory getting the message "Installed c:\fast\anaconda\2.0.1\lib\site-packages\cx_oracle-5.1.3-py2.7...
Reinstall zlib on centos
30,797,283
0
0
79
0
python,zlib,centos5
I thought guys in here are much more active. anyway it ended up that I contacted my server company and they checked the hard disk and said that there is physical fault with the hard disk. I backed up my data on another server. they changed the hard disks and installed a fresh OS. now every thing's fine
0
1
0
0
2015-06-05T20:03:00.000
1
0
false
30,674,893
0
0
0
1
I faced "segmentation fault error" with "yum". Then I realised that there's a problem with zlib, but I messed it when trying to fix it. Now I need to reinstall zlib. since "yum" is no longer working I need to reinstall zlib through rpm or wget or some other way. could any one tell me the step by step procedure of rein...
nosetest not finding tests on cygwin
34,595,846
-1
1
218
0
python,cygwin,nose,nosetests
If you only have a single file with tests, you can launch it like this: nosetests tests.py
0
1
0
1
2015-06-06T09:54:00.000
1
-0.197375
false
30,681,408
0
0
0
1
I have a set of unit tests files created in python with unittest as the import. Running nosetests on both the terminal of MacOSX and on the cmd.exe of Windows 7, it finds the tests and runs them. Trying to execute nosetests under Cygwin does not find any tests to run. All three cases use the same version of Python (3.4...
python-sys.stdin.readlines() ,Stop reading lines in command line
30,685,708
1
1
2,456
0
python,python-3.x
1) sys.stdin is a TextIOWrapper, its purpose is to read text from stdin. The resulting strings will be actual strs. sys.stdin.buffer is a BufferedReader. The lines you get from this will be byte strings 2) They read all the lines from stdin until hitting eof or they hit the limit you give them 3) If you're trying to...
0
1
0
0
2015-06-06T17:27:00.000
2
0.099668
false
30,685,632
1
0
0
1
I have a code with function sys.stdin.readlines(). What is the difference between the above one and sys.stdin.buffer.readlines()?. What exactly do they do ? If they read lines from command line,how to stop reading lines at a certain instant and proceed to flow through the program?
twisted.reactor callWhenRunning and callLater undefined?
30,689,289
1
1
436
0
python-2.7,twisted
Python data structures can change at runtime, so Eclipse can only guess what methods are available. In the case of twisted.internet.reactor, it is a singleton whose type may change depending on how things are initialized, so it appears to Eclipse as a blank module. Since PyDev for Eclipse does not provide a way for li...
0
1
0
0
2015-06-07T00:21:00.000
1
0.197375
false
30,688,827
0
0
0
1
I am working with twisted and...well these two methods keep coming up in Eclipse as undefined. Cannot find any reference to this. I tried #@UndefinedVariable (which solved the reactor.run() issue I had but it does not work in this case. Running Eclipse Kepler on Mac Yosemite with twisted-15.2.1 zope.interface-4.1.2.
PYTHON py2exe makes too many files.. how do I execute only one .EXE file?
30,699,958
0
0
280
0
python,exe,py2exe
Py2exe is a tool provides an exe application which can be run without installing python interpreter, after packaging you find your exe and dlls of interpreter and all modules... In dist folder. It does nt provide all in one exe, use pyinstaller instead
0
1
0
0
2015-06-07T23:56:00.000
2
0
false
30,699,683
1
0
0
1
After I make an exe file, there are many files such as .pyd that my exe depend on them.. I want to make a program with only one exe file which will be handie.. please help me
os.rename() gives permisson denied when python script launched from jenkins
30,706,914
0
0
1,541
0
python,jenkins
I think you're using relative path names. In that case it will default to the current working directory, which works when you run it manually, but may fail when Jenkins runs your code using a different working directory. The solution is to make sure that both the src and dst args to os.rename() are absolute paths, or a...
0
1
0
0
2015-06-08T05:20:00.000
1
0
false
30,701,698
0
0
0
1
I am getting the following error when I launched my build script from jenkins os.rename(str1,str) OSError: [Errno 13] Permission denied Build step 'Execute shell' marked build as failure I am able to rename the file manually.I have rwx permissions on that file.But I could not do the same thing when python script laun...
Move python code to background after running a part of it
30,710,470
1
4
2,517
0
python,background-process
If you have the #!/bin/env python, and its permissions are set correctly, you can try something like nohup /path/to/test.py &
0
1
0
0
2015-06-08T13:14:00.000
2
0.099668
false
30,710,144
1
0
0
1
I have a python code, which has some part that needs to be run on foreground since it tells out if the socket connection was proper or not. Now after running that part the output is written into a file. Is there a way to move the running python code (process) automatically from foreground to background after running so...
Unix: Have Python script constantly running best practice?
30,742,647
2
15
40,621
0
python,unix,ubuntu
I am not sure how "best practice" this is but you could do: Add the program to: /etc/rc.d/rc.local This will have the program run at startup. If you add an '&' to the end of the line it will be run in the background. If you dont want to run the program manually (not at startup) you could switch to another tty by pressi...
0
1
0
1
2015-06-09T20:47:00.000
4
0.099668
false
30,742,533
0
0
0
1
I have a Python script which process data off of a HTTP data stream and I need this script to in theory be running at all times and forever unless I kill it off manually to update it and run it again. I was wondering what the best practice to do this was on a Unix (Ubuntu in particular) so that even if Terminal is clos...
py2exe: Allow a console window to be either shown or hidden with a sys.argv
30,759,966
1
0
66
0
python,user-interface,console,pyside,py2exe
This is not a py2exe limitation, but a Windows limitation. On Windows, applications are compiled either as Console Applications or GUI Applications. The difference is that Console Applications always open a console window, whilst GUI Applications never do. As far as I can tell, it's not possible to have an application ...
1
1
0
0
2015-06-10T14:45:00.000
1
0.197375
false
30,759,749
1
0
0
1
I have a python program using PySide. When run normally, it opens up a PySide GUI, but when run with some flags in the command line, it spits some things out in the console window. I'd like to retain this dual functionality, but it seems with py2exe you have to choose whether to have a console window or not when compil...
Using Jmeter OS Process Sampler to collect script data
30,803,435
1
0
1,555
0
python,command,jmeter
Hi you just have to print the data you need to pass to jmeter, and then use one (or more) regular expression to extract values.
0
1
0
0
2015-06-10T15:52:00.000
2
0.099668
false
30,761,322
0
0
1
1
Is it possible to collect the output of a python script using the "OS Process Sampler"? My python script does a database query and returns "r1=123 r2=456 r3=789" Is there a way to collect the r1, r2, r3 values and graph them?
Navigating Directories and Counting files in a directory with Python
30,769,638
0
0
57
0
python,parsing,directory
len(os.listdir('path')) will give you the total number of entries at 'path' (this includes files and directories). As far as I know, the os module is platform independent, however the strings used for paths are different for windows and unix-based environments (and maybe others, I don't know). Windows path strings shou...
0
1
0
0
2015-06-10T23:20:00.000
1
1.2
true
30,768,970
1
0
0
1
I am fairly familiar with Python and coding in general but I do not have much experience with the parsing and directory navigation in Python. I have a file that contains some data that I wish to extract and I want to be able to count the number of files and directories in given directory. I have done a little research ...
schedule automate shell script running not as ROOT
30,956,053
0
0
164
0
python,linux,shell,unix,linux-kernel
In a pinch, you can use at(1). Make sure the program you run reschedules the at job. Warning: this goes to heck if the machine is down for any length of time.
0
1
0
1
2015-06-11T09:24:00.000
4
0
false
30,776,719
0
0
0
3
I have a shell script that I want to run automatically every day at 08 AM, and I am not authorised to use the crontab because I don't have root permission My home directory is /home/user1/. Any suggestions?
schedule automate shell script running not as ROOT
30,777,116
0
0
164
0
python,linux,shell,unix,linux-kernel
I don't think root permission is required to create a cron job. Editing a cronjob that's not owned by you - there's where you'd need root.
0
1
0
1
2015-06-11T09:24:00.000
4
0
false
30,776,719
0
0
0
3
I have a shell script that I want to run automatically every day at 08 AM, and I am not authorised to use the crontab because I don't have root permission My home directory is /home/user1/. Any suggestions?
schedule automate shell script running not as ROOT
30,776,928
0
0
164
0
python,linux,shell,unix,linux-kernel
Even if you dont have root permission you can set cron job. Chcek these 2 commands as user1, if you can modify it or its throwing any error. crontab -l If you can see then try this as well: crontab -e If you can open and edit, then you can run that script with cron. by adding this line: * 08 * * * /path/to/your/...
0
1
0
1
2015-06-11T09:24:00.000
4
0
false
30,776,719
0
0
0
3
I have a shell script that I want to run automatically every day at 08 AM, and I am not authorised to use the crontab because I don't have root permission My home directory is /home/user1/. Any suggestions?
ImportError: DLL load failed: %1 is not a valid Win32 application Only When Outside Python27 Directory
30,790,972
0
1
1,173
0
python,windows,importerror,pythonpath,sys.path
So for reference the source of the issue was residue from an old Enthought Canopy installation. The computer was using that installation of python (which didn't have the 3rd party libraries installed) instead of the one in Python27. I deleted that install from the system path and restarted the command prompt and now al...
0
1
0
0
2015-06-11T19:46:00.000
2
0
false
30,790,073
1
0
0
1
I have an odd variation of the common "ImportError: DLL load failed: %1 is not a valid Win32 application" error. I only get this error when I try to import a 3rd party library while run a python script outside of the python27 directory. For instance, if I do "import numpy" while inside python27, it works fine, but if I...
Nginx + FastCGI with blocking calls
30,792,360
1
0
345
0
python,nginx,fastcgi
Nginx talks to a fastcgi process over a socket connection. If the fastcgi process blocks, that means that it won't be sending data over the socket. This won't block nginx as such, because it keeps processing events (data from other connections). It uses non-blocking techniques like select, poll or equivalent OS-depende...
0
1
0
1
2015-06-11T20:42:00.000
1
0.197375
false
30,791,066
0
0
0
1
The main advantage of Nginx is cited as it not needing to spawn separate threads for each request it receives. Now, if we were to run a python based web application using FastCGI, and this web application has blocking calls, would this create a bottleneck? Since there is only a limited number of workers running(1 per p...
Google App Engine : Wrong Serving Url
30,824,576
0
0
50
0
image,google-app-engine,google-app-engine-python,serving
Try specifying size=0 in the images.get_serving_url method call. eg. images.get_serving_url(blob_key, size=0)
0
1
0
0
2015-06-13T08:40:00.000
1
0
false
30,816,730
0
0
1
1
I have created a Google App Engine project where it's possible to upload photos. Uploading part is working fine and all the photos are uploaded in proper size. But when I try getting images.get_serving_url , it returns me serving_url appended with lh3.googleusercontent.com but according to GoogleAppEngine documentation...
How can I put a python program with multiple files in /usr/local/bin?
30,831,720
0
0
494
0
python,shell,command-line
Put the python files in a folder and then put this folder into an installation directory (may be in /usr/local/foldername). Use chdir in script/s to change directory to the file containing folder (may be os.path.dirname(os.path.realpath(sys.argv[0]))) to import dependencies from there, or use absolute path. Now make a...
0
1
0
0
2015-06-14T01:25:00.000
1
1.2
true
30,825,162
1
0
0
1
I know that if my program were just one python script file, I could just start it with the shebang and put it in /usr/local/bin so that I could invoke it at any time from the command prompt. However, what if my program were multiple files, but I only want one to be invokable from the command line? For example, if I've...
Can't install any python package from the python command prompt
30,833,498
0
1
4,366
0
python,shell,installation,package
Click Windows(button)+R then type cmd. In there type pip -V, what version does it show? If you get pip 6.1.1 from C:\Python32\lib\site-packages <python 3.4> (depending on your directory) then you're good, simply make your installations from there.
0
1
0
0
2015-06-14T19:11:00.000
3
0
false
30,833,432
1
0
0
2
I am trying to install some python packages from the python shell but I get syntaxError. I am using python 3.4.3 which supposed to come with pip installed and I can see pip3 pip3.4, pip, easy_install, and easy_install-3.4 under scripts but whenever I run the command in the shell I get syntax error. Am I not supposed ...
Can't install any python package from the python command prompt
30,833,440
3
1
4,366
0
python,shell,installation,package
Am I not supposed to use the python shell for package installation? No. Commands like pip are to be run on the operating system command line (i.e., the "DOS prompt" on Windows).
0
1
0
0
2015-06-14T19:11:00.000
3
0.197375
false
30,833,432
1
0
0
2
I am trying to install some python packages from the python shell but I get syntaxError. I am using python 3.4.3 which supposed to come with pip installed and I can see pip3 pip3.4, pip, easy_install, and easy_install-3.4 under scripts but whenever I run the command in the shell I get syntax error. Am I not supposed ...
Get environment variable for current user and for all users in Python
60,003,845
-2
6
4,434
0
python,environment-variables
you can get all the variables by import os print(os.environ) this will return you the dictionary type of output with keys as enviornment variables and values as the values of the enviornment variables. to get the current username: print(os.environ['USERNAME']) Look for yourself what you want in the dictionary.
0
1
0
0
2015-06-14T23:11:00.000
2
-0.197375
false
30,835,522
1
0
0
1
Is there way to determine which environment variables returned by os.environ belongs to current user and which one - to all users? I do not want to change it, only get. UPD: I am using Microsoft Windows 7.
How to execute script on schedule?
30,835,954
32
25
56,111
0
python,automation
You can use cron for this if you are on a Linux machine. Cron is a system daemon used to execute specific tasks at specific times. cron works on the principle of crontab, a text file with a list of commands to be run at specified times. It follows a specific format, which can is explained in detail in man 5 crontab For...
0
1
0
0
2015-06-14T23:16:00.000
3
1.2
true
30,835,547
0
0
0
1
I have two Python scripts on my machine that I want to execute two times a day on specific time period. How do I automate this task? Since I will be away from home and thus my computer for a while, I want to upload them to a site and be executed from there automatic without me doing anything. How can I do this?
How to handle the File hand-off from windows in a python program
30,985,046
0
2
68
0
python,windows,pdf,file-io
So, yes, Windows passes the file name into the script as one of the sys.argvs. It is (so far as I can tell from printing the value) a file name without the path, that I used to open the file, so that tells me that Windows starts my program with the working directory set to the directory of the file it's called on. One ...
0
1
0
0
2015-06-18T22:09:00.000
1
1.2
true
30,926,669
1
0
0
1
I want to set up my python program to process all pdfs that are opened on my system, and then hand the processed pdf off to a standard reader. So I register my program with windows as the default handler for .pdf files and windows presumably will run my program on the pdf file. How within the script do I access this ...
Changing a read-only file
30,939,390
6
0
253
0
python,text
Yes, you are right, you can only read where you cannot write.
0
1
0
1
2015-06-19T13:16:00.000
1
1.2
true
30,939,165
0
0
0
1
I need to change text documents. The way I've been doing it is making a new file, copying everything line by line from the old file and making changes on the way, then saving the new file as the old file's name. This becomes a problem when I only have read permission on the file. First I get OSErrno 30, not letting me ...
For the life of me I cannot make a file-set argument the next to last one
30,944,299
1
0
52
0
python,filenames
It's your shell, not Python, that's doing the expansion. Python always sees a single flat list of arguments. In case you want to parse arguments, which basically turns this flat list into a more complex data structure, you can use the argparse module, or use more extensive third party projects like click.
0
1
0
0
2015-06-19T17:12:00.000
1
0.197375
false
30,943,690
1
0
0
1
I want to run something like: python command.py -i -c "f*.xxx" "search" This fine since "file-set" is not expanded" but: python command.py -i -c f*.xxx "search" This is expanded so sys.argv = ['command.py','-i', '-c', 'f1.xxx','f2.xxx','search'] Why couldn't it be ['command.py','-i', '-c', ['f1.xxx','f2.xxx'],'...
Excuting cpp file from Python
30,954,837
2
0
70
0
python,c++
Look For python.net which is cable of making a call to the interfaces written in .net supported languages. What all you need to do is Steps: Download and put it two files Python.Runtime.dll and clr.pyd in your DLLs folder. From you >>>(triple greater than prompt )Python prompt Try >>>import clr if it doesn't gives a...
1
1
0
0
2015-06-20T13:36:00.000
2
0.197375
false
30,954,589
1
0
0
1
I need to execute C++ code to acquire images to process in python. I need to use these commands from python: make and ./name_of_the_executable Could anybody please help know me how to do it?
How can I read the dynamic section of an ELF file in python
31,053,673
1
1
1,452
0
python,linux,elf,readelf
using pyelftools: tag = section.get_tag(n) gives the nth tag of a specific section
0
1
0
0
2015-06-22T16:40:00.000
1
1.2
true
30,985,379
0
0
0
1
I want to get information about the dynamic section of an ELF file. Basically the same information I get using the command line: readelf -d elfFile
chef cookbook dependency on system software not on another cookbook
31,379,600
0
0
60
0
python,automation,chef-infra,orchestration
I applied the following steps to solve my problem Found the directory which gets created after installation of the independent software waited for the directory to get created(using ruby block code for sleeping) and initiated the installation of dependent software thereafter to ensure the dependency is satisfied. sol...
0
1
0
0
2015-06-23T08:42:00.000
2
1.2
true
30,997,900
0
0
0
1
As part of a platform setup orchestration we are using our python package to install various software packages on a cluster of machines in cloud. We have the following scenario: Our python package initiates installation of certain software packages(say A,B,C) then simultaneously initiates installation of certain other...
GAE golang templates stopped working
31,039,704
0
0
50
0
python-2.7,google-app-engine,go
I re-installed Python (the module_test and other tests failed) and updated the gae-go sdk. This fixed my problem. I believe that a recently identified Flash exploit had something to do with it as I experienced a number of Flash crashes in web page ads just before the problems began.
0
1
0
0
2015-06-23T16:46:00.000
1
0
false
31,008,719
0
0
1
1
I've been successfully using go for months - last night my app started 404 page not found errors but only on pages that use Templates. Those that don't use the Template system work fine. I re-installed the Go sdk and discovered that the Guestbook demo ( also uses Templates) doesn't work either. ... and then I notic...
Typing 'python' in terminal runs a python script and spits error
31,015,074
0
0
64
0
python,python-2.7
Thanks, @JoranBeasley, @barunsthakur, @PadraicCunningham, and all. I had PYTHONSTARTUP set in .bashrc. May help forgetful people in the future.
0
1
0
1
2015-06-23T22:57:00.000
3
0
false
31,014,858
1
0
0
2
I'm taking a python course, I save exercise scripts in /this/is/where/I save/exercises/exercise.py. Now whenever I type python in terminal it immediately gives me this: IOError: [Errno 2] No such file or directory: '/this/is/where/I save/exercises/exercise.py' I know it's not found since I deleted the file. But why is ...
Typing 'python' in terminal runs a python script and spits error
31,014,929
-1
0
64
0
python,python-2.7
Python has a special script that is run on startup. On my platform it is located at /usr/lib/python2.5/site-packages/sitecustomize.py IIRC. You may want to check that file for any script calls to that directory. Also, if you are on a linux machine you could check /etc/bashrc or /etc/profile.d. If that doesn't help, try...
0
1
0
1
2015-06-23T22:57:00.000
3
-0.066568
false
31,014,858
1
0
0
2
I'm taking a python course, I save exercise scripts in /this/is/where/I save/exercises/exercise.py. Now whenever I type python in terminal it immediately gives me this: IOError: [Errno 2] No such file or directory: '/this/is/where/I save/exercises/exercise.py' I know it's not found since I deleted the file. But why is ...
Recover Python script from memory, I screwed up
31,015,993
7
5
17,971
0
python,recovery
As far as I know, Python doesn't keep the source in memory, and the method presented in the comment only keeps executables alive, not scripts. Dumping the memory of the program probably allows you to get to the bytecode, but I have no idea how much effort that might require. Instead, I'd first try a non-Python-specific...
0
1
0
1
2015-06-24T00:13:00.000
3
1.2
true
31,015,556
0
0
0
1
Help, I screwed up. I have a somewhat complex python script that is currently running in a putty window to a Ubuntu server. I accidentally overwrote the script using another putty window, so the copy on the hard drive is now gone, but the script is still running from memory in the first window. This happened before I h...
Python pip install error
36,225,388
0
0
1,929
0
python,macos,python-2.7,python-3.x
I have similar issue with pip install. However, if I do "sudo su -" then do my pip install 'fileName', that solve the problem for me.
0
1
0
0
2015-06-24T03:16:00.000
2
0
false
31,017,006
1
0
0
1
I have just installed Python 3.4.3 on my MAC (Yosemite). I need to install a couple of lxml, however everytime I type in: pip install /""/, I get error messages. I have followed multiple tutorials and pip is installed. MAC already had Python 2.7., but I installed the 3.4.3. version, not sure if that is the issue. The e...
Crontab, python script fails to run
31,025,417
4
1
1,804
0
python,bash,unix,crontab
The working directory of the cron is different from the directory you run the script directly. Make your bash script to use absolute path for python script files. Or make the bash script to change directory to where you run the script directly.
0
1
0
1
2015-06-24T11:31:00.000
2
1.2
true
31,025,392
0
0
0
1
I have a bash script to automate few things I do. The bash calls 2 python scripts, If I run the bash script normally, everything runs, no errors what so ever. I set up a cron job to Automate this and when I checked the logs I noticed the python scripts don't run at all. It gives me the following error. python: can't op...
python script via windows 7 scheduler still running
31,075,460
0
1
627
0
python,windows-7,scheduled-tasks
While I had the Task Scheduler open, the screen was showing "running". After I closed the screen and let it run the next day, everything worked fine. It must be something to do with the refresh on the task scheduler. So my solution was to close the Task Scheduler and let it run as scheduled.
0
1
0
0
2015-06-25T19:52:00.000
1
0
false
31,059,562
0
0
0
1
I'm a noobie to python and have over the past few days tested and created a .PY file that runs perfectly from the command prompt either with the D:\Python34 or just as Its pretty basic. Gets info from web and places it in a spreadsheet - I import requests, BeautifulSoup and openpyxl. The last statement is to save th...
Processing data from Google App Engine on a Google Virtual Machine
31,260,767
0
1
47
0
python,google-app-engine,virtual-machine,google-cloud-platform
Sticking with the described POST request using urllib2. We decided we might move this part of the project to a different provider so better to not use Google Cloud only methods.
0
1
0
0
2015-06-26T08:23:00.000
1
1.2
true
31,068,381
0
0
1
1
My website runs on Python on Google App Engine, and I've setup a Virtual Machine to use libraries that weren't supported by the default App Engine environment. Now I need to send data from my app to the VM and retrieve the response. Data in this case will be an email address and an email message. Currently I am testin...
Run script bash on saltstack master before minion
31,254,893
0
0
905
0
python,git,salt-stack
If you need the highstate on the minion to cause something to occur on the master than you are going to want too look into using salt's Reactor (which is designed to do exactly this kind of multi-machine stuff).
0
1
0
1
2015-06-26T13:07:00.000
3
1.2
true
31,073,993
0
0
0
2
I allow myself to write to you, due to a block on my part at Salt. I made a bash script that adds a host in my zabbix monitoring server. it works perfectly when I run .sh the idea is that I want to automate this configuration through salt. I am when I do a highstate my state that contains the script runs in the master ...
Run script bash on saltstack master before minion
31,083,687
0
0
905
0
python,git,salt-stack
Run a minion on the same box as your master, then you can run the script on your master's minion and then on the other server.
0
1
0
1
2015-06-26T13:07:00.000
3
0
false
31,073,993
0
0
0
2
I allow myself to write to you, due to a block on my part at Salt. I made a bash script that adds a host in my zabbix monitoring server. it works perfectly when I run .sh the idea is that I want to automate this configuration through salt. I am when I do a highstate my state that contains the script runs in the master ...
Including Fake-headers via pycparser in Windows?
31,080,381
2
1
261
0
python,windows,pycparser
The documentation is one and the same. You cannot effectively use pycparser without a basic understanding of how the C compilation pipeline works - sorry! The documentation actually addresses Windows directly. The only difference is that instead of relying on a system C compiler (on Linux) you have to explicitly downlo...
0
1
0
0
2015-06-26T13:22:00.000
1
1.2
true
31,074,329
1
0
0
1
We can support new typedefs , #includes and #defines , by preprocessing it with the help of pycparser parse_file . I also went through the documentation: README page and the blog post , but all the documentation was written for linux systems.I have no clue about linux systems and would love to get the documentation fo...
Why haven't I got "Scripts" in Python27 on Windows?
31,088,517
1
1
1,848
0
python-2.7,pip
I have solved my problem: When I have tried to run get-pip, I have right-clicked on the file get-pip.py and I have chosen "Python Launcher for Windows" to run it. Instead, I should have opened the command prompt in the right folder and I should have written "python get-pip.py".
0
1
0
0
2015-06-26T14:30:00.000
1
1.2
true
31,075,818
1
0
0
1
I have installed Python2.7 on Windows. I tried to install pip, so I downloaded get-pip, then I run it but it didn't install anything in "scripts" in python27, neither in Python27/Tools/Scripts
Make an batch file that runs commando in WinPython Command Prompt
31,158,200
1
4
4,820
0
windows,batch-file,python-3.x
I solved the problem by removing the path from normal python installation. I also uninstalled the normal python distribution. I also made a path to the python version in WinPython. Now I can use the normal cmd to run the program. :-)
0
1
0
0
2015-06-29T10:17:00.000
2
1.2
true
31,113,114
1
0
0
1
How do I write an batch file that will execute a commando "python my_program.py" from the WinPython Command Prompt? Not from the cmd.exe!
How to tell if windows processes have started
31,119,681
0
1
34
0
python,windows
The solution I came up with uses two batch files. One to run Load with an argument of 105 that is in the startup folder and the other batch file will be put on the desktop with a time of 45. Not my favorite solution, but it gets the job done and it's fairly easy to understand.
0
1
0
0
2015-06-29T14:22:00.000
1
0
false
31,118,164
0
0
0
1
I wrote a program called load, to show a loading bar for 0:45 seconds while another program is starting which has no indication that it is loading. It works exactly as I want when the system is already running, but I have it so it runs at startup which causes the program to take a 1:45 to start. I am trying to figure o...
Installer script for OSX, python + node
31,131,268
0
0
35
0
python,macos,bash,installation
Are you using python2 or python3? Dependencies for scapy differ.
0
1
0
0
2015-06-29T20:36:00.000
1
0
false
31,125,113
1
0
0
1
I'm writing what is a relatively small desktop application, but I'm using several technologies/languages and not sure the best way to create a installer script. I have a python script which uses tornado and scapy (which also requires pcapy), and have a kernel extension that needs to be installed. This python script is ...
Remove 1 version of Python in Ubuntu
31,129,540
-3
2
2,398
0
python,python-2.7,ubuntu,tkinter,versions
You can delete the whole /usr/local directory and the system won't be affected because /usr/local is the directory defined by the user solely. When you freshly install Ubuntu /usr/local is empty
0
1
0
0
2015-06-30T03:02:00.000
3
-0.197375
false
31,128,840
1
0
0
1
So apparently I have 2 Pythons (same version) installed in different folders...one is in /usr/bin/ and the other one is in /usr/local/bin but the one the shell uses when I type in python is the one in /usr/local/bin. I'd like to use the /usr/bin/ version because is the one that works with many imports I've been dealing...
Run a Python program at start-up on Windows
33,310,327
1
2
11,230
0
python,windows,python-2.7,executable
Use VBScript: 1-> create anyname.vbs with this data: Set wvbs=CreateObject("Wscript.Shell") wvbs.run "full location of your File",0 2-> copy anyname.vbs file in C:\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup this folder Now when windows start it will run your file in hidden mode
0
1
0
0
2015-06-30T06:18:00.000
4
0.049958
false
31,130,960
1
0
0
1
I am developing a key-logger on Python (only for curiosity sake). And the script will be an executable. Without access to the computer so the process should not need a UI or user interaction. Is there any way, even in another executable to make the key-logger start at start-up ?
Neo4j from Python in Windows 7
31,165,664
1
0
340
0
python,windows,neo4j
py2Neo is a library which you can generate/configure/manipulate Neo4j graph database. It is not an executable application. As far as your Python works on Windows, py2neo should work as well. You can download py2neo via pip install as you can download many libraries as well.
0
1
0
0
2015-07-01T15:13:00.000
1
0.197375
false
31,165,248
1
0
0
1
I would like to use Neo4j from Python in Windows 7 operating system. Which library can I install? Py2Neo seems to work for Linux and Mac but not for Windows.
Block output window from an executable converted from .pyw using pyinstaller
31,180,100
0
0
135
0
python
Oh nevermind, i already know how. By using --noconsole when converting the .pyw I think it works with .py extension too Sorry for bad english..
0
1
0
0
2015-07-02T08:57:00.000
1
0
false
31,179,989
1
0
0
1
I recently converted a python program to an executable (.exe) but i still see an output window when i launched the executable. I don't want any output window because the program is a background process. I tried using .pyw extension before converting to an executable with no success... I'm using pyinstaller to convert ...
How to switch between python2 and python3 pip on Fedora 22?
42,448,451
0
2
3,457
0
python,python-2.7,pip,fedora,python-3.4
on fedora 25 you can just do the following: copy file sudo cp /usr/bin/pip /usr/bin/pip3 then edit it to change #!/usr/bin/python to #!/usr/bin/python3 do pip3 -V to see that works. this solution can also work on others version of fedora.
0
1
0
0
2015-07-02T10:54:00.000
4
0
false
31,182,595
1
0
0
3
As I have started to use Python 3.4, I need pip to maintain libraries on both Python 2.7 and Python 3.4. How to select the appropriate pip quickly using terminal? Note: This question is NOT related to Virtualenv but with the default python2.7 and python3.4 that comes with Fedora 22 Workstation. As a temporary fix, I a...
How to switch between python2 and python3 pip on Fedora 22?
32,880,093
3
2
3,457
0
python,python-2.7,pip,fedora,python-3.4
I never use pip install directly (when outside a venv, at least). Instead I use python-<version> -m pip install --user <packages>, which always does what I really meant regardless of what version the wrapper scripts are for. This is especially useful if I've locally installed a newer version of pip.
0
1
0
0
2015-07-02T10:54:00.000
4
0.148885
false
31,182,595
1
0
0
3
As I have started to use Python 3.4, I need pip to maintain libraries on both Python 2.7 and Python 3.4. How to select the appropriate pip quickly using terminal? Note: This question is NOT related to Virtualenv but with the default python2.7 and python3.4 that comes with Fedora 22 Workstation. As a temporary fix, I a...
How to switch between python2 and python3 pip on Fedora 22?
31,182,728
2
2
3,457
0
python,python-2.7,pip,fedora,python-3.4
Fedora separates Python 2.x and 3.x's environments. yum install python-pip will give you an executable called pip which you can use for Python 2.x packages, and yum install python3-pip will give you an executable called pip3for managing Python 3.x packages. You can install either, both or neither - they will not interf...
0
1
0
0
2015-07-02T10:54:00.000
4
1.2
true
31,182,595
1
0
0
3
As I have started to use Python 3.4, I need pip to maintain libraries on both Python 2.7 and Python 3.4. How to select the appropriate pip quickly using terminal? Note: This question is NOT related to Virtualenv but with the default python2.7 and python3.4 that comes with Fedora 22 Workstation. As a temporary fix, I a...