[reportlab-users] open_for_read and Window file paths

Jerome Alet reportlab-users@reportlab.com
Thu, 3 Jun 2004 10:34:59 +0200


On Thu, Jun 03, 2004 at 09:25:20AM +0100, Robin Becker wrote:
> 
> >>> urlparse('c:/code/reportlab/test/pythonpowered.gif')
> ('c', '', '/code/reportlab/test/pythonpowered.gif', '', '', '')
> 
> >>> urlparse('yabadaba:/code/reportlab/test/pythonpowered.gif')
> ('yabadaba', '', '/code/reportlab/test/pythonpowered.gif', '', '', '')
> 
> ie urlparse is not validating the scheme in any way. I hate to think 
> what'll happen with mac file names containing : :(

Not what I meant, sorry

in urlparse.py file you'll see some global variables which contain
the lists of allowed schemes

just validate against these lists, not by using the urlparse method

bye

Jerome Alet

-- 
"Ni dieu ! Ni Maitre ?" - Me.