summaryrefslogtreecommitdiff
path: root/devel/py-expect/patches/patch-af
blob: 03f396049c8b47fba749bf8845e20754dbe48036 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
$NetBSD: patch-af,v 1.1 2002/06/15 06:54:01 sjg Exp $
--- expvers.py.~1~	Fri Jun 14 13:09:31 2002
+++ expvers.py	Fri Jun 14 13:36:32 2002
@@ -2,7 +2,7 @@
 
 import sys
 import posix
-import strop
+import string
 
 def exists(path):
   try:
@@ -27,12 +27,12 @@ def is_executable(path):
 def pathjoin(dir, base):
   return '%s/%s' % (dir, base)
 def pathsplit(path):
-  p = strop.rfind(path, '/')
+  p = string.rfind(path, '/')
   if p >= 0:
     return (path[:p], path[p+1:])
   return ('', path)
 def splitext(path):
-  p = strop.rfind(path, '.')
+  p = string.rfind(path, '.')
   if p >= 0:
     return (path[:p], path[p:])
   return (path, '')
@@ -64,21 +64,21 @@ def ticks(*cmdargs):
     wpid = None
     while wpid != pid:
       (wpid, wstat) = posix.wait()
-    v = strop.join(l)[:-1]
+    v = string.join(l)[:-1]
     if wstat:
       raise RuntimeError, v
     return v
 
 def expect_expr(*args):
   global expect_prog
-  cmd = 'puts [%s]' % strop.join(map(str, args))
+  cmd = 'puts [%s]' % string.join(map(str, args))
   result = ticks(expect_prog, '-c', cmd)
   return result
 
 def get_version(prog):
   version = expect_expr('exp_version')
-  if strop.count(version, '.') > 1:
-    p = strop.rfind(version, '.')
+  if string.count(version, '.') > 1:
+    p = string.rfind(version, '.')
     return (version[:p], version)
   else:
     return (version, version)
@@ -115,7 +115,7 @@ else:
   elif posix.environ.has_key('EXPECT'):
     expect_prog = posix.environ['EXPECT']
   else:
-    path = strop.split(posix.environ['PATH'], ':')
+    path = string.split(posix.environ['PATH'], ':')
     for dir in path:
       f = pathjoin(dir, 'expect')
       if is_executable(f):