urls should be a sequence, not a dictionary:
*urls = [* * '/', 'index'* * ]* Cheers, - Joe On Wed, Dec 28, 2016 at 1:29 PM, Bryan Nahrwold <[email protected]> wrote: > Sorry, > > I'm a real newbie and obviously something that is obvious to everyone else > is not obvious to me. > > I've done the install of web.py and created the first tutorial containing: > > *import web* > > *urls = {* > * '/', 'index'* > * }* > > *class index:* > * def GET(self):* > * return "Hello, world!"* > > *if __name__ == "__main__":* > * app = web.application(urls, globals())* > * app.run()* > > Note: I am running this with python 2.7.3. > > I was not sure where to store this "code.py" file. I have tried: > > C:\python27\Scripts > and > C:\index > > In both cases, the web server starts and recognizes attempts to attach to > it with either > http:\\0.0.0.0:8080 > or http:\\localhost:8080 > > but the web server can't find the index: > > *C:\index>python code.py* > *http://0.0.0.0:8080/ <http://0.0.0.0:8080/>* > *127.0.0.1:49617 <http://127.0.0.1:49617> - - [28/Dec/2016 13:00:39] > "HTTP/1.1 GET /" - 404 Not Found* > *127.0.0.1:49686 <http://127.0.0.1:49686> - - [28/Dec/2016 13:01:17] > "HTTP/1.1 GET /" - 404 Not Found* > > Any help on where I should store code.py so the web server can find > "Hello, World"? > > I am trying this out on Windows 10 with just the development, localhost > approach. > > Thanks for any help offered. > > Bryan > > -- > You received this message because you are subscribed to the Google Groups > "web.py" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/webpy. > For more options, visit https://groups.google.com/d/optout. > -- It is always best to think of reality as perfectly normal. Since the beginning, not one unusual thing has ever happened. - Less Wrong -- You received this message because you are subscribed to the Google Groups "web.py" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/webpy. For more options, visit https://groups.google.com/d/optout.
