Jordan Gleeson
Jordan Gleeson

Reputation: 541

Python versions and libraries

For an internship I have applied for I have completed a task which was to create a 2048 clone. My solution is found here. The brief said the following:

Use either Python 2.7 or 3+ and if any 3rd party libraries are used add them in a requirements file parsable by pip. The game should be started by invoking the main file: python main.py

I just wanted to ask and make sure that everything will work when I send it to them. I have used the following imports:

from msvcrt import getch
import random
from copy import deepcopy

Do I need to add anything to the folder for these to work? And I need to make sure that it will print properly for them, as I tried on a different PC and the print statements acted differently and I am unsure as to why.

Upvotes: 0

Views: 49

Answers (2)

pppery
pppery

Reputation: 3804

No, you do not need to make any kind of requirements file at all, as the mscvrt, random, and copy modules are part of python's standard library. However, the mscvrt module is only available on windows.

Upvotes: 1

Martijn Pieters
Martijn Pieters

Reputation: 1121196

You only need to add things to requirements.txt that are not part of the standard library.

msvcrt, random and copy are all part of the Python standard library and don't need to be added.

Upvotes: 0

Related Questions