Questions tagged [python-3.1]

For issues relating to development in Python, version 3.1. Use the more generic [python] and [python-3.x] tags where possible

The Python 3.1 release (first in 2009, since 2012 in security-fix-only mode, end-of-life since 2014) introduced various optimisations and module extensions (collections.OrderedDict)

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 3.x but not to Python 2, use the tag . If you aren't sure, tag your question and mention which version you're using in the body of your question.

35 questions
11
votes
4 answers

Python argparse positional arguments and sub-commands

I'm working with argparse and am trying to mix sub-commands and positional arguments, and the following issue came up. This code runs fine: import argparse parser = argparse.ArgumentParser() subparsers =…
user880248
9
votes
1 answer

AttributeError: 'Pool' object has no attribute '__exit__'

I'm doing some multiprocessing python scripts using multiprocessing.Pool. These scripts look like the following: from multiprocessing import Pool def f(x): return x*x if __name__ == '__main__': with Pool(processes=4) as pool: #…
user1251007
  • 15,891
  • 14
  • 50
  • 76
5
votes
7 answers

On Raspbian run multiple python Versions simultaniously

I have some old programs from back in the times when python 3.1 came out. In the program I often used the Callable() to pass a function and it's parameters like this to my TKinter application: tvf.mi(datei_bu, text=datei_opt,…
monamona
  • 1,195
  • 2
  • 17
  • 43
3
votes
1 answer

How can I install argparse in Python 3.1?

I am trying to get argparse to install in Python 3.1, but I get a UnicodeDecodeError out of setup.py when I easy_install it: (ve31) offline@void (projects) $ easy_install argparse install_dir…
Chris R
  • 17,546
  • 23
  • 105
  • 172
3
votes
3 answers

Interprocess communication between C# and Python

I can understand that there has been a lot of questions on this topic but none of them could really solve my problem. So here I have presented my code, and I want my mistakes to be pointed out here. I have a program written in C# which shall call a…
2
votes
2 answers

Chess Engine TypeError: unhashable type: 'list'

board = [["bRook", "bKnight", "bBishop", "bQueen", "bKing", "bBishop", "bKnight", "bRook"], ["bPawn", "bPawn", "bPawn", "bPawn", "bPawn", "bPawn", "bPawn", "bPawn"], ["", "", "", "", "", "", …
1
vote
1 answer

I keep getting an error on python path when I open terminal

I recently updated python on my mac and since then, whenever I open terminal there's the following error shown: File "/opt/homebrew/share/man/man1/python3.1", line 1 .TH PYTHON "1" ^ SyntaxError: invalid syntax Any idea how to resolve this…
m.sho
  • 11
  • 3
1
vote
0 answers

Pip for Python 3.1

I have been trying to install pip on my Python 3.1, in order to be able to convert .py files to .exe files. I have been searching around the internet, finding stuff like sudo, some bootstrap links and things like that but nothing worked yet. If…
1
vote
1 answer

Python 3.2 extremely slow when compare to Python 3.1.x

I read through Python 3.2 changes and understand that it has made many improvement over 3.1. However, my exact same code with zero modification running on 3.2 is more than 10 times slower than when I run my code on 3.1.3 It took Python 3.2 six…
SCM
  • 83
  • 2
  • 14
1
vote
0 answers

How do I connect to a Sybase Server using Python 3.1 in Windows 7?

I have thoroughly researched into this topic and I cannot get anything to work. I have tried to run modules I downloaded from this webpage: http://python-sybase.sourceforge.net/download.html The problem is that the latest releases are only supported…
1
vote
3 answers

not working Morse Code Decryptor in Python

I'm making a program where the Morse Code is decrypted into English. However, when the program is running and I put the Morse Code in (ex. *- which should result in the program printing out A) the program only gives a blank space. message =…
user9831853
1
vote
0 answers

Trying to send command between to machines Server to Client

I have two machines one is set up as a Client the other as Server. The Client is setup to receive commands from the Server and then respond. I know ... backwards. I tried using Putty but kept receiving connection refused then found out that the…
purza95
  • 59
  • 6
1
vote
2 answers

Operators from list is still showing quotation marks when printed (Python 3.1)

When I'm coding, I choose a random value from a list and print it alongside two numbers to make a sum. However, the value from the list still shows the quotation marks and I don't understand why. The code is: import random level = input('Please…
1
vote
1 answer

AttributeError functools.total_ordering

Following is my code snippet. when i run the program it gives me the following error. @functools.total_ordering AttributeError: 'module' object has no attribute 'total_ordering' I'm using python 3.1 import…
Tharanga Abeyseela
  • 3,255
  • 4
  • 33
  • 45
1
vote
4 answers

Python menu-driven programming

For menu-driven programming, how is the best way to write the Quit function, so that the Quit terminates the program only in one response. Here is my code, please edit if possible: print("\nMenu\n(V)iew High Scores\n(P)lay Game\n(S)et Game…
Lbert Hartanto
  • 131
  • 2
  • 2
  • 6
1
2 3