O'Reilly logo

WxPython Application Development Cookbook by Cody Precord

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Storing your configuration with StandardPaths

You have built your cross platform application, but in order to run your application on multiple platforms, you also need a standard way to access external resources, such as icons and user configuration data. Luckily, wxPython also has a cross platform way to access standard system paths. There are the platform-specific locations where applications store their user configuration data, which can be accessed through the StandardPaths singleton. In this recipe, we will take a look at how to set up and access application configuration data using StandardPaths.

How to do it…

Perform the following steps:

  1. First, we will start by defining a class to help manage the configuration of an application:
    import os import ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required