vb2Py

  User Guide
Using the software to convert VB projects

Quick Links

Downloads

Installation


 
  Home
  News
  Downloads
  Documentation
  Screenshots
  Online Version
  Links
  Contribute

The easiest way to use vb2Py is by working in the vb2py directory in your Python site-packages location.

To check the basic usage from the command line,

> python vb2py.py -h

An example project should be installed in the folder, vb2py/vb/test. To convert this project to a PythonCard project use the command,

> python vb2py.py vb/test/test1.vbp vb/test/test1

vb/test/test1.vbp = the VB project file for the project

vb/test/test1 = the location of the generated Python files

The directory where the Python files will be put must exist before you run the conversion.

The above conversion simply converts the layouts - no VB code is translated and you will find that the PythonCard forms don't have any code behind them. You can still try them out by typing,

> python vb/test/test1/frmMain.py

You should see a form open with a lot of controls on it. If you want to try to convert VB code as well then you can use the -c command line switch,

> python vb2py.py -c vb/test/test1.vbp vb/test/test1

The -c switch causes VB code for each VB method to be converted. You should be wary of using this switch in your own projects because the code conversion is very simplistic and will not generally work straight away.

    SourceForge.net Logo