https://github.com/mwisslead/vfp2py
Convert Visual FoxPro(VFP) code into python code
https://github.com/mwisslead/vfp2py
antlr4 conversion foxpro parse parser python rewrite vfp
Last synced: 11 days ago
JSON representation
Convert Visual FoxPro(VFP) code into python code
- Host: GitHub
- URL: https://github.com/mwisslead/vfp2py
- Owner: mwisslead
- License: mit
- Created: 2016-10-11T19:13:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-02-08T21:26:38.000Z (almost 3 years ago)
- Last Synced: 2025-11-28T13:24:59.364Z (about 2 months ago)
- Topics: antlr4, conversion, foxpro, parse, parser, python, rewrite, vfp
- Language: Python
- Homepage:
- Size: 4.32 MB
- Stars: 56
- Watchers: 15
- Forks: 26
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vfp2py
vfp2py is an attempt to create a tool to automatically create python code from
foxpro 9 code.
Many but not nearly all commands are currently supported with missing commands
to be added as need arises. Conversion can be done on individual prg files or
whole projects pjx files.
## Features
- Translates code comments
- Handles preprocessor commands
- Support for reading and writing dbf files via Ethan Furman's dbf package
- Many functions are inlined in the generated python code.
- Many complex functions and commands are available through a runtime - vfpfunc.py
- Somewhat functioning gui using PySide
## Future work
- Add more commands to parser
- Improve gui
- Rework scoping to facilitate operation of some commands.
- Add missing code conversion for some commands currently supported by parser
- Add more runtime functions
- Put package on pypi for easier install
- Speed up parsing
## Installation
`python -m pip install vfp2py`
## Usage
```
$ vfp2py --help
usage: vfp2py [-h] [--logging] infile outpath [search [search ...]]
Tool for rewriting Foxpro code in Python
positional arguments:
infile file to convert - supported file types are prg, mpr, spr, scx,
vcx, or pjx,
outpath path to output converted code, will be a filename for all but
pjx which will be a directory
search directory to search for included files
optional arguments:
-h, --help show this help message and exit
--logging file to convert
```
To convert a file simply run `vfp2py --logging input_file.prg output_file.py` or `vfp2py --logging input_project.pjx output_directory`
### Acknowledgments
Jayanta Narayan Choudhuri for providing a list of keyword and function abbreviations.