1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407
|
<?xml version='1.0' encoding='ISO-8859-1'?>
<?xml-stylesheet type="text/xsl"
href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!-- Process this file docbook2x-man:
docbook2x-man isympy.xml
this will generate isympy.1 in the current directory. -->
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!ENTITY dhfirstname "Fabian">
<!ENTITY dhsurname "Seoane">
<!ENTITY dhemail "fabian@fseoane.net">
<!-- dhusername could also be set to "&firstname; &surname;". -->
<!ENTITY dhusername "&dhfirstname; &dhsurname;">
<!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "2007-10-8">
<!ENTITY dhrelease "unused">
<!-- TITLE should be something like "User commands", -->
<!-- "&dhpackage; command-line reference" or similar (see e.g. -->
<!-- http://www.tldp.org/HOWTO/Man-Page/q2.html). But limit -->
<!-- the length to 30 chars. -->
<!ENTITY dhtitle "&dhpackage; command-line reference">
<!ENTITY dhucpackage "isympy">
<!ENTITY dhpackage "isympy">
<!-- If the application e.g. belongs to a package like X.org, -->
<!-- this should be set to the its name instead. -->
<!ENTITY dhproduct "python-sympy">
<!-- SECTION should be 1-8, maybe w/ subsection other -->
<!-- parameters are allowed: see man(7), man(1) and -->
<!-- http://www.tldp.org/HOWTO/Man-Page/q2.html. -->
<!ENTITY dhsection "1">
]>
<refentry>
<refentryinfo>
<title>&dhtitle;</title>
<productname>&dhpackage;</productname>
<releaseinfo role="version">&dhrelease;</releaseinfo>
<date>&dhdate;</date>
<authorgroup>
<author>
<firstname>Ondrej</firstname>
<surname>Certik</surname>
<contrib>Design, programming.</contrib>
<address>
<email>ondrej@certik.cz</email>
</address>
</author>
<author>
<firstname>&dhfirstname;</firstname>
<surname>&dhsurname;</surname>
<contrib>Programming.</contrib>
<address>
<email>&dhemail;</email>
</address>
</author>
</authorgroup>
<copyright>
<year>2013</year>
<holder>SymPy Development Team</holder>
</copyright>
<legalnotice>
<para>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</para>
<orderedlist>
<listitem>
<para>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</para>
</listitem>
<listitem>
<para>Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</para>
</listitem>
</orderedlist>
<para>THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</para>
</legalnotice>
</refentryinfo>
<refmeta>
<refentrytitle>&dhucpackage;</refentrytitle>
<manvolnum>&dhsection;</manvolnum>
</refmeta>
<refnamediv>
<refname>&dhpackage;</refname>
<refpurpose>interactive shell for SymPy</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>&dhpackage;</command>
<group choice="opt">
<arg choice="plain"><option>-c</option></arg>
<arg choice="plain"><option>--console</option></arg>
</group>
<group choice="opt">
<arg choice="plain"><option>-p</option> <emphasis>ENCODING</emphasis></arg>
<arg choice="plain"><option>--pretty</option> <emphasis>ENCODING</emphasis></arg>
</group>
<group choice="opt">
<arg choice="plain"><option>-t</option> <emphasis>TYPE</emphasis></arg>
<arg choice="plain"><option>--types</option> <emphasis>TYPE</emphasis></arg>
</group>
<group choice="opt">
<arg choice="plain"><option>-o</option> <emphasis>ORDER</emphasis></arg>
<arg choice="plain"><option>--order</option> <emphasis>ORDER</emphasis></arg>
</group>
<group choice="opt">
<arg choice="plain"><option>-q</option></arg>
<arg choice="plain"><option>--quiet</option></arg>
</group>
<group choice="opt">
<arg choice="plain"><option>-d</option></arg>
<arg choice="plain"><option>--doctest</option></arg>
</group>
<group choice="opt">
<arg choice="plain"><option>-C</option></arg>
<arg choice="plain"><option>--no-cache</option></arg>
</group>
<group choice="opt">
<arg choice="plain"><option>-a</option></arg>
<arg choice="plain"><option>--auto</option></arg>
</group>
<group choice="opt">
<arg choice="plain"><option>-D</option></arg>
<arg choice="plain"><option>--debug</option></arg>
</group>
<group choice="opt">
-- <emphasis>PYTHONOPTIONS</emphasis>
</group>
</cmdsynopsis>
<cmdsynopsis>
<command>&dhpackage;</command>
<!-- Normally the help and version options make the programs stop
right after outputting the requested information. -->
<group choice="opt">
<arg choice="plain">
<group choice="req">
<arg choice="plain"><option>-h</option></arg>
<arg choice="plain"><option>--help</option></arg>
</group>
</arg>
<arg choice="plain">
<group choice="req">
<arg choice="plain"><option>-v</option></arg>
<arg choice="plain"><option>--version</option></arg>
</group>
</arg>
</group>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1 id="description">
<title>DESCRIPTION</title>
<para>isympy is a Python shell for SymPy. It is just a normal python shell
(ipython shell if you have the ipython package installed) that executes
the following commands so that you don't have to:
</para>
<programlisting>
>>> from __future__ import division
>>> from sympy import *
>>> x, y, z = symbols("x,y,z")
>>> k, m, n = symbols("k,m,n", integer=True)
</programlisting>
<para>So starting isympy is equivalent to starting python (or ipython) and
executing the above commands by hand. It is intended for easy and quick
experimentation with SymPy. For more complicated programs, it is recommended
to write a script and import things explicitly (using the "from sympy
import sin, log, Symbol, ..." idiom).</para>
</refsect1>
<refsect1 id="options">
<title>OPTIONS</title>
<variablelist>
<!-- Use the variablelist.term.separator and the
variablelist.term.break.after parameters to
control the term elements. -->
<varlistentry>
<term><option>-c <replaceable class="parameter">SHELL</replaceable></option></term>
<term><option>--console=<replaceable class="parameter">SHELL</replaceable></option></term>
<listitem>
<para>Use the specified shell (python or ipython) as
console backend instead of the default one (ipython
if present or python otherwise).</para>
<para>Example: isympy -c python</para>
<para><replaceable class="parameter">SHELL</replaceable> could be either
'ipython' or 'python'</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-p <replaceable class="parameter">ENCODING</replaceable></option></term>
<term><option>--pretty=<replaceable class="parameter">ENCODING</replaceable></option></term>
<listitem>
<para>Setup pretty printing in SymPy. By default, the most pretty, unicode
printing is enabled (if the terminal supports it). You can use less
pretty ASCII printing instead or no pretty printing at all.</para>
<para>Example: isympy -p no</para>
<para><replaceable class="parameter">ENCODING</replaceable> must be one of 'unicode',
'ascii' or 'no'.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-t <replaceable class="parameter">TYPE</replaceable></option></term>
<term><option>--types=<replaceable class="parameter">TYPE</replaceable></option></term>
<listitem>
<para>Setup the ground types for the polys. By default, gmpy ground types
are used if gmpy2 or gmpy is installed, otherwise it falls back to python
ground types, which are a little bit slower. You can manually
choose python ground types even if gmpy is installed (e.g., for testing purposes).</para>
<para>Note that sympy ground types are not supported, and should be used
only for experimental purposes.</para>
<para>Note that the gmpy1 ground type is primarily intended for testing; it the
use of gmpy even if gmpy2 is available.</para>
<para>This is the same as setting the environment variable
SYMPY_GROUND_TYPES to the given ground type (e.g.,
SYMPY_GROUND_TYPES='gmpy')</para>
<para>The ground types can be determined interactively from the variable
sympy.polys.domains.GROUND_TYPES inside the isympy shell itself.</para>
<para>Example: isympy -t python</para>
<para><replaceable class="parameter">TYPE</replaceable> must be one of 'gmpy',
'gmpy1' or 'python'.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-o <replaceable class="parameter">ORDER</replaceable></option></term>
<term><option>--order=<replaceable class="parameter">ORDER</replaceable></option></term>
<listitem>
<para>Setup the ordering of terms for printing. The default is lex, which
orders terms lexicographically (e.g., x**2 + x + 1). You can choose
other orderings, such as rev-lex, which will use reverse
lexicographic ordering (e.g., 1 + x + x**2).</para>
<para>Note that for very large expressions, ORDER='none' may speed up
printing considerably, with the tradeoff that the order of the terms
in the printed expression will have no canonical order</para>
<para>Example: isympy -o rev-lax</para>
<para><replaceable class="parameter">ORDER</replaceable> must be one of 'lex', 'rev-lex', 'grlex',
'rev-grlex', 'grevlex', 'rev-grevlex', 'old', or 'none'.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-q</option></term>
<term><option>--quiet</option></term>
<listitem>
<para>
Print only Python's and SymPy's versions to stdout at startup, and nothing else.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-d</option></term>
<term><option>--doctest</option></term>
<listitem>
<para>
Use the same format that should be used for doctests. This is
equivalent to '<emphasis>isympy -c python -p no</emphasis>'.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-C</option></term>
<term><option>--no-cache</option></term>
<listitem>
<para>
Disable the caching mechanism. Disabling the cache may slow certain
operations down considerably. This is useful for testing the cache,
or for benchmarking, as the cache can result in deceptive benchmark timings.
</para>
<para>
This is the same as setting the environment variable SYMPY_USE_CACHE
to 'no'.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-a</option></term>
<term><option>--auto</option></term>
<listitem>
<para>
Automatically create missing symbols. Normally, typing a name of a
Symbol that has not been instantiated first would raise NameError,
but with this option enabled, any undefined name will be
automatically created as a Symbol. This only works in IPython 0.11.
</para>
<para>
Note that this is intended only for interactive, calculator style
usage. In a script that uses SymPy, Symbols should be instantiated
at the top, so that it's clear what they are.
</para>
<para>
This will not override any names that are already defined, which
includes the single character letters represented by the mnemonic
QCOSINE (see the "Gotchas and Pitfalls" document in the
documentation). You can delete existing names by executing "del
name" in the shell itself. You can see if a name is defined by typing
"'name' in globals()".
</para>
<para>
The Symbols that are created using this have default assumptions.
If you want to place assumptions on symbols, you should create them
using symbols() or var().
</para>
<para>
Finally, this only works in the top level namespace. So, for
example, if you define a function in isympy with an undefined
Symbol, it will not work.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-D</option></term>
<term><option>--debug</option></term>
<listitem>
<para>
Enable debugging output. This is the same as setting the
environment variable SYMPY_DEBUG to 'True'. The debug status is set
in the variable SYMPY_DEBUG within isympy.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-- <replaceable class="parameter">PYTHONOPTIONS</replaceable></term>
<listitem>
<para>
These options will be passed on to <emphasis>ipython (1)</emphasis> shell.
Only supported when ipython is being used (standard python shell not supported).
</para>
<para>
Two dashes (--) are required to separate <emphasis>PYTHONOPTIONS</emphasis>
from the other isympy options.
</para>
<para>
For example, to run iSymPy without startup banner and colors:
</para>
<para>
isympy -q -c ipython -- --colors=NoColor
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-h</option></term>
<term><option>--help</option></term>
<listitem>
<para>
Print help output and exit.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option></term>
<term><option>--version</option></term>
<listitem>
<para>
Print isympy version information and exit.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="files">
<title>FILES</title>
<variablelist>
<varlistentry>
<term><filename>${HOME}/.sympy-history</filename></term>
<listitem>
<para>Saves the history of commands when using the python
shell as backend.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="bugs">
<!-- Or use this section to tell about upstream BTS. -->
<title>BUGS</title>
<para>The upstreams <acronym>BTS</acronym> can be found at <ulink
url="http://code.google.com/p/sympy/issues/list">http://code.google.com/p/sympy/issues/list</ulink>
Please report all bugs that you find in there, this will help improve
the overall quality of SymPy.</para>
</refsect1>
<refsect1 id="see_also">
<title>SEE ALSO</title>
<!-- In alpabetical order. -->
<para><citerefentry>
<refentrytitle>ipython</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>python</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry></para>
</refsect1>
</refentry>
|