Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)
unicode(object='') -> unicode object
unicode(string[, encoding[, errors]]) -> unicode object

Create a new Unicode object from the given encoded string.
encoding defaults to the current default string encoding.
errors can be 'strict', 'replace' or 'ignore' and defaults to 'strict'.

src/p/r/PrimCom-HEAD/h.py   PrimCom(Download)
def view_edit_json(key):
    db = get_db_by_key(key)
    os.system("{ed} {f}".format(ed=cfg.EDITOR,
                                f="{root}/data/{db}.json".format(root=cfg.ROOT, db=db)))
 
    verb = action[0]
    if verb == 'cat':
        os.system("{ed} {fname}".format(ed=cfg.EDITOR,
                                        fname=fname_to_abs(action[1])))
 
        json.dump(d, f, indent=4)
    assert os.path.isfile(tmpfile)
    os.system("{ed} {fname}".format(ed=cfg.EDITOR, fname=tmpfile))
    #
    with open(tmpfile) as f:

src/p/r/PrimCom-HEAD/add_item.py   PrimCom(Download)
                reply = raw_input("Do you want to edit {f} [y/n] (default: yes)? ".format(f=fname)).strip()
                if reply in ('', 'y'):
                    os.system("{ed} {f}".format(ed=cfg.EDITOR, f=fname))