如何使用 Python 挂载文件系统? [英] How do I mount a filesystem using Python?

查看:49
本文介绍了如何使用 Python 挂载文件系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我确定这是一个简单的问题,我的 Google-fu 显然让我失望.

I'm sure this is a easy question, my Google-fu is obviously failing me.

如何使用 Python 挂载文件系统,相当于运行 shell 命令 mount ...?

How do I mount a filesystem using Python, the equivalent of running the shell command mount ...?

显然我可以使用 os.system 来运行 shell 命令,但肯定有一个很好的整洁的 Python 接口到 mount 系统调用.

Obviously I can use os.system to run the shell command, but surely there is a nice tidy, Python interface to the mount system call.

我找不到.我认为这只是一个不错的、简单的 os.mount().

I can't find it. I thought it would just be a nice, easy os.mount().

推荐答案

当然,这是一个很好的整洁的 python 挂载系统调用接口.

surely this is a nice tidy, python interface to the mount system call.

我找不到它(我认为它只是一个不错的、简单的 os.mount()).

I can't find it (I thought it would just be a nice, easy os.mount()).

当然,没有.这个函数在 Windows 上会做什么?

Surely, there is none. What would this function do on Windows?

改用 shell 命令.

Use the shell command instead.

这篇关于如何使用 Python 挂载文件系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆