ANN: vb2py online code conversion

P

Paul Paterson

The Online Version of vb2py has been released.

You can now convert Visual Basic (and to a limited extent VBA, VBScript
and ASP) to Python code right from your browser without having to
download any additional libraries or software. The online version is
based on the v0.2 codebase which includes all VB control structures and
most intrinsic functions and keywords. Form layout conversion is not
currently available in the online version.

You can access the online version here:
http://vb2py.sourceforge.net/demo.htm


What is vb2py?
==============

vb2py is a toolkit to aid in the conversion of Visual Basic projects to
Python. The aim of the conversion is to match, as closely as possible,
the original VB applications both in terms of code behaviour and form
layout. Version 0.2 comprises a basic layout converter (converting to
PythonCard) with a comprehensive code translation. The project roadmap
(http://vb2py.sourceforge.net/roadmap.htm) shows the project's
development timeline.

Converting VB to Python turns your VB projects into cross platform
developments and allows full access to all Python's extensive library of
modules.


Limitations of the online version
=================================

- No form layouts
- A limit of 500 LOC per go to prevent server overload
- Single files only
- No project level global/public variable mapping
- **Please note** there are important disclaimers on the site regarding
**security** of your code (it is submitted in plain text and is not
therefore suitable for commercially sensitive material).

Getting the Software
====================

* The main website: http://vb2py.sourceforge.net
* The online version: http://vb2py.sourceforge.net/demo.htm
* Download the current version: http://vb2py.sourceforge.net/downloads.htm
* Documentation: http://vb2py.sourceforge.net/documentation.htm


Requirements for the online version
===================================

* A web browser


Licence
=======

vb2py is released under the BSD licence.


Release History
===============

0.1 (July 9, 2003) - The first release from the project - a basic
form layout translator
0.1.1 (August 1, 2003) - A bugfix release for 0.1
0.2 (September 8, 2003)- First implementation of the full VB parser
Online (October 14, 2003) - Online version made available


Contributors Welcome
====================

This project would not be possible without the help and support of many
people. Anyone who wants to get involved is more than welcome to
participate in coding, testing, giving advice, etc. Some particular
areas of interest right now are,

- testing on large VB projects
- testing on Mac
- testing out with VBScript, VBA

In the meantime I would like to thank all those who supported and
contributed towards the project.

----

Paul Paterson

vb2py :: A Visual Basic to Python Conversion Toolkit
http://vb2py.sourceforge.net
 
W

Will Stuyvesant

[Paul Paterson]
The Online Version of vb2py has been released.
...
vb2py :: A Visual Basic to Python Conversion Toolkit
http://vb2py.sourceforge.net

Nice work!

I am not a VB person, but I always like to see people using python
CGI. But on sourceforge they only have Python 1.5.2 last time I
checked! Did you install your own python on sourceforge (if so, how
did you do that, I failed in an earlier attempt), or do they finally
have a new python version installed?
 
J

John J. Lee

I am not a VB person, but I always like to see people using python
CGI. But on sourceforge they only have Python 1.5.2 last time I
checked! Did you install your own python on sourceforge (if so, how
did you do that, I failed in an earlier attempt), or do they finally
have a new python version installed?

Not sure about the CGI environment, but on the shell server they have
2.2 installed now.


John
 
P

Paul Paterson

Will said:
[Paul Paterson]
The Online Version of vb2py has been released.
...
vb2py :: A Visual Basic to Python Conversion Toolkit
http://vb2py.sourceforge.net


Nice work!
Thanks!

I am not a VB person, but I always like to see people using python
CGI. But on sourceforge they only have Python 1.5.2 last time I
checked! Did you install your own python on sourceforge (if so, how
did you do that, I failed in an earlier attempt), or do they finally
have a new python version installed?

The Shell is now at 2.2 but cgi is still using 1.5.2, which was rather
puzzling for a while as things appeared to be working but weren't.

I had to install my own copy of Python. I'm not very literate on
Unix/Linux so this was a interesting and I'm sure there are better ways
to do it. Anyway, here is how I managed to hack it to get it to work ...

1. Make a little work area on your web space to put Python

2. Copy the python 2.2 executable across to the work area

3. Verify that you can run this from the Shell (you'll get warnings
about not being able to find lots of libraries but it should run).

4. Copy all the basic Python libraries (../lib) into the same place you
put the python executable

5. Copy the "../lib/lib-dynload" contents to your new python directory

6. Change the #! line in your .py files to point to the new python
executable

Now there has to be a better way than this but ...

7. Add the following lines to your script:

import sys
sys.path.append("path to your python folder")
sys.path.append("path to your lib-dynload")
sys.path.append("path to where your other 'site-packages' will live")

8. For me, "socket.py" was failing when importing "_socket" so I
modified it not to import "_socket" and it worked fine (I don't think
you will be able to use sockets anyway).


Anyway, this worked for my application which uses library and
non-library packages.

Good luck!

Paul
 
W

Will Stuyvesant

Paul Paterson managed to use a modern Python version for CGI, on
sourceforge. Since sourceforge is about the only free hosting for
Python CGI (if you get a project registered there) I would think it is
in the interest of Python to have a better way than this! Because, if
people can not serve their CGI script, or only with much difficulty,
then they will maybe give up on Python. We could lose good people
that way. Don't just blindly send them to "twisted". Not everybody
has a free or cheap permanent internet connection. Not everybody
wants to check forever if their webapplication is still running. CGI
is the way to go for many.

Could one of the Python-Unix-Solaris-CGI gurus please improve the
situation on sourceforge? I tried but I can't. Something like
"everybody on sourceforge can use #!../../blah/lib/python" would do
:)

Paul: congratulations on getting things to work...you must have been
very determined; I would not have that much patience (gave up on
*compiling* Python there after all the weird errors %-).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top