Skip to content

JacksonRaffety/Python_AST_Creator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python_AST_Creator

============

Description

A basic python package that takes a path to a directory as an argument and creates AST (Abstract Syntax Tree) files from found python files. The program searches the directory and all of it's subdirectories for python files (*.py) and then creates an AST from the code in the file. The program creates a file containting the plaintext of the created AST in the same directory as the found file, with the name *.py.ast.

Installation

Download this project as a ZIP and extract, or clone the project via:

git clone https://github.com/JacksonRaffety/Python_AST_Creator

Then, in the directory with setup.py, install:

pip install .

Running the Program

# running in same directory
python astcreator <path to directory to search>

# running in other directory
python <path to astcreator> <path to directory to search>

# example
python ./astcreator ../../myPythonProject

Testing

Tests made using pytest. To test, use the pytest command:

# in local directory
pyetst

# in other directory
pytest <path to installed directory>

About

A basic program for creating plaintext Abstract Syntax Trees from python code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages