For issues relating to development in Python, version 2.5.
0
votes
0answers
2 views
Connection refused when starting TCP Server / Client over cmd
I have implemented a TCP Server and a TCP Client (to test the server) in Python 2.5.1.
If I start both Python scripts in two separate PythonWin IDE's (on the same machine) everything works fine. The ...
0
votes
3answers
69 views
Remove amount of lines above and below a line containing a string
I'm formatting GPS output logs and I need an efficient method to remove x number of lines above the line that contains a 0 and y number of lines below that line.
...
1
vote
1answer
38 views
Python 2.5: ElementTree and UML in XML
I'm working with an XML file which represent an UML model. Here is an example of what it is:
<?xml version="1.0" encoding="utf-8"?>
<XMI xmi.version="1.1" xmlns:UML="omg.org/UML13">
...
0
votes
1answer
21 views
exception handling with multiple python versions
I am having a delicate problem with python exceptions.
My software is currently running on multiple platforms and I still aim at being compatible with py2.5 because it's on a cluster where changing ...
0
votes
0answers
13 views
Error importing numpy: “please exit the numpy source tree”
Got this error:
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
import numpy
File "C:\Progra~1\Python25\lib\numpy\__init__.py", line 127, in ...
0
votes
1answer
25 views
Problems with Tkinter Binding to enter/return
My program:
#!/usr/bin/python
from Tkinter import *
class App:
def __init__(self,master):
frame = Frame(master,width = 100,height = 100)
frame.bind('<Return>',self.ret)
...
0
votes
1answer
22 views
Trying to get the value from a Tkinter scale and put it into a Label
I have a small Python program that takes the value of a Tkinter scale and puts it into a label.
#!/usr/bin/python
from Tkinter import *
class App:
strval = StringVar()
def ...
1
vote
1answer
46 views
How to fix the “'str' object has no attribute 'META'” error?
I have a Django application with following model:
class Topic(models.Model):
title = models.CharField(max_length=140)
There is a URL, which should display Topic's details:
urlpatterns = ...
0
votes
1answer
29 views
Problems With Tkinter in python 2.5
So I'm doing a simple program that basically makes a scale/slidebar on the screen. When I run the application the scale shows up and works, but it doesn't print the values to the console(terminal). ...
0
votes
1answer
32 views
“No such column” error during deletion of a record in Django admin
I have following model (models.py) in my Django project:
class Topic(models.Model):
id = models.AutoField(primary_key=True)
title = models.CharField(max_length=140)
def ...
0
votes
2answers
58 views
Int() Conversions not working right in python
So I'm making a python Module to create and save data for an in-game character.
the the class is Character and goes as follows:
#!/usr/bin/python
import os
import re
class Character:
storage = ...
1
vote
1answer
53 views
How, I can change Excel sheet tab background colour by python
I am generating report and want to highlight the tab when its fails.
import xlrd
import xlwt
wb = Workbook()
add_result = wb.add_sheet(req_id[req_num])
wb.save("report_name.xls")
1
vote
2answers
96 views
NameError from Python input() function
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?
1
vote
5answers
66 views
using 'not' and 'or' together in Python
In Python 2.5, I used the code:
yn=raw_input('''This program is for solving linear and quadratic equations.
Is this what you want to do?
''')
if not 'y' in yn or 'Y' in yn:
...
2
votes
2answers
98 views
Validate comma separated decimal values reading char by char
I have a String which contains a Currency Value.
I have to read character by character from string and function must return result = 0 for all values of val.
Ex: string = "You Score is MX var."
Where ...