I've written my code to target Python 2.6.5, but I now need to run it on a cluster that only has 2.5.4, something that wasn't on the horizon when I wrote the code. Backporting the code to 2.5 shouldn't be too hard, but I was wondering if there was either a cheat-sheet or an automated tool that would help me with this. For some things, li...
Newbie Python question. I have a class that inherits from several classes, and some of the specialization classes override some methods from the base class. In certain cases, I want to call the unspecialized method. Is this possible? If so, what's the syntax?
class Base(object):
def Foo(self):
print "Base.Foo"
def B...
I want to show .ppt (PowerPoint) files uploaded by my user on my website. I could do this by converting them into Flash files, then showing the Flash files on the web page. But I don't want to use Flash to do this. I want to show it, like google docs shows, without using Flash.
I've already solved the problem for .pdf files by convertin...
How can I grab the elements inside the parentheses and put them in a file?
me (I)
you (You)
him (He)
her (She)
Thanks in advance,
Adia
...
I am very new to Panda3D and I have been trying to find a simple example of panda3d working together with wxpython (as its main frame, for instance).
The forums talk about such possibility, but I am yet to find a simple example. Can anyone please point me to a good and simple example of such code?
Thanks
...
I need to extract a description from a file, which looks like this:
"TES4!\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x00\x00HEDR\x0c\x00\xd7\xa3p?h\x03\x00\x00\x00\x08\x00\xffCNAM\t\x00Martigen\x00SNAM\xaf\x00Mart's Mutant Mod - RC4\n\nDiverse creatures & NPCs, new creatures & NPCs, dynamic size and stat scaling...
What a some possible solutions to best implement Janrain Engage (RPX Now) on Google App Engine?
...
Hi all,
I was wondering whether objects serialized using CPython's cPickle are readable by using IronPython's cPickle; the objects in question do not require any modules outside of the built-ins that both Cpython and IronPython include. Thank you!
...
Possible Duplicate:
Unziping files in python
How do I extract a zip file with Python's ZipFile module? An example script would be awesome!
...
Hi,
I have a somewhat large document and want to do stop-word elimination and stemming on the words of this document with "Python".Does anyone know an of the shelf package for these?
If not a code which is fast enough for large documents is also welcome.
Thanks
...
Hi, everyone
I've found some strange behaviour in python regarding negative numbers:
>>> a = -5
>>> a % 4
3
Could anyone explain what's going on?
...
I try to post a text to activity stream's myspace, by using python sdk from myspace 's website . Anyone has some example or what i need to use more?
...
The error which i am getting is
Traceback (most recent call last):
File "imp.py", line 52, in <module>
mode = getMode()
File "imp.py", line 8, in getMode
mode = input().lower()
File "<string>", line 1, in <module>
NameError: name 'encrypt' is not defined
Below is the code.
# Caesar Cipher
MAX_KEY_SIZE = 26
def getMod...
How do I read the number of files in a specific folder using Python? Example code would be awesome!
...
I am coding a desktop application which shows contents from text file in a gtk.label, i update that text file, say once in every 15 mints. Are are there any methods to make the application to read the text file in constant intervals and display it without restarting the window
...
My project targets a low-cost and low-resource embedded device. I am dependent on a relatively large and sprawling Python code base, of which my use of its APIs is quite specific.
I am keen to prune the code of this library back to its bare minimum, by executing my test suite within a coverage tools like Ned Batchelder's coverage or fi...
Could someone tell me how I can run Django on two ports simultaneously? The default Django configuration only listens on port 8000. I'd like to run another instance on port xxxx as well. I'd like to redirect all requests to this second port to a particular app in my Django application.
I need to accomplish this with the default Django ...
I'm a beginner having trouble decoding several dozen CSV file with numbers + (Simplified) Chinese characters to UTF-8 in Python 2.7.
I do not know the encoding of the input files so I have tried all the possible encodings I am aware of -- GB18030, UTF-7, UTF-8, UTF-16 & UTF-32 (LE & BE). Also, for good measure, GBK and GB3212, though th...
Hello,
I work in the django IPython-shell, which can be started with manage.py shell.
When i load an extern function in the shell for testing, everything is alright. But when i make changes to the function, the shell still has the old version of the function. Even if i make a new import.
Does anyone know how to reload the actual versio...
Due to refactoring/reworking on a controller I've had to embed a Python Interpreter inside a C application. I can now call python functions and pass/get Objects into Python fine.
The python code is a controller for a robot (currently simulated), this now needs make use of some C code for comparisons I'm making.
Previously the Python ...