Check-in [77c8394885]
Overview
Comment: | Convert string to bytes for gzip-json writing (Python3) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
77c839488508e62592e8c3442ae19fe7 |
User & Date: | mario on 2014-05-13 22:11:56 |
Other Links: | manifest | tags |
Context
2014-05-13
| ||
22:12 | Fix association of surfmusik.de stream URLs to station titles. check-in: 4723508e41 user: mario tags: trunk | |
22:11 | Convert string to bytes for gzip-json writing (Python3) check-in: 77c8394885 user: mario tags: trunk | |
21:04 | Mirror config dialog changes to Gtk3 ui file check-in: 74bf77f074 user: mario tags: trunk | |
Changes
Modified config.py from [5e2372f9f1] to [c89ffe92b8].
︙ | ︙ | |||
144 145 146 147 148 149 150 | if gz: f = gzip.open(file+".gz", "w") if os.path.exists(file): os.unlink(file) else: f = open(file, "w") # encode | | > | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | if gz: f = gzip.open(file+".gz", "w") if os.path.exists(file): os.unlink(file) else: f = open(file, "w") # encode data = json.dumps(data, indent=(4 if nice else None)) f.write(data.encode("utf-8")) f.close() # retrieve data from config file def load(self, name): name = name + ".json" file = self.dir + "/" + name |
︙ | ︙ |