opening a text document to show a .txt file through a browser link

Ole Jensen ole_jensen at dbmail.dk
Sun Dec 29 13:46:39 EST 2002


  "Ole Jensen" <ole_jensen at dbmail.dk> wrote in message news:xhHP9.31301$Y2.889 at news2.bredband.com...

  "Jukka K. Korpela" <jkorpela at cs.tut.fi> wrote in message news:Xns92F389B6D6C96jkorpelacstutfi at 193.229.0.31...
  > "Ole Jensen" <ole_jensen at dbmail.dk> wrote:
  > 
  > > INTRODUCTION to my question
  > 
  > Irrelevant, and even misleading:
  > 
  > > - - I have for a long time
  > > now wanted to learn how to program 
  > 
  > HTML is not programming. It's a fairly sure indication that you know 
  > _neither_ markup _nor_ programming if you call HTML authoring 
  > programming.
  >
  I just want defend myself a little here... *If* you had taken the care to *read* what I said:
  Statement one: 
  *I have for a long time now wanted
  to learn how to program*

  Statement two (notice the *also*):
  I have also for equally long time wanted to gain
  some skills in making internet sites

  (I.e. this means that I would like to gain  skills in HTML)

  Statement three (closing remark):
  doing *both*

  (i.e. both programming and mark-up)

  I have never called HTML programing, I can tell the differrence.

  > But your question is actually not about programming and not about HTML.
  > 
  That might be true (although I'm sure it will involve at least one of them), since I want to get an internet browser to behave in a certain way(when pressing a link), it certainly has relavance in a HTML NG, and maybe also in a java(script) NG.

  > > I just want click the link and have a
  > > text editor showing me the code, not the browser as it is now!
  > 
  > Then do so. Use a link as an author, and make use of a link as a user 
  > the way you like. As an author, you cannot control what users do with 
  > your links. In particular, you can't even know that there is a "text 
  > editor" in the user's system.
  > 
  (to start off: If the visitor doesn't have a text editor on his system (and nor intends to get one), he would have no reason to download the .txt file, the text file is just there as an easy mean to edit it or run it in python. Not to be viewed by the browser they can do that else where on the site.) 

  So are you suggesting that I keep the link as is, and make the users copy'n'paste the contents from their internet browser into their text editor? I know you can right click, and "save target as" (or what ever your system states precisly), besides I would prefer *not to tell* my visitors how they are supposed to do it I would rather have happen automatically (thats what computeris for after all , right :-)).

  But as stated, the .txt file is not there for your eyes to glaze upon, it is there for you to quikly edit, or to run it so that you can get a feeling of how everything works.

  So is it possible? To make text editor open and show the file?

  > > Also if it is possible I would like to make annother link that
  > > opens the same file in a specífic program (which I expect most of
  > > my viewers to have installed) how can this be done (if possible)
  > 
  > Ditto. You should really check tha FAQ section
  > http://www.htmlhelp.com/faq/html/media.html
  > 
  As I stated I tried to with: type="text/plain" which in my mind would make sense from the list given at this Url (which if possible at the user end should also be a link if I have done it right ;-))
  http://www.htmlhelp.com/faq/html/media.html#download-howto
  should I use the application method and if so how can I get a (much) simplere text editor, then MSWord, to run.


  > > for currious people the (tempory) link is:
  > > D:\Programmer\frontpage2K\Sites\Learning to program\programs.htm
  > 
  > It's not a link. It's a malformed pseudo-URL that most probably works 
  > on a particular computer of yours only.
  >

  Alright my bad its an *URL* (it was never intended as a link as the mail was written in plain text....)
  And what an embarrasment... Now I notice the proplem, Its a local file, DOH!!!
  the real url is http://www.dbhome.dk/tjampman/programs.htm


  > -- 
  > Yucca, http://www.cs.tut.fi/~jkorpela/
  > Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
  > 
  > 

  I hope I have cleared most of the dubious things now, and I msorry if I offended any of you, you all seemed rather agrievated in you responses.

  cheers Ole
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20021229/61bafaa1/attachment.html>


More information about the Python-list mailing list