def pyxl_transform(stream): try: output = pyxl_untokenize(pyxl_tokenize(stream.readline)) except Exception, ex: print ex traceback.print_exc() raise
def __init__(self, *args, **kwargs): codecs.StreamReader.__init__(self, *args, **kwargs) try: data = tokenize.untokenize(pyxl_tokenize(self.stream.readline)) except Exception, ex: print ex raise
def p(tree): new_string = tokenize.untokenize( pyxl_tokenize(StringIO.StringIO('(' + tree.s + ')').readline)).rstrip() new_tree = ast.parse("from __future__ import unicode_literals;" + new_string) return new_tree.body[1].value
def p(tree, **kw): import StringIO new_string = tokenize.untokenize( pyxl_tokenize(StringIO.StringIO('(' + tree.s + ')').readline)).rstrip().rstrip("\\") total_string = "from __future__ import unicode_literals;" + new_string new_tree = ast.parse(total_string) return new_tree.body[1].value
def pyxl_transform(stream, invertible=False, str_function='str'): try: output = pyxl_untokenize(pyxl_tokenize(stream.readline, invertible, str_function)) except Exception as ex: print(ex) traceback.print_exc() raise return output
def pyxl_transform(stream): try: output = pyxl_untokenize(pyxl_tokenize(stream.readline)) except Exception as ex: print(ex) traceback.print_exc() raise return output.rstrip()
#!/usr/bin/env python import sys from pyxl.codec.tokenizer import pyxl_tokenize, pyxl_untokenize f = open(sys.argv[1], 'r') print pyxl_untokenize(pyxl_tokenize(f.readline))
def p(tree, **kw): import StringIO new_string = tokenize.untokenize(pyxl_tokenize(StringIO.StringIO('(' + tree.s + ')').readline)).rstrip().rstrip("\\") total_string = "from __future__ import unicode_literals;" + new_string new_tree = ast.parse(total_string) return new_tree.body[1].value
#!/usr/bin/env python import sys from pyxl.codec.tokenizer import pyxl_tokenize, pyxl_untokenize with open(sys.argv[1], 'r') as f: print(pyxl_untokenize(pyxl_tokenize(f.readline)), end='')
def pyxl_transform(stream): return pyxl_untokenize(pyxl_tokenize(stream.readline)).rstrip()
#!/usr/bin/env python import sys from pyxl.codec.tokenizer import pyxl_tokenize, pyxl_untokenize f = open(sys.argv[1], 'r') print pyxl_untokenize(pyxl_tokenize(f.readline)),
def p(tree): new_string = tokenize.untokenize(pyxl_tokenize(StringIO.StringIO('(' + tree.s + ')').readline)).rstrip() new_tree = ast.parse("from __future__ import unicode_literals;" + new_string) return new_tree.body[1].value
def pyxl_transform(stream): output = pyxl_untokenize(pyxl_tokenize(stream.readline)) return output.rstrip()
#!/usr/bin/env python # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import sys import tokenize from pyxl.codec.tokenizer import pyxl_tokenize f = open(sys.argv[1], 'r') print tokenize.untokenize(pyxl_tokenize(f.readline))
def p(tree, **kw): new_string = tokenize.untokenize(pyxl_tokenize(StringIO('(' + tree.s + ')') .readline)).rstrip().rstrip("\\") new_tree = ast.parse(new_string) return new_tree.body[0].value