1 May 03:46
open_file question
I’m having trouble piecing together the correct syntax for the filter keyword of open file.
from enthought.traits.ui.file_dialog import open_file
open_file(filter=’Text file (*.txt)|*.txt’)
…selects no files.
open_file(filter=[’Text file (*.txt)|*.txt’,])
…selects text files.
open_file(filter=[’Text file (*.txt)|*.txt’, ’Python (*.py)|*.py’])
…selects only text files, and…
open_file(filter=[’Python (*.py)|*.py’, ’Text file (*.txt)|*.txt’,])
…selects only Python files.
Can someone clue me how to apply multiple, logically or’ed filters? (A pull-down selection among filters would be OK, too.)
Thanks much,
Mike
This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
_______________________________________________ Enthought-dev mailing list Enthought-dev@... https://mail.enthought.com/mailman/listinfo/enthought-dev
When you call add_observer, it returns an index corresponding to the
callback attached. To remove the callback you can do something like so
(untested):
x = obj.add_observer('SomeEvent', cbk)
obj.remove_observer(x)
prabhu
RSS Feed