Hello, Is there a way in which people have found to use goto or labels in Python?thank you.
Sent from my iPhone > On Feb 11, 2015, at 12:27 PM, [email protected] wrote: > > Send Tutor mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/tutor > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Tutor digest..." > > > Today's Topics: > > 1. Re: Wondering if there is a print in location command for > terminal? (eryksun) > 2. Timeline Script in Python (Siya Radebe) > 3. Re: Timeline Script in Python (Alan Gauld) > 4. Asking for help with installation of pyttsx (text to speech) > (Andrew K.) > 5. Importing from classes (daaku gee) > 6. Re: Asking for help with installation of pyttsx (text to > speech) (Alan Gauld) > 7. Re: Importing from classes (Alan Gauld) > 8. Re: Importing from classes (Steven D'Aprano) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 10 Feb 2015 08:29:56 -0600 > From: eryksun <[email protected]> > To: Alan Gauld <[email protected]> > Cc: [email protected] > Subject: Re: [Tutor] Wondering if there is a print in location command > for terminal? > Message-ID: > <cacl+1atmyrr1_k2nrztpitwfvdmxo4oa+t32hbcr-vf_h8_...@mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > >> On Tue, Feb 10, 2015 at 3:02 AM, Alan Gauld <[email protected]> >> wrote: >> msvcrt wraps the Microsoft Vis C Runtime functions which don't >> include positional commands. >> >> Conio was a DOS library developed by the compiler makers as a way to access >> the BIOS calls and has a gotoXY() and similar functions. It first appeared, >> as I recall, in Turbo Pascal but was later picked >> up by the C compilers as well. >> There are at least 2 libraries on PyPi that simulate conio > > OK, the only conio I was aware of was the conio.h API provided by > various C runtime libraries on Windows, as described here: > > https://en.wikipedia.org/wiki/Conio.h > > > ------------------------------ > > Message: 2 > Date: Tue, 10 Feb 2015 18:29:46 +0200 > From: Siya Radebe <[email protected]> > To: [email protected] > Subject: [Tutor] Timeline Script in Python > Message-ID: <[email protected]> > Content-Type: text/plain; charset=us-ascii > > Hi, > > Can you please help with a timeline script in python, in conjunction with how > to use their timeline library? > > I would love advise of how to best approach this, in going about developing > an event/ activity stream timeline > > I found two different libraries, one from Python, and other from Django which > is best, and how do i go about developing the script to show a timeline of > events? > > https://pypi.python.org/pypi/timeline/0.0.1 > <https://pypi.python.org/pypi/timeline/0.0.1> > > https://pypi.python.org/pypi/django-admin-timeline > <https://pypi.python.org/pypi/django-admin-timeline> > > Looking forward to your favorable response > > Kind Regards, > Siya > > ------------------------------ > > Message: 3 > Date: Tue, 10 Feb 2015 18:59:15 +0000 > From: Alan Gauld <[email protected]> > To: [email protected] > Subject: Re: [Tutor] Timeline Script in Python > Message-ID: <[email protected]> > Content-Type: text/plain; charset=windows-1252; format=flowed > >> On 10/02/15 16:29, Siya Radebe wrote: >> Hi, >> >> Can you please help with a timeline script in python, in conjunction with >> how to use their timeline library? > > Thus list is for those learning the Python language and its standard > library. > Any information about third party modules will depend on whether anyone > here has used it, usually you are better asking on a dedicated forum (or > via email to the author) Django has a user forum, the PyPI package may not. > > >> I would love advise of how to best approach this, in going about developing >> an event/ activity stream timeline > > I think you need to be more specific about what you want to do. > Are you building it in real-time or from a database analysis? > What volume of events do you need to deal with? > etc... > > > HTH > -- > Alan G > Author of the Learn to Program web site > http://www.alan-g.me.uk/ > http://www.amazon.com/author/alan_gauld > Follow my photo-blog on Flickr at: > http://www.flickr.com/photos/alangauldphotos > > > > > ------------------------------ > > Message: 4 > Date: Tue, 10 Feb 2015 22:37:28 -0500 > From: "Andrew K." <[email protected]> > To: <[email protected]> > Subject: [Tutor] Asking for help with installation of pyttsx (text to > speech) > Message-ID: <[email protected]> > Content-Type: text/plain; charset="koi8-r" > > To whom it may concern. > > I started the project CrocToy, a complex robotic toy in a form of a > crocodile. I would like to use Python as programming platform. Having limited > programming skills, I have troubles with software development. Particularly, > right now I try to learn how to use pyttsx (text to speech). I would be very > grateful for any help with installation and programming. > Thank you very much, > Andrew > PS > I would be very thankful if any mature Python programmer would like to > participate in my project. > Thank you, > Andrew > > ------------------------------ > > Message: 5 > Date: Tue, 10 Feb 2015 18:39:50 -0800 > From: daaku gee <[email protected]> > To: [email protected] > Subject: [Tutor] Importing from classes > Message-ID: > <CAH53p94+UHzGHyi1ap0-VBjcNVQkNs=shusxgxd4pbvnvf_...@mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > Hi > > When importing from other modules, I've seen syntax like: > > import from <module> <Class> > import <module> > > And another one: > import from <module> <Class> as <some_name> > > Is one better than the other or is it just personal choice? > > Thanks > \d > > > ------------------------------ > > Message: 6 > Date: Wed, 11 Feb 2015 09:24:27 +0000 > From: Alan Gauld <[email protected]> > To: [email protected] > Subject: Re: [Tutor] Asking for help with installation of pyttsx (text > to speech) > Message-ID: <[email protected]> > Content-Type: text/plain; charset=windows-1252; format=flowed > >> On 11/02/15 03:37, Andrew K. wrote: >> >> I started the project CrocToy, a complex robotic toy in a form of a >> crocodile. >> I would like to use Python as programming platform. >> Having limited programming skills, I have troubles with software > development. > > This much we can help with since the list is here for those learning > Python and programming in general. > >> Particularly, right now I try to learn how to use pyttsx (text to speech). > > But we do limit ourselves to the standard library modules so for > anything else you will be gambling on somebody here already having > used it. Usually you are better sending module specific queries to the > module support forum (or the author.) > >> I would be very grateful for any help with installation and programming. > > Do you have any specific queries? The more specific the query the more > specific the answer will be. > > Please include details of your OS and Python version. > > -- > Alan G > Author of the Learn to Program web site > http://www.alan-g.me.uk/ > http://www.amazon.com/author/alan_gauld > Follow my photo-blog on Flickr at: > http://www.flickr.com/photos/alangauldphotos > > > > > ------------------------------ > > Message: 7 > Date: Wed, 11 Feb 2015 09:32:02 +0000 > From: Alan Gauld <[email protected]> > To: [email protected] > Subject: Re: [Tutor] Importing from classes > Message-ID: <[email protected]> > Content-Type: text/plain; charset=windows-1252; format=flowed > >> On 11/02/15 02:39, daaku gee wrote: >> >> When importing from other modules, I've seen syntax like: >> >> import from <module> <Class> > > from <module> import <name> > > Note you don't import classes from modules you import names. > (The name might be the name of a class of course!) > > This form is for cases where you only want to use one or two features of > a module and don't want to have the inconvenience of typing the module > name in front each time you use them. > >> import <module> > > This is the normal usage. It gives you indirect access to all of the > module features using the <module>.<name> notation > >> import from <module> <Class> as <some_name> > > import <module> as <alias> > or > from <module> import <name> as <alias> > > These tend to be used where the module has a very long name that > you don't want to type out in full each time, so you give it a > shorter alias. > You might also use it if you are working on code that already has > a variable with the same name as the module/feature that you want > to import. You either rename all your variable references or you > choose an alias that does not conflict. > >> Is one better than the other or is it just personal choice? > > 'better' is often a subjective term. > There are reasons for each as described above. > What is best depends on the circumstance. If in > doubt use > > import <module> > > HTH > -- > Alan G > Author of the Learn to Program web site > http://www.alan-g.me.uk/ > http://www.amazon.com/author/alan_gauld > Follow my photo-blog on Flickr at: > http://www.flickr.com/photos/alangauldphotos > > > > > ------------------------------ > > Message: 8 > Date: Wed, 11 Feb 2015 21:18:17 +1100 > From: Steven D'Aprano <[email protected]> > To: [email protected] > Subject: Re: [Tutor] Importing from classes > Message-ID: <[email protected]> > Content-Type: text/plain; charset=us-ascii > >> On Tue, Feb 10, 2015 at 06:39:50PM -0800, daaku gee wrote: >> Hi >> >> When importing from other modules, I've seen syntax like: >> >> import from <module> <Class> >> import <module> >> >> And another one: >> import from <module> <Class> as <some_name> > > Not quite. The syntax is: > > import <module> > > import <module> as <new name> > > from <module> import <object> # not necessarily a class > > from <module> import <object> as <new name> > > >> Is one better than the other or is it just personal choice? > > As far as Python is concerned, there is no difference at all. The "as > name" version just lets you pick a different name, usually to save > typing: > > import module_with_a_really_long_name as module > > > Obviously the usual rule for naming things applies here too: names > should be meaningful, they should not lie, or be confusing: > > # Bad ideas. > import math as string # What? > import string as fred > import os as barney > > Beware of names which are easily confused, or have common meanings: > > - try to avoid `l` and `I` because in some fonts they look like 1 > - same for `O` and 0 > - i is normally used for for-loop counters and other integers > - n is also used for integers > - x and y for floats > > But apart from that, the names you choose are entirely up to you. > > > -- > Steve > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Tutor maillist - [email protected] > https://mail.python.org/mailman/listinfo/tutor > > > ------------------------------ > > End of Tutor Digest, Vol 132, Issue 21 > ************************************** _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
