Skip to main content

BB-PyCodeView

View syntax highlighted code from a filename or module name

Options

$ code-view --help

    code-view - view highlighted python code

    ( -c |    --comments     ):  Show comments in output
                                  - default = False
    ( -f |    --function     ):  Function name - same as adding ':function' after module name
    ( -H |      --html       ):  Output an html string
    ( -h |      --help       ):  Print help message
    ( -m |     --module      ):  View code from a module
                                  - will attempt to automagically parse this without the option given
    ( -n | --no-highlighting ):  Disable syntax highlighting in output
                                  - only effects output - string data is still processed
                                  - default = False
    ( -p |    --filepath     ):  View file contents
                                  - path can also be provided without this option
    ( -s |     --string      ):  Code view from a provided string
    (    |     --version     ):  Print version info and exit

If the options -p|--filepath, -m|--module, or -f|--function are ommitted, it will attempt to automatically assign the arguments properly. May not work depending on the module name/path. Pathnames are almost guaranteed to work on their own.

TODO

  • theming
  • comments are not removed when --no-highlighting option is used
    • syntax highlighter is what removed them - might rewrite this

ChangeLog

v0.1.0
- initial release
v0.1.1
- added html output
- added licenses
v0.1.2
- added `--version` option
v0.1.3
- made html look nicer
- fixed `--no-highlighting` option for html output
- `--no-highlighting` option now skips syntax highlighter processing
- added `__call__` method to SyntaxHighlighter
    - same as calling `SyntaxHighlighter.highlight()`
- fixes for method lookup
- added `-a`|`--attribute` options for searching attributes

Metadata

Release files for BB-PyCodeView 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for BB-PyCodeView 0.1.3
File Size Uploaded
bb_pycodeview-0.1.3.tar.gz 67.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for BB-PyCodeView 0.1.3
File Interpreter ABI Platform
bb_pycodeview-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 136.0 kB

Release files / bb_pycodeview-0.1.3.tar.gz

Download URL bb_pycodeview-0.1.3.tar.gz
Size 67.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e64f06e175fe0da616616b1273cf089d18a8bb3e04b76fe37e56507c66c50345
BLAKE2b-256 checksum
How to use checksums
7fed7a171e14c09efbad9c9f51b9090cedbb120dc96a2c0d818257aa64a51280
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.7 Linux/6.7.4-zen1-1-zen

Release files / bb_pycodeview-0.1.3-py3-none-any.whl

Download URL bb_pycodeview-0.1.3-py3-none-any.whl
Size 68.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06f7d16950ec9ba91aac855b406354aae458c071ad742f39f8b09ed33e3a75f7
BLAKE2b-256 checksum
How to use checksums
4021397f200c35c9a91c315a5c15db242bb27c5bbb647c56517f5101479dc268
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.7 Linux/6.7.4-zen1-1-zen

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page