Python可以用CD-ROM运行吗? [英] Can Python be run off of a CD-ROM?

查看:60
本文介绍了Python可以用CD-ROM运行吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我教中学,目前我正在尝试为学生带来一些计算机科学学习费用。我们所有的学校都通过MS Windows网络完成了我们所在学区的网络连接。为了保护

网络,我们所在地区的IT部门不希望在

系统上安装任何东西(或者至少让它很难完成它) )。所以,我正在使用

将MSW徽标安装到CD-ROM上......我们只需将它放在CD-ROM中并运行它即可获得



但是,我正在学习Python并认为它是TERRIFIC!所以我想知道我是否可以做同样的事情......或类似的东西?有没有办法在CD-ROM上安装

Python,如果我们不需要从命令访问

提示符?


谢谢,

BJ MacNevin


-

_______________________________

我没说这是你的错......

我说我要怪你。

Hi all,

I teach middle school and am currently trying to bring some computer science
to the students. Our district has a wonderfully linked network throughout
all our schools... done via MS Windows Network. In order to protect the
network, our district''s IT department does not want things installed on the
system (or at least makes it VERY difficult to get it done). SO, I am using
MSW Logo installed onto a CD-ROM... we just stick in the CD-ROMS and run it
off of them.

BUT, I am learning about Python and think it is TERRIFIC! So I wonder if I
can do the same thing... or something similar? Is there a way to install
Python on a CD-ROM, too, if we don''t need it to be accessed from a command
prompt?

Thanks,
BJ MacNevin

--
_______________________________
I didn''t say it was your fault...
I said I was going to blame you.

推荐答案

" BJ MacNevin" < BJ@replyhere.now>写道:
"BJ MacNevin" <BJ@replyhere.now> writes:
大家好,
我教中学,目前正在尝试为学生带来一些计算机科学。我们所有的学校都通过MS Windows网络建立了一个连接良好的网络。为了保护网络,我们学区的IT部门不希望在
系统上安装任何东西(或者至少使它很难完成)。所以,我正在使用安装在CD-ROM上的MSW徽标...我们只是粘在CD-ROM中并运行它们。
但是,我正在学习Python并认为它是TERRIFIC!所以我想知道我是否可以做同样的事......或类似的事情?有没有办法在CD-ROM上安装Python,如果我们不需要从命令
提示符访问它?
Hi all, I teach middle school and am currently trying to bring some computer science
to the students. Our district has a wonderfully linked network throughout
all our schools... done via MS Windows Network. In order to protect the
network, our district''s IT department does not want things installed on the
system (or at least makes it VERY difficult to get it done). SO, I am using
MSW Logo installed onto a CD-ROM... we just stick in the CD-ROMS and run it
off of them. BUT, I am learning about Python and think it is TERRIFIC! So I wonder if I
can do the same thing... or something similar? Is there a way to install
Python on a CD-ROM, too, if we don''t need it to be accessed from a command
prompt?



你可以*通过运行真实操作系统(BSD或Linux)从内置Python的

CD中杀死两只用CD。只需要考虑一点,不要得到太多的工作

关于它(对你来说有点慢)。


无论如何,回答主要问题。你可以在其上创建一个包含所有

Python文件的文件系统并从那里运行,但我认为主要问题是搜索

路径等。我相信你理想情况下需要将相关信息

带入注册表,但如果你不能认为这是有问题的。所以

我想知道是否有一个关于从Windows运行Python的指南

而不是它在注册表中(并且对于OP如何在
没有安装过程的注册表)。我有一个类似的问题,从一个

USB存储钥匙运行,但至少在那里我可以将文件写入同一目录

二进制文件在哪里(虽然它不是理想的)。


Eddie



You *could* kill two birds with on CD by running a real OS (BSD or Linux) from
CD with Python built in. Just a point to consider, don''t get too worked up
about it (it''s a bit slow mind you).

Anyway, to answer the main question. You can create a file system with all the
Python files on it and run from there but I think the main problem is search
paths and the like. I believe you ideally need to get the relevant information
into the registry but if you''re not able to I think this is problematic. So
I was wondering whether there was a howto on running Python from Windows
without it being in the registry (and for the OP how do you get it in the
registry without an install process). I have similar problems running from a
USB memory key but at least there I can write files to the same directory
where the binaries are (though it''s not ideal).

Eddie


ed *** @ holyrood.ed.ac.uk (Eddie Corns)写道:
ed***@holyrood.ed.ac.uk (Eddie Corns) writes:
" BJ MacNevin" < BJ@replyhere.now>写道:
"BJ MacNevin" <BJ@replyhere.now> writes:
大家好,
我教中学,目前正在尝试为学生带来一些计算机科学。我们所有的学校都通过MS Windows网络建立了一个连接良好的网络。为了保护网络,我们学区的IT部门不希望在
系统上安装任何东西(或者至少使它很难完成)。所以,我正在使用安装在CD-ROM上的MSW徽标...我们只是粘贴在CD-ROM中并运行它们。
I teach middle school and am currently trying to bring some computer science
to the students. Our district has a wonderfully linked network throughout
all our schools... done via MS Windows Network. In order to protect the
network, our district''s IT department does not want things installed on the
system (or at least makes it VERY difficult to get it done). SO, I am using
MSW Logo installed onto a CD-ROM... we just stick in the CD-ROMS and run it
off of them.


但是,我正在学习Python并认为它是TERRIFIC!所以我想知道我是否可以做同样的事......或类似的事情?有没有办法在CD-ROM上安装Python,如果我们不需要从命令
提示符进行访问?
BUT, I am learning about Python and think it is TERRIFIC! So I wonder if I
can do the same thing... or something similar? Is there a way to install
Python on a CD-ROM, too, if we don''t need it to be accessed from a command
prompt?



本能说这应该工作。需要担心的是

Python是否因为无法写入sys.path而感到高兴

(不应该这样做,一直在Linux上发生)和确保Python

可以找到它的文件。


[...]无论如何,回答主要问题。您可以创建一个包含所有
Python文件的文件系统并从那里运行,但我认为主要问题是搜索路径等。我相信你理想情况下需要将相关信息带入注册表,但如果你不能认为这是有问题的。



Instinct says this Should Just Work. Things to worry about are
whether Python gets uppity about not being able to write to sys.path
(shouldn''t do, happens all the time on linux) and making sure Python
can find its files.

[...] Anyway, to answer the main question. You can create a file system with all the
Python files on it and run from there but I think the main problem is search
paths and the like. I believe you ideally need to get the relevant information
into the registry but if you''re not able to I think this is problematic.




我是*相当确定最近的Pythons不会靠近注册表。

win32all的东西确实如此,并且可能需要让COM工作正常工作。


干杯,

mwh

-

生产高质量软件非常耗时。但是,

不应该单独放弃Python开发的高标准
。 - Martin von Loewis,python-dev



I am *fairly* sure that recent Pythons do not go near the registry.
win32all stuff does, and probably has to to get COM stuff working.

Cheers,
mwh

--
It is time-consuming to produce high-quality software. However,
that should not alone be a reason to give up the high standards
of Python development. -- Martin von Loewis, python-dev


Eddie Corns写道:
Eddie Corns wrote:
[...]我想知道是否有一个howto on从Windows运行Python
没有它在注册表中[...]
[...] I was wondering whether there was a howto on running Python from Windows
without it being in the registry [...]




这里是HOWTO,用一句话:


抓取一个Python目录,将来自

%SYSTEMROOT%\ system32的python {major} {minor} .dll复制到这个Python目录中。


在那里,Python现在可以独立运行,如果你愿意,你可以在CD上刻录整个

目录。


win32 Python注册表中有模块搜索路径,但是他们不需要



- Gerhard



Here''s the HOWTO, in one sentence:

Grab a Python directory, copy the python{major}{minor}.dll from
%SYSTEMROOT%\system32 into this Python directory.

In there, Python now runs standalone, and you can burn the whole
directory on a CD if you like.

win32 Python does have module search paths in the registry, but they
aren''t required.

-- Gerhard


这篇关于Python可以用CD-ROM运行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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