• Now, notice the last line in Listing 1, which calls a close method on the file object.

    现在,请注意清单1中的最后一行,它调用file对象的close方法。

    youdao

  • If you need to append data to a file, you should use the append mode when creating the file object.

    如果需要向文件中添加数据,应当在创建file对象时,使用添加模式。

    youdao

  • The simplest technique for learning more about the file object is to ask for help, as shown in Listing 2.

    学习file对象的最简单方法就是阅读帮助,如清单 2 所示。

    youdao

  • As shown in Listing 6, however, writing is easy once you know the basics of working with the file object.

    但是如清单6所示,一旦了解了使用file对象的基础知识,写入也很容易。

    youdao

  • You can easily do so in Python by appending 'b' to the file mode when you create the file object, as shown in Listing 7.

    在创建file对象时,通过把'b'添加到文件模式中,可以很容易地用 Python 处理二进制数据,如清单7 所示。

    youdao

  • The read method takes two parameters: the class of the POJO and the file object that represents the XML file containing the data.

    read方法有两个参数:POJO的类和File对象,后者代表包含数据的XML文件。

    youdao

  • This section explores the superblock, the index node (or inode), the directory entry (or dentry), and finally, the file object.

    这个小节探索了超块(superblock)、索引节点(或inode)、目录条目(或dentry)和文件对象。

    youdao

  • You can use the file object to read data, to write data, to append data to a file, and to work with either binary or textual data.

    可以用file对象读取数据、写入数据或把数据添加到文件,以及处理二进制或文本数据。

    youdao

  • The second for loop simplifies this process a little by using an implicit variable (that is, one that isn't explicitly created) for the file object.

    第二个for循环通过使用file对象的隐式变量(也就是说,变量不是显式创建的),对这个过程稍做了点儿简化。

    youdao

  • You may notice that the file name of the transferred file can be obtained and, in this case, the file name is used when instantiating the file object.

    您可能会注意到可以得到传输的文件的名称,在这个示例中,在实例化File对象时使用到了文件名称。

    youdao

  • Inside the _setstate_ method we are able to recreate the file object based on the name and position information we pickled, and assign the file object to the instance's logfile attribute.

    在_ setstate _方法内,可以根据经过pickle的名称和位置信息来重建文件对象,并将该文件对象分配给这个实例的logfile属性。

    youdao

  • The file object refers to a dentry object, which refers to an inode.

    file对象引用dentry对象,后者引用inode。

    youdao

  • The file object is the basic mechanism by which you interact with files on your computer.

    file是与计算机上的文件进行交互的基本机制。

    youdao

  • The file object is the basic mechanism by which you interact with files on your computer.

    file是与计算机上的文件进行交互的基本机制。

    youdao

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定