How do I insert a copyright statement into files created by wxGlade?

I am using wxGlade to create Python scripts that use wxWidgets. wxGlade directly manipulates XML files that describe a graphical interface based on wxWidgets. These files have a * .wxg extension. From the * .wxg files, code can be generated that actually launches a GUI in one of several languages, and I use that to generate Python code.

I would like to add a copyright statement to my * .wxg files as well as the generated code. I tried to manually edit the * .wxg file and added my copyright statement as an HTML comment, but after editing the file in wxGlade and saving the edited version, my comment disappeared.

How can I add comments to these files without manually editing them after each save from wxGlade?

+1


source to share


1 answer


To add a copyright statement to a file generated by wxGlade, you will have to manually insert the copyright statement. You will need to do this for every file you create. The trick is that you don't have to do this every time you create a file, is this:

  • Build the source code for the first time
  • Add your copyright agreement to the file.
  • If not done automatically with wxGlade, surround the generated wxGlade code with

    # begin wxGlade:
    # end wxGlade
    
          

  • Make sure the "Overwrite existing sources" checkbox is unchecked (right-click the application at the top of the tree, and at the bottom of the application properties, you check the box).


If you are interested in more information on this, take a look at this page - section 9. The notes have the information you want (sorry, I can not link to this section as there is no link for it).

+1


source







All Articles