Skip to main content

A Python implementation of the picocog library (original Java version by Chris Ainsley)

Project description

Overview

A Python implementation of the picocog library (original Java version by Chris Ainsley).

Basic usage

The API of this library mostly matches its Java counterpart, but using Python naming conventions. The following code sample generates a 'Hello World' program in Python using this library.

from picocog import PicoWriter

writer = PicoWriter()
writer.writeln("""def hello():""")
writer.indent_right()
writer.writeln("""print('Hello World')""")
writer.indent_left()
writer.writeln("")
writer.writeln("""hello()""")

print(writer.to_string())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

picocog-1.0.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

picocog-1.0.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file picocog-1.0.0.tar.gz.

File metadata

  • Download URL: picocog-1.0.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.1

File hashes

Hashes for picocog-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3ad2259c6c8ff89a56e9b6ec5573257b95823cba332dc11cda87a8b691cafef8
MD5 c66a6fae067f51c7ccda5be0f814feea
BLAKE2b-256 c606945d930a359f9fd3e7f1b14100f82da810c8af22006abd0b9963be9a1e28

See more details on using hashes here.

File details

Details for the file picocog-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: picocog-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.1

File hashes

Hashes for picocog-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c1c77f3e8ab2b1519266087e00eadf8d9166c5f9796fb707fe7514ac2416227
MD5 94c999c2828192d5cabba68c92ff232f
BLAKE2b-256 fa0757a2fac2833ce971462e224c341dd8de63e44f3dfb5329982dab1e628a00

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page