On 1 Jan., 20:32, Yuval Levy <[email protected]> wrote:

> First:  I updated the ptoimggen.py script to deal with Windows paths.  I love
> Python.  Attached (for Kay).

Yuval, I suppose you want to make sure that, when using the script on
a Unix machine, ptos coming from Windows users will be properly
treated. But it makes the script non-portable. How about a Windows
user wanting to process a pto from a Unix machine?

name = os.path.basename ( line.n.value.replace ('\\', '/') ) +
'_dummy.jpg'

will only work one-way.
I think the best solution might be to use

name = re.sub ( '.*[/\\]' , '' , line.n.value )

which discards everything up to the last slash or backslash. What do
you say?

Kay

-- 
You received this message because you are subscribed to the Google Groups 
"Hugin and other free panoramic software" group.
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/hugin-ptx

Reply via email to