[python-users] FrOSCon Poster "Python"

Reimar Bauer rb.proj at googlemail.com
Di Aug 17 20:01:40 CEST 2010


Hi Andreas

ich finds praktisch wenn man sofort nen plot macht,
da ja auch Schüler das dann direkt im Mathe Physikunterricht anwenden
können.

http://msenux.redwoods.edu/math/python/simple.php

An so einem praktischem Beispiel sieht man dann auch warum man sich
damit beschäftigen sollte. (pep8ified beispiel)

>>> from pylab import arange, plot, show, sin, pi, xlabel, ylabel, title
>>> x = arange(0, 2, 0.01)
>>> y = 2 * sin(2 * pi * (x - 1 / 4))
>>> plot(x, y)
>>> ylabel('y-axis')
>>> xlabel('x-axis')
>>> title(r'$y=2\sin 2\pi(x-1/4)$')
>>> show()

das entspricht dann der Ausgabe:
http://msenux.redwoods.edu/math/python/graphics/simple2.gif

bzw. der angehängten svg

Ich finds auch praktisch wenn help, print und dir mal gezeigt wird,
z.B.:
>>> help(x)
Help on ndarray object:

class ndarray(__builtin__.object)
 |  ndarray(shape, dtype=float, buffer=None, offset=0,
 |          strides=None, order=None)

>>> print(x)
[ 0.    0.01  0.02  0.03  0.04  0.05

>>> dir(x)
['T', '__abs__', '__add__', '__and__', '__array__',
'__array_finalize__', '__arr ...


Hilfreich zum Anfangen mit python, ist auch bpython,
http://bpython-interpreter.org/
http://bpython-interpreter.org/screenshots/

Ich glaube man sollte das spielerische hervorheben.


Gruß
Reimar




2010/8/17 Andreas Schreiber <Andreas.Schreiber at dlr.de>:
> Hi zusammen,
>
> Zwischenstand: 2 von 3 Postern werden gerade gedruckt.
>
> Das dritte Poster ist noch nicht fertig. Der Inhalt sollte ja eine
> Kurzvorstellung
> von Python sein. Ich bastel zuzeit was zusammen auf Grundlage folgender
> Quellen:
>
> "Learn Python in 10 Minutes" http://www.korokithakis.net/tutorials/python
> und
> http://github.com/CarlFK/Ripley/blob/master/ripley.txt
> (see http://mail.python.org/pipermail/advocacy/2010-August/000828.html)
>
> Anregungen irgendjemand?
>
> -Andreas
>
> --
> Andreas Schreiber
> Leiter Abt. Verteilte Systeme und Komponentensoftware
> Deutsches Zentrum fuer Luft- und Raumfahrt e.V. (DLR)
> Simulations- und Softwaretechnik, Koeln-Porz
> Tel: (02203) 601-2485     http://www.dlr.de/sc
> Fax: (02203) 601-12485    MSN: mailto:Andreas.Schreiber at dlr.de
> Mobile: (0173) 5231013    ICQ# 324185855
>
> DLR auf Twitter: http://twitter.com/DLR_de
>
> ________________________________________
> Diese Mail erhalten Sie ueber die Mailingliste Python-users der Universitaet zu Koeln
> Python-users at uni-koeln.de
> https://lists.uni-koeln.de/mailman/listinfo/python-users
>
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : pylab_1.svg
Dateityp    : image/svg+xml
Dateigröße  : 40021 bytes
Beschreibung: nicht verfügbar
URL         : <http://lists.uni-koeln.de/pipermail/python-users/attachments/20100817/62f32ea4/attachment.svg>


Mehr Informationen über die Mailingliste python-users