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 place myapp in Applications location developed through py2app on mac osx | 19,920,707 | 1 | 1 | 382 | 0 | python,macos,py2app | You can use packagemaker. It makes myapp.pkg file that when double-clicked installa an app in Applications location. | 0 | 1 | 0 | 0 | 2013-10-24T08:23:00.000 | 2 | 1.2 | true | 19,560,701 | 1 | 0 | 0 | 2 | I had developed an app in python on mac osx for opening different file types on double-clicking any file. Then I converted into app by using py2app. py2app creates a myapp.app within dist folder. I moved myapp.app from dist folder to Applications location. Now, I am able to open any file through myapp just by double-cl... |
How to place myapp in Applications location developed through py2app on mac osx | 19,619,226 | 0 | 1 | 382 | 0 | python,macos,py2app | py2app has a "--dist-dir" option for selecting the output directory (default is "diet"). That said, I have never tested using that option for installation in a directory containing other programs and don't know if "python setup.py py2app --dist-dir=/Applications" is save to use.
The alternative is to use a script that ... | 0 | 1 | 0 | 0 | 2013-10-24T08:23:00.000 | 2 | 0 | false | 19,560,701 | 1 | 0 | 0 | 2 | I had developed an app in python on mac osx for opening different file types on double-clicking any file. Then I converted into app by using py2app. py2app creates a myapp.app within dist folder. I moved myapp.app from dist folder to Applications location. Now, I am able to open any file through myapp just by double-cl... |
What is the difference between using HttpUwsgiModule for NGINX and using NGINX as a reverseproxy to uWSGI? | 19,688,569 | 2 | 1 | 125 | 0 | python,nginx,webserver,reverse-proxy,uwsgi | Simply put, when you use HttpUwsgiModule NGINX speaks the uwsgi protocol and it can leave out useless informations of the http protocol leading to less overhead and thus better performance. | 0 | 1 | 0 | 1 | 2013-10-24T15:42:00.000 | 1 | 1.2 | true | 19,570,490 | 0 | 0 | 1 | 1 | Using HttpUwsgiModule with NGINX to control uWSGI has become quite popular since its release.
I was wondering though, what is the advantage of it, compared to using NGINX as a reverse-proxy to uWSGI application?
What are the gains and losses in two differing use cases? |
Running python code in background | 19,578,445 | 2 | 3 | 183 | 0 | python,linux,background,ssh | You can use screen, as Robin Krahl recommended, or you can just run your command with nohup, which suppresses the SIGHUP (hangup) signal from your SSH session disconnecting.
nohup "python -u test.py > output.txt" & | 0 | 1 | 0 | 1 | 2013-10-24T23:15:00.000 | 3 | 0.132549 | false | 19,578,392 | 0 | 0 | 0 | 1 | I need to run a python code that takes several hours and my computer disconnects from the ssh after a certain amount of inactive time.
I have tried python test.py > output.txt & but my output file is empty. However, the python code "test" is still running after I log off and log back in to the ssh. I also tried pytho... |
Can I access python variables within a `%%bash` or `%%script` ipython notebook cell? | 19,583,164 | 0 | 81 | 40,694 | 0 | ipython-notebook,ipython-magic | No, %%script magic are autogenerated and don't do any magic inter-process data communication. (which is not the case for %%R but which is a separate magic in its own class with extra care from R peoples)
But writing your own magic that does it is not too hard to do. | 0 | 1 | 0 | 0 | 2013-10-25T01:21:00.000 | 7 | 0 | false | 19,579,546 | 1 | 0 | 0 | 1 | Is there a way to access variables in the current python kernel from within a %%bash or other %%script cell?
Perhaps as command line arguments or environment variable(s)? |
performance for xarg vs. python multiprocessing+subprocess | 19,580,680 | 2 | 1 | 575 | 0 | python,unix,multiprocessing,xargs | The xargs program will collect multiple arguments from standard input, and glue them together to make one long command line. If there are many many many arguments, too long for one command line, then it will build and execute multiple command lines, as many as needed.
This means less overhead for starting up processes... | 0 | 1 | 0 | 0 | 2013-10-25T02:09:00.000 | 1 | 1.2 | true | 19,579,978 | 1 | 0 | 0 | 1 | I have a question on the performance scalability with xargs. Currently I have a batch processing program written in python with multiprocessing and subprocess. Each process spawns an independent subprocess.popen() to execute an external command. Recently I realized that the whole process can be redone with xargs. Howev... |
df command across multiple os | 19,831,707 | 0 | 0 | 752 | 0 | python,linux,solaris,expect | The only solution top this problem seems using uname to get the OS and
set the df accordingly... same as what i had stated in the problem!!! | 0 | 1 | 0 | 0 | 2013-10-25T07:26:00.000 | 5 | 1.2 | true | 19,583,656 | 0 | 0 | 0 | 2 | The df command displays the amount of disk space occupied by mounted or unmounted file systems, the amount of used and available space, and how much of the file system's total capacity has been used.
Linux has df command in the following location /bin whereas in Solaris in the following location /usr/gnu/bin...
If su... |
df command across multiple os | 19,639,734 | 0 | 0 | 752 | 0 | python,linux,solaris,expect | Are the target systems somehow under your control, and does this involve a limited set of servers?
If so, how about adding a soft link in both the Solaris and Linux servers, in the same location and with the same name?
Something like:
Solaris: ln -s /usr/gnu/bin/df /usr/bin/my_df
Linux: ln -s /bin/df /usr/bin/my_df
T... | 0 | 1 | 0 | 0 | 2013-10-25T07:26:00.000 | 5 | 0 | false | 19,583,656 | 0 | 0 | 0 | 2 | The df command displays the amount of disk space occupied by mounted or unmounted file systems, the amount of used and available space, and how much of the file system's total capacity has been used.
Linux has df command in the following location /bin whereas in Solaris in the following location /usr/gnu/bin...
If su... |
How do I pause/resume a Python script? | 19,601,896 | 11 | 3 | 7,855 | 0 | macos,python-2.7,resume | This was originally a comment, but it seems to be what OP wants, so I'm reposting it as an answer
I would use ctrl+z to suspend your live, running process. This will leave you with a PID, which you can later resume with a call to fg: fg <job-number>.
This shouldn't have any implications with changed network settings (l... | 0 | 1 | 1 | 0 | 2013-10-26T00:50:00.000 | 1 | 1.2 | true | 19,601,598 | 0 | 0 | 0 | 1 | I run python scripts on my macbook air that process data from external API's and often take several hours or occasionally even days.
However, sometimes I need to suspend my laptop in the middle of running a script so I can go to work or go home or similar.
How can I simply pause/resume these scripts in the middle of t... |
Python module will not run correctly from command prompt | 19,624,100 | 0 | 0 | 213 | 0 | eclipse,python-3.x,command-line-arguments,pydev,windows-8.1 | I answered my own question in the comment above. I just had to wait to post an answer due to the fact that I just created a stackoverflow account yesterday. | 0 | 1 | 0 | 1 | 2013-10-26T21:42:00.000 | 1 | 0 | false | 19,612,221 | 0 | 0 | 0 | 1 | This goes out to anyone who is well versed in the Eclipse IDE and or PyDev perspective plug-in who is willing to offer some technical support.
I am trying to write a python module that must take in arguments from the command prompt with sys.argv function calls. Rather than printing out the correct output when I enter E... |
Android Client and Google App Engine APIs | 19,613,781 | 1 | 0 | 127 | 0 | java,android,python,google-app-engine | Yes, you can use Python to do what you want.
Google designs their services (such as GAE and endpoints) to be language agnostic, e.g. using JSON to serialize objects.
There are a few advantages to using Java on both, such as being able to share code between client and service projects, but Google does not promote such d... | 0 | 1 | 0 | 0 | 2013-10-26T22:37:00.000 | 1 | 1.2 | true | 19,612,642 | 0 | 0 | 1 | 1 | Am I confused as to what is possible between an Android Client and Google App Engine? I would like to be able to create a Python API that would handle requests between GAE services such as Datastore, and an Android Client.
I have found some examples that detail how to make a call from within an Android Client, but it d... |
Issue with path to python/pythonpath | 19,962,347 | 0 | 1 | 137 | 0 | python,apache,unix,path,fastcgi | I had a call to python interpreter via env program in my fast cgi dispatch script. When I explicitly put path to 2.7 to the first line of the script it works as expected. | 0 | 1 | 0 | 1 | 2013-10-28T05:30:00.000 | 3 | 1.2 | true | 19,627,743 | 0 | 0 | 1 | 2 | I have a VPS with system-wide installed python 2.5.
I installed python 2.7 to one of the user's home dir (using --prefix). added it to bashrc and bash_profile, exported python variable to env, and now when I type python in console python 2.7 is running.
But when I checked python version from my application (Django usi... |
Issue with path to python/pythonpath | 27,295,744 | 0 | 1 | 137 | 0 | python,apache,unix,path,fastcgi | I've set PYTHONPATH in my /home/me/.bashrc and all worked ok from terminal, but when Apache w/ mod_wsgi starts my python scripts, it acts under sysem or dedicated user, which knows nothing of my .bashrc.
For this particular situation, I just used apache config (apache2.conf) to set python path for apache (WSGIPythonPat... | 0 | 1 | 0 | 1 | 2013-10-28T05:30:00.000 | 3 | 0 | false | 19,627,743 | 0 | 0 | 1 | 2 | I have a VPS with system-wide installed python 2.5.
I installed python 2.7 to one of the user's home dir (using --prefix). added it to bashrc and bash_profile, exported python variable to env, and now when I type python in console python 2.7 is running.
But when I checked python version from my application (Django usi... |
Handling of arbitrary options using Tornado options, i.e. like **kwargs | 19,716,110 | 3 | 3 | 4,015 | 0 | python,python-2.7,tornado,keyword-argument | The tornado.options philosophy is that any module may define options, not just the main entry point. So if you might need a bluetooth mac address, you'd define that option in the module that interacts with bluetooth. (and if you might need more than one you can set multiple=True). The only tricky part is that you mu... | 0 | 1 | 0 | 0 | 2013-10-29T12:03:00.000 | 2 | 0.291313 | false | 19,657,719 | 1 | 0 | 0 | 1 | I'm using Tornado options to define command-line arguments. However, I would like to be able to throw arbitrary configuration options, not defined in code, to my program. These will differ, depending on what the program is supposed to do. For instance, connect to a bluetooth device using a MAC address or connect to a s... |
Python: subprocess vs native API | 19,662,004 | 1 | 2 | 322 | 0 | python,api,subprocess | The only way that i see myself using subprocess instead of a native python api is if some option of the program is not provided in the api. | 0 | 1 | 0 | 0 | 2013-10-29T15:03:00.000 | 2 | 0.099668 | false | 19,661,874 | 1 | 0 | 0 | 2 | In case both options available: to call a command line tool with subprocess (say, hg) or to make use of native python API (say, mercurial API), is there a case where it's more favorable to use the former? |
Python: subprocess vs native API | 19,662,115 | 3 | 2 | 322 | 0 | python,api,subprocess | If you want to execute some third party native code which you know is not stable and may crash with a segvault then it is better to execute it as a subprocess - you will be able to safely handle the possible crashes from your Python process.
Also, if you want to call several times some code which is known to leak memo... | 0 | 1 | 0 | 0 | 2013-10-29T15:03:00.000 | 2 | 1.2 | true | 19,661,874 | 1 | 0 | 0 | 2 | In case both options available: to call a command line tool with subprocess (say, hg) or to make use of native python API (say, mercurial API), is there a case where it's more favorable to use the former? |
syncronizing across machines for a python apscheduler and wmi based windows service | 19,737,941 | 0 | 1 | 170 | 0 | python,networking,synchronization,wmi,apscheduler | I tried to include functionality like this in APScheduler 2.0 but it didn't pan out. Maybe The biggest issue is handling concurrent accesses to jobs and making sure jobs get run even if a particular node crashes. The nodes also need to communicate somehow.
Are you sure you don't want to use Celery instead? | 0 | 1 | 0 | 0 | 2013-10-30T19:44:00.000 | 1 | 0 | false | 19,692,437 | 1 | 0 | 0 | 1 | I am using apscheduler and wmi to create and install new python based windows services where the service determines the type of job to be run. The services are installed across all the machines on the same network. Given this scenario I want to make sure that these services run only on one machine and not all the machi... |
Ubuntu - PySide module not found for python2 but works fine for python3 | 19,697,689 | 1 | 1 | 1,553 | 0 | python,ubuntu,python-2.7,python-3.x,pyside | You have two independent Python 2.7 installations, one in /usr and one in /usr/local. (And that's on top of the Python 3.x installation you also have.)
This is bound to cause confusion, especially for novices. And it has caused exactly the kind of consuion it was bound to cause.
You've installed PySide into the /usr in... | 0 | 1 | 0 | 1 | 2013-10-31T01:40:00.000 | 1 | 1.2 | true | 19,696,973 | 0 | 0 | 0 | 1 | I had PyQt4 running fine with python2 on Ubuntu 12.04. I then installed python-PySide. But the installation test would give me a module not found error. Then I installed python3-PySide and it works fine. So obviously something to do with my environment paths, but I'm not sure what I need to do. I'm guessing PySide... |
Can I pass a list from python to a php script that usually takes a .txt file line-by-line to operate on? | 19,698,635 | 0 | 0 | 74 | 0 | php,python,bash,command-line-interface | Writing the data out to a text file in python and then loading that text file in php is definitely the easiest way. If you're willing to modify the php script, you could make it read the data from stdin, and set up a pipe between the two processes, but this going to be a little trickier. | 0 | 1 | 0 | 1 | 2013-10-31T03:52:00.000 | 2 | 1.2 | true | 19,698,151 | 0 | 0 | 0 | 1 | I'm new to all things programming, but am trying to build up some functionality for my team.
I have a script in python that performs some useful analysis, and now I need it to communicate to a PHP script that I usually call from the command line with an argument that is a text file, which the script parses and operates... |
Using GPIO in webpage | 19,702,189 | 2 | 0 | 467 | 0 | python,django,raspberry-pi | You don't have to run the webbrowser as root but your django app (the webserver).
Of course running a web application as root is an incredibly bad idea (even on a pi), so you might want to use a separate worker process (e.g. using celery) that runs as root and accesses the GPIOs. | 0 | 1 | 0 | 0 | 2013-10-31T08:59:00.000 | 1 | 1.2 | true | 19,702,170 | 0 | 0 | 1 | 1 | I am using Django 1.5.4 to design a web page in which i want to use GPIO, but i got following error:
"Noᅠaccessᅠtoᅠ/dev/mem. Tryᅠrunningᅠasᅠroot! "
in browser. Since web browser itself is an application, how can i assign "root" privileges to it when it tried to render a web page ? If it can be done without any need to ... |
how to run python code on amazon ec2 webservice? | 19,714,085 | 0 | 0 | 718 | 0 | python,amazon-web-services,amazon-s3,amazon-ec2,cluster-computing | You do not need to use S3, you would likely want to use EBS for storing the code if you need it to be preserved between instance launches. When you launch an instance you have the option to add an ebs storage volume to the drive. That drive will automatically be mounted to the instance and you can access it just like y... | 0 | 1 | 0 | 0 | 2013-10-31T17:35:00.000 | 1 | 0 | false | 19,713,141 | 0 | 0 | 1 | 1 | I have never used amazon web services so I apologize for the naive question. I am looking to run my code on a cluster as the quad-core architecture on my local machine doesn't seem to be doing the job. The documentation seems overwhelming and I don't even know which AWS services are going to be used for running my scri... |
How can I automate google docs with Google App Engine? | 19,746,281 | 0 | 0 | 559 | 0 | python,google-app-engine,google-docs-api | There is currently no API to create google docs directly except for:
1) make a google apps script service, which does have access to the docs api.
2) create a ".doc" then upload and convert to gdoc.
1 is best but a gas service has some limitations like quotas. If you are only creating dozens/hundreds per day you will b... | 0 | 1 | 0 | 0 | 2013-11-02T18:16:00.000 | 1 | 1.2 | true | 19,745,169 | 0 | 0 | 1 | 1 | Listmates:
I am designing a google app engine (python) app to automate law office documents.
I plan on using GAE, google docs, and google drive to create and store the finished documents. My plan is to have case information (client name, case number, etc.) entered and retrieved using GAE web forms and the google data... |
GAE SDK for Python 2.5 | 19,748,534 | 1 | 2 | 272 | 0 | google-app-engine,sdk,python-2.5 | In the 1.8.6 SDK, there's an old_dev_appserver.py that works with Python 2.5. That'll help you along as you migrate. | 0 | 1 | 0 | 0 | 2013-11-02T22:26:00.000 | 2 | 1.2 | true | 19,747,596 | 0 | 0 | 1 | 2 | I have an existing app that uses the deprecated Python 2.5 and the deprecated master/slave datastore. According to the docs, I must migrate the datastore to HRD before I can upgrade to Python 2.7. Before I can migrate my M/S datastore to HRD, I need to do some work on the app and test it using the dev server.
However,... |
GAE SDK for Python 2.5 | 20,110,862 | 0 | 2 | 272 | 0 | google-app-engine,sdk,python-2.5 | Dave W. Smith gave me the answer but I didn't know how to implement it until I made a discovery that maybe most people already know, But in case it might be helpful to somebody, I will tell it here:
I do all my GAE/Python/Flex development work in Eclispe, except that I used the launcher for local testing and deploying... | 0 | 1 | 0 | 0 | 2013-11-02T22:26:00.000 | 2 | 0 | false | 19,747,596 | 0 | 0 | 1 | 2 | I have an existing app that uses the deprecated Python 2.5 and the deprecated master/slave datastore. According to the docs, I must migrate the datastore to HRD before I can upgrade to Python 2.7. Before I can migrate my M/S datastore to HRD, I need to do some work on the app and test it using the dev server.
However,... |
How to execute a Python program from the Python shell? | 19,751,942 | 3 | 0 | 379 | 0 | python,python-3.x | Exit python interpreter/console.
Edit your program in notepad++ creating first_program.py in the same directory where your python.exe is
start cmd.exe from within exactly the same directory
type python first_program.py*
you are done | 0 | 1 | 0 | 0 | 2013-11-03T10:22:00.000 | 4 | 0.148885 | false | 19,751,900 | 1 | 0 | 0 | 3 | I am very very new in Python and I have a doubt.
If I write a program in a text editor (such as Nodepad++), then can I execute it from the Python shell (the one that begin with >>)? What command have I to launch to execute my Python program?
Tnx
Andrea |
How to execute a Python program from the Python shell? | 19,751,976 | 0 | 0 | 379 | 0 | python,python-3.x | from within the Python IDLE shell:
File -> Open... -> Select your Python program
When your program has openend select Run -> Run Module or press F5 | 0 | 1 | 0 | 0 | 2013-11-03T10:22:00.000 | 4 | 0 | false | 19,751,900 | 1 | 0 | 0 | 3 | I am very very new in Python and I have a doubt.
If I write a program in a text editor (such as Nodepad++), then can I execute it from the Python shell (the one that begin with >>)? What command have I to launch to execute my Python program?
Tnx
Andrea |
How to execute a Python program from the Python shell? | 19,751,998 | 0 | 0 | 379 | 0 | python,python-3.x | In the view of mine:
you wrote a program:
test.py
print 'test file'
and you turn to the windows cmd:
you excuted python,and you got this
>
then you can just simply:
os.system('python test.py') | 0 | 1 | 0 | 0 | 2013-11-03T10:22:00.000 | 4 | 0 | false | 19,751,900 | 1 | 0 | 0 | 3 | I am very very new in Python and I have a doubt.
If I write a program in a text editor (such as Nodepad++), then can I execute it from the Python shell (the one that begin with >>)? What command have I to launch to execute my Python program?
Tnx
Andrea |
Canopy - get Access Denied error | 19,759,856 | 0 | 0 | 703 | 0 | python,canopy | Since the supplied information is insufficient, the answer is the same. This is about user authentication. I don't know how you open the app but, your app tries to open a file or a process which is could not be opened by your user. If you open your app with root privileges there won't be any problem. | 0 | 1 | 0 | 0 | 2013-11-03T14:00:00.000 | 1 | 1.2 | true | 19,753,771 | 0 | 0 | 0 | 1 | I'm learning python (from a very low baseline) and recently re-installed Canopy (on a MacBook) It was working fine before.
Now whenever I try an launch the editor I get a Access Denied error.
Can anyone help? Please bear in mind my inexperience
Thanks
File "/Users/simonthompson/Library/Enthought/Canopy_64bit/System/lib... |
python gstreamer script error message no element "h264parse" | 19,759,263 | 1 | 0 | 2,506 | 0 | python,ubuntu,gstreamer | h264parse is part of the "gst-plugins-bad" , you will want to install them through your package manager, if your script imports Gst from gi.repository you will want the 1.0 plugins, the 0.10 otherwise.
Have a nice day :) | 0 | 1 | 0 | 0 | 2013-11-03T20:49:00.000 | 1 | 1.2 | true | 19,757,936 | 0 | 0 | 0 | 1 | I am running a Python script in Ubuntu. The script uses gstreamer. I get the following error message.
error: no element "h264parse"
Let me know if any other information would be helpful. |
Multiprocessing on Ubuntu vs OSX and SSD vs HDD | 19,758,695 | 1 | 0 | 229 | 0 | python,multithreading,macos,ubuntu | On hardware level only one operation on a device can be done at once. If the drive is busy, the requested operation is being queued. There are few different queues where it may be waiting and they vary in different operation systems, hardware or even drivers. There are different queue management methods as well most po... | 0 | 1 | 0 | 0 | 2013-11-03T21:33:00.000 | 1 | 1.2 | true | 19,758,414 | 1 | 0 | 0 | 1 | Can a HDD vs SSD setup account for lower processor utilization when there are many read and write operations?
So I've written a program that spawns multiple processes. On OSX it runs great and utilizes 100% of the cpu. Overloading it with hundreds of threads works out fine. On Ubuntu, it freezes when pushing a large nu... |
Using the GAE remote_api to Create Local Scripts | 19,760,171 | 1 | 0 | 71 | 0 | python,google-app-engine,google-cloud-datastore | Why is including the paths that onerous ?
Normally the remote_api shell is used interactively but it is a good tool that you can use as the basis of acheiving what your want.
The simplest way will be to copy and modify the remote_api shell so that rather than presenting an interactive shell you get it to run a named s... | 0 | 1 | 0 | 0 | 2013-11-04T00:23:00.000 | 1 | 1.2 | true | 19,759,934 | 0 | 0 | 1 | 1 | I'm trying to do some local processing of data entries from the GAE datastore and I am trying to do this by using the remote_api. I just want to write some quick processing scripts that pull some data, but I am getting import errors saying that Python cannot import from google.
Am I supposed to run the script from with... |
How can I track how much data my Python program is sending / receiving over the network? | 19,761,799 | 1 | 0 | 73 | 0 | python,networking,monitoring | In python, you'd probably have to wrap things - it could be a bit of a challenge.
In Linux, the netstat program will probably do something that's at least related to what you want. | 0 | 1 | 0 | 0 | 2013-11-04T04:14:00.000 | 1 | 0.197375 | false | 19,761,546 | 0 | 0 | 0 | 1 | I have a Python program that queries multiple remote services (MongoDB, MySQL, etc). Is there a way to track how much data my program is transferring over the network either within the Python program or through some Linux utility? |
Django can't find libssl on OS X Mavericks | 19,772,866 | 2 | 2 | 9,380 | 1 | python,django,macos,postgresql | It seems that it's libssl.1.0.0.dylib that is missing. Mavericks comme with libssl 0.9.8. You need to install libssl via homebrew.
If loaderpath points to /usr/lib/, you also need to symlink libssl from /usr/local/Cell/openssl/lib/ into /usr/lib. | 0 | 1 | 0 | 0 | 2013-11-04T12:15:00.000 | 5 | 0.07983 | false | 19,767,569 | 0 | 0 | 1 | 1 | I'm trying to get Django running on OS X Mavericks and I've encountered a bunch of errors along the way, the latest way being that when runpython manage.py runserver to see if everything works, I get this error, which I believe means that it misses libssl:
ImportError: dlopen(/Library/Frameworks/Python.framework/Versi... |
Error: dlopen() Library not loaded Reason: image not found | 22,560,206 | 30 | 12 | 27,135 | 0 | macos,error-handling,ipython,dlopen | Shared object location under OS X is sometimes tricky. When you directly call dlopen() you have the freedom of specifying an absolute path to the library, which works fine. However, if you load a library which in turn needs to load another (as appears to be your situation), you've lost control of specifying where the l... | 0 | 1 | 0 | 0 | 2013-11-04T20:31:00.000 | 1 | 1.2 | true | 19,776,571 | 0 | 0 | 0 | 1 | I am a newbie in this field. My laptop is Macbook air, Software: OS X 10.8.5 (12F45). I am running a code which gives me the following error:
dlopen(/Users/ramesh/offline/build_icerec/lib/icecube/phys_services.so, 2): Library not loaded: /Users/ramesh/offline/build_icerec/lib/libphys-services.dylib
Referenced from... |
I can't locate correct Python script to update | 19,783,232 | 1 | 0 | 40 | 0 | python,command-line,compiler-construction,command-line-interface,python-2.6 | Closing the loop: bdist in the path is a sign that the package was installed with setup.py install and is running from the standard Python system path, not from wherever you have it checked out.
Easy fix is to setup.py install it again.
Harder fix is to uninstall it and fiddle with Apache's working directory, but that'... | 0 | 1 | 0 | 0 | 2013-11-04T23:36:00.000 | 1 | 1.2 | true | 19,779,371 | 0 | 0 | 0 | 1 | I have a script that I am running at /var/scripts/SomeAppName/source/importer/processor.py
That script triggers an error that has a line that says:
File "build/bdist.linux-i686/egg/something/cms/browser.py", line 43, in GetBrowser
The problem I'm running into is that I'm unable to locate build/bdist.linux-i686/egg/som... |
How to stop/terminate a python script from running? | 33,560,303 | 4 | 161 | 854,269 | 0 | python,execution,terminate,termination | you can also use the Activity Monitor to stop the py process | 0 | 1 | 0 | 0 | 2013-11-05T04:46:00.000 | 17 | 0.047024 | false | 19,782,075 | 1 | 0 | 0 | 15 | I wrote a program in IDLE to tokenize text files and it starts to tokeniza 349 text files! How can I stop it? How can I stop a running Python program? |
How to stop/terminate a python script from running? | 51,491,746 | 5 | 161 | 854,269 | 0 | python,execution,terminate,termination | To stop your program, just press CTRL + D
or exit(). | 0 | 1 | 0 | 0 | 2013-11-05T04:46:00.000 | 17 | 0.058756 | false | 19,782,075 | 1 | 0 | 0 | 15 | I wrote a program in IDLE to tokenize text files and it starts to tokeniza 349 text files! How can I stop it? How can I stop a running Python program? |
How to stop/terminate a python script from running? | 52,684,880 | 2 | 161 | 854,269 | 0 | python,execution,terminate,termination | Press Ctrl+Alt+Delete and Task Manager will pop up. Find the Python command running, right click on it and and click Stop or Kill. | 0 | 1 | 0 | 0 | 2013-11-05T04:46:00.000 | 17 | 0.023525 | false | 19,782,075 | 1 | 0 | 0 | 15 | I wrote a program in IDLE to tokenize text files and it starts to tokeniza 349 text files! How can I stop it? How can I stop a running Python program? |
How to stop/terminate a python script from running? | 53,984,398 | 4 | 161 | 854,269 | 0 | python,execution,terminate,termination | Control+D works for me on Windows 10. Also, putting exit() at the end also works. | 0 | 1 | 0 | 0 | 2013-11-05T04:46:00.000 | 17 | 0.047024 | false | 19,782,075 | 1 | 0 | 0 | 15 | I wrote a program in IDLE to tokenize text files and it starts to tokeniza 349 text files! How can I stop it? How can I stop a running Python program? |
How to stop/terminate a python script from running? | 55,071,056 | 3 | 161 | 854,269 | 0 | python,execution,terminate,termination | If you are working with Spyder, use CTRL+. and you will restart the kernel, also you will stop the program. | 0 | 1 | 0 | 0 | 2013-11-05T04:46:00.000 | 17 | 0.035279 | false | 19,782,075 | 1 | 0 | 0 | 15 | I wrote a program in IDLE to tokenize text files and it starts to tokeniza 349 text files! How can I stop it? How can I stop a running Python program? |
How to stop/terminate a python script from running? | 61,886,193 | 3 | 161 | 854,269 | 0 | python,execution,terminate,termination | Windows solution: Control + C.
Macbook solution: Control (^) + C.
Another way is to open a terminal, type top, write down the PID of the process that you would like to kill and then type on the terminal: kill -9 <pid> | 0 | 1 | 0 | 0 | 2013-11-05T04:46:00.000 | 17 | 0.035279 | false | 19,782,075 | 1 | 0 | 0 | 15 | I wrote a program in IDLE to tokenize text files and it starts to tokeniza 349 text files! How can I stop it? How can I stop a running Python program? |
How to stop/terminate a python script from running? | 51,932,807 | 8 | 161 | 854,269 | 0 | python,execution,terminate,termination | Ctrl+Z should do it, if you're caught in the python shell. Keep in mind that instances of the script could continue running in background, so under linux you have to kill the corresponding process. | 0 | 1 | 0 | 0 | 2013-11-05T04:46:00.000 | 17 | 1 | false | 19,782,075 | 1 | 0 | 0 | 15 | I wrote a program in IDLE to tokenize text files and it starts to tokeniza 349 text files! How can I stop it? How can I stop a running Python program? |
How to stop/terminate a python script from running? | 67,751,184 | 2 | 161 | 854,269 | 0 | python,execution,terminate,termination | Try using:
Ctrl + Fn + S
or
Ctrl + Fn + B | 0 | 1 | 0 | 0 | 2013-11-05T04:46:00.000 | 17 | 0.023525 | false | 19,782,075 | 1 | 0 | 0 | 15 | I wrote a program in IDLE to tokenize text files and it starts to tokeniza 349 text files! How can I stop it? How can I stop a running Python program? |
How to stop/terminate a python script from running? | 46,964,691 | 33 | 161 | 854,269 | 0 | python,execution,terminate,termination | Ctrl-Break it is more powerful than Ctrl-C | 0 | 1 | 0 | 0 | 2013-11-05T04:46:00.000 | 17 | 1 | false | 19,782,075 | 1 | 0 | 0 | 15 | I wrote a program in IDLE to tokenize text files and it starts to tokeniza 349 text files! How can I stop it? How can I stop a running Python program? |
How to stop/terminate a python script from running? | 19,782,093 | 76 | 161 | 854,269 | 0 | python,execution,terminate,termination | To stop your program, just press Control + C. | 0 | 1 | 0 | 0 | 2013-11-05T04:46:00.000 | 17 | 1.2 | true | 19,782,075 | 1 | 0 | 0 | 15 | I wrote a program in IDLE to tokenize text files and it starts to tokeniza 349 text files! How can I stop it? How can I stop a running Python program? |
How to stop/terminate a python script from running? | 34,029,481 | 190 | 161 | 854,269 | 0 | python,execution,terminate,termination | You can also do it if you use the exit() function in your code. More ideally, you can do sys.exit(). sys.exit() which might terminate Python even if you are running things in parallel through the multiprocessing package.
Note: In order to use the sys.exit(), you must import it: import sys | 0 | 1 | 0 | 0 | 2013-11-05T04:46:00.000 | 17 | 1 | false | 19,782,075 | 1 | 0 | 0 | 15 | I wrote a program in IDLE to tokenize text files and it starts to tokeniza 349 text files! How can I stop it? How can I stop a running Python program? |
How to stop/terminate a python script from running? | 44,786,454 | 55 | 161 | 854,269 | 0 | python,execution,terminate,termination | To stop a python script just press Ctrl + C.
Inside a script with exit(), you can do it.
You can do it in an interactive script with just exit.
You can use pkill -f name-of-the-python-script. | 0 | 1 | 0 | 0 | 2013-11-05T04:46:00.000 | 17 | 1 | false | 19,782,075 | 1 | 0 | 0 | 15 | I wrote a program in IDLE to tokenize text files and it starts to tokeniza 349 text files! How can I stop it? How can I stop a running Python program? |
How to stop/terminate a python script from running? | 59,539,599 | 7 | 161 | 854,269 | 0 | python,execution,terminate,termination | exit() will kill the Kernel if you're in Jupyter Notebook so it's not a good idea. raise command will stop the program. | 0 | 1 | 0 | 0 | 2013-11-05T04:46:00.000 | 17 | 1 | false | 19,782,075 | 1 | 0 | 0 | 15 | I wrote a program in IDLE to tokenize text files and it starts to tokeniza 349 text files! How can I stop it? How can I stop a running Python program? |
How to stop/terminate a python script from running? | 53,211,247 | 59 | 161 | 854,269 | 0 | python,execution,terminate,termination | If your program is running at an interactive console, pressing CTRL + C will raise a KeyboardInterrupt exception on the main thread.
If your Python program doesn't catch it, the KeyboardInterrupt will cause Python to exit. However, an except KeyboardInterrupt: block, or something like a bare except:, will prevent this ... | 0 | 1 | 0 | 0 | 2013-11-05T04:46:00.000 | 17 | 1 | false | 19,782,075 | 1 | 0 | 0 | 15 | I wrote a program in IDLE to tokenize text files and it starts to tokeniza 349 text files! How can I stop it? How can I stop a running Python program? |
How to stop/terminate a python script from running? | 53,210,260 | 8 | 161 | 854,269 | 0 | python,execution,terminate,termination | When I have a python script running on a linux terminal, CTRL+\ works. (not CRTL + C or D) | 0 | 1 | 0 | 0 | 2013-11-05T04:46:00.000 | 17 | 1 | false | 19,782,075 | 1 | 0 | 0 | 15 | I wrote a program in IDLE to tokenize text files and it starts to tokeniza 349 text files! How can I stop it? How can I stop a running Python program? |
Run python application with admin privileges | 19,782,967 | 0 | 1 | 341 | 0 | python,windows | For Linux, see documentation on upstart (for Ubuntu) or service (for RedHat). The write a start-up script to start your Python script with appropriate rights. You can also configure it to be restarted if it crashes.
Windows has a similar facility for start-up programs, where you can register your program to start. | 0 | 1 | 0 | 0 | 2013-11-05T05:40:00.000 | 1 | 0 | false | 19,782,573 | 0 | 0 | 0 | 1 | Working on windows platform, I have a python application which once invoked, remembers its state and resumes in case of system crash or reboot. The application actually runs some other executables or in technological terms is of type framework. The typical scenario where the executable need to run with admin mode passe... |
How can I detect using Python the insertion of only USBs and hard drives on Ubuntu/Linux? | 19,872,640 | 1 | 2 | 4,356 | 0 | python,linux,ubuntu,python-3.x,usb | I can detect it rather easily through monitoring the /dev/disks/by-label/ directory. | 0 | 1 | 0 | 0 | 2013-11-05T07:36:00.000 | 2 | 1.2 | true | 19,783,877 | 0 | 0 | 0 | 1 | I'm building a backup program which involves detecting when media available for backup is inserted. I've looked into detecting the insertion of backup media, and I'm going to use the file system watch service inotify on the /media/username directory.
The problem is that I've looked into this directory and there are fo... |
Best high concurrency Python / Redis server | 19,787,579 | 1 | 1 | 1,710 | 0 | python,performance,redis,bottle | If you are a beginner you should not start with evented (twisted/tornado/gevent/eventlet...) libs.
It will lead you to place you dont know!
If you need to scale add machines and balance the load with a load balancer. | 0 | 1 | 0 | 0 | 2013-11-05T08:53:00.000 | 3 | 0.066568 | false | 19,784,948 | 0 | 0 | 0 | 1 | I'm prototyping a Python/Redis based API and am serving JSON using Bottle but unfortunately out of the box Bottle performs badly under load and under high concurrency. Some initial testing on real traffic results in the python script crashing without terminating, which means the API is unresponsive and not restarting*.... |
How to execute PERL scripts in Django using async tasker like Celery? | 19,791,772 | 3 | 0 | 555 | 0 | python,django,perl,rabbitmq,celery | The easiest way to execute a Perl script from Celery would probably be a thin wrapper written in Python that runs the script as a subprocess. | 0 | 1 | 0 | 0 | 2013-11-05T14:41:00.000 | 2 | 0.291313 | false | 19,791,570 | 0 | 0 | 1 | 1 | I have a need to execute PERL scripts through a Django web interface.
The user will select the parameters of the script and execute it.
I am wondering if it is possible to use Celery/RabbitMQ to execute these script as Celery tasks?
If so, would I need to modify the PERL script?
Would I have to write RabbitMQ code int... |
Pydev Not Recognized in Eclipse | 20,275,034 | 0 | 21 | 27,038 | 0 | python,eclipse,ide,pydev | ![Kepler Pydev config]
I had to spend lot of time to figure out why it is not working. But ultimately did. Download 2.8.2 zip instead and unzip in dropins folder as shown. Start eclipse with -clean option | 0 | 1 | 0 | 0 | 2013-11-07T03:19:00.000 | 9 | 0 | false | 19,827,404 | 1 | 0 | 0 | 2 | I've been using PyDev within Eclipse on my Mac for about two years now. Updated Eclipse today, and suddenly PyDev is completely missing. Tried everything, included a complete uninstall and fresh install, but although PyDev shows up as installed in the menu, it appears nowhere else.
PyDev version: 3.0.0.201311051910
Ecl... |
Pydev Not Recognized in Eclipse | 20,405,349 | 0 | 21 | 27,038 | 0 | python,eclipse,ide,pydev | I debugged a python project (imported before). The Pydev menu has reappeared by only changing the current perspective to "Debug".
I think opening the Pydev perspective through Window > Open Perspective > Other ... > Pydev would also create the Pydev menu. | 0 | 1 | 0 | 0 | 2013-11-07T03:19:00.000 | 9 | 0 | false | 19,827,404 | 1 | 0 | 0 | 2 | I've been using PyDev within Eclipse on my Mac for about two years now. Updated Eclipse today, and suddenly PyDev is completely missing. Tried everything, included a complete uninstall and fresh install, but although PyDev shows up as installed in the menu, it appears nowhere else.
PyDev version: 3.0.0.201311051910
Ecl... |
how to get python installed path from command line | 19,829,607 | 2 | 30 | 85,755 | 0 | python,windows,python-2.7,cmd | You can check registry by:
HKLM SOFTWARE\Python\PythonCore\${PYTHON_VERSION}\InstallPath
or HKCU | 0 | 1 | 0 | 0 | 2013-11-07T06:39:00.000 | 3 | 0.132549 | false | 19,829,516 | 1 | 0 | 0 | 1 | I am trying to get the installed path of python?
Any idea how to get the python installed path from command line in windows. I don't want to set the environment variable?
Thanks, |
Choosing a different python version to run code | 19,843,644 | 0 | 1 | 473 | 0 | python,windows | Assumptions: You mention python(w).exe and cmd, so you're most likely on windows.
You probably selected "use python 2.n" somewhere in your IDE (whichever one you may use). That works fine as long as you ONLY execute your scripts from there. From any arbitrary other place on your system, windows (or any other OS) makes... | 0 | 1 | 0 | 0 | 2013-11-07T17:32:00.000 | 3 | 1.2 | true | 19,842,701 | 1 | 0 | 0 | 1 | a) I have a code that works fine if I choose Python 2.5 but it gives me errors when using python 2.7. I have easily fixed the problem in windows by choosing python 2.5 as the default program. But, it seems that cmd does not follow this change. How could I fix this?
b) what is the difference between running a script usi... |
how to close remote desktop window using python | 29,933,838 | 0 | 1 | 1,415 | 0 | python,desktop,os.system,mstsc | To close one of the mstsc, you should know the pid of it. If you are opening mstsc.exe from a python script itself, then you could capture the pid of that instance.
p = Popen('C:\Windows\System32\mstsc.exe "connection.rdp"')
print p.pid
Then kill the exe using pid. | 0 | 1 | 0 | 0 | 2013-11-08T08:47:00.000 | 1 | 0 | false | 19,854,866 | 0 | 0 | 0 | 1 | I want to automate closing the remote desktop application using python. I open the remote desktop using mstsc. When I do
os.system("TASKKILL /F /IM mstsc.exe")
It is killing all the remote desktop applications that are open. Is there a way I can specify through python which remote desktop it has to close.
I have 2 or m... |
delphi code compiled to obj files to be used in python | 19,867,378 | 2 | 3 | 245 | 0 | c++,python,c,delphi,.obj | Delphi generated .obj files cannot be consumed by Python because Python doesn't consume .obj files. You'd need to compile them to a library at the very least. At which point, emitting .obj files is pointless – you may as well just output a full module. I conclude that you'll need to compile your Delphi code to a librar... | 1 | 1 | 0 | 0 | 2013-11-08T19:37:00.000 | 1 | 0.379949 | false | 19,867,190 | 1 | 0 | 0 | 1 | I have a lot of code in Delphi I would like to use in python.
In Delphi XE is an option to generate C / C + + files. obj
Can I generate these files. Obj in Delphi and use it in python code
python code to use it. obj will still be cross-platform?
thank you |
Kill Python script after 60 second in simplest way | 19,901,418 | 1 | 0 | 1,157 | 0 | python | If you are using Linux, you can try this:
(cmdpid=$BASHPID; (sleep 60; kill $cmdpid) & exec YOUR_COMMAND)
for example, if you want to execute a program named script.py:
(cmdpid=$BASHPID; (sleep 60; kill $cmdpid) & exec python script.py) | 0 | 1 | 0 | 0 | 2013-11-11T07:53:00.000 | 3 | 0.066568 | false | 19,901,351 | 1 | 0 | 0 | 1 | I have python script and want to stop work or kill proccess after 60 second of execution .
not just stop work , kill or die proccess.
Don't find a good reference for this .
P.S: Kill python script itself (like a timer with first line of script to kill script after a time)
P.S2: I'm on windows and want compile it to .ex... |
Over-riding Debian/Ubuntu's lintian profile | 20,292,610 | 1 | 4 | 683 | 0 | python,ubuntu,debian,deb,lintian | For future reference, here's what I did.
I generated and packaged the .pyo files into their own tar.gz file
In the postinst script, the tar.gz file is extracted, and the tar.gz file is deleted
In the postrm script, the pyo files are deleted.
This isn't the nicest solution in the world, but it works with Debian/Ubuntu... | 0 | 1 | 0 | 0 | 2013-11-11T08:14:00.000 | 2 | 0.099668 | false | 19,901,647 | 0 | 0 | 1 | 1 | I have written a proprietary application that needs to install some .pyo files. When I create a .deb from the app, lintian complains that package-installs-python-bytecode. I tried adding an override, but apparently this tag is marked as non-overridable by ftp-master-auto-reject.profile in /usr/share/lintian/profiles/de... |
Can't install pydev in eclipse | 31,271,138 | 0 | 0 | 9,571 | 0 | python,eclipse,pydev | I had the same problem, I opened Eclipse as admin and it worked... don't know if it helps | 0 | 1 | 0 | 0 | 2013-11-11T13:35:00.000 | 4 | 0 | false | 19,907,723 | 0 | 0 | 0 | 1 | I'd like install pydev in eclipse by following method, all of them fails:
using update site, errors happens in the installation, looks like a firewall issue.
download the pydev zip file, and extract to the eclipse folder, not working ( could not find it in preference after restart eclipse)
download hte pydev zip file... |
How exactly is Python Bytecode Run in CPython? | 70,165,436 | 0 | 65 | 14,342 | 0 | python,cpython,python-internals | When we run the python programs: 1_python source code compile with Cpython to the bytecode (bytecode is the binary file with .pyc format which seralize with marshal and it is set of stack structures that solve with pvm) 2_then the pvm (python virtual machine/python interpreter) is stackbase machine (the machine which s... | 0 | 1 | 0 | 1 | 2013-11-11T21:53:00.000 | 4 | 0 | false | 19,916,729 | 1 | 0 | 0 | 1 | I am trying to understand how Python works (because I use it all the time!). To my understanding, when you run something like python script.py, the script is converted to bytecode and then the interpreter/VM/CPython–really just a C Program–reads in the python bytecode and executes the program accordingly.
How is this b... |
How do I access my django app running on Amazon ec2? | 51,827,225 | 0 | 4 | 6,277 | 0 | python,django,amazon-web-services,amazon-ec2 | Make sure to include your IPv4 Public IP address in the ALLOWED_HOSTS section in Django project/app/settings.py script... | 0 | 1 | 0 | 0 | 2013-11-12T05:37:00.000 | 2 | 0 | false | 19,921,705 | 0 | 0 | 1 | 1 | So, I have looked around stack overflow + other sites, but havent been able to solve this problem: hence posting this question!
I have recently started learning django... and am now trying to run it on ec2.
I have an ec2 instance of this format: ec2-xx-xxx-xx-xxx.us-west-2.compute.amazonaws.com on which I have a djang... |
Continuous Deployment: Version Numbering and Jenkins for Deployment? | 19,932,927 | 2 | 2 | 1,215 | 0 | python,jenkins,continuous-integration,continuous-deployment | Since we already use Jenkins, I think we do it in a script called by
Jenkins. Any reason to do it with a different (better) tool?
To answer your question: No, there aren't any big reasons to not go with Jenkins for deployment.
Pros:
You already know Jenkins (and you probably know some of the quirks)
You don't need ... | 0 | 1 | 0 | 1 | 2013-11-12T10:32:00.000 | 1 | 1.2 | true | 19,926,738 | 0 | 0 | 0 | 1 | We want to use continuous deployment.
We have:
all sources (python) in a local RhodeCode (git) server.
Jenkins for automated testing
SSH connections to the production systems (linux).
a tool which can update servers in one command.
Now something like this should be implemented:
run tests with Jenkins
if there is a ... |
How do I make a standalone application out of a Docker container? | 19,951,847 | 1 | 5 | 3,690 | 0 | python,docker | In order to use a Docker container, you will always need the basics - Docker installed on a Linux OS (that supports LXC and any other required filesystem type). In a production environment, you'd be running a recent, native install of Linux, and the initial install of Docker would be easy, and a one-time event (in a cl... | 0 | 1 | 0 | 0 | 2013-11-13T09:17:00.000 | 3 | 0.066568 | false | 19,949,809 | 0 | 0 | 1 | 3 | I'll like to create a python flask application that can run on any platform. I've put it in a Docker container. But unless I've misunderstood something the host machine still need docker installed to launch the container. Which in turn required Vagrant and and Ubuntu VM (at least on Mac). Am I missing something? What i... |
How do I make a standalone application out of a Docker container? | 20,142,281 | 0 | 5 | 3,690 | 0 | python,docker | The simple answer is: you can't.
The long answer is: Docker is not intended to be used to make cross platform standalone applications (but JAVA is, for example). Docker instead focuses on having a light weight container that acts like a virtual machine but basically isn't. It's just a box inside a linux(!) system that ... | 0 | 1 | 0 | 0 | 2013-11-13T09:17:00.000 | 3 | 0 | false | 19,949,809 | 0 | 0 | 1 | 3 | I'll like to create a python flask application that can run on any platform. I've put it in a Docker container. But unless I've misunderstood something the host machine still need docker installed to launch the container. Which in turn required Vagrant and and Ubuntu VM (at least on Mac). Am I missing something? What i... |
How do I make a standalone application out of a Docker container? | 20,142,478 | 0 | 5 | 3,690 | 0 | python,docker | A Linux VM is a dependency if you are on Windows or Mac. Vagrant is not though. It is mentioned only because it's probably the easiest way to get a VM up and running. | 0 | 1 | 0 | 0 | 2013-11-13T09:17:00.000 | 3 | 0 | false | 19,949,809 | 0 | 0 | 1 | 3 | I'll like to create a python flask application that can run on any platform. I've put it in a Docker container. But unless I've misunderstood something the host machine still need docker installed to launch the container. Which in turn required Vagrant and and Ubuntu VM (at least on Mac). Am I missing something? What i... |
Python error while configuring mesos on centos | 20,348,972 | 3 | 1 | 2,608 | 0 | python,linux,centos,mesos | you need to have python dev version (headers etc.)
try
yum install python-devel | 0 | 1 | 0 | 0 | 2013-11-14T04:41:00.000 | 1 | 0.53705 | false | 19,969,687 | 0 | 0 | 0 | 1 | I am trying to install mesos on CentOs. I downloaded it and run ./configure command. But couldn't be completed due to installed version of python as mesos requires development version 2.6. I tried to upgrade python but it upgrades to 2.4 only. Then I manually download python 2.6 and install, which is located under /usr... |
Git: Master-thesis subprojects as submodules or stand-alone repositories | 21,260,659 | 0 | 0 | 283 | 0 | python,git,bash,git-submodules,subproject | I recommend a single master repository for this problem. You mentioned that the output files of certain programs are used as input to the others. These programs may not have run-time dependencies on each other, but they do have dependencies. It sounds like they will not work without each other being present to create t... | 0 | 1 | 0 | 0 | 2013-11-14T16:22:00.000 | 2 | 0 | false | 19,982,856 | 1 | 0 | 0 | 2 | I just started using git to get my the code I write for my Master-thesis more organized. I have divided the tasks into 4 sub-folders, each one containing data and programs that work with that data. The 4 sub-projects do not necessarily need to be connected, none off the programs contained use functions from the other s... |
Git: Master-thesis subprojects as submodules or stand-alone repositories | 19,982,974 | 1 | 0 | 283 | 0 | python,git,bash,git-submodules,subproject | Well, as devnull says, answers would be highly opinion based, but given that I disagree that that's a bad thing, I'll go ahead and answer if I can type before someone closes the question. :)
I'm always inclined to treat git repositories as separate units of work or projects. If I'm likely to work on various parts of ... | 0 | 1 | 0 | 0 | 2013-11-14T16:22:00.000 | 2 | 0.099668 | false | 19,982,856 | 1 | 0 | 0 | 2 | I just started using git to get my the code I write for my Master-thesis more organized. I have divided the tasks into 4 sub-folders, each one containing data and programs that work with that data. The 4 sub-projects do not necessarily need to be connected, none off the programs contained use functions from the other s... |
What happens to my downloads when I delete the virtual environment they're in? | 19,983,121 | 0 | 0 | 37 | 0 | python,download,virtualenv | virtualenv doesn't cache the downloads anywhere. So it downloads the sources once, compiles and installs them and then deletes the download. If you delete the env, all installed modules are gone as well. | 0 | 1 | 0 | 0 | 2013-11-14T16:25:00.000 | 1 | 1.2 | true | 19,982,928 | 1 | 0 | 0 | 1 | I set up a virtual environment on my mac and downloaded some Python libraries.
What happens to those libraries after I delete my virtual environment?
Where are my downloads stored when I download them in my virtualenv?
Thank you |
What does the $ mean when running commands? | 19,986,337 | 20 | 15 | 50,638 | 0 | python,command,installation,dollar-sign | As of now, Python does not implement $ in its syntax. So, it has nothing to do with Python.
Instead, what you are seeing is the terminal prompt of a Unix-based system (Mac, Linux, etc.) | 0 | 1 | 0 | 0 | 2013-11-14T19:13:00.000 | 5 | 1.2 | true | 19,986,306 | 1 | 0 | 0 | 2 | I've been learning Python, and I keep running into the $ character in online documentation. Usually it goes something like this:
$ python ez_setup.py (Yeah, I've been trying to install setup tools)
I'm fairly certain that this command isn't for the python IDE or console, but I've tried windows cmd and it doesn't work. ... |
What does the $ mean when running commands? | 19,986,332 | 5 | 15 | 50,638 | 0 | python,command,installation,dollar-sign | The $ is the command prompt. It is used to signify that python ez_setup.py should be run on a command line and not on a python/perl/ruby shell
You might also see % python ez_setup.py, which also means the same thing | 0 | 1 | 0 | 0 | 2013-11-14T19:13:00.000 | 5 | 0.197375 | false | 19,986,306 | 1 | 0 | 0 | 2 | I've been learning Python, and I keep running into the $ character in online documentation. Usually it goes something like this:
$ python ez_setup.py (Yeah, I've been trying to install setup tools)
I'm fairly certain that this command isn't for the python IDE or console, but I've tried windows cmd and it doesn't work. ... |
install new version of python | 19,987,194 | 0 | 0 | 168 | 0 | python,python-3.x | instead of using python I typed python3 in terminal and it was the solution | 0 | 1 | 0 | 0 | 2013-11-14T19:45:00.000 | 2 | 0 | false | 19,986,895 | 1 | 0 | 0 | 1 | I have mac os x, recently I have install python version 3.2 before I had version 2.6.1. but when I type "python" in terminal it prints Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49). what does it mean? how can I use python 3.2 that have install this week? |
Google AppEngine: Setting up user roles and permissions | 20,210,524 | 0 | 1 | 874 | 0 | python,google-app-engine,permissions,roles,app-engine-ndb | You must manage user_profile yourself. In your user_profile, you can store the user id such as an email address or a google user id like you want. Add a role array in this entity where you store all roles for this user and you manage access with decorators.
For example, users which are employers will have "EMPLOYERS" i... | 0 | 1 | 0 | 0 | 2013-11-14T21:21:00.000 | 3 | 0 | false | 19,988,654 | 0 | 0 | 1 | 2 | I am undergoing Udacity's Web Development course which uses Google AppEngine and Python.
I would like to set up specific user roles, and their alloted permissions. For example, I may have two users roles, Employer and SkilledPerson, and assign their permissions as follows:
Only Employers may create Job entities.
Only ... |
Google AppEngine: Setting up user roles and permissions | 20,207,381 | 0 | 1 | 874 | 0 | python,google-app-engine,permissions,roles,app-engine-ndb | I'd create a user_profile table which stores their Google user id, and two Boolean fields for is_employer and is_skilled_person, because there's always potential for someone to be both of these roles on your site. (Maybe I'm an employer posting a job but also looking for a job as well)
If you perceive having multiple r... | 0 | 1 | 0 | 0 | 2013-11-14T21:21:00.000 | 3 | 0 | false | 19,988,654 | 0 | 0 | 1 | 2 | I am undergoing Udacity's Web Development course which uses Google AppEngine and Python.
I would like to set up specific user roles, and their alloted permissions. For example, I may have two users roles, Employer and SkilledPerson, and assign their permissions as follows:
Only Employers may create Job entities.
Only ... |
Can one source code be deployed to Openshift, Heroku and Google App Engine at once? | 20,003,022 | 3 | 1 | 244 | 0 | python,google-app-engine,heroku,openshift | I work on Openshift and at this time I'm not aware of anything that will deploy your code to GAE and Openshift at the same time.
You might be able to write your own script for it. | 0 | 1 | 0 | 0 | 2013-11-15T10:31:00.000 | 2 | 1.2 | true | 19,998,958 | 0 | 0 | 1 | 2 | As subject, is is possible with just one source code, we can deploy our code to Openshift or Google App Engine? Heroku is not necessarily in my case.
My application is using Python Flask + PostgreSQL 9.1. I love the easiness in Openshift when I configure my technology stack, but is the case will be same with GAE?
Than... |
Can one source code be deployed to Openshift, Heroku and Google App Engine at once? | 20,003,075 | 1 | 1 | 244 | 0 | python,google-app-engine,heroku,openshift | PostgreSQL is not available on GAE, so this code will definitely not run there. | 0 | 1 | 0 | 0 | 2013-11-15T10:31:00.000 | 2 | 0.099668 | false | 19,998,958 | 0 | 0 | 1 | 2 | As subject, is is possible with just one source code, we can deploy our code to Openshift or Google App Engine? Heroku is not necessarily in my case.
My application is using Python Flask + PostgreSQL 9.1. I love the easiness in Openshift when I configure my technology stack, but is the case will be same with GAE?
Than... |
Scaling APScheduler | 25,422,173 | 2 | 5 | 901 | 0 | python-2.7,distributed,scheduler,apscheduler | This looks like an old question but I'll answer it anyway. No, it's not (yet) possible to run APScheduler in that manner yet due to lack of a synchronization/locking mechanism to that end. | 0 | 1 | 0 | 0 | 2013-11-15T12:52:00.000 | 1 | 0.379949 | false | 20,001,553 | 0 | 0 | 0 | 1 | I want to run multiple instances of APScheduler pointing to one common persistent job DB. Is it possible to run in that way?? I also mean that the jobs in the DB get shared among the Scheduler instances and at a point there is only one instance executing a scheduled job. |
Why use Pythons 'virtualenv' on Linux when one has 'chroot' (and union/overlay filesystems)? | 20,001,653 | 6 | 4 | 2,878 | 0 | python,linux,virtualenv,chroot | bootstrapping a directory tree that can be passed as root
That's not what virtualenv does, except (to some degree) for Python packages. It provides a place where these can be installed without replacing the rest of the filesystem. It also works without root privileges and it's portable as it needs no kernel support, u... | 0 | 1 | 0 | 0 | 2013-11-15T12:54:00.000 | 1 | 1 | false | 20,001,606 | 1 | 0 | 0 | 1 | First of all let me state that I am a proponent of generic software (in general ;-). I am no expert on Python, but it seems that the 'virtualenv' utility solves pretty much the same problem 'chroot' can help to solve - bootstrapping a directory tree that can be passed as root, thus effectively protecting the real direc... |
IDLE can't find cv2, CLI Python imports it correctly | 20,009,587 | 0 | 0 | 1,242 | 0 | python,opencv,command-line-interface,python-idle | When you launch GUI applications on OS X (.app bundles), no shell is involved and shell profile scripts are not used. IDLE.app is no exception. So any environment variables defined there are not available to the GUI app. The best solution is to properly install your third-party packages into the standard locations i... | 0 | 1 | 0 | 0 | 2013-11-15T18:34:00.000 | 1 | 1.2 | true | 20,008,181 | 0 | 0 | 0 | 1 | I am able to import the OpenCV python bindings (cv2) fine when running Python from the command line, but I receive the standard 'no module named cv2' from IDLE when I import there.
I checked the Path Browser in IDLE, and noticed that it doesn't match my .bashrc PYTHONPATH.
That said, I copied the cv2 binding files int... |
Making pig embedded with python script and pig cassandra integration to work with oozie | 22,040,536 | 0 | 1 | 419 | 0 | python,hadoop,cassandra,apache-pig,oozie | This is solved. Solutions..
1) Put the python file in the oozie worklow path and then reference if from here.
2) Added cassandra jar files in the lib folder in the oozie's HDFS path. | 0 | 1 | 0 | 0 | 2013-11-17T20:51:00.000 | 1 | 1.2 | true | 20,036,040 | 0 | 0 | 0 | 1 | I am new to oozie and I have few problems.
1) I am trying to embed a pig action in oozie which has a python script import. I've placed the jython.jar file in the lib path and have an import in the pig script which will take the python UDFs. I don't seems to get this working. The .py file is not getting picked up. How ... |
virtualenv can not work in centos and ubuntu | 20,043,992 | 1 | 0 | 804 | 0 | python,virtualenv | What did you expect exactly ? Virtualenv creates a sandboxed Python environmenent with binaries etc for the platform on which it's created - it doesn't automagically makes the binaries platform-independent... | 0 | 1 | 0 | 0 | 2013-11-18T09:07:00.000 | 1 | 0.197375 | false | 20,043,841 | 0 | 0 | 0 | 1 | Here is the example:
centos:(build a virtualen)
$ virtualenv tenv
ubuntu:(active it)
$ . tenv/bin/activate
$ python
Could not find platform independent libraries
Could not find platform dependent libraries
Consider setting $PYTHONHOME to [:]
ImportError: No module named site
In turn... |
Nginx(Django) ImportError: cannot import name celeryd | 20,312,840 | 1 | 0 | 700 | 0 | python,django,nginx,celery,celerybeat | It turned out I used different version of Django in my remote server.
In Celery 3.1, there is no command named celeryd. | 0 | 1 | 0 | 0 | 2013-11-18T19:45:00.000 | 1 | 1.2 | true | 20,056,399 | 0 | 0 | 1 | 1 | I tested my project in my local machine, and it worked fine. But after uploading to a remote server(CentOS), I cannot execute celerybeat.
Here is my command.
python manage.py celeryd --events --loglevel=INFO -c 5 --settings=[settings-directory].production
This command works in the local machine(with --settings=[setting... |
What's the advantage of running multiple threads per UWSGI process? | 20,062,339 | 6 | 1 | 1,418 | 0 | python,multithreading,deployment,process,uwsgi | Python's native multithreading is affected by GIL limitations. Simply put, only one Python thread at a time is physically executed. An exception to this are blocking IO calls (e. g. DB query) that let other Python threads take over, which may increase performance of IO-bound operations.
So the real performance gain wo... | 0 | 1 | 0 | 1 | 2013-11-18T21:38:00.000 | 1 | 1.2 | true | 20,058,464 | 0 | 0 | 0 | 1 | If I'm performing blocking operations like querying a database, then what is the advantage? How does this add extra worthwhile capacity? |
Google App Engine. How to create constant in application scope? | 20,065,052 | 2 | 1 | 154 | 0 | python,google-app-engine | You can define the dict with in a module, then import it where ever you wish to refer to it, or you could load it from the datastore, and set the value in the module. You would do this during a warmup request.
Defining it in a module, means to alter the contents will require de-deploying the app.
Defining it in the da... | 0 | 1 | 0 | 0 | 2013-11-19T06:43:00.000 | 1 | 0.379949 | false | 20,064,915 | 1 | 0 | 1 | 1 | I want to create global scope constant dict, that would be accessed by multiple views.
For now I see scenario after deploy:
Fetching big file, creating a dict, holding this dict in memory. This process can be re-executed by administrator. |
How to check from Linux in Python for administrative access to a Windows machine | 20,067,048 | 0 | 0 | 111 | 0 | python,windows,remote-access,administrator | I am no sys-admin, but just trying to mount the C-drive ( \hostname\C$ ) via samba/smb should work. This assumes that remote sharing and filesystem access is enabled on that box and the firewall rule setup to allow for remote connections. | 0 | 1 | 0 | 0 | 2013-11-19T07:59:00.000 | 1 | 1.2 | true | 20,066,131 | 0 | 0 | 0 | 1 | I have a network of end-user machines (Windows, Linux, MacOS) and I want to check whether the credential I have allow me to access the machines as administrator (I am checking the "here are the admin credentials to the machines" vs. reality).
I wrote a Python script (it runs on Linux) which
runs nmap -O on the network... |
file not found: /usr/lib/system/libdnsinfo.dylib for architecture i386 | 27,936,871 | 0 | 1 | 3,158 | 0 | python,ios,xcode,macos,pycrypto | Use libdns_services instead, libdnsinfo.dylib is no more supported by latest sdk. | 0 | 1 | 0 | 0 | 2013-11-19T17:27:00.000 | 3 | 0 | false | 20,078,036 | 0 | 0 | 0 | 1 | I am on MAC 10.9 with XCode 4.6.3 and have command line tools installed
I am trying to compile pycrypto-2.1.0 using
python setup.py build and getting following error
-----------------------------------------------------------------------------
ld: warning: ignoring file build/temp.macosx-10.6-intel-2.7/src/MD2.o, fi... |
PyDev Eclipse Plugin fails to update in Eclipse Update Manager | 41,791,350 | 1 | 3 | 1,251 | 0 | python,eclipse,pydev | It seems that the best resolution for this is to update from Eclipse 3.7 to 4.3+. | 0 | 1 | 0 | 0 | 2013-11-19T18:06:00.000 | 1 | 1.2 | true | 20,078,776 | 0 | 0 | 1 | 1 | I'm trying to update some software in Eclipse, and mostly haven't had problems, but when I try to update PyDev (Python plugin) I get this error:
An error occurred while collecting items to be installed
session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, ... |
How to activate an Anaconda environment | 35,214,764 | 5 | 189 | 622,482 | 0 | python,virtualenv,anaconda,conda | Below is how it worked for me
C:\Windows\system32>set CONDA_ENVS_PATH=d:\your\location
C:\Windows\system32>conda info
Shows new environment path
C:\Windows\system32>conda create -n YourNewEnvironment --clone=root
Clones default root environment
C:\Windows\system32>activate YourNewEnvironment
Deactivating environm... | 0 | 1 | 0 | 0 | 2013-11-19T20:25:00.000 | 12 | 0.083141 | false | 20,081,338 | 1 | 0 | 0 | 3 | I'm on Windows 8, using Anaconda 1.7.5 64bit.
I created a new Anaconda environment with
conda create -p ./test python=2.7 pip
from C:\Pr\TEMP\venv\.
This worked well (there is a folder with a new python distribution). conda tells me to type
activate C:\PR\TEMP\venv\test
to activate the environment, however this retur... |
How to activate an Anaconda environment | 58,099,552 | 2 | 189 | 622,482 | 0 | python,virtualenv,anaconda,conda | For me, using Anaconda Prompt instead of cmd or PowerShell is the key.
In Anaconda Prompt, all I need to do is activate XXX | 0 | 1 | 0 | 0 | 2013-11-19T20:25:00.000 | 12 | 0.033321 | false | 20,081,338 | 1 | 0 | 0 | 3 | I'm on Windows 8, using Anaconda 1.7.5 64bit.
I created a new Anaconda environment with
conda create -p ./test python=2.7 pip
from C:\Pr\TEMP\venv\.
This worked well (there is a folder with a new python distribution). conda tells me to type
activate C:\PR\TEMP\venv\test
to activate the environment, however this retur... |
How to activate an Anaconda environment | 62,778,561 | -1 | 189 | 622,482 | 0 | python,virtualenv,anaconda,conda | Window:
conda activate environment_name
Mac: conda activate environment_name | 0 | 1 | 0 | 0 | 2013-11-19T20:25:00.000 | 12 | -0.016665 | false | 20,081,338 | 1 | 0 | 0 | 3 | I'm on Windows 8, using Anaconda 1.7.5 64bit.
I created a new Anaconda environment with
conda create -p ./test python=2.7 pip
from C:\Pr\TEMP\venv\.
This worked well (there is a folder with a new python distribution). conda tells me to type
activate C:\PR\TEMP\venv\test
to activate the environment, however this retur... |
How to install pip for Python 3 on Mac OS X? | 45,603,115 | 12 | 140 | 296,833 | 0 | python,macos,python-3.x,pip,python-3.3 | brew install python3
create alias in your shell profile
eg. alias pip3="python3 -m pip" in my .zshrc
➜ ~ pip3 --version
pip 9.0.1 from /usr/local/lib/python3.6/site-packages (python 3.6) | 0 | 1 | 0 | 0 | 2013-11-19T21:57:00.000 | 16 | 1 | false | 20,082,935 | 1 | 0 | 0 | 3 | OS X (Mavericks) has Python 2.7 stock installed. But I do all my own personal Python stuff with 3.3. I just flushed my 3.3.2 install and installed the new 3.3.3. So I need to install pyserial again. I can do it the way I've done it before, which is:
Download pyserial from pypi
untar pyserial.tgz
cd pyserial
python3 s... |
How to install pip for Python 3 on Mac OS X? | 52,130,224 | 4 | 140 | 296,833 | 0 | python,macos,python-3.x,pip,python-3.3 | pip is installed automatically with python2 using brew:
brew install python3
pip3 --version | 0 | 1 | 0 | 0 | 2013-11-19T21:57:00.000 | 16 | 0.049958 | false | 20,082,935 | 1 | 0 | 0 | 3 | OS X (Mavericks) has Python 2.7 stock installed. But I do all my own personal Python stuff with 3.3. I just flushed my 3.3.2 install and installed the new 3.3.3. So I need to install pyserial again. I can do it the way I've done it before, which is:
Download pyserial from pypi
untar pyserial.tgz
cd pyserial
python3 s... |
How to install pip for Python 3 on Mac OS X? | 55,175,708 | 0 | 140 | 296,833 | 0 | python,macos,python-3.x,pip,python-3.3 | For a fresh new Mac, you need to follow below steps:-
Make sure you have installed Xcode
sudo easy_install pip
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew doctor
brew install python3
And you are done, just type python3 on terminal and you will ... | 0 | 1 | 0 | 0 | 2013-11-19T21:57:00.000 | 16 | 0 | false | 20,082,935 | 1 | 0 | 0 | 3 | OS X (Mavericks) has Python 2.7 stock installed. But I do all my own personal Python stuff with 3.3. I just flushed my 3.3.2 install and installed the new 3.3.3. So I need to install pyserial again. I can do it the way I've done it before, which is:
Download pyserial from pypi
untar pyserial.tgz
cd pyserial
python3 s... |
How to install python2.6-dev on Debian Testing | 20,102,657 | -1 | 0 | 1,188 | 0 | python,debian,python-2.6,apt | I know this might seem extreme but if you need 2.6 that badly, try running debian stable in a virtual machine like virtualbox and install 2.6 through that. | 0 | 1 | 0 | 1 | 2013-11-20T16:41:00.000 | 2 | -0.099668 | false | 20,101,721 | 1 | 0 | 0 | 1 | I'm using Linux Mint Debian Edition (eq. Debian Testing). There is no python2.6-dev package, which I'd need to install pycrypto for Python 2.6 (since it has a compilation step).
Is there any way to get this package or an equivalent on my system? I already have installed Python 2.6 in my system and I can use it without ... |
Using py2exe in a virtualenv | 20,777,298 | 11 | 9 | 4,266 | 0 | python,py2exe | You can do that this way:
Activate your virtualenv and then ...
easy_install py2exe-0.6.9.win32-py2.7.exe | 0 | 1 | 0 | 0 | 2013-11-20T18:47:00.000 | 2 | 1 | false | 20,104,368 | 1 | 0 | 0 | 2 | I have a Python script I developed within a virtualenv on Windows (Python 2.7).
I would now like to compile it into a single EXE using Py2exe.
I've read and read the docs and stackoverflow, and yet I can't find a simple answer: How do I do this? I tried just installing py2exe (via the downloadable installer), but of co... |
Using py2exe in a virtualenv | 20,196,997 | 1 | 9 | 4,266 | 0 | python,py2exe | Installing py2exe into your virtual env should be straightforward. You'll need Visual Studio 2008, the express version should work. Launch a 2008 Command Prompt and Activate your virtual env. Change into the directory that contains the py2exe source and run python setup.py install. You can verify that py2exe is in ... | 0 | 1 | 0 | 0 | 2013-11-20T18:47:00.000 | 2 | 1.2 | true | 20,104,368 | 1 | 0 | 0 | 2 | I have a Python script I developed within a virtualenv on Windows (Python 2.7).
I would now like to compile it into a single EXE using Py2exe.
I've read and read the docs and stackoverflow, and yet I can't find a simple answer: How do I do this? I tried just installing py2exe (via the downloadable installer), but of co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.