Menu

How To Add Programs?

2002-10-18
2002-10-21
  • James Rocks

    James Rocks - 2002-10-18

    Hi,

    Before I met Boa-Constructor I was devloping (relatively small, 100 lines or less) programs using Python & PythonWin.

    Now I want to bring those programs (which are all-related but not yet linked) into a project under Boa. I designed a front end for it but I'm a bit baffled as to how you bring the code in to the project. Of course I can physically add the files but how do you "call" them?

    Any help would be appreciated :-)

    Angel

     
    • Anonymous

      Anonymous - 2002-10-18

      I am not expert in Python and wxPython, but if I understand your problem, you should relate the programs with the frontend by using event handlers. For an example, look at the wiki tutorial at:
      http://wiki.wxpython.org/index.cgi/Getting_20Started
      in particular chapter 6.

      Hope this helps.
      Regards
      Antonino

       
      • Roman Yakovenko

        Roman Yakovenko - 2002-10-21

        It is simple. Go to File-> New ->PythonApp.
        By this you'll create new python app. In "Application" tab you can add, delete modules to. from project.

        I hope I answer your question.

        Roman

         
    • James Rocks

      James Rocks - 2002-10-21

      What I was asking was how one imports an existing program into a Boa Constructor project.

      At the present moment I have a working python program that, from a data file derived from TCP/IP pings, creates a report of server availability. This report works. I also started work on a separate program to create the datafile (currently created using a batch file) that would be more efficient and handle SMTP Mail etc. and that is going well. What I want to do is to bring these two programs into a Boa constrictor project and create a controlling front end for them ... I've created the front end I just can't seem to get the actual existing programs to work with Boa.

      Another reason I want this is because I have written a number of reusable routines (i.e. not project specific) and I would like to import those routines into projects as necessary.

      Angel

       
    • Riaan Booysen

      Riaan Booysen - 2002-10-21

      Hi James,

      I'm not sure what exactly the problem is as other people have answered as I would have.

      The short answer is: The same way you would add programs to any other wxPython apps.

      To use other code you have written:

      Make sure python can import it. (e.g. by putting it in the directory of the app you are you are writing or installing it as a python module )

      Then just import and use your code. As noted by someone else, usually you would do this from an event handler.

      Cheers,
      Riaan.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.