[vtkusers] VTK writers with unicode path (python)

Michka Popoff michkapopoff at gmail.com
Sat Feb 22 11:23:16 EST 2014


Hi

I was wondering if one can use filenames or paths containing unicode characters to the vtkPNGWriter in python ?
Here is my code :

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import vtk

filename = u"~/Desktop/myfolderü/image.png"
writer = vtk.vtkPNGWriter()
writer.SetFileName(filename)


Traceback (most recent call last):
  File "test.py", line 7, in <module>
    writer.SetFileName(filename)
TypeError: SetFileName argument 1: (unicode conversion error)


Thanks in advance.


Michka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140222/566506f2/attachment.html>


More information about the vtkusers mailing list