Compare commits
6
Commits
f45f25dd9d
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa503941ee | ||
|
|
5002d5a8fe | ||
|
|
1da8287a9d | ||
|
|
679ce285b4 | ||
|
|
7a00d8b440 | ||
|
|
16ca19db37 |
No files matched your search
@@ -1,12 +1,13 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
from __future__ import absolute_import
|
||||||
|
from setuptools import setup, Extension
|
||||||
|
|
||||||
# Set these so they match your system.
|
# Set these so they match your system.
|
||||||
from __future__ import absolute_import
|
|
||||||
XLibDir = '/usr/lib/x11'
|
XLibDir = '/usr/lib/x11'
|
||||||
XIncludes = '/usr/include/x11'
|
XIncludes = '/usr/include/x11'
|
||||||
|
|
||||||
from setuptools import setup, Extension
|
# Changed 'wmdocklib.pywmgeneral' -> 'pywmdockapps.pywmgeneral'
|
||||||
|
# Changed source path 'wmdocklib/pywmgeneral.c' -> 'pywmdockapps/pywmgeneral.c'
|
||||||
pywmgeneral = Extension('wmdocklib.pywmgeneral',
|
pywmgeneral = Extension('wmdocklib.pywmgeneral',
|
||||||
libraries = ['Xpm', 'Xext', 'X11'],
|
libraries = ['Xpm', 'Xext', 'X11'],
|
||||||
library_dirs = [XLibDir],
|
library_dirs = [XLibDir],
|
||||||
@@ -16,7 +17,7 @@ pywmgeneral = Extension('wmdocklib.pywmgeneral',
|
|||||||
setup(
|
setup(
|
||||||
name="pywmdockapps",
|
name="pywmdockapps",
|
||||||
version = "$Revision: 1.99 $"[11:-2],
|
version = "$Revision: 1.99 $"[11:-2],
|
||||||
description="This helper functions for windowmaker dockapps\nRead the whole story at http://pywmdockapps.sourceforge.net/",
|
description="This helper functions for windowmaker dockapps",
|
||||||
author="Kristoffer Erlandsson & al.",
|
author="Kristoffer Erlandsson & al.",
|
||||||
author_email="mfrasca@zonnet.nl",
|
author_email="mfrasca@zonnet.nl",
|
||||||
url="http://pywmdockapps.sourceforge.net",
|
url="http://pywmdockapps.sourceforge.net",
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
"""\
|
"""
|
||||||
wmdocklib is a python module that will help you develop WindowMaker dockapps
|
pywmdockapps is a python module that will help you develop WindowMaker dockapps
|
||||||
in python. It is mostly a wrapper around the functions from the popular
|
in python. It is a wrapper around the functions from wmgeneral.c.
|
||||||
wmgeneral.c, but some new functions are added too.
|
|
||||||
|
|
||||||
to get help about a contained package, try:
|
To get help about a contained package, try:
|
||||||
help(wmdocklib.<name>)
|
help(pywmdockapps.<name>)
|
||||||
"""
|
"""
|
||||||
from .pywmgeneral import *
|
from .pywmgeneral import *
|
||||||
from .pywmhelpers import *
|
from .pywmhelpers import *
|
||||||
|
|
||||||
__all__ = ['wmoo']
|
# __all__ controls what 'from pywmdockapps import *' pulls in.
|
||||||
|
# If you want users to see 'pywmgeneral' and 'pywmhelpers' too, add them here.
|
||||||
|
__all__ = ['wmoo', 'pywmgeneral', 'pywmhelpers']
|
||||||
@@ -26,14 +26,14 @@ Some changes to handle the additional event handling in pywmgeneral
|
|||||||
First workingish version
|
First workingish version
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os, re
|
import os, re, sys
|
||||||
import configparser
|
import configparser
|
||||||
|
|
||||||
charset_start = None
|
charset_start = None
|
||||||
charset_width = None
|
charset_width = None
|
||||||
pattern_start = None
|
pattern_start = None
|
||||||
|
|
||||||
import wmdocklib.pywmgeneral as pywmgeneral
|
from . import pywmgeneral
|
||||||
defaultRGBFileList = [
|
defaultRGBFileList = [
|
||||||
'/etc/X11/rgb.txt',
|
'/etc/X11/rgb.txt',
|
||||||
'/usr/lib/X11/rgb.txt',
|
'/usr/lib/X11/rgb.txt',
|
||||||
@@ -145,7 +145,13 @@ def readXPM(fileName):
|
|||||||
Raise IOError if we run into trouble when trying to read the file. This
|
Raise IOError if we run into trouble when trying to read the file. This
|
||||||
function has not been tested extensively. do not try to use more than
|
function has not been tested extensively. do not try to use more than
|
||||||
"""
|
"""
|
||||||
with open(fileName, 'r') as f:
|
if hasattr(sys, '_MEIPASS'):
|
||||||
|
base_path = os.path.join(sys._MEIPASS, "wmdocklib")
|
||||||
|
else:
|
||||||
|
base_path = "wmdocklib"
|
||||||
|
filePath = os.path.join(base_path, fileName)
|
||||||
|
|
||||||
|
with open(filePath, 'r') as f:
|
||||||
lines = [l.rstrip('\n') for l in f.readlines()]
|
lines = [l.rstrip('\n') for l in f.readlines()]
|
||||||
s = ''.join(lines)
|
s = ''.join(lines)
|
||||||
res = []
|
res = []
|
||||||
@@ -436,7 +442,13 @@ def getColorCode(colorName, rgbFileName=None):
|
|||||||
if rgbFileName is None:
|
if rgbFileName is None:
|
||||||
raise ValueError('cannot find rgb file')
|
raise ValueError('cannot find rgb file')
|
||||||
|
|
||||||
with open(rgbFileName, 'r') as f:
|
if hasattr(sys, '_MEIPASS'):
|
||||||
|
base_path = os.path.join(sys._MEIPASS, "wmdocklib")
|
||||||
|
else:
|
||||||
|
base_path = "wmdocklib"
|
||||||
|
rgbFilePath = os.path.join(base_path, rgbFileName)
|
||||||
|
|
||||||
|
with open(rgbFilePath, 'r') as f:
|
||||||
lines = f.readlines()
|
lines = f.readlines()
|
||||||
for l in lines:
|
for l in lines:
|
||||||
if l[0] != '!':
|
if l[0] != '!':
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
import sys, time
|
import sys, time
|
||||||
import wmdocklib.pywmhelpers as pywmhelpers
|
from . import pywmhelpers as pywmhelpers
|
||||||
import wmdocklib.pywmgeneral as pywmgeneral
|
from . import pywmgeneral as pywmgeneral
|
||||||
|
|
||||||
debug = 0
|
debug = 0
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user