Python Scripting in Windows MSIE 6.0

J

John J. Lee

Claudio Grondi said:
I wonder why the subject (Python scripting within HTML) is not
occuring in any past postings - do I miss something very obvious?
[...]

That subject line appears in all three of your recent posts.

No need to repeat your posts more than once.


John
 
C

Claudio Grondi

I wonder why the subject (Python scripting within HTML) is not
occuring in any past postings - do I miss something very obvious?

I try to run Pythons scripting in Windows MSIE 6.0 in the
<script language="Python">...</script> section, but it doesn't
work at all.
\Python23\Lib\site-packages\win32comext\axscript\client\pyscript_rexec.py
runs ok, registry entries seems also be ok.
I have the latest Python 2.3.4 installed.
What do I wrong?
Runs anyone of you (inspite of the security concerns) successfully
Python as scripting language in Windows MSIE 6.0 HTML pages
using it like JavaScript or VBScript ?

Thank you in advance for any help.

Claudio
 
J

jmdeschamps

Claudio Grondi said:
I wonder why the subject (Python scripting within HTML) is not
occuring in any past postings - do I miss something very obvious?

I try to run Pythons scripting in Windows MSIE 6.0 in the
<script language="Python">...</script> section, but it doesn't
work at all.
\Python23\Lib\site-packages\win32comext\axscript\client\pyscript_rexec.py
runs ok, registry entries seems also be ok.
I have the latest Python 2.3.4 installed.
What do I wrong?
Runs anyone of you (inspite of the security concerns) successfully
Python as scripting language in Windows MSIE 6.0 HTML pages
using it like JavaScript or VBScript ?

Thank you in advance for any help.

Claudio

If you mean to script "client-side" than the short answer is no(
(IMO).
In most browsers you can get a javascript interpreter or some other
ECMAscript compliant language (such as VBScript).
These language enforce *sandboxing* of web pages in order to protect
the client from downloading malicious software within the web page.
That is these interpreters cannot directly access the client machine
so it can't install modify or delete anything outside this sandbox
(generally limited to the memory space of the browser).

BUT Python is great for server-side scripting: plain CGI module works
just fine, and a plethora of frameworks built around/with/in Python
(see http://www.python.org/cgi-bin/moinmoin/WebProgramming), also
Python has divfferent socket modules to do it all yourself...
Python can also be used in PHP/ASP-like fashion with IIS servers,
meaning you can include Python code in HTML pages that IIS will
execute on the server before serving that page to the client.

Python even as a HTTPserver module that you could use on the client
itself - not very performant, but if your the only user of this server
(as it lies in a client machine) it should be good enough.

Also remember that while Python is free and available, its doesn't
necessarily reside on the client machines (and javascript will, within
a browser).

Have fun!

Jean-Marc
 
J

Jussi Jumppanen

Claudio said:
I wonder why the subject (Python scripting within HTML) is
not occuring in any past postings - do I miss something
very obvious?

... snip ...

I have the latest Python 2.3.4 installed.
What do I wrong?

You can only run Windows Scripting Host (WSH) languages inside
the MSIE browser. By default Windows only has VB Script and
JavaScript WSH scripts installed. So if you want to run Python
you will need to install a WSH version of Python.

I think ActiveState provide a WSH version of Python.

Jussi Jumppanen
Author of: Zeus for Windows (All new version 3.92 out now)
"The C/C++, Cobol, Java, HTML, Python, PHP, Perl programmer's editor"
Home Page: http://www.zeusedit.com
 
C

Claudio Grondi

No need to repeat your posts more than once.
Sorry for the multiple postings, but I had a problem with
my newsreader software.
You can only run Windows Scripting Host (WSH)
languages inside the MSIE browser.
Sure - as the subject line says (other browser
support usually only Javascript, right?).
I tried ActiveState Python 2.3.2 - and it doesn't work
either. I mean, that I have seen one or two older
postings to discussion boards saying that Python works
ok inside Microsoft Internet Explorer.

Anyone any further ideas?

It would be _so nice_ to have MSIE as a kind of
GUI to Python - even Microsoft uses MSIE for this
purpose (e.g. in the installation of Microsoft
Visual C++ NET 2003).

Thank you in advance for any helpful response.

Claudio
 
J

jmdeschamps

Claudio Grondi said:
Sorry for the multiple postings, but I had a problem with
my newsreader software.

Sure - as the subject line says (other browser
support usually only Javascript, right?).

I tried ActiveState Python 2.3.2 - and it doesn't work
either. I mean, that I have seen one or two older
postings to discussion boards saying that Python works
ok inside Microsoft Internet Explorer.

Anyone any further ideas?

It would be _so nice_ to have MSIE as a kind of
GUI to Python - even Microsoft uses MSIE for this
purpose (e.g. in the installation of Microsoft
Visual C++ NET 2003).

Thank you in advance for any helpful response.

Claudio

Hi Claudio,

Maybe tou know about this Microsoft site
http://msdn.microsoft.com/library/d.../script56/html/letScriptComponentTutorial.asp

Good luck,

JM
 
N

Neil Hodgson

Claudio Grondi:
I have the latest Python 2.3.4 installed.
What do I wrong?
Runs anyone of you (inspite of the security concerns) successfully
Python as scripting language in Windows MSIE 6.0 HTML pages
using it like JavaScript or VBScript ?

The Python Extensions for Windows supported use of client side Python in
web pages for several years but this is now disabled because of security.
You could try finding an older version of win32all or modifying the current
version: I expect Mark Hammond has not deleted the code, just turned it off.
http://sourceforge.net/projects/pywin32/
There is a mailing list for Win32 issues:
http://mail.python.org/mailman/listinfo/python-win32

Neil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top