Skip to main content

Run Python`s file as command line

Project description

Python command tool


  • python3.5 +


It is used to run your Python code as a command line . It only works on class methods . Add as_cmder decorator on your class method and create command class in command file directory . In your project root directory, create a file and import everything under the bdpycmd.pycmd module . Add initialization code and execution entry to your . Open the command line interface, go to your project root directory (the same level as your file), and run python .

Use the example project url

Source Codd url

Annotation Specification

` When adding comments to the command method, the following rules must be followed, otherwise the command parameters will not be parsed correctly

@base.BaseCommand.as_cmder def your_func(p1,p2): """ your function`s description

:param p1: type #describe
:param p2: type #describe
:return: type
your_func_content ...


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

bdpycmd-1.2.0.tar.gz (6.5 kB view hashes)

Uploaded source

Built Distribution

bdpycmd-1.2.0-py3-none-any.whl (6.8 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page