astdump /

Filename Size Date modified Message
180 B
1.1 KB
5.0 KB

Fetch module version without executing the module. Generates using information from the module. Can become handy for distutils.

$ ./
Usage: [options] <>

Read top level variables from the module without importing it. Additional keys
allow to generate automatically or view tree structure of an Abstract
Syntax Tree.

  -h, --help  show this help message and exit
  --dump      dump abstract syntax tree
  --generate  generate for a given filename


$ ./
__author__ = 'anatoly techtonik <>'
__description__ = 'Extract information from Python module without importing it.'
__license__ = 'Public Domain'
__version__ = '0.5'
$ ./ --generate
#!/usr/bin/env python
from distutils.core import setup

  name = 'astdump',
  version = '0.5',
  author = 'anatoly techtonik',
  author_email = '',
  description = 'Extract information from Python module without importing it.',
  license = 'Public Domain',