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
00a0ec19
Commit
00a0ec19
authored
Sep 03, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed tabs
parent
4e09ff2a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1469 additions
and
1533 deletions
+1469
-1533
lib/python/ZPublisher/Client.py
lib/python/ZPublisher/Client.py
+253
-253
lib/python/ZPublisher/Publish.py
lib/python/ZPublisher/Publish.py
+694
-697
lib/python/ZPublisher/Response.py
lib/python/ZPublisher/Response.py
+371
-371
lib/python/ZPublisher/Test.py
lib/python/ZPublisher/Test.py
+151
-212
No files found.
lib/python/ZPublisher/Client.py
View file @
00a0ec19
...
...
@@ -2,7 +2,7 @@
""":"
exec python $0 ${1+"$@"}
"""
#"
##############################################################################
#
# Copyright (c) 1998, Digital Creations, Fredericksburg, VA, USA.
...
...
@@ -72,7 +72,7 @@ that allows one to simply make a single web request.
The module also provides a command-line interface for calling objects.
"""
__version__
=
'$Revision: 1.2
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
4
$'
[
11
:
-
2
]
import
sys
,
regex
,
socket
,
mimetools
from
httplib
import
HTTP
...
...
lib/python/ZPublisher/Publish.py
View file @
00a0ec19
##############################################################################
#
# Copyright
# Copyright (c) 1998, Digital Creations, Fredericksburg, VA, USA.
# All rights reserved.
#
# Copyright 1996 Digital Creations, L.C., 910 Princess Anne
# Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All
# rights reserved. Copyright in this software is owned by DCLC,
# unless otherwise indicated. Permission to use, copy and
# distribute this software is hereby granted, provided that the
# above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear. Note that
# any product, process or technology described in this software
# may be the subject of other Intellectual Property rights
# reserved by Digital Creations, L.C. and are not licensed
# hereunder.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# Trademarks
# o Redistributions of source code must retain the above copyright
# notice, this list of conditions, and the disclaimer that follows.
#
# Digital Creations & DCLC, are trademarks of Digital Creations, L.C..
# All other trademarks are owned by their respective companies.
# o Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions, and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# No Warranty
# o All advertising materials mentioning features or use of this
# software must display the following acknowledgement:
#
# The software is provided "as is" without warranty of any kind,
# either express or implied, including, but not limited to, the
# implied warranties of merchantability, fitness for a particular
# purpose, or non-infringement. This software could include
# technical inaccuracies or typographical errors. Changes are
# periodically made to the software; these changes will be
# incorporated in new editions of the software. DCLC may make
# improvements and/or changes in this software at any time
# without notice.
# This product includes software developed by Digital Creations
# and its contributors.
#
# Limitation Of Liability
# o Neither the name of Digital Creations nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# In no event will DCLC be liable for direct, indirect, special,
# incidental, economic, cover, or consequential damages arising
# out of the use of or inability to use this software even if
# advised of the possibility of such damages. Some states do not
# allow the exclusion or limitation of implied warranties or
# limitation of liability for incidental or consequential
# damages, so the above limitation or exclusion may not apply to
# you.
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS AND CONTRIBUTORS *AS IS*
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL
# CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
#
#
If you have questions regarding this software,
# contact:
#
#
If you have questions regarding this software,
contact:
#
# Digital Creations, L.C.
# 910 Princess Ann Street
...
...
@@ -53,6 +50,7 @@
#
# (540) 371-6909
#
##############################################################################
__doc__
=
"""Python Object Publisher -- Publish Python objects on web servers
...
...
@@ -480,11 +478,11 @@ Publishing a module using CGI
containing the module to be published) to the module name in the
cgi-bin directory.
$Id: Publish.py,v 1.9
1 1998/09/01 15:18:32
jim Exp $"""
$Id: Publish.py,v 1.9
2 1998/09/03 14:50:17
jim Exp $"""
#'
#
##########################################################################
__version__
=
'$Revision: 1.9
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.9
2
$'
[
11
:
-
2
]
import
sys
,
os
,
string
,
cgi
,
regex
from
string
import
*
...
...
@@ -493,7 +491,6 @@ from CGIResponse import Response
from
urllib
import
quote
,
unquote
from
cgi
import
FieldStorage
,
MiniFieldStorage
# Waaaa, I wish I didn't have to work this hard.
try
:
from
thread
import
allocate_lock
except
:
...
...
lib/python/ZPublisher/Response.py
View file @
00a0ec19
'''CGI Response Output formatter
$Id: Response.py,v 1.3
5 1998/09/01 15:18:31
jim Exp $'''
$Id: Response.py,v 1.3
6 1998/09/03 14:50:16
jim Exp $'''
#
# Copyright (c) 1998, Digital Creations, Fredericksburg, VA, USA.
# All rights reserved.
...
...
@@ -51,7 +51,7 @@ $Id: Response.py,v 1.35 1998/09/01 15:18:31 jim Exp $'''
#
# (540) 371-6909
#
__version__
=
'$Revision: 1.3
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.3
6
$'
[
11
:
-
2
]
import
string
,
types
,
sys
,
regex
from
string
import
find
,
rfind
,
lower
,
upper
,
strip
,
split
,
join
,
translate
...
...
lib/python/ZPublisher/Test.py
View file @
00a0ec19
...
...
@@ -130,9 +130,9 @@ Examples
s
$Id: Test.py,v 1.1
7 1998/09/01 15:18:31
jim Exp $
$Id: Test.py,v 1.1
8 1998/09/03 14:50:17
jim Exp $
'''
__version__
=
'$Revision: 1.1
7
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
8
$'
[
11
:
-
2
]
import
sys
,
traceback
,
profile
,
os
repeat_count
=
100
...
...
@@ -363,64 +363,3 @@ def publish(script,path_info,u=None,p=None,d=None,t=None,e={},s=None,pm=0):
print
'
\
n
%s
\
n
'
%
(
'_'
*
60
)
if
__name__
==
"__main__"
:
main
()
#
# $Log: Test.py,v $
# Revision 1.17 1998/09/01 15:18:31 jim
# added open source copyright
#
# Revision 1.16 1998/05/04 21:37:32 jim
# Added support for post-mortem debugging view pm flag to publish method.
#
# Revision 1.15 1998/04/29 19:08:19 jim
# Add support for post-mortem debugging.
#
# Revision 1.14 1998/04/09 15:21:59 jim
# *** empty log message ***
#
# Revision 1.13 1998/04/09 15:20:10 jim
# Fixed way that Python is invoked in command-line mode.
#
# Revision 1.12 1997/09/02 21:15:34 jim
# Added 'Main' as default module.
# Took out break in non-existent xxx_find_object.
#
# Revision 1.11 1997/04/22 03:47:29 jim
# *** empty log message ***
#
# Revision 1.10 1997/04/11 22:45:22 jim
# Changed to require two arguments.
#
# Revision 1.9 1997/04/11 13:35:06 jim
# Added -e option to specify environment variables.
#
# Revision 1.8 1997/04/10 13:48:56 jim
# Modified profiling to use repeat_count.
#
# Revision 1.7 1997/04/09 21:08:04 jim
# Improved profiling behavior:
#
# - Do 10 trials, with a preceeding trial to warm things up,
# - Use time.time for timing rather than os.times.
#
# Revision 1.6 1997/02/14 17:28:55 jim
# Added -r option to specify repeat count fot -t.
#
# Revision 1.5 1996/11/11 22:14:26 jim
# Minor doc change
#
# Revision 1.4 1996/11/11 22:00:01 jim
# Minor doc change
#
# Revision 1.3 1996/10/02 16:03:59 jim
# Took out spurious line.
#
# Revision 1.2 1996/09/16 14:43:26 jim
# Changes to make shutdown methods work properly. Now shutdown methods
# can simply sys.exit(0).
#
# Added on-line documentation and debugging support to bobo.
#
# Revision 1.1 1996/09/13 22:51:52 jim
# *** empty log message ***
#
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