My way of "getting around it" is:<br><br><span style="font-family: courier new,monospace;">def __init__(self, port, app):</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> ...some other stuff...</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> try:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> port = int(port)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> except ValueError:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> port = 5000</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> ...some other stuff...</span><br><br>--Joe<br style="font-family: courier new,monospace;"><br><div class="gmail_quote">On Wed, Oct 28, 2009 at 9:07 PM, Steve Wakeford <span dir="ltr"><<a href="mailto:wakeford@msu.edu">wakeford@msu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I am a little stumped as to why the Blocking server is instantiated in the hw7 tests with<br>
<br>
server = webserve.Server(8000, app)<br>
<br>
but the Non-blocking server is instantiated with<br>
<br>
server = webserve_nb.NonblockingServer('', hello_app)<br>
<br>
Notice the first argument is an integer in the former and a string in the latter. Is it just me or am I missing something? How do we deal with this (for non-blocking) since the port should be dynamically passed in upon instantiation from a command line argument?<br>
<br>
My goal is to subclass the Blocking server and only to override its __init__() and serve_forever() methods. Any ideas?<br>
<br>
Thanks,<br>
-Steve<br>
<br>
_______________________________________________<br>
cse491-fall-2009 mailing list<br>
<a href="mailto:cse491-fall-2009@lists.idyll.org" target="_blank">cse491-fall-2009@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/cse491-fall-2009" target="_blank">http://lists.idyll.org/listinfo/cse491-fall-2009</a><br>
</blockquote></div><br>