Check-in [0458e0e0d1]
Overview
| Comment: | Add unicode() vs str() to compat2and3 |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | py3 |
| Files: | files | file ages | folders |
| SHA1: |
0458e0e0d165243533e49d86ac68b636 |
| User & Date: | mario on 2014-04-08 22:16:26 |
| Other Links: | branch diff | manifest | tags |
Context
|
2014-04-09
| ||
| 00:23 | Temporary fix for Gtk undefined color warnings, workaround for changed GtkMenu.popup() signature in Gtk3. Debug colors for mygtk.columns() creation. check-in: 489da08a74 user: mario tags: py3 | |
|
2014-04-08
| ||
| 22:16 | Add unicode() vs str() to compat2and3 check-in: 0458e0e0d1 user: mario tags: py3 | |
| 21:53 | fix dict + dict back into list join check-in: d09e020ecf user: mario tags: py3 | |
Changes
Modified compat2and3.py from [022ad69c97] to [13b56cb24d].
| ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | + |
# version tags
PY2 = 1
PY3 = 0
# basic functions
xrange = xrange
range = xrange
unicode = unicode
# urllib modules
import urllib
import urllib2
from urllib import urlencode
import urlparse
import cookielib
|
| ︙ | |||
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | + |
# version tags
PY2 = 0
PY3 = 1
# basic functions
xrange = range
unicode = str
# urllib modules
import urllib.request as urllib
import urllib.request as urllib2
from urllib.parse import urlencode
import urllib.parse as urlparse
from http import cookiejar as cookielib
# filesys
from io import StringIO
|
Modified help/streamtuner2.1 from [de31364a43] to [ca2f8a1565].
| 1 2 3 4 5 6 7 | - |
|
| ︙ | |||
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | + + + + + + + + + | .BI streamtuner2 " stream" " shoutcast,xiph" " ""Top 100""" Searches for the term "Top 100" in the shoutcast and xiph channels, and returns all info about the first match as JSON output. .TP .BI streamtuner2 " play frequence3" Looks for the first occourence, and starts the audio player for FREQUENCE3. .SH GRAPHICAL MODE There's only one option for the graphical UI mode: .TP .BI --gtk3 Loads Gtk3 via PyGI instead of Gtk2. This is implicit when running on Python3 anyway. .SH FILES .IR /home/ $USER /.config/streamtuner2/settings.json .SH "SEE ALSO" .BR streamripper (1) .BR audacious (1) .BR json (5) .BR m3u (5) .BR pls (5) |
Modified mygtk.py from [91f32ed114] to [3b0c65b63e].
| ︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - - + - - - + + + + - - + - + - - - - | from config import __print__, dbg # filesystem import os.path import copy import sys |
| ︙ | |||
112 113 114 115 116 117 118 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | - + |
col.set_resizable(True)
# width
if (desc[1] > 0):
col.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
col.set_fixed_width(desc[1])
# loop through cells
|
| ︙ | |||
154 155 156 157 158 159 160 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | - + |
# add data?
if (entries):
#- expand datamap
vartypes = [] #(str, str, bool, str, int, int, gtk.gdk.Pixbuf, str, int)
rowmap = [] #["title", "desc", "bookmarked", "name", "count", "max", "img", ...]
if (not rowmap):
for desc in datamap:
|
| ︙ |
Modified pson.py from [759da668d2] to [b0e4064063].
| ︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | - - + - | # might have been queried from the widgets. # #-- reading and writing json (for the config module) ---------------------------------- import sys |
| ︙ |