python-2.5 Questions
1
Solved
I am just getting an weird error:
IntegrityError: UNIQUE constraint failed: jumptimes.player_id, jumptimes.map_id, jumptimes.runID
My SQL QUERY:
t = (playerid, mapid, timeTaken, (time() if not ...
Chemo asked 13/3, 2015 at 16:52
1
I have this installed
on Windows 7
Python 2.7.6 (my default, with virtualenv installed)
Python 2.4.4
Python 2.5.4
Python 2.6.6
Python 3.3.3
virtualenv 1.10.1
I want to test code on all of those...
Incalescent asked 14/12, 2013 at 14:26
2
Solved
I'm trying to make a tabbed GUI in Python and I want to be able to toggle the enabled/disabled state of the tabs (i.e. prevent the user from switching tabs, and ghost non-active tabs out to make th...
Neurologist asked 7/1, 2014 at 22:29
6
I have a a user-inputted polynomial and I only want to use it if it only has characters in the string 1234567890^-+x.
How can I check if it does or not without using external packages? I onl...
Plato asked 22/12, 2013 at 3:40
2
Solved
I know this is easily possible in python 2.6. But what is the easiest way to do this in Python 2.5?
x = "This is my string"
b = to_bytes(x) # I could do this easily in 2.7 using bin/ord 3+ could ...
Riboflavin asked 18/12, 2011 at 17:6
1
Solved
I am running pygame (for Python) on Windows. I have some .pyo files and some .pyd files. I have another script for somewhere else that is trying to import one of the .pyd files as a module but I ke...
Sausa asked 13/1, 2012 at 5:47
1
Solved
input_var = input ("Press 'E' and 'Enter' to Exit: ")
NameError: name 'e' is not defined
I am using Python 2.5. How I can overcome this error?
Hoenack asked 9/5, 2013 at 8:21
2
Solved
I have the following code:
f = urllib.urlopen(url)
html = f.read()
I would like to know the HTTP status code (HTTP 200, 404 etc) that comes from opening the url above.
Anybody knows how it can ...
Unto asked 10/2, 2013 at 9:1
3
How to read correctly japanese and chinese characters.
I'm using python 2.5. Output is displayed as "E:\Test\?????????"
path = r"E:\Test\は最高のプログラマ"
t = path.encode()
print t
u = path.decode()
prin...
Studnia asked 4/2, 2013 at 8:29
1
Solved
I am using Eclipse 4.2.1 with the pydev Plugin (version 2.7.1) for python development.
It seems that pydev has problems with precompiled python files (*.pyc files). I am using a package which is on...
Saltatorial asked 20/12, 2012 at 7:39
1
Solved
Ok, so I am making a video. I want to know exactly how to use the FPS argument. It is a float, so I assumed it was what interval do I want between each frame. Can you give an example? I just want t...
Laos asked 16/12, 2012 at 23:6
2
Solved
I noticed the following using Python 2.5.2 (does not occur using 2.7):
#!/usr/bin/python
import sys
for line in sys.stdin:
print line,
Output:
$ echo -e "one\ntwo\nthree" | python test.py
$ ...
Tami asked 29/10, 2012 at 15:19
3
Solved
I need to test if a string is Unicode, and then if it whether it's UTF-8. After that, get the string's length in bytes including the BOM, if it ever uses that. How can this be done in Python?
Also...
Resound asked 21/8, 2012 at 10:37
1
Solved
I have the code like below:
temp = os.walk(sys.argv[1])
for root, dirs, files in temp:
for i in dirs:
dir = os.path.join(root,i)
os.rename(dir, dir+"!")
It works almost ok. But once parent fo...
Saint asked 5/8, 2012 at 12:14
3
Solved
How can I wait for user to press any key for 20 secs? I.e. I show the message and it counts 20 secs, the code continues execution either if 20 secs are passed OR if user pressed any key. How can I ...
Jaguarundi asked 2/8, 2012 at 18:51
5
Solved
I have the following class.
func_list= ["function1", "function2", "function3"]
class doit(object):
def __init__(self):
for item in func_list:
if item == "function1":
self.function1()
e...
Drollery asked 25/7, 2012 at 12:35
5
Solved
When I use the print command, it prints whatever I want and then goes to a different line. For example:
print "this should be"; print "on the same line"
Should return:
t...
Minimus asked 29/6, 2012 at 17:9
5
Solved
The Google App Engine Launcher tells me:
WARNING appengine_rpc.py:399 ssl module not found.
Without the ssl module, the identity of the remote host cannot be verified, and
connections may NOT be s...
Thacher asked 14/2, 2010 at 16:48
3
Solved
How can I do a fast reset for a continue set of values inside a Python buffer object?
Mainly I am looking for a memset :)
PS. The solution should work with Python 2.5 and modify the buffer itself...
Onder asked 25/11, 2011 at 15:4
1
Solved
I am working on finding a way to reduce boilerplate decorators. We have a lot of classes that use a @decorate. For example:
class MyClass(Base):
@decorate
def fun1(self):
pass
@decorate
def f...
Augustina asked 23/11, 2011 at 15:51
3
Solved
I am writing a module that is supposed to work in both Python 2 and 3 and I need to define a binary string.
Usually this would be something like data = b'abc' but this code code fails on Python 2....
Wraf asked 13/10, 2011 at 13:45
6
Solved
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 er...
Geanticlinal asked 19/3, 2009 at 4:0
1
Solved
In Python 2.6+, you can handle exceptions like this:
try:
# stuff
except Exception as e:
return 'exception %s' % type(e)
What is the equivalent in 2.5?
Sevier asked 25/5, 2011 at 14:33
5
Solved
I need to test an issue that occurs on Windows with Python 2.5, but the releases page doesn't link to a binary for 2.5.
Is there anywhere I could find a copy?
Haggard asked 4/8, 2010 at 18:57
1
I got an
AttributeError: '_MainProcess' object has no attribute '_exiting'
from a Python application. Unfortunately this code has to run Python 2.5 and therefore the processing module nowadays k...
Funicular asked 11/11, 2010 at 15:7
© 2022 - 2024 — McMap. All rights reserved.