[Tutor] python newbie need help
Rino Mardo
rmardo@yahoo.com
Mon, 24 Sep 2001 00:17:00 +0800
--VbJkn9YxBvnuCH5J
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Sat, Sep 22, 2001 at 12:56:29PM -0400 or thereabouts, cruciatuz wrote:
>=20
<...snipped...>
> #!/usr/bin/env python
>=20
> def faktor(a,b):
> while b !=3D 0:
> a, b =3D b, a % b
> return a
>=20
> if __name__ =3D=3D '__main__': # checks if the script is started as main
> print faktor(13, 55) # calls the function faktor(a, b)
> =09
thanks Stefan for that bit of info. i have managed to make it work
and have actually moved on to accepting arguments from the command
line.
for my first actual python project i'm thinking of a utility to
archive my mails stored in a Maildir mailbox. however, i'm finding it
difficult to find any reference as to what is the syntax should be for
most of python's modules. take for example "os.system("cd "+dirName)"
the language reference nor the library has no mention of what the
syntax should for that command. should i put a comma to separate the
arguments or no comma at all? i think what i'm looking for something
similar to the syntax diagram of pascal.
is there something similar in python?
--=20
"GUIs normally make it simple to accomplish simple actions and impossible
to accomplish complex actions." --Doug Gwyn (22/Jun/91 in comp.unix.wiza=
rds)
--VbJkn9YxBvnuCH5J
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
iD8DBQE7rgr88JtvN2Ncyp0RArWpAJ96nwTN4uEiCiv7CDin9U3kEHPw7ACfSSam
DssuYhCyx3wHYTyHY7fxcN0=
=xdxn
-----END PGP SIGNATURE-----
--VbJkn9YxBvnuCH5J--
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com