Skip to content

Use python dll to easily run python code inside foxpro.

Notifications You must be signed in to change notification settings

ugurlu2001/foxpro2python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

foxpro2python bridge

Call python code directly from foxpro.

foxpro2python is a set of foxpro classes and functions that allow simple execution of python code from within a foxpro program.

Please see the example.prg for some usage examples.

Features

  • Automatically converts between basic data types.
  • Errors raised in python are automatically raised as foxpro errors.

To use

  • Add python.prg to your project.
  • Install the Python27 folder into the working directory of the foxpro program.
  • Call the start_python procedure in python.prg
  • Call python functions with the PythonFunctionCall function (e.g. PythonFunctionCall('random', 'randint', CreateObject('PythonTuple', 5, 20)) is like calling random.randint(5, 20) in python)
  • Get items and attributes with obj.getitem and obj.getattr (e.g obj.getitem('key') will retrieve the dictionary item with key 'key')

About

Use python dll to easily run python code inside foxpro.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • xBase 88.1%
  • Python 11.9%