Home
last modified time | relevance | path

Searched refs:file_obj (Results 1 – 25 of 41) sorted by relevance

12

/external/pytorch/torch/utils/data/datapipes/utils/
Dcommon.py325 def __init__(self, file_obj, parent_stream=None, name=None): argument
326 self.file_obj = file_obj
359 file_obj = self.__dict__["file_obj"]
360 return getattr(file_obj, name)
375 self.file_obj.close(*args, **kwargs)
388 attrs += dir(self.file_obj)
396 yield from self.file_obj
399 return next(self.file_obj)
408 return self.file_obj
411 self.file_obj = obj
/external/python/pyfakefs/pyfakefs/tests/
Dfake_tempfile_test.py44 file_obj = self.fs.get_object(obj.name)
45 contents = file_obj.contents
50 file_obj = self.fs.get_object(obj.name)
51 self.assertEqual("foo", file_obj.contents)
/external/autotest/server/hosts/
Dhost_info_unittest.py381 file_obj = six.StringIO()
382 host_info.json_serialize(info, file_obj)
383 file_obj.seek(0)
390 self.assertEqual(json.load(file_obj), expected_dict)
398 file_obj = six.StringIO()
399 host_info.json_serialize(info, file_obj)
400 file_obj.seek(0)
407 self.assertEqual(json.load(file_obj), expected_dict)
Dhost_info.py433 def json_serialize(info, file_obj, version=_CURRENT_SERIALIZATION_VERSION): argument
447 return json.dump(info_json, file_obj, sort_keys=True, indent=4,
451 def json_deserialize(file_obj): argument
459 deserialized_json = json.load(file_obj)
/external/python/pyfakefs/pyfakefs/
Dfake_path.py161 file_obj = self.filesystem.resolve(path)
164 and S_IFMT(file_obj.st_mode) != S_IFDIR
168 return file_obj.st_size
242 file_obj = self.filesystem.resolve(path)
243 return file_obj.st_mtime
266 file_obj = self.filesystem.resolve(path)
269 return file_obj.st_atime # pytype: disable=name-error
285 file_obj = self.filesystem.resolve(path)
288 return file_obj.st_ctime # pytype: disable=name-error
Dfake_os.py516 file_obj = self.filesystem.resolve(path, follow_symlinks, allow_fd=True)
517 if attribute not in file_obj.xattr:
519 return file_obj.xattr.get(attribute)
542 file_obj = self.filesystem.resolve(
547 return list(file_obj.xattr.keys())
568 file_obj = self.filesystem.resolve(path, follow_symlinks, allow_fd=True)
569 if attribute in file_obj.xattr:
570 del file_obj.xattr[attribute]
602 file_obj = self.filesystem.resolve(path, follow_symlinks, allow_fd=True)
603 exists = attribute in file_obj.xattr
[all …]
/external/angle/build/
Dadd_rts_filters.py48 with os.fdopen(fp, 'w') as file_obj:
49 file_obj.write(filter_string)
/external/cronet/tot/build/
Dadd_rts_filters.py48 with os.fdopen(fp, 'w') as file_obj:
49 file_obj.write(filter_string)
/external/cronet/stable/build/
Dadd_rts_filters.py48 with os.fdopen(fp, 'w') as file_obj:
49 file_obj.write(filter_string)
/external/autotest/site_utils/
Dsuite_preprocessor.py45 with open(options.output_file, 'w') as file_obj:
46 file_obj.write('%r' % test_deps)
Dcontrol_file_preprocessor.py93 with open(options.output_file, 'w') as file_obj:
94 json.dump(suite_control_files, file_obj)
/external/tpm2-tss/src/tss2-fapi/
Difapi_io.c510 NODE_OBJECT_T *file_obj = calloc(sizeof(NODE_OBJECT_T), 1); in dirfiles_all() local
511 if (!file_obj) { in dirfiles_all()
520 file_obj->object = strdup(path); in dirfiles_all()
521 if (file_obj->object == NULL) { in dirfiles_all()
523 SAFE_FREE(file_obj); in dirfiles_all()
530 file_obj->next = second; in dirfiles_all()
532 *list = file_obj; in dirfiles_all()
/external/python/cpython3/Doc/tools/
Dcheck-warnings.py103 def get_para_line_numbers(file_obj: TextIO) -> list[list[int]]:
107 for lineno, line in enumerate(file_obj):
139 with file.open(encoding="UTF-8") as file_obj:
140 paragraphs = get_para_line_numbers(file_obj)
/external/python/cpython3/Modules/
D_zoneinfo.c124 PyObject *file_obj);
224 PyObject *file_obj = NULL; in zoneinfo_new_instance() local
234 file_obj = PyObject_CallMethod(meth, "load_tzdata", "O", key); in zoneinfo_new_instance()
235 if (file_obj == NULL) { in zoneinfo_new_instance()
246 if (file_obj == NULL) { in zoneinfo_new_instance()
248 file_obj = PyObject_CallFunction(func, "Os", file_path, "rb"); in zoneinfo_new_instance()
249 if (file_obj == NULL) { in zoneinfo_new_instance()
254 if (load_data(state, (PyZoneInfo_ZoneInfo *)self, file_obj)) { in zoneinfo_new_instance()
258 PyObject *rv = PyObject_CallMethod(file_obj, "close", NULL); in zoneinfo_new_instance()
259 Py_SETREF(file_obj, NULL); in zoneinfo_new_instance()
[all …]
/external/python/cpython3/Modules/clinic/
D_zoneinfo.c.h79 PyObject *file_obj, PyObject *key);
112 PyObject *file_obj; in zoneinfo_ZoneInfo_from_file() local
119 file_obj = args[0]; in zoneinfo_ZoneInfo_from_file()
125 return_value = zoneinfo_ZoneInfo_from_file_impl(type, cls, file_obj, key); in zoneinfo_ZoneInfo_from_file()
/external/python/google-auth-library-python/google/auth/
D_default_async.py59 with io.open(filename, "r") as file_obj:
61 info = json.load(file_obj)
Didentity_pool.py198 with io.open(filename, "r", encoding="utf-8") as file_obj:
199 return file_obj.read(), filename
D_default.py114 with io.open(filename, "r") as file_obj:
116 info = json.load(file_obj)
/external/python/oauth2client/oauth2client/
Dservice_account.py220 with open(filename, 'r') as file_obj:
221 client_credentials = json.load(file_obj)
330 with open(filename, 'rb') as file_obj:
331 private_key_pkcs12 = file_obj.read()
/external/python/oauth2client/tests/
Dtest_service_account.py42 with open(data_filename(filename), 'rb') as file_obj:
43 return file_obj.read()
103 with open(filename, 'w') as file_obj:
104 json.dump(payload, file_obj)
169 with open(filename, 'rb') as file_obj:
170 key_contents = file_obj.read()
Dtest_clientsecrets.py173 with open(filename, 'wb') as file_obj:
174 file_obj.write(b'[')
/external/cronet/stable/third_party/boringssl/src/crypto/bio/
Dbio_test.cc663 bssl::ScopedFILE file_obj = file.Open("rb"); in TEST() local
664 ASSERT_TRUE(file_obj); in TEST()
665 bio.reset(BIO_new_fp(file_obj.get(), BIO_NOCLOSE)); in TEST()
670 file_obj = file.Open("rb"); in TEST()
671 ASSERT_TRUE(file_obj); in TEST()
672 bio.reset(BIO_new_fp(file_obj.get(), BIO_CLOSE)); in TEST()
674 file_obj.release(); // |BIO_new_fp| took ownership on success. in TEST()
/external/cronet/tot/third_party/boringssl/src/crypto/bio/
Dbio_test.cc663 bssl::ScopedFILE file_obj = file.Open("rb"); in TEST() local
664 ASSERT_TRUE(file_obj); in TEST()
665 bio.reset(BIO_new_fp(file_obj.get(), BIO_NOCLOSE)); in TEST()
670 file_obj = file.Open("rb"); in TEST()
671 ASSERT_TRUE(file_obj); in TEST()
672 bio.reset(BIO_new_fp(file_obj.get(), BIO_CLOSE)); in TEST()
674 file_obj.release(); // |BIO_new_fp| took ownership on success. in TEST()
/external/boringssl/src/crypto/bio/
Dbio_test.cc665 bssl::ScopedFILE file_obj = file.Open("rb"); in TEST() local
666 ASSERT_TRUE(file_obj); in TEST()
667 bio.reset(BIO_new_fp(file_obj.get(), BIO_NOCLOSE)); in TEST()
672 file_obj = file.Open("rb"); in TEST()
673 ASSERT_TRUE(file_obj); in TEST()
674 bio.reset(BIO_new_fp(file_obj.get(), BIO_CLOSE)); in TEST()
676 file_obj.release(); // |BIO_new_fp| took ownership on success. in TEST()
/external/python/cpython3/Lib/test/test_importlib/source/
Dtest_finder.py173 with tempfile.NamedTemporaryFile() as file_obj:
174 finder = self.get_finder(file_obj.name)

12