Re: [Tutor] Data Structures printing and Python Package creation
On 2018-02-03 11:20, Bob Gailer wrote: On Feb 3, 2018 2:09 PM, "Daniel Bosah"wrote: I'm in a research group for school, and my first task is to learn how to make a Python package and to learn how to print out all types of data structures. Are there resources I can be pointed to to help me out. https://python-packaging.readthedocs.io/en/latest/ I got that using Google search. Hint hint? All types is a bit vague. I suggest you take one type at a time. Very often it is sufficient to print the object using, as you might guess, the print function. Also Google python prettyprint and python formatting. Let us know how it goes and please ask more questions. Here's another to consider: https://packaging.python.org/tutorials/distributing-packages/ As for printing out data structures: I assume you mean to present a textual representation of specific instances. If the instances are of built in types, simply print: print(myvar) # as suggested by Bob above If it is an instance of a class you've created yourself, then to get anything useful you'll have had to declare a __str__ method within that class. The method should return (as a string) what you want print to show. ...at least that's my understanding. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Data Structures printing and Python Package creation
On Feb 3, 2018 2:09 PM, "Daniel Bosah"wrote: > > I'm in a research group for school, and my first task is to learn how to > make a Python package and to learn how to print out all types of data > structures. Are there resources I can be pointed to to help me out. https://python-packaging.readthedocs.io/en/latest/ I got that using Google search. Hint hint? All types is a bit vague. I suggest you take one type at a time. Very often it is sufficient to print the object using, as you might guess, the print function. Also Google python prettyprint and python formatting. Let us know how it goes and please ask more questions. ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
[Tutor] Data Structures printing and Python Package creation
I'm in a research group for school, and my first task is to learn how to make a Python package and to learn how to print out all types of data structures. Are there resources I can be pointed to to help me out. Thanks ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] help with some code for my 8 year old! Thank you.
On 03/02/18 02:12, JSelby wrote: >My 8 year old is reading Python for kids and is trying a few programs >from the book We are working on a Mac OS X ELCapitain. We are looking at >WHACK THE BOUNCING BALL. >He has copied the code below and we get the red error message below. This is a text only mailing list so attachments get stripped by the server. Please resend but cut 'n paste the actual text into the mail message, don't use an attachment. If that doesn't work you could post the attachments on a web server and send a link that we can view. For the error messages be sure to send the entire message not just a few lines or summary. >Object: [1]application/x-apple-msg-attachment >Object: [2]application/x-apple-msg-attachment -- 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 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] help with some code for my 8 year old! Thank you.
Sorry can't see any error messages through the visible links. On 3 Feb. 2018, 7:08 pm, at 7:08 pm, JSelbywrote: > My 8 year old is reading Python for kids and is trying a few programs >from the book We are working on a Mac OS X ELCapitain. We are looking >at > WHACK THE BOUNCING BALL. >He has copied the code below and we get the red error message below. >We >followed the code exactly so are not sure what is wrong. Please can you > help. > Object: [1]application/x-apple-msg-attachment > Object: [2]application/x-apple-msg-attachment > Julie Selby > [3]ju...@beaglestrategy.com > Tel: 604 762 1968 > [4]http://ca.linkedin.com/in/julieselby/ > [5]www.beaglestrategy.com > >References > > Visible links > 1. file:///tmp/cid:BC5630A8-FD4A-488B-9979-8A8936D74EC7@hitronhub.home > 2. file:///tmp/cid:80B89FF3-BA17-444D-8E95-8C63CCF4851F@hitronhub.home > 3. mailto:ju...@beaglestrategy.com > 4. http://ca.linkedin.com/in/julieselby/ > 5. http://www.beaglestrategy.com/ >___ >Tutor maillist - Tutor@python.org >To unsubscribe or change subscription options: >https://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
[Tutor] help with some code for my 8 year old! Thank you.
My 8 year old is reading Python for kids and is trying a few programs from the book We are working on a Mac OS X ELCapitain. We are looking at WHACK THE BOUNCING BALL. He has copied the code below and we get the red error message below. We followed the code exactly so are not sure what is wrong. Please can you help. Object: [1]application/x-apple-msg-attachment Object: [2]application/x-apple-msg-attachment Julie Selby [3]ju...@beaglestrategy.com Tel: 604 762 1968 [4]http://ca.linkedin.com/in/julieselby/ [5]www.beaglestrategy.com References Visible links 1. file:///tmp/cid:BC5630A8-FD4A-488B-9979-8A8936D74EC7@hitronhub.home 2. file:///tmp/cid:80B89FF3-BA17-444D-8E95-8C63CCF4851F@hitronhub.home 3. mailto:ju...@beaglestrategy.com 4. http://ca.linkedin.com/in/julieselby/ 5. http://www.beaglestrategy.com/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor