Hello!
I am trying to creat an "About box" with wxpython. I have defined this function

def OnAboutBox(self, event):
			info = wx.AboutDialogInfo()
			info.SetIcon(wx.Icon('icons/exit.png', wx.BITMAP_TYPE_PNG))
			info.SetName('Watermark Image Processing')
			info.SetVersion('1.0b')
			info.SetDescription(info)
			info.SetCopyright('(C) 2010 Daniel Valverde')
			info.SetWebSite('http://www.acrocephalus.net')
			licenseFile = open('license.txt')
			info.SetLicence(license)
			info.AddDeveloper('Daniel Valverde')
			info.AddDocWriter('Daniel Valverde')
			info.AddArtist('Daniel Valverde')
			info.AddTranslator('Daniel Valverde')
			wx.AboutBox(info)

I know that it is better to store long text, such as the license and the description, in separate files. How can I write the funcion so that it reads this info from the files?
Cheers!!

Dani

licence variable seems unset, maybe you mean

open('licence.txt').read()

Great, it works now!!

Dani

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.