Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
d45f3f55
Commit
d45f3f55
authored
Mar 18, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial
parent
ecf2dad2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
lib/python/Products/ExternalMethod/Util.py
lib/python/Products/ExternalMethod/Util.py
+60
-0
No files found.
lib/python/Products/ExternalMethod/Util.py
0 → 100644
View file @
d45f3f55
#!/bin/env python
##############################################################################
#
# Copyright
#
# Copyright 1996 Digital Creations, L.C., 910 Princess Anne
# Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All
# rights reserved.
#
##############################################################################
__doc__
=
'''Utility routines that are handy for developers
$Id: Util.py,v 1.1 1998/03/18 23:13:28 jim Exp $'''
__version__
=
'$Revision: 1.1 $'
[
11
:
-
2
]
standard_reload
=
reload
import
Globals
,
sys
class_map
=
{}
# waaaa
def
Reload
(
module
):
classes
=
[]
__import__
(
module
)
m
=
sys
.
modules
[
module
]
for
k
,
v
in
m
.
__dict__
.
items
():
if
(
hasattr
(
v
,
'__bases__'
)
and
hasattr
(
v
,
'__name__'
)
and
hasattr
(
v
,
'__dict__'
)
and
hasattr
(
v
,
'__module__'
)
and
v
.
__module__
==
module
):
# OK, smells like a class
cn
=
"%s.%s"
%
(
module
,
k
)
if
class_map
.
has_key
(
cn
):
v
=
class_map
[
cn
]
else
:
class_map
[
cn
]
=
v
classes
.
append
((
k
,
v
))
try
:
reload
(
m
)
except
TypeError
,
v
:
raise
'spam'
,
v
,
sys
.
exc_traceback
m
=
sys
.
modules
[
module
]
r
=
''
for
name
,
klass
in
classes
:
if
hasattr
(
m
,
name
):
c
=
getattr
(
m
,
name
)
d
=
klass
.
__dict__
for
k
,
v
in
c
.
__dict__
.
items
():
d
[
k
]
=
v
if
r
:
r
=
"%s, %s"
%
(
r
,
name
)
else
:
r
=
name
Globals
.
Bobobase
.
_jar
.
cache
.
minimize
(
0
)
return
r
or
'No classes affected'
##############################################################################
#
# $Log: Util.py,v $
# Revision 1.1 1998/03/18 23:13:28 jim
# initial
#
#
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment