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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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
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
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
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.