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
101e6264
Commit
101e6264
authored
Dec 03, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rearranged SOFTWARE_HOME and INSTANCE_HOME
parent
23c4048a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
32 deletions
+41
-32
lib/python/AccessControl/User.py
lib/python/AccessControl/User.py
+2
-2
lib/python/App/ApplicationManager.py
lib/python/App/ApplicationManager.py
+2
-2
lib/python/App/Extensions.py
lib/python/App/Extensions.py
+7
-5
lib/python/App/Product.py
lib/python/App/Product.py
+1
-1
lib/python/Globals.py
lib/python/Globals.py
+20
-16
lib/python/ImageFile.py
lib/python/ImageFile.py
+2
-2
lib/python/OFS/Application.py
lib/python/OFS/Application.py
+7
-4
No files found.
lib/python/AccessControl/User.py
View file @
101e6264
"""Access control package"""
__version__
=
'$Revision: 1.6
0
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.6
1
$'
[
11
:
-
2
]
import
Globals
,
App
.
Undo
,
socket
,
regex
from
Globals
import
HTMLFile
,
MessageDialog
,
Persistent
,
PersistentMapping
...
...
@@ -173,7 +173,7 @@ class User(BasicUser, Persistent):
_remote_user_mode
=
0
try
:
f
=
open
(
'%s/access'
%
SOFTWAR
E_HOME
,
'r'
)
f
=
open
(
'%s/access'
%
INSTANC
E_HOME
,
'r'
)
data
=
split
(
strip
(
f
.
readline
()),
':'
)
f
.
close
()
_remote_user_mode
=
not
data
[
1
]
...
...
lib/python/App/ApplicationManager.py
View file @
101e6264
__doc__
=
"""System management components"""
__version__
=
'$Revision: 1.3
4
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.3
5
$'
[
11
:
-
2
]
import
sys
,
os
,
time
,
string
,
Globals
,
Acquisition
...
...
@@ -172,7 +172,7 @@ class ApplicationManager(Folder,CacheManager):
exists
=
os
.
path
.
exists
strip
=
string
.
strip
product_dir
=
path_join
(
SOFTWARE_HOME
,
'
lib/python/
Products'
)
product_dir
=
path_join
(
SOFTWARE_HOME
,
'Products'
)
product_names
=
os
.
listdir
(
product_dir
)
product_names
.
sort
()
info
=
[]
...
...
lib/python/App/Extensions.py
View file @
101e6264
...
...
@@ -12,8 +12,8 @@ __doc__='''Standard routines for handling Principia Extensions
Principia extensions currently include external methods and pluggable brains.
$Id: Extensions.py,v 1.
2 1998/09/16 16:52:42
jim Exp $'''
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
$Id: Extensions.py,v 1.
3 1998/12/03 15:29:20
jim Exp $'''
__version__
=
'$Revision: 1.
3
$'
[
11
:
-
2
]
from
string
import
find
import
os
,
zlib
,
rotor
...
...
@@ -48,8 +48,7 @@ def getObject(module, name, reload=0, modules={}):
d
=
find
(
n
,
'.'
)
if
d
>
0
:
d
,
n
=
n
[:
d
],
n
[
d
+
1
:]
n
=
(
"%s/lib/python/Products/%s/Extensions/%s.pyp"
%
(
SOFTWARE_HOME
,
d
,
n
))
n
=
(
"%s/Products/%s/Extensions/%s.pyp"
%
(
SOFTWARE_HOME
,
d
,
n
))
__traceback_info__
=
n
,
module
if
exists
(
n
):
data
=
zlib
.
decompress
(
...
...
@@ -58,7 +57,7 @@ def getObject(module, name, reload=0, modules={}):
execsrc
=
compile
(
data
,
module
,
'exec'
)
if
execsrc
is
None
:
try
:
execsrc
=
open
(
"%s/Extensions/%s.py"
%
(
SOFTWAR
E_HOME
,
module
))
try
:
execsrc
=
open
(
"%s/Extensions/%s.py"
%
(
INSTANC
E_HOME
,
module
))
except
:
raise
"Module Error"
,
(
"The specified module, <em>%s</em>, couldn't be opened."
%
module
)
...
...
@@ -99,6 +98,9 @@ def getBrain(module, class_name, reload=0):
##############################################################################
#
# $Log: Extensions.py,v $
# Revision 1.3 1998/12/03 15:29:20 jim
# rearranged SOFTWARE_HOME and INSTANCE_HOME
#
# Revision 1.2 1998/09/16 16:52:42 jim
# Improved error reporting.
#
...
...
lib/python/App/Product.py
View file @
101e6264
...
...
@@ -168,7 +168,7 @@ class Product(Folder):
# Extensions
pp
=
id
+
'.'
lpp
=
len
(
pp
)
ed
=
os
.
path
.
join
(
SOFTWAR
E_HOME
,
'Extensions'
)
ed
=
os
.
path
.
join
(
INSTANC
E_HOME
,
'Extensions'
)
if
os
.
path
.
exists
(
ed
):
for
name
in
os
.
listdir
(
ed
):
suffix
=
''
...
...
lib/python/Globals.py
View file @
101e6264
"""Global definitions"""
__version__
=
'$Revision: 1.2
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
6
$'
[
11
:
-
2
]
import
sys
,
os
from
DateTime
import
DateTime
...
...
@@ -15,20 +15,24 @@ def package_home(globals_dict):
if
hasattr
(
m
,
'__path__'
):
return
m
.
__path__
[
0
]
return
sys
.
modules
[
__name__
[:
rfind
(
__name__
,
'.'
)]].
__path__
[
0
]
try
:
home
=
CUSTOMER_HOME
,
SOFTWARE_HOME
CUSTOMER_HOME
,
SOFTWARE_HOME
=
home
try
:
home
=
os
.
environ
[
'SOFTWARE_HOME'
]
except
:
try
:
home
=
os
.
environ
[
'SOFTWARE_HOME'
]
except
:
import
Products
home
=
package_home
(
Products
.
__dict__
)
home
=
(
os
.
path
.
split
(
os
.
path
.
split
(
os
.
path
.
split
(
home
)[
0
])[
0
])[
0
]
or
os
.
getcwd
())
try
:
chome
=
os
.
environ
[
'CUSTOMER_HOME'
]
except
:
chome
=
home
CUSTOMER_HOME
=
sys
.
modules
[
'__builtin__'
].
CUSTOMER_HOME
=
chome
SOFTWARE_HOME
=
sys
.
modules
[
'__builtin__'
].
SOFTWARE_HOME
=
home
import
Products
home
=
package_home
(
Products
.
__dict__
)
d
,
e
=
os
.
path
.
split
(
chome
)
if
d
:
home
=
d
SOFTWARE_HOME
=
sys
.
modules
[
'__builtin__'
].
SOFTWARE_HOME
=
home
try
:
chome
=
os
.
environ
[
'INSTANCE_HOME'
]
except
:
chome
=
home
d
,
e
=
os
.
path
.
split
(
chome
)
if
e
==
'python'
:
d
,
e
=
os
.
path
.
split
(
d
)
if
e
==
'lib'
:
chome
=
d
INSTANCE_HOME
=
sys
.
modules
[
'__builtin__'
].
INSTANCE_HOME
=
chome
from
BoboPOS
import
Persistent
,
PickleDictionary
...
...
@@ -119,7 +123,7 @@ class HTMLFile(DocumentTemplate.HTMLFile,MethodObject.Method,):
_v_last_read
=
0
def
__init__
(
self
,
name
,
_prefix
=
None
,
**
kw
):
if
_prefix
is
None
:
_prefix
=
SOFTWARE_HOME
+
'/lib/python'
if
_prefix
is
None
:
_prefix
=
SOFTWARE_HOME
elif
type
(
_prefix
)
is
not
type
(
''
):
_prefix
=
package_home
(
_prefix
)
args
=
(
self
,
'%s/%s.dtml'
%
(
_prefix
,
name
))
...
...
@@ -134,7 +138,7 @@ class HTMLFile(DocumentTemplate.HTMLFile,MethodObject.Method,):
return
apply
(
HTMLFile
.
inheritedAttribute
(
'__call__'
),
(
self
,)
+
args
[
1
:],
kw
)
data_dir
=
CUSTOMER
_HOME
+
'/var'
data_dir
=
INSTANCE
_HOME
+
'/var'
BobobaseName
=
'%s/Data.bbb'
%
data_dir
from
App.Dialogs
import
MessageDialog
...
...
lib/python/ImageFile.py
View file @
101e6264
"""Image object that is stored in a file"""
__version__
=
'$Revision: 1.
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
6
$'
[
11
:
-
2
]
from
string
import
rfind
from
Globals
import
package_home
...
...
@@ -11,7 +11,7 @@ class ImageFile(Acquisition.Explicit):
"""Image object stored in an external file"""
def
__init__
(
self
,
path
,
_prefix
=
None
):
if
_prefix
is
None
:
_prefix
=
SOFTWARE_HOME
+
'/lib/python'
if
_prefix
is
None
:
_prefix
=
SOFTWARE_HOME
elif
type
(
_prefix
)
is
not
type
(
''
):
_prefix
=
package_home
(
_prefix
)
path
=
'%s/%s'
%
(
_prefix
,
path
)
...
...
lib/python/OFS/Application.py
View file @
101e6264
...
...
@@ -11,8 +11,8 @@
__doc__
=
'''Application support
$Id: Application.py,v 1.7
5 1998/12/01 17:28:24 brian
Exp $'''
__version__
=
'$Revision: 1.7
5
$'
[
11
:
-
2
]
$Id: Application.py,v 1.7
6 1998/12/03 15:29:20 jim
Exp $'''
__version__
=
'$Revision: 1.7
6
$'
[
11
:
-
2
]
import
Globals
,
Folder
,
os
,
regex
,
sys
,
App
.
Product
,
App
.
ProductRegistry
...
...
@@ -221,7 +221,7 @@ def open_bobobase():
Bobobase
=
Globals
.
Bobobase
=
Globals
.
PickleDictionary
(
Globals
.
BobobaseName
)
product_dir
=
os
.
path
.
join
(
SOFTWARE_HOME
,
'
lib/python/
Products'
)
product_dir
=
os
.
path
.
join
(
SOFTWARE_HOME
,
'Products'
)
__traceback_info__
=
sys
.
path
...
...
@@ -270,7 +270,7 @@ def install_products(app):
# that all folders know about top-level objects, aka products
path_join
=
os
.
path
.
join
product_dir
=
path_join
(
SOFTWARE_HOME
,
'
lib/python/
Products'
)
product_dir
=
path_join
(
SOFTWARE_HOME
,
'Products'
)
isdir
=
os
.
path
.
isdir
exists
=
os
.
path
.
exists
DictType
=
type
({})
...
...
@@ -389,6 +389,9 @@ class Misc_:
##############################################################################
#
# $Log: Application.py,v $
# Revision 1.76 1998/12/03 15:29:20 jim
# rearranged SOFTWARE_HOME and INSTANCE_HOME
#
# Revision 1.75 1998/12/01 17:28:24 brian
# Added Help support
#
...
...
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