コード例 #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()));
        }
コード例 #2
0
ファイル: nt.cs プロジェクト: weimingtom/IronPythonMod
        public static string ReadFromFileDescriptor(int fd, int buffersize)
        {
            PythonFile pf = PythonFileManager.GetFileFromId(fd);

            return(pf.Read());
        }