John Lutz

10 Reputation

4 Badges

20 years, 206 days

MaplePrimes Activity


These are answers submitted by John Lutz

First Create a Hyperlink as follows:

 

For executing programs and files:

 

Use URL

 

Then enter - file://C:\(File Path)

 

To compile a Python program:

 

Use Python 2.6. (Python 2.7 does not work)

 

Run a program called compile.py:

 

      import crystal

      py_compile.compile('crystal.py')

Run this new program containing these two statements.

 

Python will run the program and create a .pyc file at the same time/

 

Note the file name must not have spaces.

 

Ex.       import Hohmann_Transfer_Earth_Mars_Sun

            py_compile.compile('Hohmann_Transfer_Earth_Mars_Sun'

)

 

You can do this type of hyperlink to any kind of program or file.

Ex. Video, mp3, images, etc. To execute source code I think it must be compiled.

Otherwise all you get is the code itself.

I haven't answered before so it doesn't look too good.

I have asked Mathsoft to generalize their hyperlink but they still won't do it.

I have worked on my own question.

I think I found a better work around than having to use URL of file;//c:\Path of compiled file to execute.

Instead of pointing to an individual file to execute, I point to a folder which contains the programs I want to execute. They can be shortcuts to the programs, Internet URL’s, Music, video lectures, etc.

At the beginning of the worksheet I create a hyperlink to file://c:\(folder containing the programs to execute) within the worksheet.

I leave this folder open along with my Maple worksheet.

Then I include text statements within my worksheet instructing which program in the folder to double click.

Thus I have the ability to execute anything and let Windows do all the work just by Double Clicking the desired object.

I have three windows open

1.         Maple worksheet

2          Folder containing the objects to execute

3          The window of the executing program

I can have as many executing windows open as I want.

Where allowed, data or graphs can be exchanged.

Page 1 of 1