473,698 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I load python script into Html ??

I want to do the same thing as
<script language="javas cript" src="xxx.js"></script>

but with a python script :
<script language="Pytho n" src="xxx.py"></script>

=============== =============== ====
if xxx.py :
def mytest():
alert("test")
window.document .write('test')
=============== =============== ====
and test.html :
<HTML>
<SCRIPT Language="Pytho n" src="xxx.py"></SCRIPT>

<SCRIPT Language="Pytho n">
mytest()
</SCRIPT>
</HTML>
=============== =============== ====

I always got this error :
NameError : name 'mytest' is not defined

Thx ...
Patrick Poulin

Dec 13 '05
11 3469
PatPoul wrote:
Yes I register Python script.
I see in your exemple that you use file extention pys.
That was why my exemple does'nt work.

Thanks !

Patrick Poulin


In this context I have a question:

How can the registering of the Python scripting engine be easily and
completely removed? (i.e. how can I get rid of it when already registered?)

Claudio
Dec 20 '05 #11

"Claudio Grondi" <cl************ @freenet.de> wrote in message news:do******** **@newsreader3. netcologne.de.. .
PatPoul wrote:
Yes I register Python script.
I see in your exemple that you use file extention pys.
That was why my exemple does'nt work.

Thanks !

Patrick Poulin


In this context I have a question:

How can the registering of the Python scripting engine be easily and completely removed? (i.e. how can I get rid of it when
already registered?)

Claudio


Run pyscript.py passing --unregister on the command line.

Roger


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Dec 20 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

28
4608
by: Erik Johnson | last post by:
This is somewhat a NEWBIE question... My company maintains a small RDBS driven website. We currently generate HTML using PHP. I've hacked a bit in Python, and generally think it is a rather cool language. I've done Perl and like it, there are a few features of PHP I like but overall am not too excited about it. I have found PHP's strtotime() function to be quite flexible and handy and we make liberal use of it. I have not yet really...
3
3197
by: Josh | last post by:
Hi - A couple days ago I posted asking for help on how to download a pushed file. I am trying to write a script to download a bunch of links from a page that takes a while to load. I managed to get just about everything done using python to load IE, but aside from not really liking that style, I couldnt figure out how to have python download the pushed file, or how to read IE headers into python (the headers point to the download...
1
4308
by: rh | last post by:
Executing the script given below Opera, Netscape and Mozilla successfully load the js file in both the "main" and "test" window. However, while IE 6 manages to load OK in "main", it produces the "Load failed in test" alert. IE behaviour is the same if a local file is used for the js source, so the problem doesn't appear to be zone security related. Any ideas of what's wrong here, or what needs to be done to get it to work in IE?
6
3080
by: acord | last post by:
Hi, In a html page, I don't know how to load in a php page from javascript. I've already defined a <div id="treemenu"> in the html page. The executed content from the php script is supposed loaded into the treemenu div. What is the best way to achieve this? I got error where the treemenu didn't close/open on the treenode, as when I clicked on the treenode, it said Object not found. But if I don't use ajaxpage() javascript function, and...
8
2303
by: Eric_Dexter | last post by:
I was looking for a simple way to load a simple python program from another python program. I tried os.system(cabel) The file name is cabel.py a csound instrument editor.. The error I am getting is
8
1581
by: jmDesktop | last post by:
I have been to the main python site, but am still confused. I have been using .net, so it may be obvious how to do this to everyone else. I am aware there are various frameworks (Django, Pylons, etc.), but I would like to know how to create web pages without these. If I have mod_python or fastcgi on apache, where do I start? I don't have clue where to begin to create a web page from scratch in python. I am sure I will want to access...
0
1591
by: eddiefisher41 | last post by:
Hey guys. Im having problems running a python cgi. Im using the example code from: http://www.python.org/doc/essays/ppt/sd99east/sld041.htm as writen by Van Rossum himself I can get the script to run the python script but all that happens is that the black python box appears then disapears, the html that the python scripts should generate is never output. My html is: <html><head> <meta http-equiv="Content-Type" content="text/html;...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9169
Oralloy
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...
0
9030
jinu1996
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...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
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();...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.