[chirp_devel] py3 File Open problem
David Boucha
Wed Dec 14 16:07:22 PST 2022
in chirp/wxui/main.py line 813 I removed
"chirp_platform.get_platform().get_last_dir(),"
and I was able to get a usable file dialog to pop up.
812 with wx.FileDialog(self, _('Open a file'),
813
chirp_platform.get_platform().get_last_dir(),
814 wildcard=wildcard,
815 style=wx.FD_OPEN | wx.FD_FILE_MUST_EXIST)
as fd:
816 if fd.ShowModal() == wx.ID_CANCEL:
817 return
Changed to
812 with wx.FileDialog(self, _('Open a file'),
813 wildcard=wildcard,
814 style=wx.FD_OPEN | wx.FD_FILE_MUST_EXIST)
as fd:
815 if fd.ShowModal() == wx.ID_CANCEL:
816 return
On Wed, Dec 14, 2022 at 5:03 PM Charlie Li via chirp_devel <
chirp_devel at intrepid.danplanet.com> wrote:
> Dan Smith via chirp_devel wrote:
> > I'll need to go dig into that to see if we should be doing something
> else. Perhaps you're on an older python and importlib_resources behaves
> differently than my native one in python 3.10. So yeah, let me know which
> macos you're on and where you got python (and which version) so I can try
> to narrow it down.
> >
> I specifically conditional imported importlib_resources to use the
> package if the Python used is < 3.10, since certain constructs used only
> appeared in time for 3.10; they are backported into the package. Doing
> this conditional import ensures consistent behaviour (at least in theory).
> > PosixPath can be str()'d to get just a path string, so perhaps that's
> all we need to do there.
> >
> Correct.
>
> --
> Charlie Li
> …nope, still don't have an exit line.
>
> _______________________________________________
> chirp_devel mailing list
> chirp_devel at intrepid.danplanet.com
> http://intrepid.danplanet.com/mailman/listinfo/chirp_devel
> Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20221214/93042e6e/attachment-0001.html
More information about the chirp_devel
mailing list