Symbolic Link

mosscliffe mcl.office at googlemail.com
Sun Aug 19 02:32:20 EDT 2007


On 18 Aug, 23:49, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
> mosscliffe schrieb:
>
>
>
> > I am trying to create a link to a file, which I can then use in an
> > HTML page.
>
> > The system is Linux on a hosted web service, running python 2.3.
> > Other than that I have no knowledge of the system.
>
> > The link is created OK, but when I try to use it as filename for the
> > IMG TAG, it does not get displayed.  The page source of the created
> > page is pointing to the link as temp/test1.jpg
>
> > Any ideas ?
>
> > srcFile = "temp/test2.jpg"
>
> > linkFile = "temp/test1.jpg"
>
> > if os.path.islink(linkFile):
> >     print "Link Exists", nl
> >     pass
> > else:
> >     print "Making Link", nl
> >     os.symlink(srcFile, linkFile)
>
> > print '<BR><img src="%s">the image</IMG><BR><BR>' % linkFile
>
> > print '<img src="%s">the image</IMG>' % srcFile
>
> In what environment is that script running? If it's apache, it might be
> that the apache settings disallow for following links.
>
> Diez

It is Apache.

Can I create some override in the current directory.  I am afraid my
Apache skills are almost zero.

Thanks

Richard




More information about the Python-list mailing list