[Tutor] Fwd: Re: Help me out please

Alan Gauld alan.gauld at yahoo.co.uk
Thu Jul 21 17:53:02 EDT 2016

On 21/07/16 21:17, Danny Yoo wrote:

> Well, I have two scripts. One in Python and the other one in html.
> Inside the html's script you can find out these lines:
> <script>
>     initLatencymon(
>         '#latencyMON',
>         {},
>         { measurements:[*3679333, 3793762*]}
>         );
> </script>
> I need to change these *bold *variables from the Python's script. 

That's technically not too difficult at a file level, especially if
you use an html parser like Beautiful Soup. But whether that's the
best way depends on how the files are used.

How is the html file accessed? Is it independent of the python script?
In other words doers the python script run as a batch job that only
updates the values occasionally? Or regularly? (How often?) or is it on
demand - some other trigger starts the Python script?
Or does the Python script somehow start from an action by the html script?

Its all very vague just saying you have two files.
WE need to understand the intended interaction between them.

If it is just a daily or hourly update then the html parser
route is probably adequate. If its driven by an external
trigger then it might be ok but might not.

And if its driven by the html script itself then we almost
certainly need a redesign of how you are doing things.

So can you start by explaining the use case scenario
for these interactions. How do the file get executed?
What triggers them?

How do they interact (if, indeed, they do)?

Alan G
Author of the Learn to Program web site
Follow my photo-blog on Flickr at:

More information about the Tutor mailing list