I try with no luck to use python in a simple html page:
<html>
<body>
<script language="Pytho n">
window.alert('t est')
window.document .write('test')
</script>
</body>
</html>
When opened in IE6 SP1, that does nothing (no error but no message box
/ nothing written in the page).
I ran win32comext\axs cript\client\py script.py and pyscript_rexec. py to
register python as a scripting engine. No errors from those scripts.
As I understand it and from what I have read in this forum and
elsewhere, it should work, but it doesn't: what am I doing wrong ?
Note: I have installed the latest win32all extensions (163) / I'm
working on a W2K Server box (SP3). 2 2287
"popov" <go****@evpopov .com> wrote in message
news:7e******** *************** ***@posting.goo gle.com... I try with no luck to use python in a simple html page:
<html> <body> <script language="Pytho n"> window.alert('t est') window.document .write('test') </script> </body> </html>
When opened in IE6 SP1, that does nothing (no error but no message box / nothing written in the page).
I ran win32comext\axs cript\client\py script.py and pyscript_rexec. py to register python as a scripting engine. No errors from those scripts.
As I understand it and from what I have read in this forum and elsewhere, it should work, but it doesn't: what am I doing wrong ?
Note: I have installed the latest win32all extensions (163) / I'm working on a W2K Server box (SP3).
I doubt if it will work for a while. It doesn't work on my system
either, and a quick check of the pyscript_rexec. py module says
that it will enable Rexec support. Rexec support was removed from
base Python in release 2.2.3 and later, so I doubt if this is ever
going to work until ActiveState (or Mark Hammond) changes the
base code to use Exec instead of RExec.
John Roth
Hi,
Yes I have this working. Do this at your own risk:
Add the following to pyscript.py after the AXNotRExec class definition
(around line 89):
AXRExec = AXNotRExec
Then register with
python pyscript_rexec. py --debug
^^^^^^ (must be the rexec version).
You may have to unregister any other versions first:
python pyscript.py --unregister
Cheers,
-John
Peter Hansen <pe***@engcorp. com> wrote in message news:<3F******* ********@engcor p.com>... John Roth wrote: "popov" <go****@evpopov .com> wrote: I ran win32comext\axs cript\client\py script.py and pyscript_rexec. py to register python as a scripting engine. No errors from those scripts.
As I understand it and from what I have read in this forum and elsewhere, it should work, but it doesn't: what am I doing wrong ?
I doubt if it will work for a while. It doesn't work on my system either, and a quick check of the pyscript_rexec. py module says that it will enable Rexec support. Rexec support was removed from base Python in release 2.2.3 and later, so I doubt if this is ever going to work until ActiveState (or Mark Hammond) changes the base code to use Exec instead of RExec.
I was just trying this myself and had the same lack of results. I note however that while pyscript_rexec. py uses the Rexec support and might not work for reasons John describes, pyscript.py claims not to do that, and seems to be supposed to work. Yet it doesn't....
Anyone tried this lately with success?
For the record, I was trying on a vanilla Win98 machine with Py2.3.2.1 and the latest win32all as well. (The relevant test scripts execute okay, showing that the issue is with IE alone, not with the basic capability that allows ActiveX script hosting with Python.)
-Peter This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: MK |
last post by:
I'm working with IIS on W2K server. I'm trying to
use module "wmi" in a CGI script but with no success.
The following works:
import cgitb; cgitb.enable()
cgi.test()
.... but the following isn't working:
|
by: David Mitchell |
last post by:
Hello group,
I'm trying to create a TCP server using Python, and I want it to run under
Windows as a service.
Now, I'm fine with building the TCP server using Python - done it lots of
times, and I know there's lots of sample code out there I can grab if I
ever need to.
Equally, I think I've got the simpler concepts about creating Windows
|
by: |
last post by:
Hi,
A month ago, I decided to move from Delphi to Python/wxPython for a good deal of my development work, and for the past few projects (which included a full re-write of our point-of-sale system) I've had no problems and been very pleased with the move.
We're Sage (accounting software) developers and frequently link into Line 50 using a Sage supplied COM server. In Delphi, the code to create the client and a workspace (which is required...
|
by: mb3242 |
last post by:
Hello, I'm trying to use win32com to call a method in a COM object.
I'm having a problem with Python choosing the wrong type when wrapping
up lists into VARIANTs.
The function I'm trying to call in C++ looks like this:
HRESULT write( VARIANT * len, VARIANT * saData, VARIANT
* result);
Where saData contains a SafeArray of bytes and len is its length. The
function returns any error information in result.
|
by: Joakim Persson |
last post by:
Hello all. I am involved in a project where we have a desire to
improve our software testing tools, and I'm in charge of looking for
solutions regarding the logging of our software (originating from
embedded devices). Currently, we are using a heavyweight, proprietary
log tool developed by another part of the company. This tool contains
all "standard" logging functionality, but we also need to insert
"debug" log points in the software of...
| |
by: Erik Johnson |
last post by:
THE GOAL: I need to send an email with a simple ASCII text body and an
attached HTML file.
I have scripts that send basic emails via the smtplib module that don't
have any attachements and that seems to work fine. I first looked at the
mimetools modules but it says it is depreceated since 2.3, so I started
trying to use the email module. Here is a script that basically follows the
second example given in section 7.1.13 of the Python...
|
by: ycollet |
last post by:
Hello,
I'm trying to write a program to send python statements to a python
server via tcp and then get back results via a tcp connection. It
nearly works ... but I'm totally lost with the embedded dictionary (I'm
quite new to python).
The first part of the server start the python interpreter via
Py_Initialize() and then waits for python statements.
To send command, I get some strings and evaluate them through
PyRun_String.
|
by: Phoe6 |
last post by:
Hi all,
I am trying to disable the NIC card (and other cards) enabled in my
machine to test diagnostics on that card.
I am trying to disable it programmatic using python. I checked python
wmi and i could not find ways to disable/enable, (listing is however,
possible).
Where should I look for to enable/disable devices in python.
Thanks,
|
by: madsornomads |
last post by:
Hi all,
I have a problem with reading from a Java server after I have written
to it - it just hangs. It works fine if I just write to the server and
not try to write. I have read the HOWTO on sockets - and it states
that there is a problem (something about flushing), but not what the
solutions is. Nor do google. Can somebody please help?
A few lines down you can see the example code that sums up the
problem. Just change the name of...
|
by: Nikhil |
last post by:
I am using the MySQLdb python module. I have a table named 'testing'
with few columns, under the 'test' database, what is hosted on a remote
mysql server.
I want to run the following query to get a comma-seperated information
from the table
LOCK TABLES foo READ;
SELECT a,b,a+b INTO OUTFILE '/tmp/result.txt'
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |