I was wondering if anyone could tell me how to save a html page to a website's filemanager
labeled as .html so that it would be searchable.
Like a wiki.

for example:


print "<html>"
print "<title>python</title>"
print "<body>"
print """<h1> I would Like to save this page as http://www.mysite.com/python.html</h1>"""
print "</body"
print "</html>"

I was wondering if anyone could tell me how to save a html page to a website's filemanager
labeled as .html so that it would be searchable.
Like a wiki.

for example:


print "<html>"
print "<title>python</title>"
print "<body>"
print """<h1> I would Like to save this page as http://www.mysite.com/python.html</h1>"""
print "</body"
print "</html>"

Okay I'm guessing this isn't possible?

so this shouldn't be so hard.

os.mkdir("/home/weburl/public_html/mydirectory")
the above works fine

how would I place a blank html file in the same directory as above.
(blank.html for this example)

Sorry for asking for code...I understand this is a very ilogical way of saving pages, I also left out far to much information.

+generic webhosting provider using apache:+ In this case justhost.com

fo = open("/homedirectory/etc/etc/%s.html" then obviously you would specify the 'r' or 'w+' options if you need to create the file or append, followed by the standard .close()

In the above '%s', simply refers to the desired documents/file's title you wish to create.

Just like you would do with a simple .txt file :)

Benfits if a user now types http://www.yousite.com/%s.html the page will be created and saved.

I hope this helps some one who is interested in learning more about the python language.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.