Sandbox to try ThinkPy2 code
In your code, or in IDLE prompt, do this:
>> from thinkpy2.has_duplicates import *
>> has_duplicates([1, 2, 3, 1])
TrueHow it was created
This was created by following the instructions on https://j.mp/stepsPackage
After Steps 1-4:
/sandbox
    /thinkpy2
        __init__.py
    setup.pyAdded to
setup.py
from setuptools import setup
setup(name='sandbox',
      packages=['thinkpy2'],
      )created a sample
some_code.pywithtest_funcode in it.
Or even better, just skip all the above steps and simply use the script make_my_package.py
usage: python3 make_my_package.py <your_package_name>4. At the level of the /sandbox directory, type:
pip3 install -e .
That's it! You are all set!
Last updated