ANN: vb2py online code conversion

Discussion in 'Python' started by Paul Paterson, Oct 14, 2003.

  1. 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
     
    Paul Paterson, Oct 14, 2003
    #1
    1. Advertising

  2. > [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?


    --
    After all, what is your hosts' purpose in having a party? Surely not
    for you to enjoy yourself; if that were their sole purpose, they'd
    have simply sent champagne and women over to your place by taxi.
    -- P.J. O'Rourke
     
    Will Stuyvesant, Oct 14, 2003
    #2
    1. Advertising

  3. Paul Paterson

    John J. Lee Guest

    (Will Stuyvesant) writes:
    [...]
    > 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
     
    John J. Lee, Oct 14, 2003
    #3
  4. Will Stuyvesant wrote:

    >>[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
     
    Paul Paterson, Oct 15, 2003
    #4
  5. 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 %-).


    > [Paul Paterson]
    > <About serving CGI on sourceforge>
    > 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....
    > ...<tricks to make it work, copying executable (!) etc.> ...
    > 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")
    >
    > Anyway, this worked for my application which uses library and
    > non-library packages.
     
    Will Stuyvesant, Nov 7, 2003
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Paterson

    ANN: vb2py-0.1 released

    Paul Paterson, Jul 13, 2003, in forum: Python
    Replies:
    0
    Views:
    336
    Paul Paterson
    Jul 13, 2003
  2. Paul Paterson

    ANN: vb2Py 0.2 - VB to Python Conversion

    Paul Paterson, Sep 9, 2003, in forum: Python
    Replies:
    0
    Views:
    847
    Paul Paterson
    Sep 9, 2003
  3. Paul Paterson

    ANN: vb2Py 0.2.1 - VB to Python Conversion

    Paul Paterson, Feb 1, 2004, in forum: Python
    Replies:
    1
    Views:
    414
    Paul Paterson
    Feb 1, 2004
  4. asdf sdf

    Experience with vb2py?

    asdf sdf, May 3, 2004, in forum: Python
    Replies:
    3
    Views:
    1,028
    MetalOne
    May 4, 2004
  5. vb2py question

    , Nov 25, 2005, in forum: Python
    Replies:
    0
    Views:
    315
Loading...

Share This Page