How do I create a windows service with Python
This is a duplicate of this question. Please close. I really need my python program to run as a windows service. How can I do this? ...
This is a duplicate of this question. Please close. I really need my python program to run as a windows service. How can I do this? ...
I'm looking for a cross-platform file monitoring python package? I know it is possible to monitor files on windows usung pywin32, and there are packages working on Linux/Unix but does anyone know about a cross-platform one? ...
Hy, I want to use TurboMail3 (website) together with a TurboGears 2(website) project. Which files to I have to modify to include TurboMail into my TurboGears project? Everything I find on the web is for TurboMail2 and TurboGears1. The TurboMail Documentation states that there actually is a TG2 integration but I never found documentatio...
So, I'm playing with decorators in python 2.6, and I'm having some trouble getting them to work. Here's by class file: class testDec: @property def x(self): print 'called getter' return self._x @x.setter def x(self, value): print 'called setter' self._x = value What I thought this me...
I read in an earlier answer that exception handling is cheap in Python so we shouldn't do pre-conditional checking. I have not heard of this before, but I'm relatively new to Python. Exception handling means a dynamic call and a static return, whereas an if statement is static call, static return. How can doing the checking be bad and ...
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 consistent with my code. I...
Let's assume I'm creating a simple class to work similar to a C-style struct, to just hold data elements. I'm trying to figure out how to search the list of objects for objects with a certain attribute. Below is a trivial example to illustrate what I'm trying to do. For instance: class Data: pass myList = [] for i in range(20):...
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. ...
I've been applying Django's automatic administration capabilities to some applications who had previously been very difficult to administer. I'm thinking of a lot of ways to apply it to other applications we use (including using it to replace some internal apps altogether). Before I go overboard though, is there anything in particular ...
I created a new property for my db model in the Google App Engine Datastore. Old: class Logo(db.Model): name = db.StringProperty() image = db.BlobProperty() New: class Logo(db.Model): name = db.StringProperty() image = db.BlobProperty() is_approved = db.BooleanProperty(default=False) How to query for the Logo records, wh...
Looking at this tutorial here: link text it references matplotlib.get_example_data('goog.npy'). I get an error when I run this, and furthermore I can't even find the mpl-data/ folder in my macosx installation of matplot lib when searching using Spotlight. Any idea what this function is now called? ...
I'm just beginning Python, and I'd like to use an external RSS class. Where do I put that class and how do I import it? I'd like to eventually be able to share python programs. ...
I'm trying to parse some HTML with XPath. Following the simplified XML example below, I want to match the string 'Text 1', then grab the contents of the relevant content node. <doc> <block> <title>Text 1</title> <content>Stuff I want</content> </block> <block> <title>Text 2</title> <content>S...
How can I remove all HTML from a string in Python? For example, how can I turn: blah blah <a href="blah">link</a> into blah blah link Thanks! ...
I am querying a MySQL database in python and selecting a boolean value -- so the response from MySQL is either the string 'True' or 'False'. I would like to execute further code based on the boolean value from MySQL. E.g. data = 'False' # assume this is what was returned by MySQL. if data: print 'Success' #really this would be whe...
I'm new to python. I've studied C and I noticed that that the C structure (struct) seemed to have the same task as "class" in python. So what is, conceptually, the difference? ...
By best, I mean most-common, easiest to setup, free. Performance doesn't matter. ...
This page says that py2exe is GPL licensed (bottom of the page) My concern is that you have to distribute some of the files they generate. I think this would be allowed with LGPL, but not GPL. <--- Please address this in your answer. My final product would not be GPL and will not give out source code. Update: Please see my answer b...
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 gotten a version of ...
I'm writing a simple python script that will interface with the AIM servers using the OSCAR protocol. It includes a somewhat complex handshake protocol. You essentially have to send a GET request to a specific URL, receive XML or JSON encoded reply, extract a special session token and secret key, then generate a response using the token ...