~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/console/help.html

  • Committer: mattgiuca
  • Date: 2008-01-11 07:10:18 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:185
Integrated the (second) Prototype browser (HTML+CSS but no code) into the main
filebrowser app. Note that this still is non-functional - it looks the same as
the original prototype.
browser: Added the full HTML source (including example rows) into the Python
code. (Note this will be a lot cleaner once example rows are removed).
media: Added "images" directory (copied from the demo). This contains all the
icons needed for the demo.
       browser.css: Pasted the entire CSS from the demo. This styles the
        browser interface.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<div class="helpfile">
2
 
<p>The IVLE <strong>Console</strong> is a programming console for Python which provides features similar to the Python command line console or <a href="http://en.wikipedia.org/wiki/IDLE_(Python)">IDLE</a> GUI.</p>
3
 
 
4
 
<h2>Getting started</h2>
5
 
<h3>Entering Python code</h3>
6
 
<p>Using the console is fairly straightforward. Enter any valid Python code into the input text box located just to the right of the prompt (<code>&gt;&gt;&gt;</code>) at the bottom of the screen. When the line is complete, press ENTER to execute the code.</p>
7
 
 
8
 
<div class="example" style="border: solid 1px black; padding: 0.5em">
9
 
    <label id="console_prompt">&gt;&gt;&gt;&nbsp;</label>
10
 
    <input id="console_inputText"
11
 
     type="text" size="80" value="print 'Hello, world!'" readonly="readonly" />
12
 
    <input type='button' value='Interrupt' disabled="disabled" />
13
 
    <input type='button' value='Clear Output' disabled="disabled" />
14
 
</div>
15
 
 
16
 
<p>Sometimes Python may expect additional lines of input - for example, after the <code>if</code> or <code>for</code> statements. This condition is indicated by a <code>...</code> prompt next to the input. Complete the command by entering additional lines as required. Press ENTER with an empty line to mark the code block as complete and execute it.</p>
17
 
 
18
 
<p>Finally, some commands (such as <code>raw_input()</code>) may expect further input from the user. In this case the prompt will be replaced with <code>+++</code> to indicate that input other than Python code is required.</p>
19
 
 
20
 
<p>Please note that the console will time out after a period of inactivity. This has a similar result (and thus similar ramifications) to <a href="#restarting">restarting the console manually</a>.</p>
21
 
 
22
 
<h3>Interpreting output</h3>
23
 
<div class="example">
24
 
    <div id="console_body">
25
 
        <div style="background-color: gray; border: 2px solid black; padding:       
26
 
        2px; color: black; font-family: monospace; font-weight: bold;">Python 
27
 
        Console</div>
28
 
    </div>
29
 
    <div style="overflow-y: scroll; margin: 0.5em">
30
 
        <code>
31
 
        <span style="color:#800">&gt;&gt;&gt;</span>
32
 
        <span style="color:gray">i</span><br/>
33
 
        <span style="color:red">name 'i' is not defined</span><br/>
34
 
        <span style="color:#800">&gt;&gt;&gt; </span>
35
 
        <span style="color:gray">i=2</span><br/>
36
 
        <span style="color:#800">&gt;&gt;&gt; </span>
37
 
        <span style="color:gray">print i</span><br/>
38
 
        2
39
 
        </code>
40
 
    </div>
41
 
    <div id="console_inputArea">
42
 
        <label id="console_prompt_2">&gt;&gt;&gt;&nbsp;</label>
43
 
        <input id="console_inputText_2" type="text" size="80" value="print i+2" 
44
 
        readonly="readonly" />
45
 
        <input type='button' value='Interrupt' disabled="disabled" />
46
 
        <input type='button' value='Clear Output' disabled="disabled" />
47
 
    </div>
48
 
</div>
49
 
 
50
 
<p>Each line that you have entered - as well as any output produced - is shown in the text area above the input. Lines beginning with a normal prompt (<code style="color: #800">&gt;&gt;&gt;</code>) are your input lines, while lines in red (such as <code style="color: red">invalid syntax (&lt;input&gt;, line 1)</code>) are generated errors or exceptions. Other lines are normal output from your code.</p>
51
 
 
52
 
<h3>Reviewing history</h3>
53
 
<p>The IVLE console maintains a log of all entered commands in order to allow simple repetition of history. The up and down arrow keys will scroll backwards and forwards through the input history. As with any other line of code, pressing ENTER will execute the line currently in the input.</p>
54
 
 
55
 
<h2>When things go wrong...</h2>
56
 
<h3>Interrupting commands</h3>
57
 
<p>It is possible to enter commands that will render the console unusable or take a long time to complete (infinite loops like <code>while True: print "Hello, world!"</code>, for example). You may terminate execution of the current command with the <em>Interrupt</em> button. This should allow you to resume entering of commands.</p>
58
 
 
59
 
<h3><a name="restarting">Restarting the console</a></h3>
60
 
<p>If things go really wrong, you can restart the console simply by clicking the <em>Console</em> tab. Be aware that you will lose all state (such as variables and functions) entered into your previous console session.</p>
61
 
</div>