Changeset 10467:e9e98c6d4d6c in orange


Ignore:
Timestamp:
03/08/12 12:36:02 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
rebase_source:
28ec1977e55b2735fc8810aa5082289dd28bc4e0
Message:

Unicode filename support for saving a tree to .dot format.

Location:
Orange
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Orange/classification/tree.py

    r10371 r10467  
    26872687        for various outlines supported by GraphViz. 
    26882688        """ 
    2689         fle = type(file_name) == str and open(file_name, "wt") or file_name 
     2689        fle = isinstance(file_name, basestring) and open(file_name, "wt") or file_name 
    26902690 
    26912691        _TreeDumper(leaf_str, node_str, user_formats + 
  • Orange/orng/orngTree.py

    r9671 r10467  
    3131    DEPRECATED. Replaced by :obj:`TreeClassifier.dump`. 
    3232    """ 
    33     fle = type(fileName) == str and file(fileName, "wt") or fileName 
     33    fle = isinstance(fileName, basestring) and file(fileName, "wt") or fileName 
    3434 
    3535    _TreeDumper(leafStr, nodeStr, argkw.get("userFormats", []) +  
Note: See TracChangeset for help on using the changeset viewer.