如何在wxGlade创建的文件中插入版权声明?
我使用 wxGlade 创建 Python 脚本,该脚本使用 wxWidgets。 wxGlade 直接操作 XML 文件,这些文件描述了基于 wxWidgets 的 GUI。 这些文件的扩展名为 *.wxg。 从 *.wxg 文件中,可以生成实际以多种语言之一运行 GUI 的代码,我正在使用它来生成 Python 代码。
我想向我的 *.wxg 文件以及生成的代码添加版权声明。 我尝试手动编辑 *.wxg 文件并将我的版权声明添加为 HTML 注释,但是在 wxGlade 中编辑该文件并保存编辑后的版本后,我的注释消失了。
如何在每次从 wxGlade 保存后不手动编辑这些文件的情况下向这些文件添加版权声明?
I use wxGlade to create Python scripts, which use wxWidgets.
wxGlade directly manipulates XML files, which describe the wxWidgets based GUI. Those files have the *.wxg extension.
From the *.wxg files, it is possible to generate code which actually runs the GUI in one of several languages, and I am using it to generate Python code.
I would like to add a copyright statement to my *.wxg files and also to the generated code.
I tried to hand-edit a *.wxg file and added my copyright statement as a HTML comment, but after editing the file in wxGlade and saving the edited version, my comment disappearesd.
How can I add a copyright statement to those files without hand-editing them after each save from wxGlade?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要将版权声明添加到 wxGlade 生成的文件中,您必须手动插入版权声明。 您必须对生成的每个文件执行此操作。 确保不必每次生成文件时都执行此操作的技巧是执行以下操作:
如果 wxGlade 尚未自动完成,请将 wxGlade 生成的代码括起来
如果您对有关此内容的更多信息感兴趣,请查看 此页面 - 第 9 节。 Notes 包含您想要的信息(抱歉,无法链接到此部分,因为没有锚点)。
To add a copyright statement to a file generated by wxGlade, you will have to insert the copyright statement by hand. You will have to do this to every file generated. The trick to making sure that you don't have to do it every time you generate the file, is to do the following:
If it isn't already done automatically by wxGlade, surround the wxGlade-generated code with
If you are interested in more information about this, have a look at this page - section 9. Notes has the information you want (sorry, can't link to this section since there is no anchor for it).