module access

bob ackerman rdacker at pacbell.net
Thu May 2 14:48:00 EDT 2002


On Thursday, May 2, 2002, at 11:41  AM, Mark McEahern wrote:

>> print  '<A HREF="dirb/fileb.py'
>>
>> if the file this is in is called from outside the module i need the 
>> 'dirb'
>> prefix. if called from within the module, having the prefix causes the
> link
>> to fail.
>
> I'm tempted to suggest that you try to take a step back and approach your
> problem from a different angle.  Why on earth should the package layout be
> hard-coded into the hyperlink?  It seems like a classic example of mashing
> presentation and logic together too tightly.
>
> I'm sorry I can't think of anything more helpful to say.

thanks, but how else would you set up a link to a module?
how else get to that module using a link?
anyway, i am thinking this is really an html problem, not python's.
i need to tell the browser what directory is current so it knows how to 
handle the link.

> Cheers,
>
> // mark
>






More information about the Python-list mailing list