Questions tagged [python-2.3]

For issues relating to development in Python, version 2.3

The Python 2.3 release (introduced 2003, final version 2005) introduced several changes and speed improvements over version 2.2.

Use this tag if your question is specifically about . If your question applies to Python in general, use the tag . If your question applies to Python 2.x but not to Python 3, use the tag . If you aren't sure, tag your question and mention which version you're using in the body of your question.

29 questions
0
votes
2 answers

How to write a unittest with setUpClass & tearDownClass in Python 2.3

I am trying to write unittests in python 2.3. I've got everything working accept the class level setUp and tearDown function. I've tried to look online but am not able to find a way to define these in a python 2.3 unittest case. Hence, is it…
Danish
  • 3,708
  • 5
  • 29
  • 48
0
votes
5 answers

how to calculate number of items in per user groupby item

How can I output a result like this: user I R H ================= atl001 2 1 0 cms017 1 2 1 lhc003 0 1 2 from a list like this: atl001 I atl001 I cms017 H atl001 R lhc003 H cms017 R cms017 I lhc003 H lhc003 R cms017 R i.e. I…
MacUsers
  • 2,091
  • 3
  • 35
  • 56
0
votes
1 answer

Python 2 xml.dom - Changing Element Prefix

I'm working with an older version of Python (2.3) for a legacy system, and I don't have ElementTree available (which was since 2.5...). The xml.dom package seems to be the best interface I have for parsing and editing XML documents, but if you find…
user7851115
0
votes
2 answers

PyQt & Python2.3

Is there a PyQt3 (Or 4) Windows binary installer for Python 2.3? I've googled around for an hour now but to no avail. Why am I using version 2.3? With my project file size is paramount. Without the interface, un-needed modules and compressing using…
Morphine
  • 643
  • 2
  • 6
  • 11
0
votes
1 answer

Python 2.3: how can get exact float value after conversation?

x="1,234.00" y =x.replace(',','') k = float(y) print k output=1234.0 but i need 1234.00 value please solve this problem
Lakshmi
  • 1
  • 2
0
votes
1 answer

reasons that brought to PEP 263

I was reading the PEP 263 and I got stuck on this paragraph: In Python 2.1, Unicode literals can only be written using the Latin-1 based encoding "unicode-escape". This makes the programming environment rather unfriendly to Python users…
zer0uno
  • 7,521
  • 13
  • 57
  • 86
0
votes
1 answer

python 2.3 - remove directory without waiting for process to finish

I wish to write a python script (to be run in Linux) that one of its requirements is to remove a directory. the problem is that the directory is very big and takes minutes to complete. Problems: I don't want the remove command to block script…
idanshmu
  • 5,061
  • 6
  • 46
  • 92
0
votes
1 answer

Accessing a class/method from another program in Python

I have a program (blackjack.py) and it accesses another program's (cards.py and games.py) within its code. Most of this is from a book, so I'm having trouble understanding how it works. Heres the code for cards.py: class Card(object): """ A…
mandelbug
  • 1,548
  • 5
  • 20
  • 32
0
votes
1 answer

Writing and Reading to/from a file in python

I would appreciate any help with my homework assignment - It's a simple program for class that is supposed to check for a file, if it exists, it reads the file, and loads the data into the program, so you can list scores, and add more of them. Its…
mandelbug
  • 1,548
  • 5
  • 20
  • 32
0
votes
2 answers

Python Shell - Syntax Error

I am very very new to Python. I am trying to get a python program to run by writing 'python hello.py' but every time I do that I get a Syntax Error. Why is that? However when I open the file and click on run module, it works. Why won't it work if I…
Saturnian
  • 1,686
  • 6
  • 39
  • 65
0
votes
3 answers

python 2.3 how to run a piped command

I want to run a command like this grep -w 1 pattern <(tail -f mylogfile.log) basically from a python script i want to monitor a log file for a specific string and continue with the python script as soon as i found that. I am using os.system(),…
puneet agrawal
  • 343
  • 2
  • 4
  • 13
0
votes
2 answers

Python 2.3 Sort Dictionary by Value using only .Sort()

How do we sort dictionary by values in Python 2.3 when all we got is the dict.sort() taking no arguments. I can do the sorting using sorted(dict.items(), lambda x, y: cmp(x[1], y[1]), reverse=True) in newer Python. What is needed is this: Example: d…
Poker Prof
  • 169
  • 5
  • 15
-1
votes
1 answer

Python 2.3 for Windows 7 64-bit

I have developed my application with some python scripts that was written in Python 2.3 (Windows 32-bit OS) Now I need to give support for Windows 64-bit. But I can not find Python 2.3 for 64-bit. I have installed Python 2.7 in 64-bit, but I'm…
Thorin Oakenshield
  • 14,232
  • 33
  • 106
  • 146
-4
votes
1 answer

How to create a program that will store 50 random numbers in a list, and find average?

How would I: Write a function that will take a single parameter of an integer, and return a list of that many random numbers between 1 and 100. Using this function, write a program that will store 50 random numbers in a list, and then calculate and…
Emma
  • 9
1
2