Visual Foxpro Serial Communication Python

Posted By admin On 21.08.19
Visual Foxpro Serial Communication Python 4,6/5 6540 reviews

vfp2py is an attempt to create a tool to automatically create python code fromfoxpro 9 code.

Apr 21, 2018  In a project, I need to extract data from a Visual FoxPro database, which is stored in dbf files, y have a data directory with 539 files I need to take into account, each file represents a database table, so I've been doing some testing and my code goes like this.

Many but not nearly all commands are currently supported with missing commandsto be added as need arises. Conversion can be done on individual prg files orwhole 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

Communication

python setup.py install

Usage

To convert a file simply run vfp2py --logging input_file.prg output_file.py or vfp2py --logging input_project.pjx output_directory

Python Serial Communication

Acknowledgments

Communication

Jayanta Narayan Choudhuri for providing a list of keyword and function abbreviations.