Exemplo n.º 1
0
        public static object Load(object file)
        {
            PythonFile pf = file as PythonFile;

            if (pf == null)
            {
                throw Ops.TypeError("expected file, found '{0}'", Ops.GetDynamicType(file).__name__);
            }

            return(LoadString(pf.Read()));
        }
Exemplo n.º 2
0
        public static string ReadFromFileDescriptor(int fd, int buffersize)
        {
            PythonFile pf = PythonFileManager.GetFileFromId(fd);

            return(pf.Read());
        }