是否有可通过 USB 密钥在 Mac OS X 10.6 上运行的便携式 python 解释器?

发布于 2024-10-07 06:19:17 字数 268 浏览 0 评论 0原文

我一直在努力寻找一个可以通过工作计算机上的 USB 密钥运行的便携式解释器。 Work comp 运行的是 Mac OS X 10.6,环境相当受限,无法访问终端,无法安装应用程序,但我知道便携式应用程序可以从 USB 驱动器运行。我一直在使用 shell in a box 来通过网络远程访问家里的电脑,但出于对他们网络完整性的尊重,我不想这样做。我也刚刚发现了 ideone.com,它看起来很有前途,我计划明天尝试一下。但理想情况下,我希望代码在本地运行。我本人以及其他一些可能处于相同情况的人都将非常感谢任何帮助。

I've been running myself ragged trying to find a portable interpreter that I can run from a USB key on my work computer. Work comp is running Mac OS X 10.6, fairly restricted environment, no access to terminal, can't install apps but I do know that portable apps can be run from a USB drive. I've been using shell in a box to serve remote access to my comp at home over the web but out of respect for their network integrity I'd prefer not to. I've also just come across ideone.com which seems promising and I plan to give it a go tomorrow. Ideally though, I'd like to have the code running locally. Any help would be greatly appreciated by myself and, I'm sure, a few others that might be in the same situation.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

黑寡妇 2024-10-14 06:19:17

Python 已经在 OS X 上运行了。我会尝试寻找一个可以通过 USB 驱动器工作的编辑器/shell。

Python is already on OS X. I would look at trying to find an editor/shell that will work from a usb drive.

乱世争霸 2024-10-14 06:19:17

如果您无法访问计算机上的终端并且无法安装应用程序,那么使用任何 Python 都会出现问题。标准 Python 构建提供的唯一有用的开箱即用 OS X GUI 应用程序是 IDLE.app。应该可以使用基于磁盘映像文件系统或 USB 驱动器的框架构建和 IDLE.app 在 OS X 上构建自定义 Python。但你必须自己做。 OS X 上构建的 Python 框架是为了安装到特定路径而构建的,因此一旦构建就无法轻松移动。 Python 源代码分发中的配置脚本有一些参数来指定路径。请参阅 ./configure --help--enable-framework= 和 --prefix= 等。您需要进行一些尝试。

也许更有趣和更强大的想法是使用

If you don't have access to a terminal on the machine and can't install apps, using any Python is going to be problematic. The only useful out-of-the-box OS X GUI app provided by a standard Python build is IDLE.app. It should be possible to build a custom Python on OS X with a framework build and IDLE.app rooted on a disk image file system or on a USB drive. But you would have to do it yourself. Python framework builds on OS X are built to be installed to a specific path and, so, can't easily be moved once built. There are parameters to the configure script in the Python source distribution to specify the paths. See ./configure --help and --enable-framework= and --prefix= and the like. You'll need to experiment a bit.

Perhaps a more interesting and robust idea would be to package IDLE or your own frontend shell window up with Python as a standalone app using py2app. py2app already knows how to embed a Python framework into an app bundle so you'd just have to supply the frontend script. Lots of options there.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文