Re: [Tutor] Object creation query

2019-08-09 Thread bob gailer
On 8/9/2019 7:39 AM, Alan Gauld via Tutor wrote: On 09/08/2019 09:54, mhysnm1...@gmail.com wrote: updates and insertions. I have multiple tables with the same structure with differe I agree 100% with Peter and Alan's responses. -- Bob G

Re: [Tutor] instantiate and name a class from / with a string

2019-08-09 Thread bob gailer
asking for help in obtaining a value from a database? Or how to dynamically create instances assigned to root.channel attributes? Assuming the latter: name = # get from data base setattr(root.channel, name, SSE(name)) -- Bob Gailer ___ Tutor maillist

Re: [Tutor] Difference between decorator and inheritance

2019-08-02 Thread bob gailer
enter a command>') func = cmd_dict.get(cmd) -- Bob Gailer ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Which is better in principle: to store (in file) calculated data or to re-calculate it upon restarting program?

2019-07-30 Thread boB Stepp
On Tue, Jul 30, 2019 at 7:26 PM Mats Wichmann wrote: > > On 7/30/19 5:58 PM, Alan Gauld via Tutor wrote: > > On 30/07/2019 17:21, boB Stepp wrote: > > > >> musings I am wondering about -- in general -- whether it is best to > >> store calculated data values i

Re: [Tutor] Which is better in principle: to store (in file) calculated data or to re-calculate it upon restarting program?

2019-07-30 Thread boB Stepp
On Tue, Jul 30, 2019 at 7:05 PM Alan Gauld via Tutor wrote: > > On 30/07/2019 18:20, boB Stepp wrote: > > > What is the likelihood of file storage corruption? I have a vague > > sense that in earlier days of computing this was more likely to > > happen, but nowadays?

Re: [Tutor] Which is better in principle: to store (in file) calculated data or to re-calculate it upon restarting program?

2019-07-30 Thread boB Stepp
On Tue, Jul 30, 2019 at 12:05 PM Zachary Ware wrote: > > On Tue, Jul 30, 2019 at 11:24 AM boB Stepp wrote: > > In this trivial example I cannot imagine there is any realistic > > difference between the two approaches, but I am trying to generalize > > my thoughts f

[Tutor] Which is better in principle: to store (in file) calculated data or to re-calculate it upon restarting program?

2019-07-30 Thread boB Stepp
errors occurring in files. Any thoughts on this? TIA! -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Stylometry Help

2019-07-20 Thread Bob Gailer
e tutor list does not forward attachments. If the files are not too big just include them in the body of the email. Otherwise you'll have to store them in the cloud and give us a link. Be sure to reply all so we all get to see your problem. Bob gailer

[Tutor] Unit testing: Just the API or internal use only methods, too?

2019-07-16 Thread boB Stepp
thods only used internally by the class and not meant to be publicly accessible. Is this generally how I should be viewing testing? Would someone be willing to expand at some length on this topic? TIA! -- boB ___ Tutor maillist - Tutor@python.o

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-08 Thread bob gailer
Data = [    ['2019-01-19','Fred Flintstone',23], ['2019-02-01','Scooby doo', 99] ] Warning 3: age is not a fundamental attribute; it is a computed value! -- Bob Gailer ___ Tutor maillist - Tutor@python.o

Re: [Tutor] Python 3.7 Grids

2019-06-29 Thread boB Stepp
termine between the two > demo cards. As Bob Gailer mentioned this is a text only list which does not allow attachments, so I cannot see what you are actually attempting with your code. But with what you said, two thoughts come to my mind: 1) You can embed each card image on a button widget and i

Re: [Tutor] [Python-Help] Writing hello world

2019-06-29 Thread Bob Gailer
On Jun 28, 2019 9:26 AM, "Erastus muriithi" wrote: > > Iam a student..iam interested in learning python,,I don't know how to study this python.kindly help me how to go about it..Thankyou First make sure you have python installed on your computer. If you need help with that let us know what kind o

Re: [Tutor] Python 3.7 Grids

2019-06-29 Thread Bob Gailer
even better if it's not terribly complicated paste it into the reply. be sure to reply all so everyone on the tutor list will see your reply. > There are no viruses. That's kind of like a Salesman saying "trust me". Bob Gailer

Re: [Tutor] python

2019-06-25 Thread Bob Gailer
On Jun 25, 2019 8:52 AM, "Shaon Debnath" wrote: > > I just wanted to know all about map() function in python. See https://www.geeksforgeeks.org/python-map-function/. If after reading that you still have questions please come back and ask t

Re: [Tutor] Query about python recipies for practices

2019-05-27 Thread boB Stepp
eazley and Jones. Perhaps that might help? Some cautionary words of warning: If this is an obscure way of getting a pre-packaged homework solution, then you are doing yourself a grave disservice! -- boB ___ Tutor maillist - Tutor@python.org To u

Re: [Tutor] Looking for some direction

2019-05-12 Thread boB Stepp
On Sun, May 12, 2019 at 5:19 PM boB Stepp wrote: > > On Sun, May 12, 2019 at 1:05 PM David L Neil > wrote: > > > I'm using Gnome Terminal under Fedora (Linux). This allows multiple > > terminals in tabs (and thus Ctrl-Tab rapid-switching). However, it > >

Re: [Tutor] Looking for some direction

2019-05-12 Thread boB Stepp
thub.com/tmux/tmux/wiki) is capable of session management. I have no personal use of tmux, but have been intrigued enough about others referring to it that eventually I will get around to seriously checking it out. -- boB ___ Tutor maillist - Tutor@py

Re: [Tutor] Local variable look up outside the function and method

2019-05-12 Thread boB Stepp
3.6.8: print("In module scope, x =", x) In module scope, x = 10 boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Collating date data from a csv file

2019-05-08 Thread boB Stepp
On Wed, May 8, 2019 at 10:29 PM boB Stepp wrote: > > On Wed, May 8, 2019 at 10:09 PM Cameron Simpson wrote: > > > > A defaultdict is a dict which magicly makes missing elements when they > > get access, using a factory function you supply. Here we're using &quo

Re: [Tutor] Collating date data from a csv file

2019-05-08 Thread boB Stepp
ed to always return zero as Python versions progress? More importantly, perhaps, where would I go to look to find the answer to this question myself? -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.

[Tutor] Syntac Error

2019-04-23 Thread Bob Griffin
Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> print("Game Over") Game Over >>> Sent from Mail for Windows 10 Each time I write the program in Python from the book Python Programming, Thi

Re: [Tutor] Off-Topic: Tutor group specific to Java

2019-04-19 Thread boB Stepp
Try Java Ranch: https://javaranch.com/ -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Questions about the deprecation of standard library modules

2019-03-30 Thread boB Stepp
t to know how the removal process works for deprecated standard library modules that I might be interested in. -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to store scores of a race's players

2019-03-26 Thread Bob Gailer
Please do not use a mangled return email address. It causes us a lot of pain when we fail to read your address to fix it and get the message bounced back. The only reason I'm even bothering to resend it is because I put a lot of work into it.: > On > Mar 26, 2019 6:55 AM, "^Bart" wrote: > > > > He

Re: [Tutor] How to store scores of a race's players

2019-03-26 Thread Bob Gailer
On Mar 26, 2019 6:55 AM, "^Bart" wrote: > > Hello! > > I need to store scores of three players for more than a race, after every race the user will read "Is the competition finished?", if the competition if finished the user will see the winner who got higest score: > Thank you for reaching out to

Re: [Tutor] [OT] Problem with auto-complete package installation in Atom [Was: Re: After virtualenv, how to use ide]

2019-03-24 Thread boB Stepp
ed detail. Or, in my case, many overlooked details! Keep trying and always try to give the best, most helpful description of problems you are experiencing, what you expected to happen and what actually did happen, so that you have the best chance of getting useful help. Take care! boB __

Re: [Tutor] How to avoid "UnboundLocalError: local variable 'goal_year' referenced before assignment"?

2019-03-24 Thread boB Stepp
Oh, happy day! eval() has been expunged from my program!! I will now continue from where I left off earlier. On Sun, Mar 24, 2019 at 12:22 AM Cameron Simpson wrote: > > On 23Mar2019 22:15, boB Stepp wrote: > > The lambda is just a single line function definition, and doesn't

[Tutor] [OT] Problem with auto-complete package installation in Atom [Was: Re: After virtualenv, how to use ide]

2019-03-24 Thread boB Stepp
on(s) about it would probably get better results on whatever forums are devoted to it. I am sure there will be at least one if not more. Cheers! boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to avoid "UnboundLocalError: local variable 'goal_year' referenced before assignment"?

2019-03-23 Thread boB Stepp
n Sun, Mar 24, 2019 at 12:22 AM Cameron Simpson wrote: > > Discussion below your post here, since I feel I should quote it all: > > On 23Mar2019 22:15, boB Stepp wrote: > >Traceback (most recent call last): > > File "pages_per_day.py", line 250, in > >s

[Tutor] How to avoid "UnboundLocalError: local variable 'goal_year' referenced before assignment"?

2019-03-23 Thread boB Stepp
referenced before assignment I understand this result, but cannot come up with a way to implement my desired DRY strategy as I am stuck on how to get around this "local variable ... referenced before assignment" issue. On subsequent passes "goal_year" will become "goal_mont

Re: [Tutor] After virtualenv, how to use ide

2019-03-23 Thread boB Stepp
me change the setting > of Spyder so that it uses different versions? A quick search yields this Stack Overflow thread with what appears to be several useful links embedded: https://stackoverflow.com/questions/30170468/how-to-run-spyder-in-virtual-environment -- boB _

Re: [Tutor] How to create a structure from a Log file

2019-03-11 Thread Bob Gailer
On Mar 11, 2019 2:53 AM, "Asad" wrote: > > Hi All , > >I think this format would be easy in a row and table format > > Date > Time > Message > 1/21/2019 > 10:13:14.237 CET > Method Entry. workDir=/tmp frameworkHome=/u01/app/oracle/product/ 12.2.0.1/dbhome_1 For me the easiest would be

Re: [Tutor] How to create a structure from a Log file

2019-03-10 Thread Bob Gailer
Thank you for showing us a sample of the log file. That is half the battle. Would you now reformat a couple of the lines so that we can see how you'd like to see them. It also may be the case that the advice given by others will be sufficient to guide you __

Re: [Tutor] How to create a structure from a Log file

2019-03-09 Thread Bob Gailer
Would you give us more information? What is an example of a log file? How would you like to see it presented? The more information you give us the easier it is for us to help. On Mar 9, 2019 11:20 AM, "Asad" wrote: Hi All , I would like to know , how can I approach this problem to cr

Re: [Tutor] Is this the preferred way to change terminal screen color using curses?

2019-03-02 Thread boB Stepp
*not* have the man pages for ncurses, even though it was installed. I had to manually fetch the man pages myself. -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Is this the preferred way to change terminal screen color using curses?

2019-03-02 Thread boB Stepp
window_obj.bkgd(' ', color_pair) if __name__ == '__main__': input("Press ENTER to change screen to first color, then press" " any key for next color change until the program exits.") curses.wrapper(start_cli) -- boB ___

Re: [Tutor] ANSI / VT100 Escape Codes in Windows 7 Environment

2019-02-27 Thread boB Stepp
-in-python-3-4-on-windows7 The checked answer gives a link to binaries for Windows, which seems to support all Python versions through 3.7, including 2.7. Just a thought... -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscri

Re: [Tutor] Why does using "window.addchr()" to place a character at the lower right corner raise an exception?

2019-02-27 Thread boB Stepp
On Wed, Feb 27, 2019 at 8:09 PM Alex Kleider wrote: > > On 2019-02-27 17:48, boB Stepp wrote: > > Under https://docs.python.org/3/library/curses.html#window-objects in > > the curses docs, it states: > > > > > > window.addch(ch[, attr]) > > window.addc

[Tutor] Why does using "window.addchr()" to place a character at the lower right corner raise an exception?

2019-02-27 Thread boB Stepp
, subwindow, or pad will cause an exception to be raised after the character is printed. Why is this? What is special about the lower right corner of a terminal window? I am guessing this is some relic of the original terminal era. TIA! -- boB

Re: [Tutor] How to use "curses.resizeterm(nlines, ncols)"

2019-02-24 Thread boB Stepp
if I ever use curses to write a program that others would be using if it is worthwhile to at least warn the users against overly shrinking their terminal window or somehow trying to handle the resulting exception? Or does such a user "deserve" what he/she gets? ~(:>)) -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to use "curses.resizeterm(nlines, ncols)"

2019-02-24 Thread boB Stepp
On Sun, Feb 24, 2019 at 2:52 PM Mats Wichmann wrote: > > On 2/24/19 1:30 PM, boB Stepp wrote: > > > So what am I misunderstanding? Can someone show me a code snippet > > that I can run which will demonstrate the usefulness and usage of > > curses.resizeterm()? &

Re: [Tutor] How to use "curses.resizeterm(nlines, ncols)"

2019-02-24 Thread boB Stepp
On Sun, Feb 24, 2019 at 4:40 PM Cameron Simpson wrote: > > On 24Feb2019 14:30, boB Stepp wrote: > >What you say makes sense and supports much of what I had concluded > >from my coding experiments. However, I still cannot get the function > >call, curses.resizeterm(), t

Re: [Tutor] How to use "curses.resizeterm(nlines, ncols)"

2019-02-24 Thread boB Stepp
nal window is the same. The stdscr.border() still tracks around the limits of the full terminal screen size. I had also tried not adding stdscr.border() in the if block, thinking that maybe curses.resizeterm() would redraw the border once I refreshed the screen, but that

[Tutor] How to use "curses.resizeterm(nlines, ncols)"

2019-02-23 Thread boB Stepp
resize the terminal window that the curses program is running within. Can someone give me a working example of how to use this command? TIA! -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.o

[Tutor] Good tutorials about Python 2 and 3 OOP by Leonardo Giordani

2019-02-13 Thread boB Stepp
quite a few other articles that look equally interesting! -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Fwd: [Tkinter-discuss] New docs: using tkinter GUIs on Android

2019-02-10 Thread boB Stepp
inter-disc...@python.org https://mail.python.org/mailman/listinfo/tkinter-discuss -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Putting a Bow on It

2019-02-09 Thread boB Stepp
s. Sorry I know so little about this, but perhaps this might get you pointed in a helpful direction. Hopefully the professionals will weigh in on your questions soon. -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] OT: A bit of humor related to my sporadic quest to learn Python

2019-01-13 Thread boB Stepp
My son sent me this link, which I think captures my situation with Python quite nicely: https://cdn-images-1.medium.com/max/720/1*7RZKI-g4K_syDf6XQEGWKw.jpeg -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options

Re: [Tutor] Defining variable arguments in a function in python

2018-12-31 Thread boB Stepp
implied by the subject line you choose. I know I am often quite guilty on rambling on, so I know how hard it is to do this. I say all of this, Avi, not to be critical, but to hopefully enhance everyone's opportunity to process and learn from

Re: [Tutor] loop error

2018-12-20 Thread boB Stepp
approach would be to construct the smallest possible runnable example code that reproduces your problem. Good luck and better thinking! -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.or

Re: [Tutor] Python

2018-12-20 Thread Bob Gailer
On Dec 20, 2018 12:17 PM, "Mary Sauerland" wrote: > > Hi, > > I want to get rid of words that are less than three characters but I keep getting errors. I tried multiple ways but keep getting errors. Hi Mary welcome to the tutor list. We love to help. We are a few volunteers. It is very difficult

Re: [Tutor] Extract URL

2018-12-13 Thread Bob Gailer
On Dec 13, 2018 2:01 PM, "Sammy Lee" wrote: > > I need help on the problem stated below. > > > Given a URL, open the webpage and return the first anchor link url (a href). > > > def extract_url_link(url): Same comments as my other two emails. ___ Tutor

Re: [Tutor] Python function

2018-12-13 Thread Bob Gailer
On Dec 13, 2018 1:55 PM, "Sammy Lee" wrote: > > How do I create a python function that opens a CSV file and determines how many columns > of data are in the file? The CSV files have been randomly generated from https://www.mockaroo.com/ > > def csv_column_count(openfile): Same comments as I made

Re: [Tutor] Long Lines techniques

2018-12-13 Thread Bob Gailer
t if it starts at the beginning of a statement. Hope this helps Bob gailer ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Open webpage and save CSV

2018-12-13 Thread Bob Gailer
're using and what version of python. You will need the services of the urllib. request module to get the contents of a web page. So start with that. > Given a URL, open the webpage and save the CSV to a given file path. > > > def save_

Re: [Tutor] I need help with my project

2018-11-28 Thread Bob Gailer
tten any Python program? Show us the program. Tell us where you are stuck. We really like to help but we do not have any crystal balls to look into. Help us understand your situation fully. Bob Gailer ___ Tutor maillist - Tutor@python.org To unsubs

Re: [Tutor] seeking beginners tutorial for async

2018-11-19 Thread Bob Gailer
> Can you be more specific what you're looking for? For starters a minimal executable program that uses the async keyword. On the JavaScript side this is trivial and easily understood. I did find in the python documentation a hello world program that uses async IO. It helped me understand how t

[Tutor] seeking beginners tutorial for async

2018-11-18 Thread bob gailer
://javascript.info/promise-basics, but trying to map it to python is very frustrating. The python docs also do not help. Can you point me to any resources that are actually useful to a beginner? Bob Gailer guru of many languages including Python ( up till now

Re: [Tutor] how to print lines which contain matching words or strings

2018-11-18 Thread Bob Gailer
On Nov 18, 2018 1:19 PM, "Bob Gailer" wrote: > > On Nov 18, 2018 12:14 PM, "Asad" wrote: > > > > Hi All , > > > >I have a set of words and strings : > > > > like : > > > > p = [A ,"B is good" ,123456 , &

Re: [Tutor] how to print lines which contain matching words or strings

2018-11-18 Thread Bob Gailer
attern in p > > thanks, you are welcome, but I'm not sure what you're thanking us for. I don't see any kind of request in your email. There are various resources on how to ask effective questions. You might try Googling that topic. I have more that I will say later. Bob Gailer

Re: [Tutor] Require Python assistance

2018-11-09 Thread Bob Gailer
asier it becomes for us to help you. Google is your friend here. For example try searching Google for "Elliptic Curve Cryptography python" and suggestion so that I can improve my computing skills (please see the attached file) Bob Gailer __

Re: [Tutor] Request for help with code

2018-11-06 Thread Bob Gailer
On Nov 6, 2018 4:51 PM, "Joseph Gulizia" wrote: > > I'm using the bookazine "The Python Book" First Edition on pages 13-14 it > gives the code (listed further below). > > It asks for user to state a given number of integers (for example 4)...then > user enters integers. It doesn't stop seeking i

Re: [Tutor] (no subject)

2018-10-27 Thread Bob Gailer
On Oct 27, 2018 7:48 AM, "Jesse Stockman" wrote: > > Hi there > > I need to draw a patten with turtle in python 3.7 but I cant get it to work here are the specs of the pattern and my code so far can you please help Thank you for asking for help. It would help us if you were more specific. "Can't

Re: [Tutor] (no subject)

2018-10-27 Thread boB Stepp
color): > move_to(x, y) > hight = int(input("input hight: ")) > width = int(input("input width: ")) > color(winner_color) > begin_fill() > forward(width) > left(90) > forward(hight) > left(90) > forward(width) > left(90) > forward(hight) > end_fill() > > > main() > draw_block(x, y, hight, width, color) > > > exitonclick() -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python Help

2018-10-26 Thread Bob Gailer
On Oct 26, 2018 1:20 PM, "Adam Eyring" wrote: > > Try this cleaned up version with colons in the right places, dollar signs removed, and other corrections: Does it do what you want? > beefmeals=int(input("Enter number of beef meals: ")) > shitmeals=int(input("Enter number of vegan meals: ")) > p

Re: [Tutor] Python Help

2018-10-26 Thread Bob Gailer
On Oct 26, 2018 6:11 AM, "Ben Placella" wrote: > > I need to write code that runs a cost calculating program with many > different variables and I honestly don't understand it Could you be more specific? What exactly don't you understand, or even better what do you understand? my code is: How

Re: [Tutor] Fwd: Can tempfile.NamedTemporaryFile(delete=False) be used to create *permanent* uniquely named files?

2018-10-22 Thread boB Stepp
On Mon, Oct 22, 2018 at 11:57 AM Mats Wichmann wrote: > > On 10/22/18 8:24 AM, boB Stepp wrote: > > Forwarding to the Tutor list. Herr Maier offers a good idea that > > would take away much of a remaining issue -- the name "Temporary". I > > need to look into

Re: [Tutor] What is the best way for a program suite to know where it is installed?

2018-10-22 Thread boB Stepp
On Mon, Oct 22, 2018 at 9:47 AM Mats Wichmann wrote: > > On 10/20/18 9:00 PM, boB Stepp wrote: > > So far the best method I've come up with is to make use of "__file__" > > for the initiating program file. But from past discussions I am not > > certain thi

[Tutor] Fwd: Can tempfile.NamedTemporaryFile(delete=False) be used to create *permanent* uniquely named files?

2018-10-22 Thread boB Stepp
Oct 22, 2018 at 5:25 AM Subject: Re: Can tempfile.NamedTemporaryFile(delete=False) be used to create *permanent* uniquely named files? To: boB Stepp On 21.10.18 08:13, boB Stepp wrote: > Use case: I want to allow a user of my Solitaire Scorekeeper program > to be able to give any nam

Re: [Tutor] Can tempfile.NamedTemporaryFile(delete=False) be used to create *permanent* uniquely named files?

2018-10-21 Thread boB Stepp
nd I would have to do the same for the code snippet you supplied, adding a few additional lines of code. But thank you for your input! It may turn out that there is something undesirable that I am unaware of in the NamedTemporaryFile approach, other than what I really want is a NamedPermanentFil

[Tutor] Can tempfile.NamedTemporaryFile(delete=False) be used to create *permanent* uniquely named files?

2018-10-20 Thread boB Stepp
"gaps". So I am now wondering if using tempfile.NamedTemporaryFile(delete=False) would solve this problem nicely? As I am not very familiar with this library, are there any unforeseen issues I should be made aware of? Would this work equally well on all operating systems

Re: [Tutor] When are "__init__.py" files needed and not needed in a project?

2018-10-20 Thread boB Stepp
On Sat, Oct 20, 2018 at 11:21 PM Alex Kleider wrote: > > On 2018-10-20 14:52, boB Stepp wrote: > > > >> > In case it helps, my current project structure is: > >> > > >> > ~/Projects/solitaire_scorekeeper/# I left off the actual project &g

[Tutor] What is the best way for a program suite to know where it is installed?

2018-10-20 Thread boB Stepp
istributing programs? If so, this strikes me as a huge mess to dive into! TIA! -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] When are "__init__.py" files needed and not needed in a project?

2018-10-20 Thread boB Stepp
On Sat, Oct 20, 2018 at 1:36 PM Peter Otten <__pete...@web.de> wrote: > > boB Stepp wrote: > > > Linux Mint 19 Cinnamon, Python 3.6.6 [snip] > > I was expecting this error and will shortly correct it. So my > > question remains, when are "__init__.py" fi

[Tutor] When are "__init__.py" files needed and not needed in a project?

2018-10-20 Thread boB Stepp
the first time on my new Solitaire Scorekeeper project (Finally getting around to this!), I got: bob@Dream-Machine1:~/Projects/solitaire_scorekeeper$ python3 -m unittest -- Ran 0 tests in 0.000s OK So no tests were run. So it i

Re: [Tutor] python game error

2018-10-14 Thread bob gailer
More comments on code: guess = raw_input("[pod #]> ")     if int(guess) != good_pod: If user enters something that will not convert to integer an exception will be raised. For example >>> int('a') Traceback (most recent call last):   File "", line 1, in ValueError: invalid literal

Re: [Tutor] python game error

2018-10-14 Thread bob gailer
The reason I used it here was because the OP was using map (actually Map). Duh! Bob ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] python game error

2018-10-14 Thread bob gailer
More comments: User Friendly? I hope this game is not intended for actual use. No one will be able to guess the correct actions in a reasonable time. or 3 digit random code given 10 tries for any one code. I for one would give up pretty quickly. The original colossal

Re: [Tutor] python game error

2018-10-14 Thread bob gailer
On 10/13/2018 4:25 AM, Mariam Haji wrote: ... Your problem intrigued me enough to spend some time "fixing" your program so it will compile with no errors and run at least the initial case where I entered "shoot!" Here are the problems I found: (line numbers refer to your original code) - spell

Re: [Tutor] python game error

2018-10-13 Thread Bob Gailer
suggestions: 1-Use triple-quoted strings: print """take the short-cut!""' 2 - make the program much simpler to start with. The usual approach to developing programs like this is to start simple get the simple things working right then add more complicated scene descriptions. Even better: separa

Re: [Tutor] Advanced python recommendations

2018-10-10 Thread boB Stepp
On Wed, Oct 10, 2018 at 12:09 PM Mats Wichmann wrote: > This is actually the concept of test driven development (TDD), which I'm > not a huge proponent of personally, but kind of useful for this: I'm curious: What are the things you find less than satisfactory f

Re: [Tutor] Advanced python recommendations

2018-10-09 Thread boB Stepp
e most, as the others have said. -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python programming help!

2018-09-23 Thread Bob Gailer
On Sep 23, 2018 3:33 AM, "V E G E T A L" wrote: > > Hello folks! So, I'm pretty much a noob still experimenting with basic > commands. I wanted to make a code that checks if the value of one variable > is less, equal or greater than the other. Pretty simple right? But then, > this problem emerged

[Tutor] OT: How to automate the setting of file permissions for all files in a collection of programs?

2018-08-29 Thread boB Stepp
in the Solaris environment, I am not allowed to do so. I am not allowed to use Python pip either. Strange rules ... -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Contour Plots

2018-08-28 Thread boB Stepp
al tutorial at https://seaborn.pydata.org/tutorial.html If the above does not sufficiently help then you will have to provide additional information as to what exactly you are trying to do, how are you trying to do it, where are you getting stuck, etc. HTH! -- boB ___

Re: [Tutor] How to have unique identifiers for multiple object instances of a given class?

2018-08-27 Thread boB Stepp
On Mon, Aug 27, 2018 at 3:44 AM Alan Gauld via Tutor wrote: > > On 27/08/18 04:58, boB Stepp wrote: > >> Maybe JSON for that? Or even a shelve database? > > > > I plan to keep this simple. I will use a ".cfg" file to store game > > configuration inform

Re: [Tutor] How to have unique identifiers for multiple object instances of a given class?

2018-08-26 Thread boB Stepp
On Sun, Aug 26, 2018 at 6:10 PM Alan Gauld via Tutor wrote: > > On 26/08/18 23:38, boB Stepp wrote: > > > class SolitaireGame(): > > def __init__(self, name): > > self.name = name > > > Say I go with the aforementioned game with 13 separate scores

Re: [Tutor] How to have unique identifiers for multiple object instances of a given class?

2018-08-26 Thread boB Stepp
On Sun, Aug 26, 2018 at 7:48 PM Steven D'Aprano wrote: > > On Sun, Aug 26, 2018 at 05:38:52PM -0500, boB Stepp wrote: > > > I feel that I may be missing something truly obvious. I am pondering > > the design of a solitaire scorekeeper program. It is just mea

[Tutor] How to have unique identifiers for multiple object instances of a given class?

2018-08-26 Thread boB Stepp
s to persistently store these objects on disk upon program closure. TIA! -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to write a function which reads files

2018-08-08 Thread boB Stepp
On Wed, Aug 8, 2018 at 8:30 PM boB Stepp wrote: > > On Tue, Aug 7, 2018 at 9:13 AM Rafael Knuth wrote: Curses! Sorry, Chris! This should be: > > Chris Warrick wrote: > > > Also, consider using snake_case instead of PascalCase for your > > > function name, sinc

Re: [Tutor] How to write a function which reads files

2018-08-08 Thread boB Stepp
://www.python.org/dev/peps/pep-0008/ -- boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Questions about the formatting of docstrings

2018-07-27 Thread boB Stepp
On Fri, Jul 27, 2018 at 12:50 AM Steven D'Aprano wrote: > > On Thu, Jul 26, 2018 at 11:34:11PM -0500, boB Stepp wrote: > > (1) The author claims that reStructuredText is the official Python > > documentation standard. Is this true? If yes, is this something I > &g

[Tutor] Questions about the formatting of docstrings

2018-07-26 Thread boB Stepp
s to me that if type hinting is being used, then the ":type" info is redundant, so I wonder if special provision is made for avoiding this redundancy when using type hinting? TIA! -- boB ___ Tutor maillist - Tutor@python.org To unsubscri

Re: [Tutor] Wish to upgrade Python 3.6.5 to Python 3.6.6 for Linux Mint 19

2018-07-15 Thread boB Stepp
I added to the end of my .bashrc: export PATH="/home/bob/.pyenv/bin:$PATH" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)" This apparently allows pyenv's "shims" to take precedence in the search path for Python versions. Warning: On the page M

Re: [Tutor] Wish to upgrade Python 3.6.5 to Python 3.6.6 for Linux Mint 19

2018-07-15 Thread boB Stepp
I would leave it alone. This is what led me to my question, I could not find a "vetted 3.6.6". However, I will keep your suggested command in mind for the future. I have decided I am going to try out Mats' suggestion of pyenv. It seems clean, flexible, and does not mess wi

Re: [Tutor] Wish to upgrade Python 3.6.5 to Python 3.6.6 for Linux Mint 19

2018-07-14 Thread boB Stepp
On Sun, Jul 15, 2018 at 1:38 AM boB Stepp wrote: > > On Sat, Jul 14, 2018 at 11:52 PM boB Stepp wrote: > > > > On Sat, Jul 14, 2018 at 8:43 PM boB Stepp wrote: > > > > > > On Sat, Jul 14, 2018 at 8:23 PM Mats Wichmann wrote: > > > > > >

Re: [Tutor] Wish to upgrade Python 3.6.5 to Python 3.6.6 for Linux Mint 19

2018-07-14 Thread boB Stepp
On Sat, Jul 14, 2018 at 11:52 PM boB Stepp wrote: > > On Sat, Jul 14, 2018 at 8:43 PM boB Stepp wrote: > > > > On Sat, Jul 14, 2018 at 8:23 PM Mats Wichmann wrote: > > > > > > take a look at pyenv. should make it fairly easy. > > > > > >

Re: [Tutor] Wish to upgrade Python 3.6.5 to Python 3.6.6 for Linux Mint 19

2018-07-14 Thread boB Stepp
On Sat, Jul 14, 2018 at 8:43 PM boB Stepp wrote: > > On Sat, Jul 14, 2018 at 8:23 PM Mats Wichmann wrote: > > > > take a look at pyenv. should make it fairly easy. > > > > https://github.com/pyenv/pyenv > > This does look interesting. On the linked page, afte

Re: [Tutor] Wish to upgrade Python 3.6.5 to Python 3.6.6 for Linux Mint 19

2018-07-14 Thread boB Stepp
.7.8 example: $ pyenv install 2.7.8 Where and how does it get its Python installation? boB ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Wish to upgrade Python 3.6.5 to Python 3.6.6 for Linux Mint 19

2018-07-14 Thread boB Stepp
obvious choices: (1) Just stick with the current system Python 3 until an issue comes up that 3.6.6 fixes. (2) Wait on the system Python 3 to provide an update to Python 3.6.6. (3) Install into a virtual environment -- either compiling from source or the PPA route. Thanks, Jim! -- boB

  1   2   3   4   5   6   7   8   9   10   >