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