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
Miminal Linux For a Pylons Web App?
589,645
0
2
602
0
python,linux,pylons
Damn Small Linux? Slax?
0
1
0
1
2009-02-26T04:33:00.000
7
0
false
589,115
0
0
0
4
I am going to be building a Pylons-based web application. For this purpose, I'd like to build a minimal Linux platform, upon which I would then install the necessary packages such as Python and Pylons, and other necessary dependencies. The other reason to keep it minimal is because this machine will be virtual, probabl...
Python - How to check if a file is used by another application?
592,121
0
9
22,009
0
python,windows,unix,logging,file-io
One thing I've done is have python very temporarily rename the file. If we're able to rename it, then no other process is using it. I only tested this on Windows.
0
1
0
0
2009-02-26T06:44:00.000
3
0
false
589,407
0
0
0
1
I want to open a file which is periodically written to by another application. This application cannot be modified. I'd therefore like to only open the file when I know it is not been written to by an other application. Is there a pythonic way to do this? Otherwise, how do I achieve this in Unix and Windows? edit: I'll...
When is it (not) appropriate to bundle dependencies with an application?
609,861
3
14
1,453
0
python,dependencies,distribution,packaging
An important point seems to have been forgotten in the Cons of bundling libraries/frameworks/etc with the application: security updates. Most Web frameworks are full of security holes and require frequent patching. Any library, anyway, may have to be upgraded one day or the other for a security bug. If you do not bundl...
0
1
0
0
2009-02-28T16:59:00.000
8
0.07486
false
598,299
1
0
0
7
Summary I recently had a conversation with the creator of a framework that one of my applications depends on. During that conversation he mentioned as a sort of aside that it would make my life simpler if I just bundled his framework with my application and delivered to the end user a version that I knew was consisten...
When is it (not) appropriate to bundle dependencies with an application?
598,397
10
14
1,453
0
python,dependencies,distribution,packaging
I favor bundling dependencies, if it's not feasible to use a system for automatic dependency resolution (i.e. setuptools), and if you can do it without introducing version conflicts. You still have to consider your application and your audience; serious developers or enthusiasts are more likely to want to work with a ...
0
1
0
0
2009-02-28T16:59:00.000
8
1.2
true
598,299
1
0
0
7
Summary I recently had a conversation with the creator of a framework that one of my applications depends on. During that conversation he mentioned as a sort of aside that it would make my life simpler if I just bundled his framework with my application and delivered to the end user a version that I knew was consisten...
When is it (not) appropriate to bundle dependencies with an application?
598,333
1
14
1,453
0
python,dependencies,distribution,packaging
Just my experience, take it with a grain of salt. My preference for a couple of open-source libraries that I author is for independence from additional libs as much as possible. Reason being, not only am I on the hook for distribution of additional libraries along with mine, I'm also obliged to update my application f...
0
1
0
0
2009-02-28T16:59:00.000
8
0.024995
false
598,299
1
0
0
7
Summary I recently had a conversation with the creator of a framework that one of my applications depends on. During that conversation he mentioned as a sort of aside that it would make my life simpler if I just bundled his framework with my application and delivered to the end user a version that I knew was consisten...
When is it (not) appropriate to bundle dependencies with an application?
603,843
3
14
1,453
0
python,dependencies,distribution,packaging
If you're producing software for an end-user, the goal is to let the customer use your software. Anything that stands in the way is counter-productive. If they have to download dependencies themselves, there's a possibility that they'll decide to avoid your software instead. You can't control whether libraries will be ...
0
1
0
0
2009-02-28T16:59:00.000
8
0.07486
false
598,299
1
0
0
7
Summary I recently had a conversation with the creator of a framework that one of my applications depends on. During that conversation he mentioned as a sort of aside that it would make my life simpler if I just bundled his framework with my application and delivered to the end user a version that I knew was consisten...
When is it (not) appropriate to bundle dependencies with an application?
603,778
2
14
1,453
0
python,dependencies,distribution,packaging
For Linux, don't even think about bundling. You aren't smarter than the package manager or the packagers, and each distribution takes approach their own way - they won't be happy if you attempt to go your way. At best, they won't bother with packaging your app, which isn't great. Keep in mind that in Linux, dependencie...
0
1
0
0
2009-02-28T16:59:00.000
8
0.049958
false
598,299
1
0
0
7
Summary I recently had a conversation with the creator of a framework that one of my applications depends on. During that conversation he mentioned as a sort of aside that it would make my life simpler if I just bundled his framework with my application and delivered to the end user a version that I knew was consisten...
When is it (not) appropriate to bundle dependencies with an application?
598,614
1
14
1,453
0
python,dependencies,distribution,packaging
Beware reproducing the classic Windows DLL hell. By all means minimize the number of dependencies: ideally, just depend on your language and its framework, nothing else, if you can. After all, preserving hard disk space is hardly the objective any more, so users need not care about having multiple copies. Also, unless ...
0
1
0
0
2009-02-28T16:59:00.000
8
0.024995
false
598,299
1
0
0
7
Summary I recently had a conversation with the creator of a framework that one of my applications depends on. During that conversation he mentioned as a sort of aside that it would make my life simpler if I just bundled his framework with my application and delivered to the end user a version that I knew was consisten...
When is it (not) appropriate to bundle dependencies with an application?
598,599
1
14
1,453
0
python,dependencies,distribution,packaging
I always include all dependancies for my web applications. Not only does this make installation simpler, the application remains stable and working the way you expect it to even when other components on the system are upgraded.
0
1
0
0
2009-02-28T16:59:00.000
8
0.024995
false
598,299
1
0
0
7
Summary I recently had a conversation with the creator of a framework that one of my applications depends on. During that conversation he mentioned as a sort of aside that it would make my life simpler if I just bundled his framework with my application and delivered to the end user a version that I knew was consisten...
Calling function defined in exe
598,571
0
4
2,356
0
python
Unless the said executable takes command line arguments which will specify which function to use, I don't think this is possible. With that being said, if you created the EXE, command line arguments are a good way to implement the functionality you're looking for.
0
1
0
0
2009-02-28T19:55:00.000
3
0
false
598,569
1
0
0
2
I need to know a way to call a function defined in the exe from a python script. I know how to call entire exe from py file.
Calling function defined in exe
598,585
1
4
2,356
0
python
Not sure if it is for windows. But you can treat an exe like a dll (if functions are exported). And they can be used by other programs.
0
1
0
0
2009-02-28T19:55:00.000
3
0.066568
false
598,569
1
0
0
2
I need to know a way to call a function defined in the exe from a python script. I know how to call entire exe from py file.
How can I manually register distributions with pkg_resources?
2,164,138
0
1
724
0
python,google-app-engine,setuptools,pkg-resources
Create a setup.py for the package just as you would normally, and then use "setup.py sdist --formats=zip" to build your source zip. The built source zip will include an .egg-info metadata directory, which will then be findable by pkg_resources. Alternately, you can use bdist_egg for all your packages.
0
1
0
0
2009-03-01T03:40:00.000
3
1.2
true
599,205
0
0
0
2
I'm trying to get a package installed on Google App Engine. The package relies rather extensively on pkg_resources, but there's no way to run setup.py on App Engine. There's no platform-specific code in the source, however, so it's no problem to just zip up the source and include those in the system path. And I've go...
How can I manually register distributions with pkg_resources?
744,882
0
1
724
0
python,google-app-engine,setuptools,pkg-resources
On your local development system, run python setup.py bdist_egg, which will create a Zip archive with the necessary metadata included. Add it to your sys.path, and it should work properly.
0
1
0
0
2009-03-01T03:40:00.000
3
0
false
599,205
0
0
0
2
I'm trying to get a package installed on Google App Engine. The package relies rather extensively on pkg_resources, but there's no way to run setup.py on App Engine. There's no platform-specific code in the source, however, so it's no problem to just zip up the source and include those in the system path. And I've go...
Recommendations for Python development on a Mac?
618,078
3
8
6,687
0
python,macos
How about EPD from Enthought? Yes, it's large but it is a framework build and includes things like wxPython, vtk, numpy, scipy, and ipython built-in.
0
1
0
0
2009-03-02T04:04:00.000
11
0.054491
false
601,236
1
0
0
4
I bought a low-end MacBook about a month ago and am finally getting around to configuring it for Python. I've done most of my Python work in Windows up until now, and am finding the choices for OS X a little daunting. It looks like there are at least five options to use for Python development: "Stock" Apple Python Mac...
Recommendations for Python development on a Mac?
601,287
0
8
6,687
0
python,macos
I recommend python (any python?) plus the ipython shell. My most recent experience with MacPython was MacPython 2.5, and I found IDLE frustrating to use as an editor. It's not very featureful, and its' very slow to scroll large quantities of output.
0
1
0
0
2009-03-02T04:04:00.000
11
0
false
601,236
1
0
0
4
I bought a low-end MacBook about a month ago and am finally getting around to configuring it for Python. I've done most of my Python work in Windows up until now, and am finding the choices for OS X a little daunting. It looks like there are at least five options to use for Python development: "Stock" Apple Python Mac...
Recommendations for Python development on a Mac?
601,250
2
8
6,687
0
python,macos
I recommend using Python Virtual environments, especially if you use a Timecapsule because Timecapsule will back everything up, except modules you added to Python!
0
1
0
0
2009-03-02T04:04:00.000
11
0.036348
false
601,236
1
0
0
4
I bought a low-end MacBook about a month ago and am finally getting around to configuring it for Python. I've done most of my Python work in Windows up until now, and am finding the choices for OS X a little daunting. It looks like there are at least five options to use for Python development: "Stock" Apple Python Mac...
Recommendations for Python development on a Mac?
601,252
9
8
6,687
0
python,macos
One advantage I see in using the "stock" Python that's included with Mac OS X is that it makes deployment to other Macs a piece of cake. I don't know what your deployment scenario is, but for me this is important. My code has to run on any number of Macs at work, and I try to minimize the amount of work it takes to run...
0
1
0
0
2009-03-02T04:04:00.000
11
1
false
601,236
1
0
0
4
I bought a low-end MacBook about a month ago and am finally getting around to configuring it for Python. I've done most of my Python work in Windows up until now, and am finding the choices for OS X a little daunting. It looks like there are at least five options to use for Python development: "Stock" Apple Python Mac...
Choosing and deploying a comet server
622,509
5
13
7,360
0
python,django,comet,daemon
I would recommend looking into Twisted, their twisted.web server, and the comet work done on top of it at Divmod. They can handle far more concurrent connections than traditional thread or process based servers, which is exactly what you need for something like this. And, yes, I've architected systems using Twisted for...
0
1
0
0
2009-03-07T12:51:00.000
6
1.2
true
621,802
0
0
1
1
I want to push data to the browser over HTTP without killing my django/python application. I decided to use a comet server, to proxy requests between my application and the client (though I still haven't really figured it out properly). I've looked into the following engines: orbited cometd ejabberd jetty Has anyone ha...
What will be the upgrade path to Python 3.x for Google App Engine Applications?
625,632
1
9
4,490
0
python,google-app-engine
The app.yaml syntax already supports multiple languages and multiple API versions, though only one of each (Python, API version 1) is currently supported. Presumably, one of those extension mechanisms will be used to specify that you want Python 3, and it'll be up to you to port your app over to work in Python 3, then ...
0
1
0
0
2009-03-09T04:43:00.000
4
0.049958
false
625,042
1
0
1
2
What is required to make the transition to Python 3.x for Google App Engine? I know Google App Engine requires the use of at least Python 2.5. Is it possible to use Python 3.0 already on Google App Engine?
What will be the upgrade path to Python 3.x for Google App Engine Applications?
625,130
1
9
4,490
0
python,google-app-engine
At least at the being, Guido was working closely with the team at Google who is building AppEngine. When this option does become available, you will have to edit your main XAML file. I agree with Chris B. that Python 3.0 support may not be forthcoming too soon, but I'm not sure I agree that it will come sooner than Per...
0
1
0
0
2009-03-09T04:43:00.000
4
0.049958
false
625,042
1
0
1
2
What is required to make the transition to Python 3.x for Google App Engine? I know Google App Engine requires the use of at least Python 2.5. Is it possible to use Python 3.0 already on Google App Engine?
Dump memcache keys from GAE SDK Console?
626,559
8
1
2,662
0
python,google-app-engine,memcached
People ask for this on the memcached list a lot, sometimes with the same type of "just in case I want to look around to debug something" sentiment. The best way to handle this is to know how you generate your keys, and just go look stuff up when you want to know what's stored for a given value. If you have too many thi...
0
1
0
0
2009-03-09T07:49:00.000
5
1.2
true
625,314
0
0
1
4
In the "Memcache Viewer", is there any way to dump a list of existing keys? Just for debugging, of course, not for use in any scripts! I ask because it doesn't seem like the GAE SDK is using a "real" memcache server, so I'm guessing it's emulated in Python (for simplicity, as it's just a development server).. This woul...
Dump memcache keys from GAE SDK Console?
625,331
4
1
2,662
0
python,google-app-engine,memcached
No. I did not found such functionality in memcached too. Thinking about this issue, I found this limitation understandable - it would require keeping a registry of keys with all related problems like key expiration, invalidation and of course locking. Such system would not be as fast as memcaches are intended to be.
0
1
0
0
2009-03-09T07:49:00.000
5
0.158649
false
625,314
0
0
1
4
In the "Memcache Viewer", is there any way to dump a list of existing keys? Just for debugging, of course, not for use in any scripts! I ask because it doesn't seem like the GAE SDK is using a "real" memcache server, so I'm guessing it's emulated in Python (for simplicity, as it's just a development server).. This woul...
Dump memcache keys from GAE SDK Console?
626,458
0
1
2,662
0
python,google-app-engine,memcached
Memcache is designed to be quick and there's no convincing use case for this functionality which would justify the overhead required for a command that is so at odds with the rest of memcached. The GAE SDK is simulating memcached, so it doesn't offer this functionality either.
0
1
0
0
2009-03-09T07:49:00.000
5
0
false
625,314
0
0
1
4
In the "Memcache Viewer", is there any way to dump a list of existing keys? Just for debugging, of course, not for use in any scripts! I ask because it doesn't seem like the GAE SDK is using a "real" memcache server, so I'm guessing it's emulated in Python (for simplicity, as it's just a development server).. This woul...
Dump memcache keys from GAE SDK Console?
660,458
0
1
2,662
0
python,google-app-engine,memcached
The easiest way that I could think of, would be to maintain a memcache key at a known ID, and then append to it every time you insert a new key. This way you could just query for the single key to get a list of existing keys.
0
1
0
0
2009-03-09T07:49:00.000
5
0
false
625,314
0
0
1
4
In the "Memcache Viewer", is there any way to dump a list of existing keys? Just for debugging, of course, not for use in any scripts! I ask because it doesn't seem like the GAE SDK is using a "real" memcache server, so I'm guessing it's emulated in Python (for simplicity, as it's just a development server).. This woul...
What is the feasibility of porting a legacy C program to Python?
632,844
1
2
381
0
python,c
If I was faced with a similar situation I'd ask myself a couple of questions: Is there anything more important I could be working on? Does Python bring anything to the table that is currently handled poorly by the current application? Will this allow me to add functionality that was previously too difficult to impleme...
0
1
0
1
2009-03-10T23:47:00.000
7
0.028564
false
632,730
0
0
0
6
I have a program in C that communicates via UDP with another program (in Java) and then does process manipulation (start/stop) based on the UDP pkt exchange. Now this C program has been legacy and I want to convert it to Python - do you think Python will be a good choice for the tasks mentioned?
What is the feasibility of porting a legacy C program to Python?
634,093
0
2
381
0
python,c
If this is an embedded program, then it might be a problem to port it since Python programs typically rely on the Python runtime and library, and those are fairly large. Especially when compared to a C program doing a well-defined task. Of course, it's likely you've already considered that aspect, but I wanted to menti...
0
1
0
1
2009-03-10T23:47:00.000
7
0
false
632,730
0
0
0
6
I have a program in C that communicates via UDP with another program (in Java) and then does process manipulation (start/stop) based on the UDP pkt exchange. Now this C program has been legacy and I want to convert it to Python - do you think Python will be a good choice for the tasks mentioned?
What is the feasibility of porting a legacy C program to Python?
632,740
1
2
381
0
python,c
Assuming that you have control over the environment which this application will run, and that the performance of interpreted language (python) compared to a compiled one (C) can be ignored, I believe Python is a great choice for this.
0
1
0
1
2009-03-10T23:47:00.000
7
0.028564
false
632,730
0
0
0
6
I have a program in C that communicates via UDP with another program (in Java) and then does process manipulation (start/stop) based on the UDP pkt exchange. Now this C program has been legacy and I want to convert it to Python - do you think Python will be a good choice for the tasks mentioned?
What is the feasibility of porting a legacy C program to Python?
632,788
4
2
381
0
python,c
I'd say that if: Your C code contains no platform specific requirements You are sure speed is not going to be an issue going from C to python You have a desire to not compile anymore You would like to try utilise exception handling You want to dabble in OO You might choose to run on many platforms without porting You ...
0
1
0
1
2009-03-10T23:47:00.000
7
0.113791
false
632,730
0
0
0
6
I have a program in C that communicates via UDP with another program (in Java) and then does process manipulation (start/stop) based on the UDP pkt exchange. Now this C program has been legacy and I want to convert it to Python - do you think Python will be a good choice for the tasks mentioned?
What is the feasibility of porting a legacy C program to Python?
632,925
2
2
381
0
python,c
Remember as well, you can leave parts of your program in C, turn them into Python modules and build python code around them - you don't need to re-write everything up-front.
0
1
0
1
2009-03-10T23:47:00.000
7
0.057081
false
632,730
0
0
0
6
I have a program in C that communicates via UDP with another program (in Java) and then does process manipulation (start/stop) based on the UDP pkt exchange. Now this C program has been legacy and I want to convert it to Python - do you think Python will be a good choice for the tasks mentioned?
What is the feasibility of porting a legacy C program to Python?
632,935
1
2
381
0
python,c
Yes, I think Python is a good choice, if all your platforms support it. Since this is a network program, I'm assuming the network is your runtime bottleneck? That's likely to still be the case in Python. If you really do need to speed it up, you can include your long-since-debugged, speedy C as Python modules.
0
1
0
1
2009-03-10T23:47:00.000
7
0.028564
false
632,730
0
0
0
6
I have a program in C that communicates via UDP with another program (in Java) and then does process manipulation (start/stop) based on the UDP pkt exchange. Now this C program has been legacy and I want to convert it to Python - do you think Python will be a good choice for the tasks mentioned?
Is there any linux distribution that comes with python 2.6 yet?
640,292
1
4
619
0
python,linux
For what it's worth, Python 2.6 is available in the Portage tree for Gentoo, but it's hardmasked (that doesn't really count as stable) because apparently there are some programs that don't work with it. My guess is that if you had Gentoo, you could install Python 2.6 and get it to work, but it might not be smart to mak...
0
1
0
0
2009-03-12T19:47:00.000
6
0.033321
false
640,191
1
0
0
2
I've heard ubuntu 9.4 will but it's still in alpha. Are there any stable distros that come with python 2.6 or at least don't depend on it so much so reinstalling python won't break anything?
Is there any linux distribution that comes with python 2.6 yet?
640,447
4
4
619
0
python,linux
openSUSE 11.1 ships Python 2.6 as standard.
0
1
0
0
2009-03-12T19:47:00.000
6
0.132549
false
640,191
1
0
0
2
I've heard ubuntu 9.4 will but it's still in alpha. Are there any stable distros that come with python 2.6 or at least don't depend on it so much so reinstalling python won't break anything?
Which version of python is currently best for os x?
651,764
1
2
856
0
python,macos
I've updated my macbook running leopard to python 2.6 and haven't had any problems with psycopg2. For that matter, I haven't had any compatibility issues anywhere with 2.6, but obviously switching to python3k isn't exactly recommended if you're concerned about backwards compatibility.
0
1
0
0
2009-03-16T19:00:00.000
10
0.019997
false
651,717
1
0
0
6
After going through hell trying to install the latest version of postgresql and psycopg2 today I'm going for a complete reinstall of Leopard. I've been sticking with macpython 2.5 for the past year but now I'm considering macports even 2.6 For me it's most important for Twisted, PIL and psycopg2 to be working without a...
Which version of python is currently best for os x?
1,115,314
0
2
856
0
python,macos
If your using Macports, I recommend downloading the python_select package, which facilitates easy switching between different versions including the built in apple versions. Makes life a lot easier.
0
1
0
0
2009-03-16T19:00:00.000
10
0
false
651,717
1
0
0
6
After going through hell trying to install the latest version of postgresql and psycopg2 today I'm going for a complete reinstall of Leopard. I've been sticking with macpython 2.5 for the past year but now I'm considering macports even 2.6 For me it's most important for Twisted, PIL and psycopg2 to be working without a...
Which version of python is currently best for os x?
651,768
4
2
856
0
python,macos
You can install them side-by-side. If you've encounter problems just set python 2.5 as the standard python and use e.g. python26 for a newer version.
0
1
0
0
2009-03-16T19:00:00.000
10
0.07983
false
651,717
1
0
0
6
After going through hell trying to install the latest version of postgresql and psycopg2 today I'm going for a complete reinstall of Leopard. I've been sticking with macpython 2.5 for the past year but now I'm considering macports even 2.6 For me it's most important for Twisted, PIL and psycopg2 to be working without a...
Which version of python is currently best for os x?
652,455
0
2
856
0
python,macos
I am using Python 2.5.1. It's working great for me for general scripting and some CherryPy web projects.
0
1
0
0
2009-03-16T19:00:00.000
10
0
false
651,717
1
0
0
6
After going through hell trying to install the latest version of postgresql and psycopg2 today I'm going for a complete reinstall of Leopard. I've been sticking with macpython 2.5 for the past year but now I'm considering macports even 2.6 For me it's most important for Twisted, PIL and psycopg2 to be working without a...
Which version of python is currently best for os x?
651,988
1
2
856
0
python,macos
I use both Twisted and Psycopg2 extensively on OSX, and both work fine with Python 2.6. Neither has been ported to Python 3.0, as far as I know. Several of Python 3.0's features have been back-ported to 2.6, so you gain quite a bit by moving from 2.5 to 2.6. But I wouldn't switch to 3.0 until all of your thirdparty l...
0
1
0
0
2009-03-16T19:00:00.000
10
0.019997
false
651,717
1
0
0
6
After going through hell trying to install the latest version of postgresql and psycopg2 today I'm going for a complete reinstall of Leopard. I've been sticking with macpython 2.5 for the past year but now I'm considering macports even 2.6 For me it's most important for Twisted, PIL and psycopg2 to be working without a...
Which version of python is currently best for os x?
651,835
1
2
856
0
python,macos
I would stick with the MacPython version 2.5.x (I believe 2.5.4 currently). Here's my rationale: Snow Leopard may still be on the 2.5 series, so you might as well be consistent with the future OS (i.e. no point in going too far ahead). For most production apps, nobody is going to want to use 2.6 for another year. No ...
0
1
0
0
2009-03-16T19:00:00.000
10
0.019997
false
651,717
1
0
0
6
After going through hell trying to install the latest version of postgresql and psycopg2 today I'm going for a complete reinstall of Leopard. I've been sticking with macpython 2.5 for the past year but now I'm considering macports even 2.6 For me it's most important for Twisted, PIL and psycopg2 to be working without a...
Access to errno from Python?
6,170,629
1
25
10,955
0
python,linux,python-2.5,errno
ctypes actually gives a standard way to access python's c implementation, which is using errno. I haven't tested this on anything other than my (linux) system, but this should be very portable: ctypes.c_int.in_dll(ctypes.pythonapi,"errno") which returns a c_int containing the current value.
0
1
0
1
2009-03-19T04:00:00.000
6
0.033321
false
661,017
0
0
0
1
I am stuck with a fairly complex Python module that does not return useful error codes (it actually fails disturbingly silently). However, the underlying C library it calls sets errno. Normally errno comes in over OSError attributes, but since I don't have an exception, I can't get at it. Using ctypes, libc.errno doesn...
Can I use a single file as a buffer? I.e. write to and read from at same time
669,335
2
2
313
0
python,file-io
You can use memory-mapped files, standard Python module called mmap.
0
1
0
0
2009-03-19T11:20:00.000
3
0.132549
false
661,826
0
0
0
1
I want to have an application writing out information at the same time that a monitor is reading it. The application is "embedded" (and on Win32 XP) and so has restricted memory and I/O functionality. The simplest way I can think to do this is by writing the data to a buffer file from the application, and then read the...
Can I write Python web application for Windows and Linux platforms at the same time?
663,372
0
3
1,553
0
python,cgi,fastcgi,wsgi
Writing python web apps is a topic on itself, but I would say that by default, it will be portable on multiple servers / platforms. When developping python web applications, you will often use frameworks that provide their own web server. For performance reasons, you might want to place it behind apache, but it is not...
0
1
0
0
2009-03-19T15:52:00.000
6
0
false
662,762
0
0
1
5
Can I write web application that I can host on Windows(IIS web server) and Linux (Apache or lighttpd) without any changes? CGI? Maybe something new? WSGI | FastCGI ?
Can I write Python web application for Windows and Linux platforms at the same time?
663,304
0
3
1,553
0
python,cgi,fastcgi,wsgi
consider also the possibility of using web2Py, or XML-RPC implementation, or Twisted...
0
1
0
0
2009-03-19T15:52:00.000
6
0
false
662,762
0
0
1
5
Can I write web application that I can host on Windows(IIS web server) and Linux (Apache or lighttpd) without any changes? CGI? Maybe something new? WSGI | FastCGI ?
Can I write Python web application for Windows and Linux platforms at the same time?
662,791
2
3
1,553
0
python,cgi,fastcgi,wsgi
Yes, if you use CGI, FastCGI or depending on your framework, even a self-contained web server (so IIS and Apache would be a reverse-proxy) then that would all work. The difference will be the configuration of the OS-specific servers, and also your Python environment on each OS. So you may find yourself doing a small b...
0
1
0
0
2009-03-19T15:52:00.000
6
0.066568
false
662,762
0
0
1
5
Can I write web application that I can host on Windows(IIS web server) and Linux (Apache or lighttpd) without any changes? CGI? Maybe something new? WSGI | FastCGI ?
Can I write Python web application for Windows and Linux platforms at the same time?
662,784
2
3
1,553
0
python,cgi,fastcgi,wsgi
web.py includes a server... It will do the trick for small jobs. By the way, Apache works on windows.
0
1
0
0
2009-03-19T15:52:00.000
6
0.066568
false
662,762
0
0
1
5
Can I write web application that I can host on Windows(IIS web server) and Linux (Apache or lighttpd) without any changes? CGI? Maybe something new? WSGI | FastCGI ?
Can I write Python web application for Windows and Linux platforms at the same time?
662,789
7
3
1,553
0
python,cgi,fastcgi,wsgi
Yes you can. But you can also use apache on windows. If you go the IIS way there's only CGI and it's pretty hard to set up. You can also use python based server like CherryPy which is pretty good and will work on all platforms with python. Some frameworks like django support both CGI and WSGI, so you don't have to worr...
0
1
0
0
2009-03-19T15:52:00.000
6
1
false
662,762
0
0
1
5
Can I write web application that I can host on Windows(IIS web server) and Linux (Apache or lighttpd) without any changes? CGI? Maybe something new? WSGI | FastCGI ?
PyObjC + Python 3.0 Questions
667,584
9
10
1,254
0
python,cocoa,xcode,pyobjc
PyObjC does not yet work with Python 3.0. According to Ronald Oussoren, a (the?) PyObjC developer, Python 3.0 support is possible, but not yet implemented: Support for Python 3.x is on my todo list but is non-trivial to achieve. PyObjC contains a large amount of pretty low-level C code, getting the details w.r...
0
1
0
0
2009-03-20T13:30:00.000
2
1.2
true
666,148
1
0
0
1
By default, a Cocoa-Python application uses the default Python runtime which is version 2.5. How can I configure my Xcode project so that it would use the newer Python 3.0 runtime? I tried replacing the Python.framework included in the project with the newer version but it did not work. And another thing, are PyObjc mo...
Full command line as it was typed
667,556
29
36
9,141
0
python,command-line
You're too late. By the time that the typed command gets to Python your shell has already worked its magic. For example, quotes get consumed (as you've noticed), variables get interpolated, etc.
0
1
0
0
2009-03-20T19:11:00.000
10
1
false
667,540
1
0
0
4
I want to get the full command line as it was typed. This: " ".join(sys.argv[:]) doesn't work here (deletes double quotes). Also I prefer not to rejoin something that was parsed and split. Any ideas?
Full command line as it was typed
667,889
5
36
9,141
0
python,command-line
As mentioned, this probably cannot be done, at least not reliably. In a few cases, you might be able to find a history file for the shell (e.g. - "bash", but not "tcsh") and get the user's typing from that. I don't know how much, if any, control you have over the user's environment.
0
1
0
0
2009-03-20T19:11:00.000
10
0.099668
false
667,540
1
0
0
4
I want to get the full command line as it was typed. This: " ".join(sys.argv[:]) doesn't work here (deletes double quotes). Also I prefer not to rejoin something that was parsed and split. Any ideas?
Full command line as it was typed
668,518
2
36
9,141
0
python,command-line
On Linux there is /proc/<pid>/cmdline that is in the format of argv[] (i.e. there is 0x00 between all the lines and you can't really know how many strings there are since you don't get the argc; though you will know it when the file runs out of data ;). You can be sure that that commandline is already munged too since ...
0
1
0
0
2009-03-20T19:11:00.000
10
0.039979
false
667,540
1
0
0
4
I want to get the full command line as it was typed. This: " ".join(sys.argv[:]) doesn't work here (deletes double quotes). Also I prefer not to rejoin something that was parsed and split. Any ideas?
Full command line as it was typed
667,554
13
36
9,141
0
python,command-line
In a Unix environment, this is not generally possible...the best you can hope for is the command line as passed to your process. Because the shell (essentially any shell) may munge the typed command line in several ways before handing it to the OS for execution.
0
1
0
0
2009-03-20T19:11:00.000
10
1
false
667,540
1
0
0
4
I want to get the full command line as it was typed. This: " ".join(sys.argv[:]) doesn't work here (deletes double quotes). Also I prefer not to rejoin something that was parsed and split. Any ideas?
Web crawlers and Google App Engine Hosted applications
677,133
1
4
3,097
0
python,google-app-engine,web-crawler
App Engine code only runs in response to HTTP requests, so you can't run a persistent crawler in the background. With the upcoming release of scheduled tasks, you could write a crawler that uses that functionality, but it would be less than ideal.
0
1
0
0
2009-03-24T07:44:00.000
4
0.049958
false
676,460
0
0
1
2
Is it impossible to run a web crawler on GAE along side with my app considering the I am running the free startup version?
Web crawlers and Google App Engine Hosted applications
677,320
0
4
3,097
0
python,google-app-engine,web-crawler
It's possible. But that's not really an application for appengine just as Arachnid wrote. If you manage to get it working I'll doubt you'll stay in the qotas for free accounts.
0
1
0
0
2009-03-24T07:44:00.000
4
0
false
676,460
0
0
1
2
Is it impossible to run a web crawler on GAE along side with my app considering the I am running the free startup version?
What to do with "The input line is too long" error message?
4,378,603
1
10
26,102
0
python,command-line,windows-console
I got the same message but it was strange because the command was not that long (130 characters) and it used to work, it just stopped working one day. I just closed the command window and opened a new one and it worked. I have had the command window opened for a long time (maybe months, it's a remote virtual machine). ...
0
1
0
0
2009-03-25T18:08:00.000
6
0.033321
false
682,799
0
0
0
2
I am trying to use os.system() to call another program that takes an input and an output file. The command I use is ~250 characters due to the long folder names. When I try to call the command, I'm getting an error: The input line is too long. I'm guessing there's a 255 character limit (its built using a C system call...
What to do with "The input line is too long" error message?
682,807
1
10
26,102
0
python,command-line,windows-console
Assuming you're using windows, from the backslashes, you could write a .bat file from python and then os.system() on that. It's a hack.
0
1
0
0
2009-03-25T18:08:00.000
6
0.033321
false
682,799
0
0
0
2
I am trying to use os.system() to call another program that takes an input and an output file. The command I use is ~250 characters due to the long folder names. When I try to call the command, I'm getting an error: The input line is too long. I'm guessing there's a 255 character limit (its built using a C system call...
python convert microsoft office docs to plain text on linux
685,656
0
11
11,214
0
python,linux,ms-office
I've had some success at using XSLT to process the XML-based office files into something usable in the past. It's not necessarily a python-based solution, but it does get the job done.
0
1
0
0
2009-03-26T12:24:00.000
7
0
false
685,533
0
0
0
1
Any recomendations on a method to convert .doc, .ppt, and .xls to plain text on linux using python? Really any method of conversion would be useful. I have already looked at using Open Office but, I would like a solution that does not require having to install Open Office.
Python module for VBox?
694,365
2
2
1,234
0
python,virtualbox
Consider using libvirt. The VirtualBox support is bleeding-edge (not in any release, may not even be in source control yet, but is available as a set of patches on the mailing list) -- but this single API, available for C, Python and several other languages, lets you control virtual machines and images running in Qemu/...
0
1
0
0
2009-03-28T23:20:00.000
1
1.2
true
693,752
1
0
0
1
I want to make some python scripts to create an "Appliance" with VirtualBox. However, I can't find any documentation anywhere on making calls to VBoxService.exe. Well, I've found stuff that works from OUTSIDE the Machine, but nothing from working from inside the machine. Does anyone know anything about this? If there's...
Suppress output in Python calls to executables
2,728,111
12
45
42,935
0
python,redirect
If your search engine lead you to this old question (like me), be aware that using PIPE may lead to deadlocks. Indeed, because pipes are buffered, you can write a certain number of bytes in a pipe, even if no one read it. However the size of buffer is finite. And consequently if your program A has an output larger than...
0
1
0
1
2009-03-30T22:39:00.000
9
1
false
699,325
0
0
0
1
I have a binary named A that generates output when called. If I call it from a Bash shell, most of the output is suppressed by A > /dev/null. All of the output is suppressed by A &> /dev/null I have a python script named B that needs to call A. I want to be able to generate output from B, while suppressing all the outp...
Using pydev with Eclipse on OSX
10,695,484
1
11
11,573
0
python,eclipse
I know this is a ancient post... but, in case of some newbee like me to get the better answer. I just using "Eclipse Marketplace" from the "Help" menu and search for keyword "python" or "PyDev" to get PyDev, and get it successfully installed. AND, you should add PyDev to the top-right dock. For the instance, my eclipse...
0
1
0
0
2009-04-01T03:11:00.000
4
0.049958
false
703,925
0
0
0
2
I setup PyDev with this path for the python interpreter /System/Library/Frameworks/Python.framework/Versions/2.5/Python since the one under /usr/bin were alias and Eclipse won't select it. I can run my python script now but cannot run the shell as an external tool. The message I get is variable references empty selecti...
Using pydev with Eclipse on OSX
884,296
3
11
11,573
0
python,eclipse
Common practice seems to be to install an up-to-date Python 2.5 from python.org and use that instead of the system installation. I saw that recommended here and there when I got started on Mac OS X. It installs under /Library (as opposed to /System/Library) so the system Python is intact. Pydev has /Library/Frameworks/...
0
1
0
0
2009-04-01T03:11:00.000
4
0.148885
false
703,925
0
0
0
2
I setup PyDev with this path for the python interpreter /System/Library/Frameworks/Python.framework/Versions/2.5/Python since the one under /usr/bin were alias and Eclipse won't select it. I can run my python script now but cannot run the shell as an external tool. The message I get is variable references empty selecti...
How do I schedule a process' termination?
704,223
0
0
2,629
0
python,bash,unix,process,kill
One idea: Save the process's PID (returned by fork() in your child process) to a file, then either schedule a cron job to kill it or kill it manually, reading the PID from the file. Another option: Create a shell script wrapper that automatically kills and restarts the process. Same as above, but you can keep the PID i...
0
1
0
0
2009-04-01T05:44:00.000
7
0
false
704,203
0
0
0
1
I need to run a process, wait a few hours, kill it, and start it again. Is there an easy way that I can accomplish this with Python or Bash? I can run it in the background but how do I identify it to use kill on it?
check permissions of directories in python
704,953
0
3
15,588
0
python,chmod
Does it have to be python? You can also use find to do that : "find . -perm 775"
0
1
0
0
2009-04-01T10:35:00.000
5
0
false
704,945
0
0
0
1
i want a python program that given a directory, it will return all directories within that directory that have 775 (rwxrwxr-x) permissions thanks!
Create a standalone windows exe which does not require pythonXX.dll
707,261
1
16
9,499
0
python,windows,py2exe
This is not the best way to do it, but you might consider using executable SFX Archive with both the .exe and .dll files inside, and setting it to execute your .exe file when it's double clicked.
0
1
0
0
2009-04-01T20:38:00.000
5
0.039979
false
707,242
1
0
0
2
is there a way to create a standalone .exe from a python script. Executables generated with py2exe can run only with pythonXX.dll. I'd like to obtain a fully standalone .exe which does not require to install the python runtime library. It looks like a linking problem but using static library instead the dynamic one and...
Create a standalone windows exe which does not require pythonXX.dll
707,310
5
16
9,499
0
python,windows,py2exe
Due to how Windows' dynamic linker works you cannot use the static library if you use .pyd or .dll Python modules; DLLs loaded in Windows do not automatically share their symbol space with the executable and so require a separate DLL containing the Python symbols.
0
1
0
0
2009-04-01T20:38:00.000
5
0.197375
false
707,242
1
0
0
2
is there a way to create a standalone .exe from a python script. Executables generated with py2exe can run only with pythonXX.dll. I'd like to obtain a fully standalone .exe which does not require to install the python runtime library. It looks like a linking problem but using static library instead the dynamic one and...
Packaging Ruby or Python applications for distribution?
718,216
1
4
2,181
0
python,ruby,deployment
You can't strictly do this (creating a single installer/executable) in a general cross-platform way, because different platforms use different executable formats. The JVM thing is relying on having a platform-specific JVM already installed on the destination computer; if there is not one installed, then your JAR won't...
0
1
0
0
2009-04-04T04:52:00.000
5
0.039979
false
716,524
0
0
1
2
Are there any good options other than the JVM for packaging Python or Ruby applications for distribution to end-users? Specifically, I'm looking for ways to be able to write and test a web-based application written in either Ruby or Python, complete with a back-end database, that I can then wrap up in a convenient set...
Packaging Ruby or Python applications for distribution?
7,002,189
1
4
2,181
0
python,ruby,deployment
You can either distribute the app as a virtual machine or create an installer that includes all dependencies, like the GitHub guys did for their on-premise version.
0
1
0
0
2009-04-04T04:52:00.000
5
0.039979
false
716,524
0
0
1
2
Are there any good options other than the JVM for packaging Python or Ruby applications for distribution to end-users? Specifically, I'm looking for ways to be able to write and test a web-based application written in either Ruby or Python, complete with a back-end database, that I can then wrap up in a convenient set...
How do I write to the console in Google App Engine?
18,987,161
0
50
25,274
0
python,google-app-engine,logging
Use log.setLevel(Level.ALL) to see messages The default message filtering level seems to be 'error'. I didn't see any useful log messages until I used the setLevel() method to make the .info and .warning messages visible. Text printed to System.out wasn't showing up either. It seems to be interpreted as log.info() l...
0
1
0
0
2009-04-07T20:14:00.000
11
0
false
727,410
0
0
1
2
Often when I am coding I just like to print little things (mostly the current value of variables) out to console. I don't see anything like this for Google App Engine, although I note that the Google App Engine Launcher does have a Log terminal. Is there any way to write to said Terminal, or to some other terminal, usi...
How do I write to the console in Google App Engine?
20,152,111
1
50
25,274
0
python,google-app-engine,logging
Hello I'm using the version 1.8.6 of GoogleAppEngineLauncher, you can use a flag to set the messages log level you want to see, for example for debug messages: --dev_appserver_log_level debug Use it instead of --debug (see @Christopher answer).
0
1
0
0
2009-04-07T20:14:00.000
11
0.01818
false
727,410
0
0
1
2
Often when I am coding I just like to print little things (mostly the current value of variables) out to console. I don't see anything like this for Google App Engine, although I note that the Google App Engine Launcher does have a Log terminal. Is there any way to write to said Terminal, or to some other terminal, usi...
How do you automate the launching/debugging of large scale projects?
750,128
0
4
1,141
0
python,debugging,gdb,subprocess,selinux
Your comment notes that you're sshing in with putty... do you have a controlling tty? With openssh you would want to add the -T option, I don't know how/if putty will do this the way you're using it. Also: you might try using cygwin's ssh instead of putty.
0
1
0
0
2009-04-10T22:43:00.000
3
0
false
739,090
0
0
0
2
Scenario: There is a complex piece of software that is annoying to launch by hand. What I've done is to create a python script to launch the executable and attach gdb for debugging. The process launching script: ensures an environment variable is set. ensures a local build directory gets added to the environment's LD_...
How do you automate the launching/debugging of large scale projects?
753,721
0
4
1,141
0
python,debugging,gdb,subprocess,selinux
if you already have a current script set up to do this, but are having problems automating part of it, maybe you can just grab expect and use it to provide the setup, then drop back into interactive mode in expect to launch the process. Then you can still have your ctrl-c available to interrupt.
0
1
0
0
2009-04-10T22:43:00.000
3
0
false
739,090
0
0
0
2
Scenario: There is a complex piece of software that is annoying to launch by hand. What I've done is to create a python script to launch the executable and attach gdb for debugging. The process launching script: ensures an environment variable is set. ensures a local build directory gets added to the environment's LD_...
Need to build (or otherwise obtain) python-devel 2.3 and add to LD_LIBRARY_PATH
754,180
2
2
1,219
0
python,linux,build
You can use the python RPM's linked to from the python home page ChristopheD mentioned. You can extract the RPM's using cpio, as they are just specialized cpio archives. Your method of extracting them to your home directory and setting LD_LIBRARY_PATH and PATH should work; I use this all the time for hand-built newer v...
0
1
0
0
2009-04-15T21:13:00.000
2
1.2
true
753,749
0
0
0
1
I am supporting an application with a hard dependency on python-devel 2.3.7. The application runs the python interpreter embedded, attempting to load libpython2.3.so - but since the local machine has libpython2.4.so under /usr/lib64, the application is failing. I see that there are RPMs for python-devel (but not versio...
How do you use Binary conversion in Python/Bash/AWK?
6,600,616
0
1
2,535
0
python,bash,binary,awk
In newer versions of Python there exists the bin() function which I believe takes an int and returns a binary literal, of form 0b011010 or whatever.
0
1
0
0
2009-04-16T15:14:00.000
3
0
false
756,630
1
0
0
1
I am new in binary conversion. I use Python, Bash and AWK daily. I would like to see binary conversion's applications in these languages. For example, I am interested in problems which you solve by it at your work. Where do you use binary conversion in Python/Bash/AWK? I would like to see examples of codes.
How to retrieve google appengine entities using their numerical id?
760,060
0
3
1,494
0
python,google-app-engine
Turns out I needed to do key = Key.from_path( Application_ModelName, numeric_id ) wasn't clear till i looked at the dict() of an entity
0
1
0
0
2009-04-17T09:39:00.000
4
0
false
759,771
0
0
1
1
Is it possible to retrieve an entity from google appengine using their numerical IDs and if so how? I tried using: key = Key.from_path("ModelName", numericalId) m = ModelName.get(key) but the key generated wasnt correct.
Investigating python process to see what's eating CPU
784,432
6
6
3,282
0
python,multithreading,debugging,monitoring,pylons
As you noted, in --reload mode, Paste sweeps the filesystem every second to see if any of the files loaded have changed. If they have, then Paste reloads the process. You can also manually tell Paste to monitor non-Python code modules for changes if desired. You can change the reload interval with the --reload-interval...
0
1
0
1
2009-04-17T11:17:00.000
2
1
false
760,039
0
0
0
1
I have a python process (Pylons webapp) that is constantly using 10-30% of CPU. I'll improve/tune logging to get some insight of what's going on, but until then, are there any tools/techniques that allow to see what python process is doing, how many and how busy threads it has etc? Update: configured access log which ...
How to hide console window in python?
70,466,855
1
92
193,952
0
python,console,hide
just change the file extension from .py to .pyw
0
1
0
0
2009-04-19T01:35:00.000
9
0.022219
false
764,631
1
0
0
3
I am writing an IRC bot in Python. I wish to make stand-alone binaries for Linux and Windows of it. And mainly I wish that when the bot initiates, the console window should hide and the user should not be able to see the window. What can I do for that?
How to hide console window in python?
764,642
44
92
193,952
0
python,console,hide
In linux, just run it, no problem. In Windows, you want to use the pythonw executable. Update Okay, if I understand the question in the comments, you're asking how to make the command window in which you've started the bot from the command line go away afterwards? UNIX (Linux) $ nohup mypythonprog & Windows C:/...
0
1
0
0
2009-04-19T01:35:00.000
9
1
false
764,631
1
0
0
3
I am writing an IRC bot in Python. I wish to make stand-alone binaries for Linux and Windows of it. And mainly I wish that when the bot initiates, the console window should hide and the user should not be able to see the window. What can I do for that?
How to hide console window in python?
15,148,338
28
92
193,952
0
python,console,hide
On Unix Systems (including GNU/Linux, macOS, and BSD) Use nohup mypythonprog &, and you can close the terminal window without disrupting the process. You can also run exit if you are running in the cloud and don't want to leave a hanging shell process. On Windows Systems Save the program with a .pyw extension and now i...
0
1
0
0
2009-04-19T01:35:00.000
9
1
false
764,631
1
0
0
3
I am writing an IRC bot in Python. I wish to make stand-alone binaries for Linux and Windows of it. And mainly I wish that when the bot initiates, the console window should hide and the user should not be able to see the window. What can I do for that?
Programmatically taking screenshots in windows without the application noticing
767,992
6
0
3,194
0
python,windows,events,operating-system,screenshot
There will certainly be no protection against a screenshot taken with a digital camera.
1
1
0
0
2009-04-20T07:11:00.000
4
1
false
767,212
0
0
0
2
There are various ways to take screenshots of a running application in Windows. However, I hear that an application can be tailored such that it can notice when a screenshot is being taken of it, through some windows event handlers perhaps? Is there any way of taking a screenshot such that it is impossible for the appl...
Programmatically taking screenshots in windows without the application noticing
767,985
3
0
3,194
0
python,windows,events,operating-system,screenshot
> I hear that an application can be tailored such that it can notice when a screenshot is being taken of it Complete nonsense. Don't repeat what kids say... Read MSDN about screenshots.
1
1
0
0
2009-04-20T07:11:00.000
4
1.2
true
767,212
0
0
0
2
There are various ways to take screenshots of a running application in Windows. However, I hear that an application can be tailored such that it can notice when a screenshot is being taken of it, through some windows event handlers perhaps? Is there any way of taking a screenshot such that it is impossible for the appl...
Estimating zip size/creation time
767,701
3
7
3,583
0
python,zip,time-estimation
I suggest you measure the average time it takes to produce a zip of a certain size. Then you calculate the estimate from that measure. However I think the estimate will be very rough in any case if you don't know how well the data compresses. If the data you want to compress had a very similar "profile" each time you c...
0
1
0
1
2009-04-20T10:23:00.000
4
0.148885
false
767,684
0
0
0
2
I need to create ZIP archives on demand, using either Python zipfile module or unix command line utilities. Resources to be zipped are often > 1GB and not necessarily compression-friendly. How do I efficiently estimate its creation time / size?
Estimating zip size/creation time
767,704
16
7
3,583
0
python,zip,time-estimation
Extract a bunch of small parts from the big file. Maybe 64 chunks of 64k each. Randomly selected. Concatenate the data, compress it, measure the time and the compression ratio. Since you've randomly selected parts of the file chances are that you have compressed a representative subset of the data. Now all you have to ...
0
1
0
1
2009-04-20T10:23:00.000
4
1.2
true
767,684
0
0
0
2
I need to create ZIP archives on demand, using either Python zipfile module or unix command line utilities. Resources to be zipped are often > 1GB and not necessarily compression-friendly. How do I efficiently estimate its creation time / size?
importing gaeutilities or any other module by dev_appserver
771,165
1
0
803
0
python,google-app-engine,import
Strange. I would start troubleshooting by making 100% sure that the sys.path that dev_appserver.py uses does include C:\Python25\Lib\site-packages\gaeutilities-1.2.1. I suggest you display sys.path in a HTML view served by dev_appserver.py. Check permissions on gaeutilities-1.2.1 directory and subdirectories. Perhaps t...
0
1
0
0
2009-04-20T22:39:00.000
1
1.2
true
770,385
0
0
1
1
I'm developing a gae application on a windows machine. to have session handling I downloaded gaeutilities and added its path (C:\Python25\Lib\site-packages\gaeutilities-1.2.1) to the registry ("PythonPath" item under python25). in my code this is how I import the gaeutilities Session class: from appengine_utilities.ses...
Call python script from AIR application?
3,895,749
0
1
1,223
0
python,flex3,air
Air 2.0 has a native process API.
0
1
0
0
2009-04-21T09:09:00.000
4
0
false
771,738
0
0
0
3
How can we invoke a python script using AIR 1.5?
Call python script from AIR application?
771,836
-1
1
1,223
0
python,flex3,air
Hypothetically, Adobe Alchemy technology may allow you to port Python interpreter to Flash. Though I seriously doubt that's the approach you want to use. Depending on task there should be easier solutions.
0
1
0
0
2009-04-21T09:09:00.000
4
-0.049958
false
771,738
0
0
0
3
How can we invoke a python script using AIR 1.5?
Call python script from AIR application?
771,745
1
1
1,223
0
python,flex3,air
You cannot directly invoke system commands or run an executable (the python interpreter) from within an AIR application. If it's possible to share what exactly you want to do, maybe we can suggest alternatives. If it's really really (that's two reallys) important to run an executable from AIR lookup the CommandProxy d...
0
1
0
0
2009-04-21T09:09:00.000
4
1.2
true
771,738
0
0
0
3
How can we invoke a python script using AIR 1.5?
What does the 'shell' argument in subprocess mean on Windows?
772,743
1
1
1,280
0
python,subprocess
When you execute an external process, the command you want may look something like "foo arg1 arg2 arg3". If "foo" is an executable, that is what gets executed and given the arguments. However, often it is the case that "foo" is actually a script of some sort, or maybe a command that is built-in to the shell and not an...
0
1
0
0
2009-04-21T09:35:00.000
4
1.2
true
771,816
1
0
0
1
The docs for the subprocess module state that 'If shell is True, the specified command will be executed through the shell'. What does this mean in practice, on a Windows OS?
os.path.exists() for files in your Path?
777,067
3
16
87,347
0
python,windows
Please note that checking for existance and then opening is always open to race-conditions. The file can disappear between your program's check and its next access of the file, since other programs continue to run on the machine. Thus there might still be an exception being thrown, even though your code is "certain" th...
0
1
0
0
2009-04-22T01:09:00.000
5
0.119427
false
775,351
1
0
0
2
I commonly use os.path.exists() to check if a file is there before doing anything with it. I've run across a situation where I'm calling a executable that's in the configured env path, so it can be called without specifying the abspath. Is there something that can be done to check if the file exists before calling it? ...
os.path.exists() for files in your Path?
777,961
2
16
87,347
0
python,windows
You generally shouldn't should os.path.exists to try to figure out if something is going to succeed. You should just try it and if you want you can handle the exception if it fails.
0
1
0
0
2009-04-22T01:09:00.000
5
0.07983
false
775,351
1
0
0
2
I commonly use os.path.exists() to check if a file is there before doing anything with it. I've run across a situation where I'm calling a executable that's in the configured env path, so it can be called without specifying the abspath. Is there something that can be done to check if the file exists before calling it? ...
access eggs in python?
775,908
1
1
412
0
python,egg
Adding the egg to PYTHONPATH or to sys.path will allow you to access the modules and packages within.
0
1
0
0
2009-04-22T05:55:00.000
2
0.099668
false
775,880
1
0
0
1
Is there any way to call an installed python egg from python code? I need to cal a sphinx documentation generator from within a python code, and currently i'm doing it like this: os.system( "sphinx-build.exe -b html c:\\src c:\\dst" ) This works, but requires some additional configuration: 'scripts' folder inside a pyt...
How to run a python script in the background?
783,541
2
26
42,798
0
python,windows,backgrounding
cron it on linux; schedule it on windows [control panel > scheduled tasks > Add scheduled task]
0
1
0
0
2009-04-23T21:07:00.000
6
0.066568
false
783,531
1
0
0
3
I have a script that checks something on my PC every 5 minutes and I don't want Python to show on my task tray. I use Windows as my operating system. Is there any way to make Python run in the background and force it to not show in my task tray?
How to run a python script in the background?
783,559
5
26
42,798
0
python,windows,backgrounding
Just another option you have: You can create a shortcut to your Python script, then right-click the shortcut --> Properties --> Shortcut tab There is a drop-down box under the Run option which lets you run the command minimized.
0
1
0
0
2009-04-23T21:07:00.000
6
0.16514
false
783,531
1
0
0
3
I have a script that checks something on my PC every 5 minutes and I don't want Python to show on my task tray. I use Windows as my operating system. Is there any way to make Python run in the background and force it to not show in my task tray?
How to run a python script in the background?
783,544
-6
26
42,798
0
python,windows,backgrounding
Look for Schedule Tasks in the control panel.
0
1
0
0
2009-04-23T21:07:00.000
6
1.2
true
783,531
1
0
0
3
I have a script that checks something on my PC every 5 minutes and I don't want Python to show on my task tray. I use Windows as my operating system. Is there any way to make Python run in the background and force it to not show in my task tray?
Is there a way to retrieve process stats using Perl or Python?
785,836
2
2
4,760
0
python,linux,perl,process
If you are fork()ing the child, you will know it's PID. From within the parent you can then parse the files in /proc/<PID/ to check the memory and CPU usage, albeit only for as long as the child process is running.
0
1
0
1
2009-04-24T13:18:00.000
3
0.132549
false
785,810
0
0
0
2
Is there a way to generically retrieve process stats using Perl or Python? We could keep it Linux specific. There are a few problems: I won't know the PID ahead of time, but I can run the process in question from the script itself. For example, I'd have no problem doing: ./myscript.pl some/process/I/want/to/get/stats/f...
Is there a way to retrieve process stats using Perl or Python?
785,855
1
2
4,760
0
python,linux,perl,process
A common misconception is that reading /proc is like reading /home. /proc is designed to give you the same information with one open() that 20 similar syscalls filling some structure could provide. Reading it does not pollute buffers, send innocent programs to paging hell or otherwise contribute to the death of kittens...
0
1
0
1
2009-04-24T13:18:00.000
3
0.066568
false
785,810
0
0
0
2
Is there a way to generically retrieve process stats using Perl or Python? We could keep it Linux specific. There are a few problems: I won't know the PID ahead of time, but I can run the process in question from the script itself. For example, I'd have no problem doing: ./myscript.pl some/process/I/want/to/get/stats/f...
How to install Python on mac os x and windows with Aptana Studio?
14,819,410
2
2
3,309
0
python,aptana
To add the current Python version on Mac: Add new interpreter via Aptana Studio 3/Preferences/PyDev/Interpreter-Python. Give it name (check version using the Terminal and then python or /usr/bin/python. Then add the path (2.7 in my case): /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python If you inst...
0
1
0
0
2009-04-24T19:57:00.000
7
0.057081
false
787,330
0
0
0
2
How do I get python to work with aptana studio? I've downloaded a bunch of stuff, but none of them seem to give me a straight text editor where I can interpret code into an executable type thing. I know there's interactive mode in IDLE, but I want to actually use an editor. So I downloaded the pydev extensions for Apta...
How to install Python on mac os x and windows with Aptana Studio?
788,002
0
2
3,309
0
python,aptana
On Mac OS X Leopard and Tiger, Python is already installed. On Mac, I've tried a few editor. Textmate is my current choice. If you're looking for a free one, I really liked Xcode. But you'll have to run your script from the command line. If you want a cross-platform environment, you could try Eclipse and the pydev exte...
0
1
0
0
2009-04-24T19:57:00.000
7
0
false
787,330
0
0
0
2
How do I get python to work with aptana studio? I've downloaded a bunch of stuff, but none of them seem to give me a straight text editor where I can interpret code into an executable type thing. I know there's interactive mode in IDLE, but I want to actually use an editor. So I downloaded the pydev extensions for Apta...
How to install python-rsvg without python-gnome2-desktop on Ubuntu 8.10?
787,960
2
4
3,929
0
python,librsvg,rsvg
No longer relevant. Installed the entire package, and got rsvg that way.
0
1
0
0
2009-04-24T22:32:00.000
1
1.2
true
787,812
1
0
0
1
I need rsvg support in Python 2.5.2. It appears that I have to install all 199 deps along with the package python-gnome2-desktop, which doesn't sound fun at all. Alternatives?
Blender- python
788,143
1
3
1,821
0
python,blender
Personally, I was setting my PATH environment variable so that Blender would find the most appropriate version of Python first.
0
1
0
0
2009-04-25T02:36:00.000
4
0.049958
false
788,102
1
0
0
2
How do I point Blender to the version of python I have installed
Blender- python
7,134,809
5
3
1,821
0
python,blender
Blender 2.5x now comes bundled with its own python, this is un-modified, only included to so users don't have to match their system versions of python. If you remove this python/ directory blender will look for python on the system, matching the version it was compiled with. (3.2, 3.3 etc, minor point releases are all ...
0
1
0
0
2009-04-25T02:36:00.000
4
0.244919
false
788,102
1
0
0
2
How do I point Blender to the version of python I have installed
Check to see if python script is running
66,500,807
0
121
189,116
0
python,process,daemon
I was looking for an answer on this and in my case, came to mind a very easy and very good solution, in my opinion (since it's not possible to exist a false positive on this, I guess - how can the timestamp on the TXT be updated if the program doesn't do it): --> just keep writing on a TXT the current timestamp in some...
0
1
0
1
2009-04-25T06:59:00.000
20
0
false
788,411
0
0
0
1
I have a python daemon running as a part of my web app/ How can I quickly check (using python) if my daemon is running and, if not, launch it? I want to do it that way to fix any crashes of the daemon, and so the script does not have to be run manually, it will automatically run as soon as it is called and then stay ru...
Locales and temperature/length conversion
790,078
0
1
355
0
python,localization
For what it's worth, KDE offers a choice of "Metric" or "Imperial" as the standard unit system, so I would presume that it's possible to access that information through Python somehow. Gnome might have a similar setting, I'm not sure... but I don't think there's any equivalent for a generic UNIX/Linux system. The most...
0
1
0
1
2009-04-25T23:49:00.000
2
0
false
789,953
1
0
0
1
Do locales contain information about preferred units for temperature, lengths, etc. on Unix/Linux? Is it possible to access these properties from Python? I checked out the "locales" module, but didn't find anything suitable. I'd like my application to automatically convert values into the most suitable unit.