Web-Books
im Austria-Forum
Austria-Forum
Web-Books
Informatik
Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python
Seite - 212 -
  • Benutzer
  • Version
    • Vollversion
    • Textversion
  • Sprache
    • Deutsch
    • English - Englisch

Seite - 212 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Bild der Seite - 212 -

Bild der Seite - 212 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Text der Seite - 212 -

212 A GettingAccesstoPython A.3.1 TheNeedforaTextEditor Since programs consist of plain text, we need to write this text with the help of another program that can store the text in a file. You havemost likely extensive experiencewithwriting textonacomputer,but forwritingyourownprogramsyou need special programs, called editors, which preserve exactly the characters you type. Thewidespreadwordprocessors,MicrosoftWordbeinga primary example, are aimed at producing nice-looking reports. These programs format the text and arenot acceptable tools forwritingyourownprograms, even though theycansave thedocument inapure text format. Spacesareoften important inPythonprograms, and editors for plain text give you complete control of the spaces and all other characters in theprogramfile. A.3.2 TextEditors Themostwidely used editors forwritingprogramsareEmacs andVim,which are availableonallmajorplatforms. Somesimpler alternatives forbeginnersare Linux:Gedit MacOSX:TextWrangler Windows:Notepad++ Wemaymention that Python comeswith an editor called Idle,which canbeused towrite programsonall three platforms, but running the programwith command- line arguments is a bit complicated for beginners in Idle so Idle is notmy favorite recommendation. Gedit is a standard programonLinux platforms, but all other editorsmust be installed inyour system. This is easy: justgoogle thename,download thefile, and follow the standard procedure for installation. All of thementioned editors come with a graphical user interface that is intuitive to use, but themajor popularity of EmacsandVimisdue to their richsetof short-keysso thatyoucanavoidusing the mouseandconsequentlyedit at higher speed. A.3.3 TerminalWindows To run thePythonprogram,youneeda terminal window. This is awindowwhere you can issueUnix commands in Linux andMacOSX systems andDOS com- mands inWindows. On aLinux computer, gnome-terminal ismy favorite, but otherchoicesworkequallywell, suchasxtermandkonsole.OnaMaccomputer, launch theapplicationUtilities - Terminal. OnWindows, launchPowerShell. Youmust first move to the right folder using the cd foldername command. Thenrunningapythonprogramprog.py is amatterofwritingpython prog.py. Whatever theprogramprints canbeseen in the terminalwindow.
zurück zum  Buch Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python
Titel
Programming for Computations – Python
Untertitel
A Gentle Introduction to Numerical Simulations with Python
Autoren
Svein Linge
Hans Petter Langtangen
Verlag
Springer Open
Datum
2016
Sprache
englisch
Lizenz
CC BY-NC 4.0
ISBN
978-3-319-32428-9
Abmessungen
17.8 x 25.4 cm
Seiten
248
Schlagwörter
Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
Kategorie
Informatik
Web-Books
Bibliothek
Datenschutz
Impressum
Austria-Forum
Austria-Forum
Web-Books
Programming for Computations – Python