On 22/05/14 19:47, Chris “Kwpolska” Warrick wrote:
On Thu, May 22, 2014 at 12:54 AM, Alan Gauld wrote:
But basically this just creates a text file in a folder somewhere.
Its only when that is accessed via a web server that it gets
sent to a browser, and only as a static file.
If you wanted to
On Thu, May 22, 2014 at 12:54 AM, Alan Gauld wrote:
> But basically this just creates a text file in a folder somewhere.
> Its only when that is accessed via a web server that it gets
> sent to a browser, and only as a static file.
>
> If you wanted to do it dynamically you'd have a file called
>
fabu desay Wrote in message:
> If I got the problem correctly
What problem is that? I see no context.
> ,you can equally create + open a file
> file = open(filename,+wr)
But the second argument must be a string. I cannot imagine any
content in the wrong variable that would produce a strin
As a web server, you would not even be trying to open a file on disk.
You've most likely got the network socket as a file-like object in
hand: you'd probably write directly to that file-like object and avoid
touching any disk whatsoever. You want to avoid touching disk if
possible, especially on h
On 21/05/14 16:50, fabu desay wrote:
If I got the problem correctly,you can equally create + open a file
file = open(filename,+wr)
You wouldn't normally use +wr as a mode; that introduces a lot of
complications. Usually you just open to read, or open to write.
In your case w is all you need.
If I got the problem correctly,you can equally create + open a file
file = open(filename,+wr)
The file should have the HTML extension
You can now pace your web contents in the file.html you created
that should work by trigering the python file you programed in and it
inturn creates the website or