comparison MoinMoin/script/__init__.py @ 2338:b902f2397c68

rename server and request Implementations by adding a prefix server_, request_
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Thu, 05 Jul 2007 21:23:29 +0200
parents 01f05e74aa9c
children ccf6d7ffb310
comparison
equal deleted inserted replaced
2290:49188b1e803c 2338:b902f2397c68
43 self.errstream.write(data) 43 self.errstream.write(data)
44 44
45 45
46 class ScriptRequestCLI(ScriptRequest): 46 class ScriptRequestCLI(ScriptRequest):
47 """ When a script runs directly on the shell, we just use the CLI request 47 """ When a script runs directly on the shell, we just use the CLI request
48 object (see MoinMoin.request.CLI) to do I/O (which will use stdin/out/err). 48 object (see MoinMoin.request.request_cli) to do I/O (which will use stdin/out/err).
49 """ 49 """
50 def __init__(self, request): 50 def __init__(self, request):
51 self.request = request 51 self.request = request
52 52
53 def read(self, n=None): 53 def read(self, n=None):
170 help="wiki page name [default: all pages]" 170 help="wiki page name [default: all pages]"
171 ) 171 )
172 172
173 def init_request(self): 173 def init_request(self):
174 """ create request """ 174 """ create request """
175 from MoinMoin.request import CLI 175 from MoinMoin.request import request_cli
176 if self.options.wiki_url: 176 if self.options.wiki_url:
177 self.request = CLI.Request(self.options.wiki_url, self.options.page) 177 self.request = request_cli.Request(self.options.wiki_url, self.options.page)
178 else: 178 else:
179 self.request = CLI.Request(pagename=self.options.page) 179 self.request = request_cli.Request(pagename=self.options.page)
180 180
181 def mainloop(self): 181 def mainloop(self):
182 # Insert config dir or the current directory to the start of the path. 182 # Insert config dir or the current directory to the start of the path.
183 config_dir = self.options.config_dir 183 config_dir = self.options.config_dir
184 if config_dir: 184 if config_dir: