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
e4601f7b
Commit
e4601f7b
authored
Dec 19, 1997
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Products a Package.
parent
cf5d6411
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
lib/python/OFS/Application.py
lib/python/OFS/Application.py
+13
-8
No files found.
lib/python/OFS/Application.py
View file @
e4601f7b
...
...
@@ -11,8 +11,8 @@
__doc__
=
'''Application support
$Id: Application.py,v 1.3
1 1997/12/19 15:37:34
jim Exp $'''
__version__
=
'$Revision: 1.3
1
$'
[
11
:
-
2
]
$Id: Application.py,v 1.3
2 1997/12/19 17:04:21
jim Exp $'''
__version__
=
'$Revision: 1.3
2
$'
[
11
:
-
2
]
import
Globals
,
Folder
,
os
,
regex
,
sys
...
...
@@ -33,6 +33,10 @@ class Application(Folder.Folder):
"Miscellaneous product information"
__roles__
=
None
class
p_
:
"Shared Principia information"
__roles__
=
None
manage_options
=
(
{
'icon'
:
'OFS/Folder_icon.gif'
,
'label'
:
'Contents'
,
'action'
:
'manage_main'
,
'target'
:
'manage_main'
},
...
...
@@ -139,8 +143,7 @@ def open_bobobase():
# Open the application database
Bobobase
=
Globals
.
Bobobase
=
Globals
.
PickleDictionary
(
Globals
.
BobobaseName
)
product_dir
=
os
.
path
.
join
(
SOFTWARE_HOME
,
'Products'
)
sys
.
path
.
append
(
product_dir
)
product_dir
=
os
.
path
.
join
(
SOFTWARE_HOME
,
'lib/python/Products'
)
install_products
()
...
...
@@ -171,7 +174,7 @@ def install_products():
# that all folders know about top-level objects, aka products
path_join
=
os
.
path
.
join
product_dir
=
path_join
(
SOFTWARE_HOME
,
'Products'
)
product_dir
=
path_join
(
SOFTWARE_HOME
,
'
lib/python/
Products'
)
isdir
=
os
.
path
.
isdir
exists
=
os
.
path
.
exists
DictType
=
type
({})
...
...
@@ -185,10 +188,10 @@ def install_products():
package_dir
=
path_join
(
product_dir
,
product_name
)
if
not
isdir
(
package_dir
):
continue
if
not
exists
(
path_join
(
package_dir
,
'__init__.py'
)):
continue
product
=
__import__
(
product_name
)
product
=
getattr
(
__import__
(
"Products.%s"
%
product_name
),
product_name
)
for
meta_type
in
pgetattr
(
product
,
'meta_types'
,
()):
if
product_name
==
'OFS'
:
meta_types
.
insert
(
0
,
meta_type
)
if
product_name
==
'OFS
P
'
:
meta_types
.
insert
(
0
,
meta_type
)
else
:
meta_types
.
append
(
meta_type
)
name
=
meta_type
[
'name'
]
...
...
@@ -256,11 +259,13 @@ class Misc_:
def
__str__
(
self
):
return
self
.
__name__
def
__getitem__
(
self
,
name
):
return
self
.
_d
[
name
]
##############################################################################
#
# $Log: Application.py,v $
# Revision 1.32 1997/12/19 17:04:21 jim
# Make Products a Package.
#
# Revision 1.31 1997/12/19 15:37:34 jim
# Now product __init__s can omit __ foolishness.
# Now products can define misc objects.
...
...
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