Hi,
I have created an exe from a wxPython application. I some files created using
pickle and I want them to be opened in my application when double-clicked. Is
this possible?
By the way, how can I allocate an icon to those files?
[I am using wxPython 2.8 and Python 2.4 on XP Pro]
Regards,
Simon.
Hi all,
I have a problem that couldn't solve for days, and I hope get some help
here: I have two combo box, say ComboBox1 and ComboBox2. There are two items
in ComboBox1, say "0" and "1". How can I make ComboBox2 show 8 items if
ComboBox1.Item="0" and make ComboBox2 show 16 items if ComboBox1.Item="1"?
Thanks in advance.
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.472 / Virus Database: 269.8.1/822 - Release Date: 28/05/2007
11:40 AM
Hi Song,
Hi all,
I have a problem that couldn't solve for days, and I hope get some help
here: I have two combo box, say ComboBox1 and ComboBox2. There are two items
in ComboBox1, say "0" and "1". How can I make ComboBox2 show 8 items if
ComboBox1.Item="0" and make ComboBox2 show 16 items if ComboBox1.Item="1"?
Something along these lines might work:
self.ComboBox1 = ComboBox1
self.ComboBox2 = ComboBox2
self.ComboBox1.Bind(wx.EVT_COMBOBOX, self.OnComboBox)
def OnComboBox(self, event):
self.ComboBox2.Clear()
if event.GetString() == '0':
theStrings = EightItemsList
else:
theStrings = SixteenItemsList
self.ComboBox2.AppendItems(theStrings)
HTH.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/
···
On 5/29/07, Song Cao wrote:
Look into packing your application with the wonderful tool called “inno setup”. You can read about the tool here:
http://www.jrsoftware.org/isinfo.php
and how to associate files during install here:
http://www.jrsoftware.org/isfaq.php#assoc
Regards,
···
–
Rune Devik
http://www.garageinnovation.org
On 5/29/07, simon kagwe simonkagwe@yahoo.com wrote:
Hi,
I have created an exe from a wxPython application. I some files created using
pickle and I want them to be opened in my application when double-clicked. Is
this possible?
By the way, how can I allocate an icon to those files?
[I am using wxPython 2.8 and Python 2.4 on XP Pro]
Regards,
Simon.
To unsubscribe, e-mail:
wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
simon kagwe wrote:
Hi,
I have created an exe from a wxPython application. I some files created using
pickle and I want them to be opened in my application when double-clicked. Is
this possible?
By the way, how can I allocate an icon to those files?
use python's _winreg module.
e.g.
import _winreg as reg
reg.CreateKey(reg.HKEY_CLASSES_ROOT,'.lpj')
reg.SetValue(reg.HKEY_CLASSES_ROOT, '.lpj', reg.REG_SZ, 'peak-o-mat')
pom = reg.CreateKey(reg.HKEY_CLASSES_ROOT, 'peak-o-mat')
ico = reg.CreateKey(pom, 'DefaultIcon')
reg.SetValue(pom, 'DefaultIcon', reg.REG_SZ, iconpath)
sh = reg.CreateKey(pom, 'shell')
op = reg.CreateKey(sh, 'open')
cmd = reg.CreateKey(op, 'command')
reg.SetValue(op, 'command', reg.REG_SZ, '\"%s\" \"%%1\"'%batchpath)
This will register '.lpj' file extension with an application called 'peak-o-mat'
and assign a default icon.
Christian
Hi
The advantage of using Inno Setup to generate an installer that does this is that it also generates an uninstaller which removes the registry changes done during the install. And it looks really nice as well…
···
On 5/31/07, Christian K ckkart@hoc.net wrote:
simon kagwe wrote:
Hi,
I have created an exe from a wxPython application. I some files created using
pickle and I want them to be opened in my application when double-clicked. Is
this possible?
By the way, how can I allocate an icon to those files?
use python’s _winreg module.
e.g.
import _winreg as reg
reg.CreateKey(reg.HKEY_CLASSES_ROOT,‘.lpj’)
reg.SetValue
(reg.HKEY_CLASSES_ROOT, ‘.lpj’, reg.REG_SZ, ‘peak-o-mat’)
pom = reg.CreateKey(reg.HKEY_CLASSES_ROOT, ‘peak-o-mat’)
ico = reg.CreateKey(pom, ‘DefaultIcon’)
reg.SetValue(pom, ‘DefaultIcon’, reg.REG_SZ, iconpath)
sh = reg.CreateKey(pom, ‘shell’)
op = reg.CreateKey(sh, ‘open’)
cmd = reg.CreateKey(op, ‘command’)
reg.SetValue(op, ‘command’, reg.REG_SZ, ‘"%s" "%%1"’%batchpath)
This will register ‘.lpj’ file extension with an application called ‘peak-o-mat’
and assign a default icon.
Christian
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org
Hi Christian,
Christian K wrote:
simon kagwe wrote:
Hi,
I have created an exe from a wxPython application. I some files created using
pickle and I want them to be opened in my application when double-clicked. Is
this possible?
By the way, how can I allocate an icon to those files?
use python's _winreg module.
interesting, didn't know about this.
e.g.
import _winreg as reg
reg.CreateKey(reg.HKEY_CLASSES_ROOT,'.lpj')
reg.SetValue(reg.HKEY_CLASSES_ROOT, '.lpj', reg.REG_SZ, 'peak-o-mat')
pom = reg.CreateKey(reg.HKEY_CLASSES_ROOT, 'peak-o-mat')
ico = reg.CreateKey(pom, 'DefaultIcon')
reg.SetValue(pom, 'DefaultIcon', reg.REG_SZ, iconpath)
sh = reg.CreateKey(pom, 'shell')
op = reg.CreateKey(sh, 'open')
cmd = reg.CreateKey(op, 'command')
reg.SetValue(op, 'command', reg.REG_SZ, '\"%s\" \"%%1\"'%batchpath)
This will register '.lpj' file extension with an application called 'peak-o-mat'
and assign a default icon.
Have you tested this on Vista? I think it would only work if the application runs as admin, or it might write it to a virtualized area (I think this depends on the manifest file you use).
Werner
Rune Devik wrote:
Hi
The advantage of using Inno Setup to generate an installer that does
this is that it also generates an uninstaller which removes the registry
changes done during the install. And it looks really nice as well..
True. Though if you pack your software with distutils using
python setup.py bdist_wininst --install-script=<install_script>
then <install_script> is run with first argument '-install' or '-uninstall'
depending on wether you're installing the package or requesting its removal. So
you can have the same automatism.
Christian
Werner F. Bruhin wrote:
Hi Christian,
Christian K wrote:
simon kagwe wrote:
Hi,
I have created an exe from a wxPython application. I some files
created using
pickle and I want them to be opened in my application when
double-clicked. Is
this possible?
By the way, how can I allocate an icon to those files?
use python's _winreg module.
interesting, didn't know about this.
e.g.
import _winreg as reg
reg.CreateKey(reg.HKEY_CLASSES_ROOT,'.lpj')
reg.SetValue(reg.HKEY_CLASSES_ROOT, '.lpj', reg.REG_SZ, 'peak-o-mat')
pom = reg.CreateKey(reg.HKEY_CLASSES_ROOT, 'peak-o-mat')
ico = reg.CreateKey(pom, 'DefaultIcon')
reg.SetValue(pom, 'DefaultIcon', reg.REG_SZ, iconpath)
sh = reg.CreateKey(pom, 'shell')
op = reg.CreateKey(sh, 'open')
cmd = reg.CreateKey(op, 'command')
reg.SetValue(op, 'command', reg.REG_SZ, '\"%s\" \"%%1\"'%batchpath)
This will register '.lpj' file extension with an application called
'peak-o-mat'
and assign a default icon.
Have you tested this on Vista? I think it would only work if the
application runs as admin, or it might write it to a virtualized area (I
think this depends on the manifest file you use).
I haven't even seen vista yet
So no. sorry.
Christian
Christian K wrote:
...
I haven't even seen vista yet
So no. sorry.
You are not missing much 
Werner