Re: [Linux-programlama] Python Programlama:Paremetre Ekleme:Nasıl?

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: Buğrahan Korkmaz (kickboksor@gmail.com)
Date: Mon 19 Jun 2006 - 11:38:55 GMT


Teşekkür ederim...

2006/6/19, Burak Çelebi <burakcelebi@gmail.com>:
>
> Bunlara da bakmak isteyebilirsiniz:
>
> http://docs.python.org/lib/module-getopt.html
> http://docs.python.org/lib/module-optparse.html
>
> On 6/19/06, Burak Çelebi <burakcelebi@gmail.com> wrote:
> > On 6/19/06, Burak Çelebi <burakcelebi@gmail.com> wrote:
> > > sys.argv stringlerden olusan liste donduruyor:
> > >
> > > ornegin,
> > > python test.py 5 mest
> > >
> > > icin
> > > ['/home/burak/arg.py', '5', 'mest'] listesi doner. Burada 5'i int
> >
> > Pardon dogrusu:
> > ['/home/burak/test.py', '5', 'mest'] olacak.
> >
> > > olarak kullanmak icin string'ten int'e donusturmemiz gerek. 'mest' i
> > > ise dogrudan kullanabiliriz.
> > >
> > > import sys
> > >
> > > args = sys.argv
> > >
> > > print 4 + int(args[1])
> > > print args[2]
> > >
> > >
> > > On 6/19/06, Buğrahan Korkmaz <kickboksor@gmail.com> wrote:
> > > > Lütfen, anlayamadım. Bir daha anlatır mısınız?
> > > >
> > > > Sys'yi import ettik. Tamam ondan sonrasını da anladım ama nasıl
> > > > kullanabileceğimi bilmiyorum. Biraz daha açın...
> > > >
> > > > 2006/6/19, Burak Çelebi < burakcelebi@gmail.com>:
> > > > >
> > > > Merhaba,
> > > >
> > > > On 6/19/06, Buğrahan Korkmaz <kickboksor@gmail.com> wrote:
> > > > > Merhabalar,
> > > > >
> > > > > Arkadaşlar ben python programlama dili üzerinde çalışıyorum.
> Birşeyi
> > > > > yapamıyorum. Mesela konsol uygulamaları paremetre kullanır. Her
> > > > paremetrede
> > > > > çeşitli görevler yaparlar. Ben de konsolda pythonla programlama
> yaptığım
> > > > > için bunu öğrenmem lazım. Evet, nasıl paremetre ekleyebilirim?
> > > >
> > > > import sys
> > > >
> > > > args = sys.argv
> > > > print args[0]
> > > > print args[1]
> > > > ...
> > > >
> > > >
> > > >
> > > > --
> > > > Burak Celebi - http://www.burakcelebi.tk
> > > >
> > > > _______________________________________________
> > > > Linux-programlama mailing list
> > > > Linux-programlama@liste.linux.org.tr
> > > > http://liste.linux.org.tr/mailman/listinfo/linux-programlama
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Buğrahan Korkmaz
> > > > _______________________________________________
> > > > Linux-programlama mailing list
> > > > Linux-programlama@liste.linux.org.tr
> > > > http://liste.linux.org.tr/mailman/listinfo/linux-programlama
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Burak Celebi - http://www.burakcelebi.tk
> > >
> >
> >
> > --
> > Burak Celebi - http://www.burakcelebi.tk
> > Jerry: But the question is, are you still master of your domain?
> >
>
>
> --
> Burak Celebi - http://www.burakcelebi.tk
>
> _______________________________________________
> Linux-programlama mailing list
> Linux-programlama@liste.linux.org.tr
> http://liste.linux.org.tr/mailman/listinfo/linux-programlama
>
>
>

-- 
Buğrahan Korkmaz

_______________________________________________
Linux-programlama mailing list
Linux-programlama@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.