Hi John, Welcome you to the Python tutor mailing list.
On 9 July 2014 19:26, John Cast <jdc...@stanford.edu> wrote: > > First, please forgive any ignorance in my post here as I am not good with > HTML and new to python. Not a problem. Although the list if formally about learning the basics of Python, there's many people on here with both diverse and deep knowledge so people often get lucky with what would be formally off-topic questions. > I have a bunch of excel spreadsheets (all in the same format) that I am > writing a python script to go through and pick out some information and post > to a wiki page. I'm new to python and have gone through some basic tutorials. > I feel confident that I can figure out how to read an excel spreadsheet in > python. I imagine you're referring to using the xlrd module? > However, I am feeling a bit overwhelmed with figuring out how to do the web > stuff in python. The webpage doesn't exist yet and I have envisioned that the > wiki webpage is created once and then simply update it every time the script > is run. However, I don't know much about how persistence works with webpages. OK... > I have two main questions: > > 1) Considering the webpage doesn't exist yet, do I need to 'serve' or 'post' > a webpage (as was brought up below)? That depends. Actually both approaches are feasible but to make a choice either way would depend really on what you're actually trying to achieve and what constraints you operate under in terms of web server/hosting. > 2) How do I create this wiki webpage? and does this happen in python every > time the script is run? > > 3) How do I send my data to this webpage? Again, that depends. You need to decide what approach would suit your context better: 1) Generating a static HTML website from your data ====================================== Pros: - Hosts anywhere, not backend Python required - Setup, Management and generation is relatively straightforward, and web pages themselves can be written up in e.g. simple text formats (Markdown etc) - Light, fast - Easy to version control Cons: - No DB backend so site is less interactive than it would otherwise be. Example: Pelican web framework for Python. See here: http://pelican.readthedocs.org/en/3.4.0/ and here: http://blog.getpelican.com/ 2) Build a website with Python on the back-end ================================== Pros: - Much more flexible. - You can pretty much do anything - Setup and management is more involved/complex. Cons - Usually not quite as fast as a static site - Requires hosting that can comply with your backend needs (Python + whatever framework you want to use.) Examples: - Django web framework: https://www.djangoproject.com/ - Web2py web framework: http://www.web2py.com/ There's of course a myriad of related and alternatives to what I've mentioned above which may or may not be applicable to what you're doing but without knowing more about your operational and other requirements it's impossible to make further suggestions. I just want to address one other point -- you mention the term "wiki", note that the items I've mentioned aren't wiki's in their own right, however if you really do want wiki functionality then just to note that there are Python powered CMS's and wiki's as well (some powered by the framework's I've mentioned). Hope that helps, Walter _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor