Skip to content

Commit f265bfd

Browse files
committed
fix #25
1 parent 3cc4700 commit f265bfd

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

openstereo/os_plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ def plot_contours(
671671
intervals = [
672672
float(i)
673673
for i in re.split(
674-
b"[^-\\d\\.]+", contour_settings["intervals"]
674+
"[^-\\d\\.]+", contour_settings["intervals"]
675675
)
676676
]
677677
# xi = yi = np.linspace(-1.1, 1.1, contour_settings["cresolution"])

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def run(self):
6464

6565
setup(
6666
name="OpenStereo",
67-
version="2.0b11",
67+
version="2.0b12",
6868
packages=find_packages(),
6969
entry_points={
7070
"console_scripts": ["openstereo = openstereo.os_base:os_main"]
@@ -92,7 +92,7 @@ def run(self):
9292
license="GPLv3",
9393
keywords="geology attitude stereonet projection structural",
9494
url="https://github.com/spamlab-iee/os",
95-
download_url="https://github.com/spamlab-iee/os/archive/v0.9.0.tar.gz",
95+
download_url="https://github.com/spamlab-iee/os/archive/v2.0b12.tar.gz",
9696
classifiers=[
9797
"Development Status :: 3 - Alpha",
9898
"Topic :: Scientific/Engineering",

test_icon.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import os
2+
from win32com.shell import shell, shellcon
3+
import winerror
4+
5+
class IconOverlay:
6+
7+
_reg_clsid_ = '{4FC554DF-F0EE-4A4F-966C-9C49CCF14D59}'
8+
_reg_progid_ = 'TJG.PythonPackagesOverlayHandler'
9+
_reg_desc_ = 'Icon Overlay Handler to indicate Python packages'
10+
_public_methods_ = ['GetOverlayInfo', 'GetPriority', 'IsMemberOf']
11+
_com_interfaces_ = [shell.IID_IShellIconOverlayIdentifier]
12+
13+
def GetOverlayInfo(self):
14+
return (r'C:\Program Files\TortoiseHg\icons\status\added.ico', 0, shellcon.ISIOI_ICONFILE)
15+
16+
def GetPriority(self):
17+
return 50
18+
19+
def IsMemberOf(self, fname, attributes):
20+
if os.path.exists (os.path.join (fname, "__init__.py")):
21+
return winerror.S_OK
22+
return winerror.E_FAIL
23+
24+
if __name__=='__main__':
25+
import win32api
26+
import win32con
27+
import win32com.server.register
28+
29+
win32com.server.register.UseCommandLine (IconOverlay)
30+
keyname = r'Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\PyPackageOverlay'
31+
key = win32api.RegCreateKey (win32con.HKEY_LOCAL_MACHINE, keyname)
32+
win32api.RegSetValue (key, None, win32con.REG_SZ, IconOverlay._reg_clsid_)

0 commit comments

Comments
 (0)