I need to be able to convert a large, legacy, code base written in Visual Basic 6, (as released in 1998 and with support stopped in 2008), to python so as to extend the support life and provide cross-platform capabilities.

I have found a number of on-line converters but as the code that needs to be converted is proprietary I cannot use them. I have also found vb2py but it hasn't been updated since V0.2.1 in Feb 2004 with the release notes stating that there were "quite a large" number of unsupported functions & keywords.

Required Features:

  1. Must be totally offline, i.e. no calls to online tools
  2. Commercial Use Permitted, I not planning to distribute the tool but will need to distribute the results without licencing issues.
  3. Convert all VB6 functions to python equivalents
  4. Output as plain Python (2 or 3)
  5. Either produce converted forms or add markers for where they need to go and list the field names
  6. Not OS-X based as I don't have access to such a machine.

Nice to have:

  1. Produce forms as wx, PyQt, pySide, Kivy or Tkinter components.
  2. Ideally Gratis & Open Source
  3. Windows but Linux would also be usable
  • 3
    I'd be astonished if you a) found such a tool (esp. VB6 to python), and b) it translated the code base at close to 100% reliability. What do you mena by "large" (SLOC)? I think you are more likely to need to build such a translator. See stackoverflow.com/a/3460977/120163
    – Ira Baxter
    Commented Jun 3, 2016 at 4:59
  • 1
    @IraBaxter A developer at a company that I work at is leaving and turning his area of work over to me - it turns out that a large proportion of his output over the last 10+ years has been in VB6 - I have yet to determine actual SLOC count. Commented Jun 3, 2016 at 5:07
  • 1
    I was going to set up maintenance services and I did some research on how to migrate VB6 code. Whatever VB2X program I tried, none of them could produce good results in terms of maintainability. We did a VB6 to C# migration for a real world project. It took a lot of effort to understand the generated code, since it was mainly a 1:1 copy using strange VB6 compatibility methods. It was not "pythonic" (the C# way of course) at all. Finally we stopped using the migrated code and rewrote the code manually, which was a great reduction of lines of code (something like 200kLoC to 35kLoC). Commented Jun 3, 2016 at 19:28


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.