Questions tagged [python-2.2]

For issues relating to development in Python, version 2.2

The Python 2.2 release (introduced 2001, final version 2003) introduced many changes including new style classes and unified types and classes.

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.

Look here for Python 2.2 specific downloads and documentation.

18 questions
16
votes
5 answers

How do I rethrow an exception that contains information about an original exception?

So I basically have to isolate 2 layers of the application from one another by exceptions. I have this WLST 12c script (python 2.2), that goes like try: something something... except java.lang.UnsuportedOpperationException, (a, b): …
vlad-ardelean
  • 7,480
  • 15
  • 80
  • 124
6
votes
4 answers

Dedupe and sort a list in Python 2.2

In Python 2.2 (don't ask), what's the neatest way to sort a list and remove duplicates? I can obviously write a function that would sort() then iterate, but am wondering if there's an idiomatic one-liner. edit: The list is short, so efficiency is…
NPE
  • 486,780
  • 108
  • 951
  • 1,012
4
votes
3 answers

how to join dictionary

I've data stat=[{'state': {'europe': ['germany', 'england']}}, {'state': {'europe': ['french', 'netherland']}}, {'state': {'asian': ['japan', 'china']}}] Question: how to join between the list ? Given result: {'state': [{'europe':…
2
votes
2 answers

Run all iterations in a for loop in parallel

I am using Python v 2.2.1 and trying to write a code which needs to perform some tasks in parallel inside a for loop. The number of iterations is not fixed and depends on the list (serverList, in this case). How can I achieve this through…
2
votes
1 answer

Python "for" inside "any" syntax error?

I have a piece of code that broke the other day and I can't find the problem. I need to do something if I find a coincidence between a user input and the first value of any element of a list of lists. I had this code running in another computer, but…
1
vote
1 answer

Python 2.2.3 HTTP Basic Authentication Implementation

I am trying to implement the HTTP Basic Authentication in Python 2.2.3. This is code: import…
1
vote
1 answer

How to change byte on specific addres

I need to write program that will change bytes in file in specific addreses. I can use only python 2.2 it's game's module so... I read once about mmap but i can't find it in python 2.2
1
vote
3 answers

search times of "x in []" vs "x in {}"

I ran into a problem where I have to go through proxy logs to see if users have visited a list of sites. I wrote a small script to read all proxy logs, matching the visited host against the list: for proxyfile in proxyfiles: for line in…
0
votes
0 answers

dynamic module does not define init function with python 2.2 only

I have a problem with the dynamic error module does not define init function (initsomething). Everything is fine when I use python 2.7, the problem only occurs with compilation using python 2.2 The output format is .pyd. My code in c++ #ifndef…
0
votes
1 answer

Failed to import python file from the same directory (version 2.2)

I have the following python files: help_functions.py check.py I'm trying to import help_functions file from check file (both files in the same directory) with the following command: from help_functions import Utils after running it from cmd with…
0
votes
1 answer

Message Queuing on python 2.2

How to do a Message Queuing in python 2.2? Must be in python 2.2, I need for a legacy system. I've already looked a lot and found nothing, I'm already thinking that it can not be done. Which I do not doubt, since python 2.2 is quite old.
0
votes
0 answers

SHA256 hash in Python 2.2

I need to create a SHA256 hash in Python 2.2, but a don't found any way to do this. All I found is for Python 2.4 or higher. Anyone has a ideia to how I can do this?
0
votes
1 answer

Image Processing MemoryError

I am trying to edit a lot of images with a python script. The amount of images varies a lot, when there are only a small amount of images (10-20) everything works fine and I don't get any errors. When the number of images increases (100-200),…
0
votes
1 answer

.pop() Dictionary Error

I tried searching for this an answer to this question for a long time now. I tried everywhere, but could be that I am searching with the wrong keywords, if so, please forgive me for asking a stupid or already answered question. I am trying to pop a…
0
votes
0 answers

pickle in python 2.7 and unpicle in python 2.2

I have two processes running on different machines with different python versions (2.7 and 2.2 ). I need to know if its easy to pickle a python dictionary in python 2.7 and then unpickle in python 2.2 with same syntax or there is a difference. msg =…
RAFIQ
  • 905
  • 3
  • 18
  • 32
1
2