New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate wx.FileSystemHandler issue #926

RobinD42 opened this Issue Jul 16, 2018 · 1 comment


None yet
1 participant
Copy link

RobinD42 commented Jul 16, 2018

Operating system: Mac & Linux
wxPython version: 4.0.1
Stock or custom build: stock
Python version: 3.6
Stock or custom build: any

Description of the problem:

from io import BytesIO
import wx

class MyFileSystemHandler(wx.FileSystemHandler):

    def CanOpen(self, location):
        return True

    def OpenFile(self, fs, location):
        print('OpenFile:', location)
        fsfile = wx.FSFile(BytesIO(b'hello'), location,
                          'text/plain', '', wx.DateTime.Now())
        stream = fsfile.GetStream()
        assert stream.IsOk()
        return fsfile

app = wx.App(False)

hello_file = wx.FileSystem().OpenFile('myprot:hello', wx.FS_READ)

This comment has been minimized.

Copy link

RobinD42 commented Oct 4, 2018

Fixed by #1027

@RobinD42 RobinD42 closed this Oct 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment