Skip to content

nomissbowling/try-python

 
 

Repository files navigation

try-python

This is my TUTORIAL project for python.

try-python - Python Version CodeFactor Gitpod Ready-to-Code

Caution

I'm japanese. so some script include Japanese comments. 😉

Requirements

  • Python 3.7 or higher (I'm using Python 3.8)

Requirements (Optional)

  • JetBrains PyCharm
  • VisualStudio Code

Make Environment

$ cd try-python
$ python3 -m venv .venv
$ source .venv/bin/activate
$ python -m pip install -U -r requirements-dev.txt

Unit Test

$ cd try-python
$ source .venv/bin/activate
$ pytest

Run Examples

Each python scripts can be run individually.

  • Launch from PyCharm

or

$ cd try-python
$ source .venv/bin/activate
$ python -m trypython

VSCode settings (Example)

settings.json

{
    "editor.insertSpaces": true,
    "editor.tabSize": 4,
    "python.pythonPath": "/path/to/python",
    "python.terminal.launchArgs": [
        "-B",
        "-c",
        "\"import IPython; IPython.start_ipython()\""
    ],
    "python.linting.flake8Enabled": true,
    "python.linting.enabled": true,
    "python.linting.mypyEnabled": true,
    "python.formatting.provider": "black",
    "python.unitTest.pyTestEnabled": true,
    "python.linting.pydocstyleEnabled": false
}

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File (Integrated Terminal)",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "cwd": "${workspaceFolder}",
            "pythonPath": "${config:python.pythonPath}",
            "env": {
                "PYTHONPATH": "${workspaceFolder}",
                "PYTHONDONTWRITEBYTECODE": "1"
            }
        }
    ]
}

😃

About

This is my TUTORIAL project for Python.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.9%
  • Dockerfile 0.1%