Title stringlengths 15 150 | A_Id int64 2.98k 72.4M | Users Score int64 -17 470 | Q_Score int64 0 5.69k | ViewCount int64 18 4.06M | Database and SQL int64 0 1 | Tags stringlengths 6 105 | Answer stringlengths 11 6.38k | GUI and Desktop Applications int64 0 1 | System Administration and DevOps int64 1 1 | Networking and APIs int64 0 1 | Other int64 0 1 | CreationDate stringlengths 23 23 | AnswerCount int64 1 64 | Score float64 -1 1.2 | is_accepted bool 2
classes | Q_Id int64 1.85k 44.1M | Python Basics and Environment int64 0 1 | Data Science and Machine Learning int64 0 1 | Web Development int64 0 1 | Available Count int64 1 17 | Question stringlengths 41 29k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Python subprocess how to determine if child process hangs? | 3,724,322 | 2 | 2 | 2,476 | 0 | python,process,subprocess,parent-child | Well, how do you tell the difference between a stuck process and a process that takes longer than usual to complete? The short answer is: No, you can't detect if your child process is stuck.
I would say that to be able to detect this you need some kind of continuous communication with the process (e.g. look at log file... | 0 | 1 | 0 | 0 | 2010-09-16T06:35:00.000 | 2 | 1.2 | true | 3,724,238 | 1 | 0 | 0 | 2 | How do I know is there my child process got hang while operating? |
How to call an executable as independent process using python in windows | 3,727,415 | 1 | 3 | 1,090 | 0 | python,windows,python-3.x | I sounds as if you want the callee to callback the caller (sorry for the alliteration :) Since you are using Python 3.1 maybe the subprocess module will provide the intended behavior. It is not a true callback per se, but the calling program can perform decisions based on the output of the called program (exe in this c... | 0 | 1 | 0 | 0 | 2010-09-16T10:43:00.000 | 1 | 0.197375 | false | 3,725,859 | 0 | 0 | 0 | 1 | After calling an exe using python script in windows, the exe should run independent of this python script and once it is initiated the control should comeback to python script and executes the further script and control of .py file will die. But on other side before finishing execution, the exe should call this python ... |
Using Python in Netbeans | 3,743,725 | 0 | 1 | 486 | 0 | python,netbeans | You probably want to ask this question on www.serverfault.com rather than stackoverflow as it is more of a configuration issue rather than a programming issue.
Include the version of Netbeans and the Java you are using - and whether you using native python and/or Jython as well.
Also include at which point you see the ... | 0 | 1 | 0 | 0 | 2010-09-16T15:42:00.000 | 1 | 0 | false | 3,728,310 | 1 | 0 | 1 | 1 | I have x64 Windows XP machine.
I use Netbeans to code Java.
I am now trying to use it for Python, but I get this error:
\NetBeans was unexpected at this time.
Any idea how to fix it? |
How to update $PATH | 3,730,090 | 1 | 3 | 3,792 | 0 | python,scripting,path,bash | You shouldn't. It's the user choice whether he wants that in the PATH, in what cases and how to achieve that. What you can do is inform the user about the directory where your scripts reside and suggest putting it to the PATH.
Or maybe you're asking from the user's perspective? | 0 | 1 | 0 | 1 | 2010-09-16T19:17:00.000 | 7 | 0.028564 | false | 3,729,965 | 0 | 0 | 0 | 5 | I am writing a python/pygtk application that is adding some custom scripts (bash) in a certain folder in $HOME (eg. ~/.custom_scripts).
I want to make that folder available in $PATH. So every time the python app is adding the script, that script could be instantly available when the user is opening a terminal (eg. gno... |
How to update $PATH | 3,730,011 | 2 | 3 | 3,792 | 0 | python,scripting,path,bash | .profile would be a reasonable place if it's a per-user install; /etc/profile.d for system-wide installs. (You'll need root to do that, of course.)
Your installer won't be able to change the path of the current shell (unless it's being run via source, which would be...odd.) | 0 | 1 | 0 | 1 | 2010-09-16T19:17:00.000 | 7 | 0.057081 | false | 3,729,965 | 0 | 0 | 0 | 5 | I am writing a python/pygtk application that is adding some custom scripts (bash) in a certain folder in $HOME (eg. ~/.custom_scripts).
I want to make that folder available in $PATH. So every time the python app is adding the script, that script could be instantly available when the user is opening a terminal (eg. gno... |
How to update $PATH | 3,730,014 | 2 | 3 | 3,792 | 0 | python,scripting,path,bash | For scripts that go in the $HOME directory you'd typically use $HOME/bin folder instead which is (usually) on the path. | 0 | 1 | 0 | 1 | 2010-09-16T19:17:00.000 | 7 | 0.057081 | false | 3,729,965 | 0 | 0 | 0 | 5 | I am writing a python/pygtk application that is adding some custom scripts (bash) in a certain folder in $HOME (eg. ~/.custom_scripts).
I want to make that folder available in $PATH. So every time the python app is adding the script, that script could be instantly available when the user is opening a terminal (eg. gno... |
How to update $PATH | 3,730,027 | 1 | 3 | 3,792 | 0 | python,scripting,path,bash | ~/.bashrc is read every time gnome-terminal is opened, (assuming the user has SHELL set to /bin/bash).
Be sure to check os.environ['PATH'] to see if the directory has already been added, so that the script doesn't add it more than once. | 0 | 1 | 0 | 1 | 2010-09-16T19:17:00.000 | 7 | 1.2 | true | 3,729,965 | 0 | 0 | 0 | 5 | I am writing a python/pygtk application that is adding some custom scripts (bash) in a certain folder in $HOME (eg. ~/.custom_scripts).
I want to make that folder available in $PATH. So every time the python app is adding the script, that script could be instantly available when the user is opening a terminal (eg. gno... |
How to update $PATH | 3,730,001 | 1 | 3 | 3,792 | 0 | python,scripting,path,bash | /etc/profile.d would add it to every user's path
~/.bashrc would just be your own
you can always do "$ source ~/.bashrc" to re-read the config files. | 0 | 1 | 0 | 1 | 2010-09-16T19:17:00.000 | 7 | 0.028564 | false | 3,729,965 | 0 | 0 | 0 | 5 | I am writing a python/pygtk application that is adding some custom scripts (bash) in a certain folder in $HOME (eg. ~/.custom_scripts).
I want to make that folder available in $PATH. So every time the python app is adding the script, that script could be instantly available when the user is opening a terminal (eg. gno... |
Python subprocess timeout? | 3,733,359 | 2 | 19 | 37,063 | 0 | python,timeout,pipe,subprocess,popen | Unfortunately, there isn't such a solution. I managed to do this using a threaded timer that would launch along with the process that would kill it after the timeout but I did run into some stale file descriptor issues because of zombie processes or some such. | 0 | 1 | 0 | 0 | 2010-09-17T07:00:00.000 | 10 | 0.039979 | false | 3,733,270 | 1 | 0 | 0 | 1 | Is there any argument or options to setup a timeout for Python's subprocess.Popen method?
Something like this:
subprocess.Popen(['..'], ..., timeout=20) ? |
TCP server: how to avoid message overlapping | 3,733,452 | 0 | 0 | 772 | 0 | python,networking,tcp | You often write clients in the plural form: are there several clients connecting to your server? In this case, each client should be using its own TCP stream, and the issue you are describing should never occur.
If the various commands are send from a single client, then you should write your client code so that it wai... | 0 | 1 | 1 | 0 | 2010-09-17T07:20:00.000 | 3 | 1.2 | true | 3,733,363 | 0 | 0 | 0 | 2 | I am going to write a TCP server, the client sends me XML message, I am wondering if below condition will happen and how to avoid that:
1) client sends <cmd ...></cmd>
2) sever is busy doing something
3) clients sends <cmd ...></cmd>
4) server does a recv() and put the string to buffer
Will the buffer be filled with <c... |
TCP server: how to avoid message overlapping | 3,733,419 | 4 | 0 | 772 | 0 | python,networking,tcp | This is impossible to guarantee at the TCP level, since it only knows about streams.
Depending on the XML parser you're using, you should be able to feed it the stream and have it tell you when it has a complete object, leaving the second <cmd... in its buffer until it is closed also. | 0 | 1 | 1 | 0 | 2010-09-17T07:20:00.000 | 3 | 0.26052 | false | 3,733,363 | 0 | 0 | 0 | 2 | I am going to write a TCP server, the client sends me XML message, I am wondering if below condition will happen and how to avoid that:
1) client sends <cmd ...></cmd>
2) sever is busy doing something
3) clients sends <cmd ...></cmd>
4) server does a recv() and put the string to buffer
Will the buffer be filled with <c... |
How to set Google App Engine cron job using different interval in different period of time? | 3,736,761 | 3 | 0 | 502 | 0 | python,google-app-engine,cron | I would recommend just using every 5 minutes synchronized in the cron.yaml, and then just terminate immediately in the handler if the exact time is not to your liking (hour before 9 or after 20 and minute // 5 is odd, for example). GAE's cron is not very sophisticated, but running a trivial handler which just gets the... | 0 | 1 | 0 | 0 | 2010-09-17T15:01:00.000 | 2 | 0.291313 | false | 3,736,497 | 0 | 0 | 0 | 1 | How to config a cron job to run every 5 minutes between 9:00am~20:00pm,
but every 10 minutes in other time of the day. |
is there a compatible TCL environment variable for cygwin and python idle | 3,739,923 | 0 | 0 | 167 | 0 | python,cygwin,tcl | If you could change the variable, you know already which it is, and to which value it is set. Would you kindly share this information, maybe someone can make an educated guess? | 0 | 1 | 0 | 0 | 2010-09-18T00:05:00.000 | 1 | 0 | false | 3,739,837 | 1 | 0 | 0 | 1 | Idle stopped working after installing cygwin and after some troubleshooting (on windows if its not obvious), it looks like the issue is with a TCL library. They both use an environment variable to locate tcl. when I installed cygwin, it overwrote the variable to a different (and incompatible to python) version. Now I f... |
Total number of live sessions on GAE | 3,740,943 | 1 | 0 | 94 | 0 | python,google-app-engine | Considering the distributed nature of GAE, I don't think you can do this directly.
You can store visits in the database (with timestamp) and query this (use a cookie to check if a user is already counted, avoid writing on each request!).
Alternatively, you can use some external service that uses included javascript or... | 0 | 1 | 0 | 0 | 2010-09-18T08:37:00.000 | 1 | 1.2 | true | 3,740,932 | 0 | 0 | 1 | 1 | Is there a way to count total number of active sessions (e.g. in 10 minutes) on Google App Engine (Python)?
I want to show something on frontpage like, This site currently haz 200 people online |
Read EXE, MSI, and ZIP file metadata in Python in Linux | 3,742,782 | 1 | 7 | 4,161 | 0 | python,windows-installer,metadata,md5 | To answer your second question: no, there is no way to hash a PE file or ZIP file, ignoring the metadata, without locating and reading the metadata. This is because the metadata you're interested in is stored at variable locations in the file.
In the case of PE files (EXE, DLL, etc), it's stored in a resource block, t... | 0 | 1 | 0 | 0 | 2010-09-18T16:55:00.000 | 4 | 0.049958 | false | 3,742,583 | 1 | 0 | 0 | 1 | I am writing a Python script to index a large set of Windows installers into a DB.
I would like top know how to read the metadata information (Company, Product Name, Version, etc) from EXE, MSI and ZIP files using Python running on Linux.
Software
I am using Python 2.6.5 on Ubuntu 10.04 64-bit with Django 1.2.1.
Found ... |
Making Python script accessible system wide | 3,743,825 | 0 | 3 | 3,533 | 0 | python,linux,windows,shell,osx-leopard | All of those operating systems should support a PATH environment variable which specifies directories that have executables that should be available everywhere. Make your script executable by chmod +x and place it into one of those directories (or add a new one to your PATH - I have ~/bin for instance).
I don't know ho... | 0 | 1 | 0 | 0 | 2010-09-18T22:43:00.000 | 2 | 0 | false | 3,743,812 | 0 | 0 | 0 | 1 | Can someone tell me how to make my script callable in any directory?
My script simply returns the number of files in a directory. I would like it to work in any directory by invoking it, instead of first being copied there and then typing python myscript.py
I am using Mac OS X, but is there a common way to get it insta... |
How to write a python program that automatically starts when windows start? | 3,745,929 | 2 | 2 | 2,821 | 0 | python,windows,pyqt4,startup | You can just place a shortcut in the "Startup" folder, in the windows start menu. | 0 | 1 | 0 | 0 | 2010-09-19T13:48:00.000 | 2 | 1.2 | true | 3,745,917 | 1 | 0 | 0 | 1 | I'm writing a program using python 2.6 and pyqt4. I want this program to automatically start whenever windows stars (something like uTorrent client). How do I make this work? I am using windows 7. |
Other solutions/languages that are superior to the TCL-based Expect? | 3,747,275 | 4 | 8 | 1,532 | 0 | python,perl,awk,tcl,expect | ajsie asks, "Which other automation tools are you talking about?"
I'll answer a different question: "which other contexts do I have in mind"? The answer: any interactive environment OTHER than a stdio one. Expect is NOT for automation of GUI points-and-clicks, for example. Expect is also not available for Win* n... | 0 | 1 | 0 | 1 | 2010-09-19T15:11:00.000 | 4 | 0.197375 | false | 3,746,221 | 1 | 0 | 0 | 2 | I am amazed by how Expect (TCL) can automate a lot of things I normally could not do.
I thought I could dig deeper into Expect by reading a book, but before I do that I want to ask if there are other solutions/languages that could do what Expect does?
Eg. I have read that people compare Expect with Awk and also Perl.
C... |
Other solutions/languages that are superior to the TCL-based Expect? | 3,747,203 | 9 | 8 | 1,532 | 0 | python,perl,awk,tcl,expect | There's more to it.
Bluntly, the original Expect--the Tcl Expect--is the best one. It better supports "interact" and various pty eccentricities than any of its successors. It has no superior, for what it does.
HOWEVER, at the same time, most Expect users exploit such a small fraction of Expect's capabilities that thi... | 0 | 1 | 0 | 1 | 2010-09-19T15:11:00.000 | 4 | 1.2 | true | 3,746,221 | 1 | 0 | 0 | 2 | I am amazed by how Expect (TCL) can automate a lot of things I normally could not do.
I thought I could dig deeper into Expect by reading a book, but before I do that I want to ask if there are other solutions/languages that could do what Expect does?
Eg. I have read that people compare Expect with Awk and also Perl.
C... |
Getting BadValueError on Google App Engine Datastore Delete | 3,747,783 | 3 | 3 | 481 | 0 | python,google-app-engine | Try updating your model so that the Districts field is not required (i.e., pass required=False as a keyword parameter to the Districts field). Then the validator shouldn't complain about the existing entities and you should be able to delete the entities.
Alternatively, if you know the keys for the entities you want t... | 0 | 1 | 0 | 0 | 2010-09-19T22:36:00.000 | 2 | 1.2 | true | 3,747,772 | 0 | 0 | 1 | 2 | I am trying to delete records in the datastore. Unfortunately, whenever I try to delete the items, it gives me a BadValueError, saying Districts (one of the columns) is required. Because of an issue with the bulk loader, Districts is null for all of the rows...but I still need to clean out the datastore to try to fix... |
Getting BadValueError on Google App Engine Datastore Delete | 3,747,781 | 0 | 3 | 481 | 0 | python,google-app-engine | Change your entities/models so that Districts is no longer a required property? | 0 | 1 | 0 | 0 | 2010-09-19T22:36:00.000 | 2 | 0 | false | 3,747,772 | 0 | 0 | 1 | 2 | I am trying to delete records in the datastore. Unfortunately, whenever I try to delete the items, it gives me a BadValueError, saying Districts (one of the columns) is required. Because of an issue with the bulk loader, Districts is null for all of the rows...but I still need to clean out the datastore to try to fix... |
Retrieve header information from exe | 3,749,339 | 0 | 2 | 3,428 | 0 | python,header,exe | Of course it is possible to write a Python script to retrieve header information from an XYZ file. Three simple steps:
(1) Find docs for the header part of an XYZ file; read them.
(2) Read the docs for the Python struct module or ctypes module or both.
(3) Write and test the script.
Which step are you having trouble wi... | 0 | 1 | 0 | 0 | 2010-09-20T07:04:00.000 | 3 | 0 | false | 3,749,270 | 0 | 0 | 0 | 1 | I was wondering whether it would be possible to write a python script that retrieves header information from an .exe file. I tried googling but didn't really find any results that were usable.
Thanks.
Sept |
How to copy directory permissions | 3,754,917 | 1 | 1 | 1,862 | 0 | python,permissions | Try cp -a from_dir to_dir. It will maintain the permissions from the first directory. | 0 | 1 | 0 | 1 | 2010-09-20T19:33:00.000 | 3 | 0.066568 | false | 3,754,848 | 0 | 0 | 0 | 1 | I'm curious how to copy the permission from directory to another.
Any idea?
Thanks |
is it possible to have keyname and an id for an entity in Appengine? | 3,759,934 | 2 | 0 | 68 | 0 | python,google-app-engine | No. An entity's Key is composed of the application ID, the Kind, the path of the parent entity (if any) and either a key name or an auto-generated ID. It's not possible to have both. The entire Key is the "primary key". | 0 | 1 | 0 | 0 | 2010-09-21T09:39:00.000 | 1 | 1.2 | true | 3,759,021 | 0 | 0 | 1 | 1 | I'm building a facebook app, and my users table's keyName is set to the Uid of the facebook user. I found this to be efficient because I can use db.Key.from_path() to efficiently query the datastore for a particular user instead of doing a query (where uid = x, limit = 1). This is actually my first time using key names... |
Running python on a Windows machine vs Linux | 3,765,219 | 15 | 17 | 63,443 | 0 | python,windows | Don't tell anybody this, but I've run python/django on windows. It works all right and the performance hit isn't any worse than you would expect from windows. I used MySQL and it installed without a problem. I had to grope around to find out how to manage it (no good ol' sudo /etc/init.d/mysql restart but i eventually ... | 0 | 1 | 0 | 0 | 2010-09-21T23:17:00.000 | 6 | 1.2 | true | 3,765,178 | 1 | 0 | 0 | 6 | I am interested in learning python but my Linux skills suck. I would like to develop a medium to large scale web application using python and django but afraid the software may not work well on a windows box. Is there a performance difference in running python on Linux vs Windows? Is there anything that I should watch ... |
Running python on a Windows machine vs Linux | 3,765,246 | 1 | 17 | 63,443 | 0 | python,windows | Which software are you affraid will not work on windows, the actual web app or your development enviroment. If you mean the IDE, then I wouldn't worry about that there are very good python IDEs for windows, as for the webapp that's another discussion all together
The statement that "it is very easy integrating C++ libs... | 0 | 1 | 0 | 0 | 2010-09-21T23:17:00.000 | 6 | 0.033321 | false | 3,765,178 | 1 | 0 | 0 | 6 | I am interested in learning python but my Linux skills suck. I would like to develop a medium to large scale web application using python and django but afraid the software may not work well on a windows box. Is there a performance difference in running python on Linux vs Windows? Is there anything that I should watch ... |
Running python on a Windows machine vs Linux | 3,765,233 | 1 | 17 | 63,443 | 0 | python,windows | Shouldn't be a problem. Some people even host Python+Django on Windows. | 0 | 1 | 0 | 0 | 2010-09-21T23:17:00.000 | 6 | 0.033321 | false | 3,765,178 | 1 | 0 | 0 | 6 | I am interested in learning python but my Linux skills suck. I would like to develop a medium to large scale web application using python and django but afraid the software may not work well on a windows box. Is there a performance difference in running python on Linux vs Windows? Is there anything that I should watch ... |
Running python on a Windows machine vs Linux | 3,765,227 | 1 | 17 | 63,443 | 0 | python,windows | Python program is very easily portable. Most of the time your code will work on any platform that have the appropriate version of python.
One point to be aware of though, is file path handling. Linux, Windows, Macs, etc uses different path schemes, so you shouldn't be handling them as strings; instead use os.path funct... | 0 | 1 | 0 | 0 | 2010-09-21T23:17:00.000 | 6 | 0.033321 | false | 3,765,178 | 1 | 0 | 0 | 6 | I am interested in learning python but my Linux skills suck. I would like to develop a medium to large scale web application using python and django but afraid the software may not work well on a windows box. Is there a performance difference in running python on Linux vs Windows? Is there anything that I should watch ... |
Running python on a Windows machine vs Linux | 3,765,244 | 9 | 17 | 63,443 | 0 | python,windows | I've been working Py on both Windows and Linux. I favor Linux because of several things:
virtualenvs - once you start working with virtualenvs, there is no turning back.
SHELL - CMD is very frustrating when executing python/management commands in django. Also, you should add python.exe every time :).
ipython works bet... | 0 | 1 | 0 | 0 | 2010-09-21T23:17:00.000 | 6 | 1 | false | 3,765,178 | 1 | 0 | 0 | 6 | I am interested in learning python but my Linux skills suck. I would like to develop a medium to large scale web application using python and django but afraid the software may not work well on a windows box. Is there a performance difference in running python on Linux vs Windows? Is there anything that I should watch ... |
Running python on a Windows machine vs Linux | 3,765,742 | 14 | 17 | 63,443 | 0 | python,windows | but afraid the software may not work well on a windows box.
Your software will work. The Windows OS may not work as you hope. But that's Windows, not Python.
We develop 100% on Windows. We completely test: Unit test, integration test and user acceptance test on Windows. 100%.
We deploy for production 0% on Windo... | 0 | 1 | 0 | 0 | 2010-09-21T23:17:00.000 | 6 | 1 | false | 3,765,178 | 1 | 0 | 0 | 6 | I am interested in learning python but my Linux skills suck. I would like to develop a medium to large scale web application using python and django but afraid the software may not work well on a windows box. Is there a performance difference in running python on Linux vs Windows? Is there anything that I should watch ... |
How to serve data from UDP stream over HTTP in Python? | 3,768,227 | 4 | 6 | 4,771 | 0 | python,wsgi | The software uses UDP to send sequential updates to a given set of variables in (near) real-time (updates every 5-10 ms). thus, I do not need to capture all UDP data -- it is sufficient that the latest update is retrieved
What you must do is this.
Step 1.
Build a Python app that collects the UDP data and caches it int... | 0 | 1 | 1 | 0 | 2010-09-22T09:44:00.000 | 3 | 1.2 | true | 3,768,019 | 0 | 0 | 0 | 1 | I am currently working on exposing data from legacy system over the web. I have a (legacy) server application that sends and receives data over UDP. The software uses UDP to send sequential updates to a given set of variables in (near) real-time (updates every 5-10 ms). thus, I do not need to capture all UDP data -- it... |
How to use at command to set python script execute at specified time | 3,774,794 | 2 | 2 | 2,030 | 0 | python,cron,package,execute,at-job | type man at, it will explain how to use it. Usage will slighty differ from system to system, so there's no use to tell you here exactly. | 0 | 1 | 0 | 1 | 2010-09-23T01:21:00.000 | 4 | 0.099668 | false | 3,774,772 | 0 | 0 | 0 | 1 | When I try to use cron to execute my python script in a future time, I found there is a command at, AFAIK, the cron is for periodically execute, but what my scenario is only execute for once in specified time.
and my question is how to add python script to at command,
also it there some python package for control the a... |
Determining a file's path name from different working directories in python | 3,780,153 | 0 | 0 | 165 | 0 | python,file,relative-path | Put it in a well known directory (/usr/lib/yourproject/ or ~/lib or something similar), or have it in a well known relative path based on the location of your source files that are using it. | 0 | 1 | 0 | 0 | 2010-09-23T15:47:00.000 | 4 | 0 | false | 3,780,094 | 1 | 0 | 0 | 2 | I have a python module that is shared among several of my projects (the projects each have a different working directory). One of the functions in this shared module, executes a script using os.spawn. The problem is, I'm not sure what pathname to give to os.spawn since I don't know what the current working directory ... |
Determining a file's path name from different working directories in python | 3,780,160 | 1 | 0 | 165 | 0 | python,file,relative-path | So I just learned about the __file__ variable, which will provide a solution to my problem. I can use file to get a pathname which will be constant among all projects, and use that to reference the script I need to call, since the script will always be in the same location relative to __file__. However, I'm open to oth... | 0 | 1 | 0 | 0 | 2010-09-23T15:47:00.000 | 4 | 1.2 | true | 3,780,094 | 1 | 0 | 0 | 2 | I have a python module that is shared among several of my projects (the projects each have a different working directory). One of the functions in this shared module, executes a script using os.spawn. The problem is, I'm not sure what pathname to give to os.spawn since I don't know what the current working directory ... |
shell script remote execution using python | 3,786,764 | 0 | 6 | 11,566 | 0 | python,unix,shell | If you don't want to use paramiko, then try telnetlib. You can use it to execute remote commands. | 0 | 1 | 0 | 0 | 2010-09-23T17:41:00.000 | 7 | 0 | false | 3,781,087 | 0 | 0 | 0 | 2 | Is there a way that I can use Python on Windows to execute shell scripts which are located on a remote Unix machine?
P.S: Sorry about the late edit. I do know of Paramiko, but I wanted to know if there is way of doing it without it. For starters, could it be done with subprocess()? |
shell script remote execution using python | 3,781,130 | 0 | 6 | 11,566 | 0 | python,unix,shell | You will either need to run some sort of server on the remote machine, or ssh in and do it yourself. It would not be difficult to use one of the many pre-written Python servers to listen for a client and kick off a shell script.
Authentication may or may not be a problem for you; be aware that anyone else can follow th... | 0 | 1 | 0 | 0 | 2010-09-23T17:41:00.000 | 7 | 0 | false | 3,781,087 | 0 | 0 | 0 | 2 | Is there a way that I can use Python on Windows to execute shell scripts which are located on a remote Unix machine?
P.S: Sorry about the late edit. I do know of Paramiko, but I wanted to know if there is way of doing it without it. For starters, could it be done with subprocess()? |
pywin32 captive installation (avoid py*.dll getting installed in system32 directory) | 3,782,055 | 0 | 2 | 573 | 0 | python,pywin32,python-embedding | I previously used py2exe to freeze the application and all the DLLs. Then use Innosetup to create an installer. Work like a charm. | 0 | 1 | 0 | 0 | 2010-09-23T19:33:00.000 | 1 | 0 | false | 3,781,873 | 1 | 0 | 0 | 1 | I have python as an embedded scripting environment in my application. I supply the python bits (python26.dll, DLLs & Lib folders) with my application. All this to avoid asking users to install python (you know how it goes in big corporations).
All works nice except pywin32. It installs pythoncom26.dll and pywintypes26.... |
Problems with Vim's Pydiction and Python in Ubuntu 10.4 | 44,201,882 | 0 | 1 | 2,092 | 0 | python,vim,autocomplete | That's the way my same problem i solve:
before i get this problem - i was set the path only to directory and that's was wrong
After i set the path Including the filename it starts work! | 0 | 1 | 0 | 0 | 2010-09-23T21:19:00.000 | 3 | 0 | false | 3,782,613 | 0 | 0 | 0 | 3 | So I installed pydiction into vim for autocompleting my python code in windows. No problemo. Worked like a charm.
Tried the same thing with my Ubuntu setup, creating the .vim/after/ftplugin directory in my home folder and updating the vimrc with the correct path of the pydiction dictionary but I fail every time. Why i... |
Problems with Vim's Pydiction and Python in Ubuntu 10.4 | 3,788,533 | 0 | 1 | 2,092 | 0 | python,vim,autocomplete | Sounds like it's having a problem with your complete-dict file. I'm using Ubuntu 10.04 and it works fine for me. Make sure your complete-dict file actually has content in it, in this case make sure it has the word 'raw' in it. | 0 | 1 | 0 | 0 | 2010-09-23T21:19:00.000 | 3 | 0 | false | 3,782,613 | 0 | 0 | 0 | 3 | So I installed pydiction into vim for autocompleting my python code in windows. No problemo. Worked like a charm.
Tried the same thing with my Ubuntu setup, creating the .vim/after/ftplugin directory in my home folder and updating the vimrc with the correct path of the pydiction dictionary but I fail every time. Why i... |
Problems with Vim's Pydiction and Python in Ubuntu 10.4 | 3,793,008 | 1 | 1 | 2,092 | 0 | python,vim,autocomplete | Problem has been solved, apparently gvim did not like the fact that i put the files in a ".vim" directory even though that was exactly what the instructions told me to do. I put them in my home folder pydiction.vim and complete-dictionary and now it works ok, with no issues.
Now autocomplete works with any word I tried... | 0 | 1 | 0 | 0 | 2010-09-23T21:19:00.000 | 3 | 0.066568 | false | 3,782,613 | 0 | 0 | 0 | 3 | So I installed pydiction into vim for autocompleting my python code in windows. No problemo. Worked like a charm.
Tried the same thing with my Ubuntu setup, creating the .vim/after/ftplugin directory in my home folder and updating the vimrc with the correct path of the pydiction dictionary but I fail every time. Why i... |
Output a python script to text file | 3,791,920 | 0 | 2 | 33,610 | 0 | python | That seems to work fine for me in the DOS shell. | 0 | 1 | 0 | 0 | 2010-09-25T00:27:00.000 | 4 | 0 | false | 3,791,905 | 1 | 0 | 0 | 1 | I'm using a script that someone else wrote in python. It's executed from the command line with 3 arguments.
example: "python script.py 1111 2222 3333"
It does it's thing and works perfectly. The results are NOT saved though, and I would really like to pipe the output to a text file. Can I simply use similar dos comm... |
How do you stream data into the STDIN of a program from different local/remote processes in Python? | 3,792,108 | 1 | 2 | 1,779 | 0 | python,process,ipc,stdout,stdin | In most platforms (i.e., operating systems), an existing process's existing file descriptors are inviolate -- the operating system, striving to guarantee process integrity, will be designed to not allow a separate, unrelated process to alter those file descriptors.
Nevertheless, if you do specify a very specific and we... | 0 | 1 | 0 | 0 | 2010-09-25T01:26:00.000 | 2 | 0.099668 | false | 3,792,054 | 1 | 0 | 0 | 1 | Standard streams are associated with a program. So, suppose there
is a program already running in some way (I don't care how or in
what way). The goal is to create pipes to the STDIN of the
program from different processes (or programs) that run either
locally or remotely and stream data into it asynchronously.
Availab... |
New to google app engine ! what to do next? | 3,805,886 | 1 | 1 | 120 | 0 | python,google-app-engine | Typically when I end up doing something more than a trivial demo I need a reason. Figure out something you want to make and stumble through it, learning as you go until it's working.
I'd use the google app engine community as a place to get questions answered, they're pretty good for that.
As a first app, I'd just hav... | 0 | 1 | 0 | 0 | 2010-09-27T16:28:00.000 | 2 | 0.099668 | false | 3,805,802 | 0 | 0 | 1 | 1 | I want to develop some web apps using Google app engine. I had deployed a guest book application which was their in "gooleappengine" folder by changing its ID.and also was successful.This is simple one.But not getting how to develop complex web apps. Can anyone please suggest me any good Tutarial or example codes Or an... |
AMQP implementations with Celery | 4,311,856 | 0 | 0 | 289 | 0 | python,amqp,celery | After reading some docs and trying out a few options, I have found that RabbitMQ suffices for most purposes. | 0 | 1 | 0 | 0 | 2010-09-28T03:16:00.000 | 1 | 1.2 | true | 3,809,440 | 0 | 0 | 1 | 1 | I wanted to get your opinions on the merits of different AMQP implementations to be used with celery. I am looking particularly at message prioritization and job queue sizes.
What are your thoughts? |
Getting admin password while copy file using shutil.copy? | 3,811,219 | 1 | 6 | 7,772 | 0 | python,file-permissions | Start your program with a user that is allowed to write there. For example login to root first (su) or run the script with sudo myscript.py. | 0 | 1 | 0 | 1 | 2010-09-28T09:04:00.000 | 4 | 0.049958 | false | 3,811,197 | 0 | 0 | 0 | 1 | I m using shutil.copy from python to copy a list of files. But when i copy the files to /usr/lib/ location, i m getting permission denied as i need to be an administrator to do that.
So How could i copy files with admin permission or
how could i get the admin password from the user to copy the files?
Ideas would be ap... |
Trigger an event when system locks/unlocks on Windows XP | 49,125,177 | 0 | 1 | 3,146 | 0 | windows,scripting,time,tracking,python-idle | Do check that CanHandleSessionChange property is True or not ?
This will be checked from the designer view -> Property
Then use OnSessionChange function | 0 | 1 | 0 | 0 | 2010-09-28T11:58:00.000 | 3 | 0 | false | 3,812,417 | 0 | 0 | 0 | 1 | Please help me to find a way to track lock/unlock time on my WinXP machine. I've tried windows scheduler - it only logs logins, not locks. Any alternatives?
In Miranda's source code I saw implementation via IdleObject tracker, but this way is too long. May be an AutoIt script? Time tracking program (freeware)? |
Python App Engine: Task Queues | 3,823,052 | 2 | 1 | 284 | 0 | python,google-app-engine | I've solved this in the past by keeping the status for the tasks in memcached, and polling (via Ajax) to determine when the tasks are finished.
If you go this way, it's best if you can always "manually" determine the status of the tasks without looking in memcached, since there's always the (slim) chance that memcach... | 0 | 1 | 0 | 0 | 2010-09-29T12:41:00.000 | 1 | 1.2 | true | 3,821,636 | 0 | 0 | 1 | 1 | I need to import some data to show it for user but page execution time exceeds 30 second limit. So I decided to split my big code into several tasks and try Task Queues. I add about 10-20 tasks to queue and app engine executes tasks in parallel while user is waiting for data. How can I determine that my tasks are compl... |
Running Python command-line utility from Java | 3,824,363 | 0 | 3 | 2,293 | 0 | java,python,scripting | Have you considered jython? You can:
1) use it to run python scripts (allowing it to call Java classes)
2) compile python into class files, making them usable by normal Java code without jython being present at runtime
I've only used it in the first pattern, but I've seen tonnes of docs on the second. | 0 | 1 | 0 | 0 | 2010-09-29T17:26:00.000 | 3 | 0 | false | 3,824,249 | 0 | 0 | 1 | 1 | I developed a command-line utility which needs to be called from a Java GUI application. The team in charge on the Java GUI would like to bind my command-line application to a button in the GUI; the Python application is such that at the time we have no time or interest in rewriting it in Java.
I have no experience wha... |
ensuring dynamic image urls in a web-app: use a blob store? | 3,831,317 | 1 | 0 | 291 | 0 | python,sqlite,web-applications,nginx,blob | Why so complicated?
Serve the image under the name which the user supplied (i.e. http://www.mywebapp.com/images/foo1.jpg)
Save the images in a directory using a UUID as name.
Create a map of file names to UUIDs in the session.
In the handler for /images/ look up the real file name in the map. Return 404 if no such ent... | 0 | 1 | 0 | 0 | 2010-09-30T11:59:00.000 | 3 | 1.2 | true | 3,830,294 | 0 | 0 | 1 | 2 | I want to serve images in a web-app using sessions such that the links to the images expire once the session has expired.
If I show the actual links to the filesystem store of the images, say http://www.mywebapp.com/images/foo1.jpg this clearly makes stopping future requests for the image (one the user has signed out o... |
ensuring dynamic image urls in a web-app: use a blob store? | 3,830,345 | -1 | 0 | 291 | 0 | python,sqlite,web-applications,nginx,blob | A combination of your two ideas (copy to a dir, expire when session expires) could be generalized to creating a new dir (could be as simple as a symlink) every 15 minutes. When generating the new symlink, also remove the one that's an hour old by now. Always link to the newest name in your code. | 0 | 1 | 0 | 0 | 2010-09-30T11:59:00.000 | 3 | -0.066568 | false | 3,830,294 | 0 | 0 | 1 | 2 | I want to serve images in a web-app using sessions such that the links to the images expire once the session has expired.
If I show the actual links to the filesystem store of the images, say http://www.mywebapp.com/images/foo1.jpg this clearly makes stopping future requests for the image (one the user has signed out o... |
Creating an autostart application on Ubuntu Linux | 3,839,956 | 1 | 0 | 1,095 | 0 | python,ubuntu-10.04,autostart,wakeup | If you want to guarantee it's always running, have a look at man inittab. | 0 | 1 | 0 | 0 | 2010-10-01T13:02:00.000 | 3 | 0.066568 | false | 3,839,383 | 0 | 0 | 0 | 2 | I'm trying to setup a Python application that should automatically start when Linux boots. It should also start (unless not already running) if the computer resumes from standby mode - which is mainly the problem.
Does anybody know where to integrate these requirements?
Thanks,
Marius |
Creating an autostart application on Ubuntu Linux | 3,839,444 | 0 | 0 | 1,095 | 0 | python,ubuntu-10.04,autostart,wakeup | Configure a cron job every minute to detect if application running - if not start. | 0 | 1 | 0 | 0 | 2010-10-01T13:02:00.000 | 3 | 1.2 | true | 3,839,383 | 0 | 0 | 0 | 2 | I'm trying to setup a Python application that should automatically start when Linux boots. It should also start (unless not already running) if the computer resumes from standby mode - which is mainly the problem.
Does anybody know where to integrate these requirements?
Thanks,
Marius |
Learning Twisted | 3,846,924 | 2 | 19 | 5,772 | 0 | python,twisted | Look at the samples that come with twisted's documentation. Also, the documentation is not bad, but it is not very complete. Also, the API docs are quite good in fact.
When you know with which part you start, just try and play with the code until you're stuck, then google samples relating to your code and ask on stack... | 0 | 1 | 0 | 0 | 2010-10-02T17:50:00.000 | 4 | 0.099668 | false | 3,846,875 | 1 | 0 | 0 | 2 | How do I begin learning Twisted? What books, documentation or tutorial do you guys recommend?
The reason I asked this question is that I think learning Twisted would help me otherwise also in learning concepts related to network programming (terminologies and how it works and stuff) I have heard that the documentation ... |
Learning Twisted | 3,846,959 | 3 | 19 | 5,772 | 0 | python,twisted | The way i learned twisted was by starting a small project and lots of googling around; the twisted tutorials are sometimes not very clear, its just getting used to the framework and the way it works...
EDIT:
itd also recommend trying to understand what twisted is based on, the whole idea of twisted is to provide event ... | 0 | 1 | 0 | 0 | 2010-10-02T17:50:00.000 | 4 | 0.148885 | false | 3,846,875 | 1 | 0 | 0 | 2 | How do I begin learning Twisted? What books, documentation or tutorial do you guys recommend?
The reason I asked this question is that I think learning Twisted would help me otherwise also in learning concepts related to network programming (terminologies and how it works and stuff) I have heard that the documentation ... |
Google App Engine or Django? | 13,424,917 | 0 | 13 | 5,657 | 0 | python,django,google-app-engine | If you plan to use Django on app engine, then chances are you will want to use Djangos ORM. Which means.. you will probably be looking at Django non-rel. However there are a few things to consider:
Django non-rel runs a few versions behind the latest django release, so some modern features (such as advanced timezone s... | 0 | 1 | 0 | 0 | 2010-10-02T19:29:00.000 | 4 | 0 | false | 3,847,202 | 0 | 0 | 1 | 2 | I've been learning Python and now I'd like to learn a Python-based web framework. I'm considering Google App Engine and Django. Which one should I choose? What are their unique features and learning curves? |
Google App Engine or Django? | 14,967,904 | 1 | 13 | 5,657 | 0 | python,django,google-app-engine | I believe that Django is better because it gives more flexibility with features and also with hosts. Djangobook.com has a very good tutorial. | 0 | 1 | 0 | 0 | 2010-10-02T19:29:00.000 | 4 | 0.049958 | false | 3,847,202 | 0 | 0 | 1 | 2 | I've been learning Python and now I'd like to learn a Python-based web framework. I'm considering Google App Engine and Django. Which one should I choose? What are their unique features and learning curves? |
Deciding on RESTful Architecture for my Python code API | 3,881,996 | 0 | 1 | 643 | 0 | java,python,rest | Hmm, if you're into Python and open to a Java element, you might want to consider using the Java framework Restlet with Python code running in Jython. I'm a big fan of Restlet; its API embodies RESTful principles, so it encourages one to structure one's code and thinking according to those principles. It's also just a ... | 0 | 1 | 0 | 0 | 2010-10-02T22:41:00.000 | 1 | 0 | false | 3,847,803 | 0 | 0 | 1 | 1 | I would like to build something like this
Datastore | mycode.py | RESTful API | mywebapp.py(Django or Tornado)
I checked Piston for Django but it seems that this way I am going to be tied to Django, I would rather have a RESTful API for mycode.py that is consumable by more than one REST client and also can consume it f... |
Retrieving YAML parameters during runtime in App Engine (Python) | 3,849,039 | 5 | 3 | 1,038 | 0 | python,google-app-engine,runtime,yaml | No, but some of the data is available from os.environ - for example, os.environ['APPLICATION_ID'], and os.environ['CURRENT_VERSION_ID']. | 0 | 1 | 0 | 0 | 2010-10-03T05:05:00.000 | 3 | 1.2 | true | 3,848,671 | 0 | 0 | 1 | 1 | Is it possible to programmatically retrieve any of the YAML parameters during run-time? Are they stored in the environment somewhere?
Good example would be to automatically find the application version and to add it as a comment in the landing HTML page. |
Run a python script and a compiled c code without terminal or dock item in Mac OS X | 3,853,095 | 0 | 2 | 1,064 | 0 | python,macos,command-line | have you tried using the nohup? lets say you have a launch script to start your program:
launch.sh:
nohup your_program &
exit | 0 | 1 | 0 | 0 | 2010-10-04T05:22:00.000 | 2 | 0 | false | 3,853,038 | 0 | 0 | 0 | 1 | For great help from stackoverflow, the development for the Mac version of my program is done.
Now I need to deploy my program, and I was wondering if there is any way to "hide" my running Python code (it also runs .so library and it seems it makes a dock item to appear).
The program is supposed to be running in the ba... |
checking when all data is sent using non-blocking open | 3,859,933 | 4 | 0 | 809 | 0 | python,c,linux,io,blocking | You have a misunderstanding of what non-blocking means. It does not imply asynchronous operation - you can have any combination of asynchronous/synchronous and blocking/non-blocking.
A write() just hands data off to the kernel to take care of. When write() returns successfully, the kernel has now taken care of the da... | 0 | 1 | 0 | 0 | 2010-10-04T18:56:00.000 | 6 | 1.2 | true | 3,858,238 | 0 | 0 | 0 | 6 | If I open a a file as os.open( '/dev/ttyS2', O_RDWR | O_NDELAY ), is there any way that I can check when my 'write()' commands have finished? Or, can I open a file for non-blocking read but blocking write? |
checking when all data is sent using non-blocking open | 3,859,349 | 3 | 0 | 809 | 0 | python,c,linux,io,blocking | If you are writing to a tty (as you are in your example), you can use termios.tcdrain to wait until all written bytes have been transmitted.
Your write systems calls will still be non-blocking, so you will need to handle EWOULDBLOCK/EAGAIN errors, and use select(2), poll(2) or epoll(7) to know when you can write to the... | 0 | 1 | 0 | 0 | 2010-10-04T18:56:00.000 | 6 | 0.099668 | false | 3,858,238 | 0 | 0 | 0 | 6 | If I open a a file as os.open( '/dev/ttyS2', O_RDWR | O_NDELAY ), is there any way that I can check when my 'write()' commands have finished? Or, can I open a file for non-blocking read but blocking write? |
checking when all data is sent using non-blocking open | 3,858,262 | 0 | 0 | 809 | 0 | python,c,linux,io,blocking | Open two file descriptors to the same location - one for non-blocking reads and the other for blocking writes. | 0 | 1 | 0 | 0 | 2010-10-04T18:56:00.000 | 6 | 0 | false | 3,858,238 | 0 | 0 | 0 | 6 | If I open a a file as os.open( '/dev/ttyS2', O_RDWR | O_NDELAY ), is there any way that I can check when my 'write()' commands have finished? Or, can I open a file for non-blocking read but blocking write? |
checking when all data is sent using non-blocking open | 3,858,291 | 0 | 0 | 809 | 0 | python,c,linux,io,blocking | Have you tried os.fsync(fd)? | 0 | 1 | 0 | 0 | 2010-10-04T18:56:00.000 | 6 | 0 | false | 3,858,238 | 0 | 0 | 0 | 6 | If I open a a file as os.open( '/dev/ttyS2', O_RDWR | O_NDELAY ), is there any way that I can check when my 'write()' commands have finished? Or, can I open a file for non-blocking read but blocking write? |
checking when all data is sent using non-blocking open | 3,858,316 | 1 | 0 | 809 | 0 | python,c,linux,io,blocking | The O_NDELAY flag always affects both reading and writing. To achieve a blocking write on a non-blocking file you can select (Python module) the file and write when it becomes writable in a loop. | 0 | 1 | 0 | 0 | 2010-10-04T18:56:00.000 | 6 | 0.033321 | false | 3,858,238 | 0 | 0 | 0 | 6 | If I open a a file as os.open( '/dev/ttyS2', O_RDWR | O_NDELAY ), is there any way that I can check when my 'write()' commands have finished? Or, can I open a file for non-blocking read but blocking write? |
checking when all data is sent using non-blocking open | 3,858,252 | 0 | 0 | 809 | 0 | python,c,linux,io,blocking | OS API write() returns count of written bytes. Checking this value against size of your input you can see when all input is sent. | 0 | 1 | 0 | 0 | 2010-10-04T18:56:00.000 | 6 | 0 | false | 3,858,238 | 0 | 0 | 0 | 6 | If I open a a file as os.open( '/dev/ttyS2', O_RDWR | O_NDELAY ), is there any way that I can check when my 'write()' commands have finished? Or, can I open a file for non-blocking read but blocking write? |
send commands to a backgrounded jobs stdin | 3,862,362 | 0 | 0 | 157 | 0 | php,python | You could connect its stdin to a FIFO and then have another daemon also connect to the FIFO and send commands. It might be better to have the control daemon start the Java daemon though, so that the Java daemon doesn't shut down if the control daemon does for some reason. | 0 | 1 | 0 | 0 | 2010-10-05T09:20:00.000 | 3 | 0 | false | 3,862,332 | 0 | 0 | 1 | 1 | I have a java server application that, when its running, you can interact with it sending commands via stdin. I want to write a web interface that can send these commands to it.
In order to do that I need some way of getting commands from php to the stdin for this backgrounded job. Is there a way to do this from conso... |
Agnostic automated deployment | 3,864,388 | 1 | 3 | 520 | 0 | java,python,ruby,deployment | We use Ant or Maven for different projects we have in house (depending on the need and how old the project is too...). We tend to use Jenkins (formerly known as Hudson) as our build and deployment tool.
And then we encourage developers to write code that does not hard code to DB's, URL's, etc. We try to abstract via th... | 0 | 1 | 0 | 0 | 2010-10-05T13:47:00.000 | 8 | 0.024995 | false | 3,864,223 | 0 | 0 | 1 | 8 | What do you use to automatically deploy applications for various kinds of server applications (web, socket, daemon) that uses various technologies (different DBs, languages, etc)?
Here we use Python, Java and Ruby, and may use other languages as well in the future.
Update: I ended up using Puppet to manage all server ... |
Agnostic automated deployment | 3,864,349 | 1 | 3 | 520 | 0 | java,python,ruby,deployment | you can use maven, ant, ivy along with hudson for java projects. | 0 | 1 | 0 | 0 | 2010-10-05T13:47:00.000 | 8 | 0.024995 | false | 3,864,223 | 0 | 0 | 1 | 8 | What do you use to automatically deploy applications for various kinds of server applications (web, socket, daemon) that uses various technologies (different DBs, languages, etc)?
Here we use Python, Java and Ruby, and may use other languages as well in the future.
Update: I ended up using Puppet to manage all server ... |
Agnostic automated deployment | 3,864,310 | 1 | 3 | 520 | 0 | java,python,ruby,deployment | I think the best choice you could do is using maven. Even if maven is mostly used for Java projects, you can with the right plugins (or the one you write) deploy anything anywhere. | 0 | 1 | 0 | 0 | 2010-10-05T13:47:00.000 | 8 | 0.024995 | false | 3,864,223 | 0 | 0 | 1 | 8 | What do you use to automatically deploy applications for various kinds of server applications (web, socket, daemon) that uses various technologies (different DBs, languages, etc)?
Here we use Python, Java and Ruby, and may use other languages as well in the future.
Update: I ended up using Puppet to manage all server ... |
Agnostic automated deployment | 3,864,298 | 1 | 3 | 520 | 0 | java,python,ruby,deployment | For Python you could use Fabric or Paver
For Ruby, there's capistrano and 'vlad the deployer'
For Java, it's the Ant.
For PHP/Python projects I also use Peritor Webistrano, a neat frontend for capistrano. It involves changing a few of the default recipes to remove the rails-specific stuff, but it's worth it once you ge... | 0 | 1 | 0 | 0 | 2010-10-05T13:47:00.000 | 8 | 0.024995 | false | 3,864,223 | 0 | 0 | 1 | 8 | What do you use to automatically deploy applications for various kinds of server applications (web, socket, daemon) that uses various technologies (different DBs, languages, etc)?
Here we use Python, Java and Ruby, and may use other languages as well in the future.
Update: I ended up using Puppet to manage all server ... |
Agnostic automated deployment | 3,864,289 | 3 | 3 | 520 | 0 | java,python,ruby,deployment | I use Puppet for some of the deployements / initial configuration of server. Maven and Ant for Java based projects. | 0 | 1 | 0 | 0 | 2010-10-05T13:47:00.000 | 8 | 1.2 | true | 3,864,223 | 0 | 0 | 1 | 8 | What do you use to automatically deploy applications for various kinds of server applications (web, socket, daemon) that uses various technologies (different DBs, languages, etc)?
Here we use Python, Java and Ruby, and may use other languages as well in the future.
Update: I ended up using Puppet to manage all server ... |
Agnostic automated deployment | 6,336,041 | 2 | 3 | 520 | 0 | java,python,ruby,deployment | Go for KWateeSDCM. It comes with a straightforward web GUI and does not require obscure scripting and integrates nicely with your build chain via a REST API. | 0 | 1 | 0 | 0 | 2010-10-05T13:47:00.000 | 8 | 0.049958 | false | 3,864,223 | 0 | 0 | 1 | 8 | What do you use to automatically deploy applications for various kinds of server applications (web, socket, daemon) that uses various technologies (different DBs, languages, etc)?
Here we use Python, Java and Ruby, and may use other languages as well in the future.
Update: I ended up using Puppet to manage all server ... |
Agnostic automated deployment | 3,864,283 | 1 | 3 | 520 | 0 | java,python,ruby,deployment | We use Maven and pull out to the ant-plugin when required. In turn the ant-plugin very occasionally calls out to some native scripting language/application/packager/whatever but we're finding that over time we can generally find a Maven or ANT plugin/task to do the trick.
You might want to look up Continuous Deploymen... | 0 | 1 | 0 | 0 | 2010-10-05T13:47:00.000 | 8 | 0.024995 | false | 3,864,223 | 0 | 0 | 1 | 8 | What do you use to automatically deploy applications for various kinds of server applications (web, socket, daemon) that uses various technologies (different DBs, languages, etc)?
Here we use Python, Java and Ruby, and may use other languages as well in the future.
Update: I ended up using Puppet to manage all server ... |
Agnostic automated deployment | 3,864,269 | 2 | 3 | 520 | 0 | java,python,ruby,deployment | You could use Ant, Makefile, or a batch script. Or a combination of them. | 0 | 1 | 0 | 0 | 2010-10-05T13:47:00.000 | 8 | 0.049958 | false | 3,864,223 | 0 | 0 | 1 | 8 | What do you use to automatically deploy applications for various kinds of server applications (web, socket, daemon) that uses various technologies (different DBs, languages, etc)?
Here we use Python, Java and Ruby, and may use other languages as well in the future.
Update: I ended up using Puppet to manage all server ... |
how to make a Command Line Interface from a given data model used for GUI | 3,867,843 | 1 | 0 | 440 | 0 | python,user-interface,wxpython,wxwidgets,command-line-interface | If you can call your data model's methods from your GUI and they don't depend on anything in the GUI, then yes, you should be able to call those same methods from another GUI, be it CLI, pyGTK or whatever. | 0 | 1 | 0 | 0 | 2010-10-05T20:34:00.000 | 2 | 0.099668 | false | 3,867,500 | 0 | 0 | 0 | 1 | HI, guys. I am developing a GUI to configure and call several external programs with Python and I use wxPython for the GUI toolkits. Basically, instead of typing commands and parameters in each shell for each application (one application via one shell), the GUI is visualizing these parameters and call them as subproces... |
Developing with Django+Celery without running `celeryd`? | 58,684,713 | 0 | 29 | 9,748 | 0 | python,django,celery | After 5+ years of writing Celery tasks I have noticed a pattern I have developed that can help with testing and ease of development - I realised it is much better if my Celery tasks are thin wrappers around the regular Python functions that I typically put in myproject.impl package. Celery tasks may contain some strict... | 0 | 1 | 0 | 0 | 2010-10-06T15:54:00.000 | 4 | 0 | false | 3,874,422 | 0 | 0 | 1 | 1 | In development, it's a bit of a hassle to run the celeryd as well as the Django development server. Is it possible to, for example, ask celery to run tasks synchronously during development? Or something similar? |
Set python virtualenv in vim | 3,881,570 | 18 | 18 | 20,646 | 0 | python,vim,virtualenv,macvim | Activate your virtualenv before starting vim. You will automatically get the corresponding interpreter instance. | 0 | 1 | 0 | 0 | 2010-10-07T12:19:00.000 | 6 | 1 | false | 3,881,534 | 1 | 0 | 0 | 1 | I use vim for coding and for python coding in particular. Often I want to execute the current buffer with python interpreter. (for example to run unittests), usually I do this with :!python % <Enter>
This scenatio will work works fine with global python, but I want to run virtualenv python instead. How do I enable vir... |
How can I open a Python shell at a network path in Windows? | 3,884,931 | 0 | 2 | 2,258 | 0 | python,windows-xp | You need to map it as a drive. | 0 | 1 | 0 | 0 | 2010-10-07T18:53:00.000 | 3 | 0 | false | 3,884,881 | 1 | 0 | 0 | 1 | How can I open a Python interpreter at a specific network path in Windows?
In the Explorer address bar the path is in UNC form: \\myhost\myshare\....
I can't work out how to change to this directory from the Windows command line, nor in what format I could pass it as an argument to os.chdir.
I'm running Python 2.5 on W... |
Determine IP address of CONNECTED interface (linux) in python | 3,885,255 | 0 | 1 | 2,443 | 0 | python,linux,networking,ip-address | If the default gateway for the system is reliable, then grab that from the output from route -n the line that contains " UG " (note the spaces) will also contain the IP of the gateway and interface name of the active interface. | 0 | 1 | 1 | 0 | 2010-10-07T19:24:00.000 | 2 | 0 | false | 3,885,160 | 0 | 0 | 0 | 1 | On my linux machine, 1 of 3 network interfaces may be actually connected to the internet. I need to get the IP address of the currently connected interface, keeping in mind that my other 2 interfaces may be assigned IP addresses, just not be connected.
I can just ping a website through each of my interfaces to determin... |
unbuffered urllib2.urlopen | 3,888,827 | 0 | 1 | 1,600 | 0 | python,urllib2,urllib,buffering,urlopen | A quick hack that has occurred to me is to use urllib.urlopen() with threading.Timer() to emulate timeout. But that's only quick and dirty hack. | 0 | 1 | 1 | 0 | 2010-10-08T08:20:00.000 | 2 | 1.2 | true | 3,888,812 | 0 | 0 | 0 | 1 | I have client for web interface to long running process. I'd like to have output from that process to be displayed as it comes. Works great with urllib.urlopen(), but it doesn't have timeout parameter. On the other hand with urllib2.urlopen() the output is buffered. Is there a easy way to disable that buffer? |
Simple interpreter to embed and extend inside an C++ Windows application | 3,897,041 | 1 | 3 | 739 | 0 | c++,python,scripting,lua | Guile is easy to embed and extend, and scheme if powerfull programming language.
You can compile libguile and add it to the repository in lib directory or add source for guile and compile it when user compile the project.
But I don't try to use guile on Windows. | 1 | 1 | 0 | 0 | 2010-10-09T16:04:00.000 | 4 | 0.049958 | false | 3,896,313 | 0 | 0 | 0 | 3 | I need a simple interpreter which will do execution (evaluation) of simple expressions/statements and also call functions from main C++ applications. At the moment I do not need scripting of the application, but it may be useful later.
It should also be strait-forward for other team members to pull my application from ... |
Simple interpreter to embed and extend inside an C++ Windows application | 3,897,270 | 4 | 3 | 739 | 0 | c++,python,scripting,lua | Two great options you've already listed are Python and Lua. Here are some of the tradeoffs for your consideration:
Python
A much more complete and powerful language (IMHO!) with libraries for anything and tons of support and communities everywhere you look.
Syntax is not entirely C-like
Although Python wasn't designed... | 1 | 1 | 0 | 0 | 2010-10-09T16:04:00.000 | 4 | 1.2 | true | 3,896,313 | 0 | 0 | 0 | 3 | I need a simple interpreter which will do execution (evaluation) of simple expressions/statements and also call functions from main C++ applications. At the moment I do not need scripting of the application, but it may be useful later.
It should also be strait-forward for other team members to pull my application from ... |
Simple interpreter to embed and extend inside an C++ Windows application | 3,898,118 | 2 | 3 | 739 | 0 | c++,python,scripting,lua | No matter which scripting language you choose (and I would probably vote for Python), you might consider using SWIG (www.swig.org) to ease the burden of interfacing to C++. While normally used to build C++ extensions for python (or ruby, lua, guile, any many others), it can be used to aid in embedding too.
You had ment... | 1 | 1 | 0 | 0 | 2010-10-09T16:04:00.000 | 4 | 0.099668 | false | 3,896,313 | 0 | 0 | 0 | 3 | I need a simple interpreter which will do execution (evaluation) of simple expressions/statements and also call functions from main C++ applications. At the moment I do not need scripting of the application, but it may be useful later.
It should also be strait-forward for other team members to pull my application from ... |
GUI development package | 3,897,118 | 3 | 0 | 238 | 0 | python,linux,user-interface | There are numerous decent GUI toolkits, the most popular being PyQt, PyGTK, wxPython and Tkinter. Personally, I prefer Qt, but that's really subjective. | 0 | 1 | 0 | 0 | 2010-10-09T17:20:00.000 | 2 | 1.2 | true | 3,897,101 | 1 | 0 | 0 | 2 | I am new to GUI development. What is the best GUI development package for python on linux (ubuntu being more specific)? |
GUI development package | 3,897,128 | 1 | 0 | 238 | 0 | python,linux,user-interface | This is much more a matter of personal taste.
I use GTK+ with Glade. | 0 | 1 | 0 | 0 | 2010-10-09T17:20:00.000 | 2 | 0.099668 | false | 3,897,101 | 1 | 0 | 0 | 2 | I am new to GUI development. What is the best GUI development package for python on linux (ubuntu being more specific)? |
URL rewriting question | 3,898,807 | 0 | 0 | 762 | 0 | python,apache | You'd need to show your apache configuration to say for certain, but it seems that Apache isn't actually using mod_cgi to serve the index.cgi script. In your configuration there should be something like 'LoadModule mod_cgi'. It should be uncommented (i.e., it shouldn't have a '#' at the beginning of the line).
If you ... | 0 | 1 | 0 | 1 | 2010-10-09T17:31:00.000 | 2 | 0 | false | 3,897,140 | 0 | 0 | 1 | 2 | I have a CGI script (pwyky) that I called index.cgi, put in directory wiki/, and setup Apache to call localhost/wiki/index.cgi when I access localhost/wiki.
I'm getting errors when I'm trying to use this application -- it creates a page with links like "http://localhost/wiki/@edit/index", but when I click that link, Ap... |
URL rewriting question | 3,908,016 | 0 | 0 | 762 | 0 | python,apache | I found the problem, it turned out this is done through RewriteEngine. Pwyky puts .htaccess file in the directory with all the settings for RewriteEngine, but because AllowOverride is "None" by default on MacOS, they were ignored. The solution was to change all "AllowOverride" directives to "All" | 0 | 1 | 0 | 1 | 2010-10-09T17:31:00.000 | 2 | 1.2 | true | 3,897,140 | 0 | 0 | 1 | 2 | I have a CGI script (pwyky) that I called index.cgi, put in directory wiki/, and setup Apache to call localhost/wiki/index.cgi when I access localhost/wiki.
I'm getting errors when I'm trying to use this application -- it creates a page with links like "http://localhost/wiki/@edit/index", but when I click that link, Ap... |
Twisted factory protocol instance based callback | 3,906,174 | 1 | 0 | 499 | 0 | python,twisted,factory | No. Write a class that does the interaction with one user. In connectionMade you check if a instance of this class already exists, if not you make a new one and store it on the factory, ie in a { addr : handler } dict. If the connection exists alreay you get the old handler from the factory. | 0 | 1 | 0 | 0 | 2010-10-11T11:33:00.000 | 1 | 0.197375 | false | 3,905,791 | 0 | 0 | 1 | 1 | Hey, I got a ReconnectingClientFactory and I wonder if I can somehow define protocol-instance-based connectionMade/connectionLost callbacks so that i can use the factory to connect to different hosts ans distinguish between each connection.
Thanks in advance. |
Possible to do ordered dictionary in python 2.5 (due to GAE)? | 3,911,537 | 0 | 1 | 673 | 0 | python,google-app-engine,dictionary,python-2.5 | you can sort a dict.items() list (of tuples) .. can't? | 0 | 1 | 0 | 0 | 2010-10-12T03:31:00.000 | 3 | 0 | false | 3,911,494 | 1 | 0 | 0 | 2 | I'm new to Python, and using Google App Engine, which is currently running only Python 2.5. Are there any built-in ways of doing an ordered dictionary, or do I have to implement something custom? |
Possible to do ordered dictionary in python 2.5 (due to GAE)? | 3,912,743 | 0 | 1 | 673 | 0 | python,google-app-engine,dictionary,python-2.5 | OrderedDict is new in 2.7, so no, there's no built-in way to do this - you'll have to implement your own.
Usually, an ordered dictionary is implemented as a dictionary of linked list nodes, linked in traversal order. This should be fairly straightforward to implement yourself. | 0 | 1 | 0 | 0 | 2010-10-12T03:31:00.000 | 3 | 0 | false | 3,911,494 | 1 | 0 | 0 | 2 | I'm new to Python, and using Google App Engine, which is currently running only Python 2.5. Are there any built-in ways of doing an ordered dictionary, or do I have to implement something custom? |
How to interchange data between two python applications? | 3,922,943 | 2 | 12 | 6,055 | 0 | python,process,pyqt4,pid | While it's not related to the way of the communication, I recommend checking out the pickle/cPickle module (which can encode objects into string streams and vice versa). Very useful. | 0 | 1 | 0 | 0 | 2010-10-13T09:02:00.000 | 3 | 0.132549 | false | 3,922,135 | 0 | 0 | 0 | 2 | I have two python applications. I need to send commands and data between them (between two processes).
What is the best way to do that?
One program is a daemon who should accept commands and parameters from another GUI application.
How can I make daemon to monitor comands from GUI, while making it's job?
I prefer solut... |
How to interchange data between two python applications? | 3,922,174 | 10 | 12 | 6,055 | 0 | python,process,pyqt4,pid | You can use the following methods for data interchange:
Socket Programming : In Qt you can access QtNetwork module. See qt assistant for examples
IPC : Use shared Memory implemented in QSharedMemory class.
If this application will run on unix os only, then you can try Posix based message queue etc. for data interchang... | 0 | 1 | 0 | 0 | 2010-10-13T09:02:00.000 | 3 | 1.2 | true | 3,922,135 | 0 | 0 | 0 | 2 | I have two python applications. I need to send commands and data between them (between two processes).
What is the best way to do that?
One program is a daemon who should accept commands and parameters from another GUI application.
How can I make daemon to monitor comands from GUI, while making it's job?
I prefer solut... |
Read static content from within the code of an application | 3,926,731 | 1 | 1 | 97 | 0 | python,google-app-engine | You can just open them (only read only). | 0 | 1 | 0 | 0 | 2010-10-13T18:19:00.000 | 2 | 0.099668 | false | 3,926,712 | 0 | 0 | 0 | 2 | Is there a way to read the contents of a static data directory or interact with that data in any way from within the code of an application?
Edit: Please excuse me if it wasn't clear at first, I mean getting a list of the files in that directory, not reading the data in them. |
Read static content from within the code of an application | 3,927,648 | 3 | 1 | 97 | 0 | python,google-app-engine | No. Files marked as static in app.yaml are not available to your application; they're served from separate servers.
If you just need to list them, you could build a list as part of your deploy process. If you need to actually read them, you'll need to include a second copy in your application directory (although the ... | 0 | 1 | 0 | 0 | 2010-10-13T18:19:00.000 | 2 | 1.2 | true | 3,926,712 | 0 | 0 | 0 | 2 | Is there a way to read the contents of a static data directory or interact with that data in any way from within the code of an application?
Edit: Please excuse me if it wasn't clear at first, I mean getting a list of the files in that directory, not reading the data in them. |
python - multi line stdout refresh issue | 3,939,511 | 1 | 2 | 1,629 | 0 | python | It doesn't really answer your question, but there isn't really anything wrong with calling os.system to clear out the terminal (other than the system running on different operating systems) in which case you could use:
os.system('cls' if os.name=='nt' else 'clear') | 0 | 1 | 0 | 0 | 2010-10-15T04:22:00.000 | 3 | 1.2 | true | 3,939,482 | 0 | 0 | 0 | 1 | I have a stats app written in python that on a timer refreshes the ssh screen with stats. Right now it uses os.system('clear') to clear the screen and then outputs a multi line data with the stats.
I'd like to do just do a \r instead of executing the clear but that only works with one line, is it possible to do this wi... |
Python script to loop through all files in directory, delete any that are less than 200 kB in size | 3,947,329 | -2 | 31 | 52,290 | 0 | python | Generally ls -la is in bytes.
If you want it in "human readable" form, use the command ls -alh. | 0 | 1 | 0 | 0 | 2010-10-16T01:46:00.000 | 4 | -0.099668 | false | 3,947,313 | 0 | 0 | 0 | 1 | I want to delete all files in a folder that are less than 200 kB in size.
Just want to be sure here, when i do a ls -la on my macbook, the file size says 171 or 143, I am assuming this is kb correct? |
Google App Engine development server is slow to start up when using WingIDE | 3,957,947 | 2 | 1 | 713 | 0 | python,google-app-engine,performance,wing-ide | Probably because you've got a debugger hooked up - debuggers slow code down a lot by instrumenting everything, and deserializing your datastore is a lot of work.
Using the --use_sqlite flag will enable an experimental sqlite-based local datastore, which should require less startup time. Note that it'll require you to w... | 0 | 1 | 0 | 0 | 2010-10-16T02:36:00.000 | 2 | 1.2 | true | 3,947,443 | 0 | 0 | 1 | 1 | I'm developing on Google App Engine. I am using WingIDE (a python IDE) to debug on the development server. I have several thousand entities in my datastore and I can see that when the development server starts up, it has to go through DatastoreFileStub.Read() and do something which each entity.
The problem is, when I r... |
What threading module should I use to prevent disk IO from blocking network IO? | 3,950,630 | 7 | 6 | 1,332 | 0 | python,multithreading,io,blocking,nonblocking | Since you're I/O bound, then use the threading module.
You should almost never need to use thread, it's a low-level interface; the threading module is a high-level interface wrapper for thread.
The multiprocessing module is different from the threading module, multiprocessing uses multiple subprocesses to execute a t... | 0 | 1 | 1 | 0 | 2010-10-16T20:20:00.000 | 1 | 1.2 | true | 3,950,607 | 0 | 0 | 0 | 1 | I have a Python application that, to be brief, receives data from a remote server, processes it, responds to the server, and occasionally saves the processed data to disk. The problem I've encountered is that there is a lot of data to write, and the save process can take upwards of half a minute. This is apparently a b... |
How to change email account details in appcfg.py google appengine SDK | 4,927,348 | 0 | 9 | 6,689 | 0 | python,google-app-engine | Answer of Adam Bernier also can apply when you use the
appcfg.py download_app for downloading app from appengine servers. | 0 | 1 | 0 | 0 | 2010-10-16T22:29:00.000 | 5 | 0 | false | 3,951,089 | 0 | 0 | 1 | 1 | I have hosted GAE apps with two different email ids! When i first time used appcfg.py to update my app then it prompted me for email id and password but later it doesnot. How to i change the saved email id and password? I tried to use --email= flag with appcfg.py, but it dint worked. |
Reading files in GAE using python | 3,957,752 | 2 | 2 | 613 | 0 | python,django,google-app-engine | os.path.normpath() on "content_includes" is a no-op - normpath just removes double slashes and other denormalizations. What you probably want is to build a path relative to the script, in which case you should do something like os.path.join(os.path.dirname(__file__), 'content_includes', pageName + '.inc'). | 0 | 1 | 0 | 0 | 2010-10-17T21:22:00.000 | 2 | 1.2 | true | 3,955,361 | 0 | 0 | 1 | 2 | I created a simple python project that serves up a couple of pages. I'm using the 'webapp' framework and django. What I'm trying to do is use one template file, and load 'content files' that contain the actual page text.
When I try to read the content files using os.open, I get the following error:
pageContent = os.op... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.