Re: [Tutor] Union

2019-08-12 Thread Jim
On 8/12/19 4:12 PM, Mats Wichmann wrote: On 8/12/19 2:50 PM, Jim wrote: I was reading the docs for PySimpbleGUI here: https://pysimplegui.readthedocs.io/en/latest/#building-custom-windows In the table of parameters for the Window() function for example the icon parameter the meaning is  Union

[Tutor] Union

2019-08-12 Thread Jim
of "Union". I don't recall seeing anything like it before. Thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Impersonation

2019-07-16 Thread Jim
On 7/15/19 9:36 PM, Jim wrote: Mats, Hopefully you recognize my email address as someone you have given advice concerning Python. Over the last month or so I have received at least 3 emails supposedly coming from you that I am sure you did not send. The from line is:  Mats Wichmann

[Tutor] Impersonation

2019-07-15 Thread Jim
, 2019 10:36 AM, Mats Wichmann wrote: Hope you are well. Just wanted to share something with you http://www.bt6q.lnhaxf.info/ I just wanted you to know that it seems someone is trying to impersonate you. Regards, Jim ___ Tutor maillist - Tutor

[Tutor] Consequences of removing python3-venv

2019-05-09 Thread Jim
on3.5-config 0 lrwxrwxrwx 1 root root 10 Jan 9 2017 /usr/bin/python3m -> python3.5m 0 lrwxrwxrwx 1 root root 17 Mar 23 2016 /usr/bin/python3m-config -> python3.5m-config So will allowing the update harm my virtual environments? I really don't wan

Re: [Tutor] Python 3.6 update?

2018-10-27 Thread Jim
On 10/25/18 5:30 PM, Mats Wichmann wrote: On 10/25/2018 03:07 PM, Jim wrote: Mint 18.1 Default python3 = 3.5 Python 3.6 installed for use by a virtual environment. Update manager just informed me of an update for python 3.6 to 3.6.7-1. When I started to install it, I got a dialog saying

[Tutor] Python 3.6 update?

2018-10-25 Thread Jim
will be removed python3-dev & python3-venv. I am wondering what will happen to the virtual environment I have installed that uses python 3.6. Will the 2 packages be replaced and the virtual environment continue to work or is there some other steps I will need to take. Regards,

Re: [Tutor] No module named uno in virtual environment

2018-09-09 Thread Jim
On 09/09/2018 01:29 PM, Mats Wichmann wrote: On 09/09/2018 10:49 AM, Jim wrote: ok, awkward naming issue. try openoffice-python instead? Unfortunately it produces the same result, no module uno found. I think all of the packages on pipy need the uno module to be installed to function. When

Re: [Tutor] No module named uno in virtual environment

2018-09-09 Thread Jim
On 09/08/2018 08:35 PM, Mats Wichmann wrote: On September 8, 2018 5:46:46 PM MDT, Jim wrote: On 09/08/2018 05:26 PM, Mats Wichmann wrote: On 09/07/2018 03:10 PM, Jim wrote: Mint 18.1 System python3 3.5.2 Python3-uno is available to the system python3. How can I make it available to python

Re: [Tutor] No module named uno in virtual environment

2018-09-08 Thread Jim
On 09/08/2018 05:26 PM, Mats Wichmann wrote: On 09/07/2018 03:10 PM, Jim wrote: Mint 18.1 System python3 3.5.2 Python3-uno is available to the system python3. How can I make it available to python 3.6.5 in a virtual environment I installed using venv? with your virtualenv activated, just

[Tutor] No module named uno in virtual environment

2018-09-07 Thread Jim
8, in import uno, re, zipfile, types, inspect, tempfile, shutil, subprocess ModuleNotFoundError: No module named 'uno' Thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How can I find a group of characters in a list of strings?

2018-07-25 Thread Jim
exiting the inner loop as soon as I find a letter is not in the string, but there must be a better way. I'd appreciate hearing about a better way to attack this. thanks, Jim If I only had to do this once, over only a million items (given today's CPU power), so I'd probably do something like

Re: [Tutor] How can I find a group of characters in a list of strings?

2018-07-25 Thread Jim
On 07/25/2018 07:43 PM, Steven D'Aprano wrote: On Wed, Jul 25, 2018 at 06:50:56PM -0500, Jim wrote: [...] I need to check and see if the letters 'OFHCMLIP' are one of the items in the list but there is no way to tell in what order the letters will appear. So I can't just search for the string

[Tutor] How can I find a group of characters in a list of strings?

2018-07-25 Thread Jim
loop as soon as I find a letter is not in the string, but there must be a better way. I'd appreciate hearing about a better way to attack this. thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https

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

2018-07-14 Thread Jim
. If you use a virtual environment you don't have to worry about breaking your system python. regards, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Need help combining elements of a list of lists

2018-07-11 Thread Jim
On 07/10/2018 11:03 PM, Mats Wichmann wrote: On 07/10/2018 09:09 PM, Steven D'Aprano wrote: On Tue, Jul 10, 2018 at 09:46:57PM -0500, Jim wrote: Say I have a list like ltrs and I want to print out all the possible 3 letter combinations. I want to combine letters from each inner list

Re: [Tutor] Need help combining elements of a list of lists

2018-07-11 Thread Jim
On 07/10/2018 10:09 PM, David Rock wrote: On Jul 10, 2018, at 22:04, David Rock wrote: On Jul 10, 2018, at 21:46, Jim wrote: ltrs = [['A', 'B'], ['C', 'D', 'E'], ['F', 'G', 'H', 'I']] A fairly straightforward way is to use nested loops: for l in ltrs[0]: ... for j in ltrs[1

[Tutor] Need help combining elements of a list of lists

2018-07-10 Thread Jim
]) #BEI thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Using pip

2018-07-05 Thread Jim
provides). Also depending on which version of python you are using (2 or 3) you may have to type pip3 instead of just pip. regards, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org

Re: [Tutor] Virtual environment can't find uno

2018-06-14 Thread Jim
On 06/14/2018 10:51 AM, Mats Wichmann wrote: On 06/13/2018 06:55 PM, Jim wrote: Running Linux Mint 18. I have python 3.6 running in a virtual environment. I want to use a package called oosheet to work with libreoffice calc. When I try to import it I get the following error: import oosheet

[Tutor] Virtual environment can't find uno

2018-06-13 Thread Jim
with no errors. python3-uno was installed using apt-get. How do I get python 3.6 in the virtual environment to find uno? Thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Need help with a virtual environment mess

2018-05-07 Thread Jim
On 05/07/2018 12:02 PM, Mats Wichmann wrote: On 05/07/2018 10:16 AM, Jim wrote: My understanding of VE's, based on some feedback from here, is you install install the python you want on the system then use it to install your VE. Then you install what ever you need to the VE. In my case I had

Re: [Tutor] Need help with a virtual environment mess

2018-05-07 Thread Jim
On 05/06/2018 05:16 PM, boB Stepp wrote: On Sun, May 6, 2018 at 11:05 AM, Jim <jf_byr...@comcast.net> wrote: In a prior thread you guys helped me fix a problem with pip after I upgraded an installed version of python 3.6 on my Mint 18 system. Pip would not run in my python 3.6 v

[Tutor] Need help with a virtual environment mess

2018-05-06 Thread Jim
ll the python3-tk package >>> If I go to synaptic and install the python3-tk it installs version 3.6.5 of the package and I can still not import tkinter in env with python 3.5.2, but I can in env36 with python 3.6.5. I don't know if it makes a

Re: [Tutor] pip stopped working gives error

2018-05-04 Thread Jim
On 05/03/2018 03:48 PM, Mats Wichmann wrote: On 05/03/2018 02:27 PM, Jim wrote: I heard distutils may have been split out... see if you have a package python3-distutils and if not installed, can you install it? I have: //usr/lib/python3.5/distutils and //usr/lib/python3.6/distutils

Re: [Tutor] pip stopped working gives error

2018-05-04 Thread Jim
On 05/03/2018 03:40 PM, Zachary Ware wrote: On Thu, May 3, 2018 at 2:10 PM, Jim <jf_byr...@comcast.net> wrote: I have python 3.6 installed in a virtual environment on Mint 18. Today I wanted to use pip and got this error when I tried to use it. (env36) jfb@jims-mint18 ~ $ pip help Tra

Re: [Tutor] pip stopped working gives error

2018-05-03 Thread Jim
On 05/03/2018 02:42 PM, Mats Wichmann wrote: On 05/03/2018 01:10 PM, Jim wrote: I have python 3.6 installed in a virtual environment on Mint 18. Today I wanted to use pip and got this error when I tried to use it.  (env36) jfb@jims-mint18 ~ $ pip help Traceback (most recent call last

[Tutor] pip stopped working gives error

2018-05-03 Thread Jim
nvironment I have setup. It has worked in the past as I have installed pylint and pykeyboard with it. As I type this I just remembered Mint updated python 3.6 earlier today. So now I suspect the update is involved. Has anyone else experienced th

Re: [Tutor] Need help with FileNotFoundError

2018-04-26 Thread Jim
On 04/26/2018 03:27 PM, Danny Yoo wrote: copy('~/Documents/Courses/ModernBootcamp/story.txt', '~/Documents/Courses/ModernBootcamp/story_copy.txt') Hi Jim, You may need to use os.path.expanduser, as "tilde expansion" isn't something that's done automatically. This is referenced i

[Tutor] Need help with FileNotFoundError

2018-04-26 Thread Jim
py FirstProgram guessing_game.py list_methods.py smiley_faces.py while_loop.py I must be doing something wrong path-wise, but I can't seem to figure it out. Any help appreciated. Regards, Jim ___ Tutor maillist - Tutor@python.org To u

Re: [Tutor] Virtual environment question

2018-03-13 Thread Jim
On 03/12/2018 08:44 PM, eryk sun wrote: On Tue, Mar 13, 2018 at 1:31 AM, Jim <jf_byr...@comcast.net> wrote: On 03/12/2018 04:04 AM, eryk sun wrote: On Mon, Mar 12, 2018 at 12:44 AM, Jim <jf_byr...@comcast.net> wrote: home = /usr/bin include-system-site-packages = false [...]

Re: [Tutor] Virtual environment question

2018-03-12 Thread Jim
On 03/12/2018 04:04 AM, eryk sun wrote: On Mon, Mar 12, 2018 at 12:44 AM, Jim <jf_byr...@comcast.net> wrote: home = /usr/bin include-system-site-packages = false [...] resp = opener.open(request, timeout=self._timeout) File "/usr/lib/python3.5/urllib/request.py", l

Re: [Tutor] Virtual environment question

2018-03-11 Thread Jim
On 03/11/2018 05:54 PM, Cameron Simpson wrote: Note: This message came straight to me and I haven't seen it on the list yet. Hopefully this reply will make it to the list. On 11Mar2018 15:52, jim <jf_byr...@comcast.net> wrote: It was my understanding that using a virtual environmen

[Tutor] Virtual environment question

2018-03-11 Thread Jim
arted from a virtual environment. Regards, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] When to use classes

2017-08-20 Thread Jim
but ultimately limited, scope of Hypercard. In one sense Hypercard is still alive. Check out Livecode at livecode.com Regards, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Using venv

2017-05-29 Thread Jim
On 05/29/2017 08:09 PM, Ben Finney wrote: You should probably disregard this message as I have since solved the problem I was asking about. I originally wrote this message on 01/27/17, how it make it back to the list I don't know. Regards, Jim Jim <jf_byr...@comcast.net> writes:

Re: [Tutor] No file or directory error using subprocess and Popen

2017-05-15 Thread Jim
On 05/15/2017 08:33 PM, Jim wrote: On 05/15/2017 02:48 AM, Steven D'Aprano wrote: On Sun, May 14, 2017 at 10:57:57PM -0500, Jim wrote: I am running this on Mint 18. This is the third script I have written to open and position windows in workspaces. The first two work, but trying to open ebook

Re: [Tutor] No file or directory error using subprocess and Popen

2017-05-15 Thread Jim
On 05/15/2017 07:03 AM, Peter Otten wrote: Jim wrote: I am running this on Mint 18. This is the third script I have written to open and position windows in workspaces. The first two work, but trying to open ebook-viewe r (calibre) with a specific book produces the following error. If I run

Re: [Tutor] No file or directory error using subprocess and Popen

2017-05-15 Thread Jim
On 05/14/2017 11:19 PM, boB Stepp wrote: On Sun, May 14, 2017 at 10:57 PM, Jim <jf_byr...@comcast.net> wrote: I am running this on Mint 18. This is the third script I have written to open and position windows in workspaces. The first two work, but trying to open ebook-viewe r (c

Re: [Tutor] No file or directory error using subprocess and Popen

2017-05-15 Thread Jim
On 05/15/2017 02:48 AM, Steven D'Aprano wrote: On Sun, May 14, 2017 at 10:57:57PM -0500, Jim wrote: I am running this on Mint 18. This is the third script I have written to open and position windows in workspaces. The first two work, but trying to open ebook-viewe r (calibre) with a specific

[Tutor] No file or directory error using subprocess and Popen

2017-05-14 Thread Jim
s does not have a length limit in linux. Could someone tell me how to correct the above error. Thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] General question rgrd. usage of libraries

2017-05-05 Thread Jim
is a Python API to google sheets but when I had a look, it seemed fairly complex. I haven't tried it yet but depending on what you need to do this library may be what you need: https://pypi.python.org/pypi/gspread. Regards, Jim ___

Re: [Tutor] Can a virtual environment be renamed?

2017-04-17 Thread Jim
On 04/16/2017 11:24 AM, Chris Warrick wrote: On 16 April 2017 at 18:16, Jim <jf_byr...@comcast.net> wrote: On 04/16/2017 10:10 AM, Chris Warrick wrote: On 16 April 2017 at 16:45, Jim <jf_byr...@comcast.net> wrote: My system python is 2.7.12 so I created a virtual environmen

Re: [Tutor] Can a virtual environment be renamed?

2017-04-17 Thread Jim
On 04/16/2017 02:18 PM, Mats Wichmann wrote: On 04/16/2017 10:16 AM, Jim wrote: On 04/16/2017 10:10 AM, Chris Warrick wrote: On 16 April 2017 at 16:45, Jim <jf_byr...@comcast.net> wrote: My system python is 2.7.12 so I created a virtual environment using venu to run 3.5.2. I put it in

Re: [Tutor] Can a virtual environment be renamed?

2017-04-16 Thread Jim
On 04/16/2017 10:10 AM, Chris Warrick wrote: On 16 April 2017 at 16:45, Jim <jf_byr...@comcast.net> wrote: My system python is 2.7.12 so I created a virtual environment using venu to run 3.5.2. I put it in /home/jfb/EVs/env. Now I would like to try 3.6 and put it in env36. Is it po

[Tutor] Can a virtual environment be renamed?

2017-04-16 Thread Jim
My system python is 2.7.12 so I created a virtual environment using venu to run 3.5.2. I put it in /home/jfb/EVs/env. Now I would like to try 3.6 and put it in env36. Is it possible to change env to env35 for 3.5.2 without breaking things? Thanks, Jim

Re: [Tutor] Please explain part of this code

2017-02-15 Thread Jim
On 02/15/2017 04:56 PM, Alan Gauld via Tutor wrote: On 15/02/17 22:37, Jim wrote: self.choices = { "1": self.show_notes, "2": self.search_notes, "3": self.add_note, "4"

[Tutor] Please explain part of this code

2017-02-15 Thread Jim
tand what is going on with "action". All of the choices to the right of the :'s are methods defined elsewhere in the code. So I guess that will call whatever method is associated with a choice. I don't recall ever seeing this before. What is this technique called? Thanks, Jim

Re: [Tutor] How to interact with the result of subprocess.call()

2017-02-01 Thread Jim
On 12/26/2016 04:48 AM, Peter Otten wrote: Jim Byrnes wrote: Is there a way to terminate subprocess and still keep LO open so pykeyboard can send it keystrokes from the script? In theory you can open Libre Office from another thread, wait a moment and then send it keystrokes from the main

Re: [Tutor] Using venv

2017-01-28 Thread Jim
On 01/27/2017 04:49 PM, Cameron Simpson wrote: On 27Jan2017 15:47, jim <jf_byr...@comcast.net> wrote: It has been suggested to me that I should use a virtual environment and venv would be a good choice. I've read through PEP405 and this link [1]. Though some of it seems a little confusing

[Tutor] Using venv

2017-01-27 Thread Jim
macros and evaluating pyspread for it's macro capability. Would modules installed in my venv be available to the spreadsheet programs? Thanks, Jim [1] https://realpython.com/blog/python/python-virtual-environments-a-primer/ ___ Tutor maillist

Re: [Tutor] How to interact with the result of subprocess.call()

2016-12-25 Thread Jim Byrnes
On 12/24/2016 07:43 PM, Alan Gauld via Tutor wrote: On 25/12/16 01:21, Jim Byrnes wrote: I am not trying to automate libreoffice using subprocess. No, but you are trying to automate LO from within Python by sending it keystrokes and that's not easy. That's why I previously asked whether you

Re: [Tutor] How to interact with the result of subprocess.call()

2016-12-24 Thread Jim Byrnes
On 12/24/2016 05:10 PM, Danny Yoo wrote: On Sat, Dec 24, 2016 at 2:40 PM, Jim Byrnes <jf_byr...@comcast.net> wrote: subprocess.call(['libreoffice', '/home/jfb/test.ods']) k.tap_key(k.enter_key) k.tap_key(k.enter_key) If I run the above code, libreoffice opens the test.ods spreadsheet the

[Tutor] How to interact with the result of subprocess.call()

2016-12-24 Thread Jim Byrnes
. How can I continue to send keystrokes to libreoffice from the script once it has been opened by subprocess.call()? Thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman

Re: [Tutor] Open a libreoffice calc file in Python

2016-12-22 Thread Jim Byrnes
On 12/22/2016 03:54 AM, Alan Gauld via Tutor wrote: On 22/12/16 03:37, Jim Byrnes wrote: Python 3.4 on Ubuntu If I was going to open a libreoffice calc file from the terminal I would go: libreoffice --calc /home/path/to/myfile.ods. How would I do this from Python? Others have advised how

[Tutor] Open a libreoffice calc file in Python

2016-12-21 Thread Jim Byrnes
Python 3.4 on Ubuntu If I was going to open a libreoffice calc file from the terminal I would go: libreoffice --calc /home/path/to/myfile.ods. How would I do this from Python? Thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe

Re: [Tutor] comp.lang.python on gmane

2016-10-28 Thread Jim Byrnes
On 10/27/2016 09:54 PM, Random832 wrote: On Thu, Oct 27, 2016, at 20:40, Jim Byrnes wrote: Is comp.lang.python available on gmane? I've googled and found references to it being on gmane but I can't find it there. I'd like to use gmane because Comcast doesn't do usenet anymore. I don't know

Re: [Tutor] comp.lang.python on gmane

2016-10-27 Thread Jim Byrnes
On 10/27/2016 08:09 PM, Danny Yoo wrote: On Thu, Oct 27, 2016 at 5:40 PM, Jim Byrnes <jf_byr...@comcast.net> wrote: Is comp.lang.python available on gmane? I've googled and found references to it being on gmane but I can't find it there. I'd like to use gmane because Comcast doesn't do

[Tutor] comp.lang.python on gmane

2016-10-27 Thread Jim Byrnes
Is comp.lang.python available on gmane? I've googled and found references to it being on gmane but I can't find it there. I'd like to use gmane because Comcast doesn't do usenet anymore. Thanks, Jim ___ Tutor maillist - Tutor@python.org

[Tutor] Accessing Yahoo with Python?

2016-10-08 Thread Jim Byrnes
re I get the data I want. The part of my program that retrieves the data from Yahoo has not changed in quite a while. Is it possible that I have exceeded a Yahoo limit on requests from one IP address? Test data I am using gets the historical info on 3 stocks over a 3 day period. Thanks, Jim

Re: [Tutor] pip says no downloads for PyMedia

2016-09-13 Thread Jim Byrnes
On 09/13/2016 04:01 PM, boB Stepp wrote: On Tue, Sep 13, 2016 at 2:17 PM, Jim Byrnes <jf_byr...@comcast.net> wrote: On 09/12/2016 07:59 PM, Jim Byrnes wrote: On 09/12/2016 06:06 PM, boB Stepp wrote: On Sep 10, 2016 7:20 PM, "Jim Byrnes" <jf_byr...@comcast.net> wrote:

Re: [Tutor] pip says no downloads for PyMedia

2016-09-13 Thread Jim Byrnes
On 09/12/2016 07:59 PM, Jim Byrnes wrote: On 09/12/2016 06:06 PM, boB Stepp wrote: On Sep 10, 2016 7:20 PM, "Jim Byrnes" <jf_byr...@comcast.net> wrote: I am using python3 could that be the problem? I looked but couldn't find any info on what version of python is n

Re: [Tutor] pip says no downloads for PyMedia

2016-09-12 Thread Jim Byrnes
On 09/12/2016 06:06 PM, boB Stepp wrote: On Sep 10, 2016 7:20 PM, "Jim Byrnes" <jf_byr...@comcast.net> wrote: I am using python3 could that be the problem? I looked but couldn't find any info on what version of python is needed. I went to pymedia.org. The copyrig

[Tutor] pip says no downloads for PyMedia

2016-09-10 Thread Jim Byrnes
line 277, in find_requirement raise DistributionNotFound('No distributions at all found for %s' % req) pip.exceptions.DistributionNotFound: No distributions at all found for PyMedia I am using python3 could that be the problem? I looked but couldn't find any info on what ver

Re: [Tutor] tkinter/sqlite3?

2016-08-26 Thread Jim Byrnes
On 08/26/2016 04:22 AM, Alan Gauld via Tutor wrote: On 26/08/16 02:34, Jim Byrnes wrote: Exception in Tkinter callback Traceback (most recent call last): ... File "tk_pwds.py", line 56, in fill_accounts_lb cur.execute('''SELECT Account FROM pwds WHERE Category=? ORDER

Re: [Tutor] tkinter/sqlite3?

2016-08-26 Thread Jim Byrnes
On 08/26/2016 02:03 AM, Peter Otten wrote: Jim Byrnes wrote: I am working with Python 3.4.3 on Ubuntu 14.04. I am learning tkinter so I decided to rewrite a program I had written in pythoncard in tkinter. I found that a sqlite3 SELECT statement that works in pythoncard throws an error

[Tutor] tkinter/sqlite3?

2016-08-25 Thread Jim Byrnes
ere it is coming up with the 8 bindings it said are supplied? Thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Regex/Raw String confusion

2016-08-04 Thread Jim Byrnes
On 08/04/2016 03:27 AM, Alan Gauld via Tutor wrote: On 04/08/16 02:54, Jim Byrnes wrote: Is the second example a special case? phoneNumRegex = re.compile(r'(\(\d\d\d\)) (\d\d\d-\d\d\d\d)') I ask because it produces the same results with or without the ' r '. That's because in this specific

[Tutor] Regex/Raw String confusion

2016-08-03 Thread Jim Byrnes
'(\(\d\d\d\)) (\d\d\d-\d\d\d\d)') mo = phoneNumRegex.search('My phone number is: (415) 555-4242.') print(mo.group(1)) print() print(mo.group(2)) Both examples work, but one place he says you can't escape raw strings and the other he says you can. What am I missing here? Regards, Jim

Re: [Tutor] OOP help needed

2016-07-27 Thread Jim Byrnes
On 07/27/2016 04:04 AM, Alan Gauld via Tutor wrote: On 27/07/16 04:44, Jim Byrnes wrote: OOP has always driven me crazy. I read the material and follow the examples until I feel I understand them, but when I try to implement it I end up with an error filled mess. That suggests that its

Re: [Tutor] OOP help needed

2016-07-27 Thread Jim Byrnes
On 07/27/2016 03:12 AM, Peter Otten wrote: Jim Byrnes wrote: OOP has always driven me crazy. I read the material and follow the examples until I feel I understand them, but when I try to implement it I end up with an error filled mess. So I decided to give it another try. When I got

Re: [Tutor] OOP help needed

2016-07-27 Thread Jim Byrnes
On 07/26/2016 11:38 PM, Ben Finney wrote: Jim Byrnes <jf_byr...@comcast.net> writes: So I decided to give it another try. When I got to the chapter on tkinter I decided to solve all the exercises using OOP even though the book solutions did not use OOP. Hmm, that sounds ill advised

[Tutor] OOP help needed

2016-07-26 Thread Jim Byrnes
t see the difference. Thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Variable in tkinter?

2016-07-24 Thread Jim Byrnes
On 07/24/2016 02:08 PM, Alan Gauld via Tutor wrote: On 23/07/16 16:38, Jim Byrnes wrote: # the views frame = tkinter.Frame(window) frame.pack() button = tkinter.Button(frame, text='Up', command=click_up) button.pack() button = tkinter.Button(frame, text='Down', command=click_down) button.pack

[Tutor] Variable in tkinter?

2016-07-23 Thread Jim Byrnes
the program does work. Could someone explain to me why it works? Regards, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Using python 3 on Ubuntu 14.04

2015-12-24 Thread Jim Byrnes
On 12/24/2015 04:03 PM, Ben Finney wrote: Jim Byrnes <jf_byr...@comcast.net> writes: Thanks for all the info guys. I got myself confused because I thought that python 3 was the default for Ubuntu 14.04, but it is just installed by default. Even if that were true, the ‘python’ c

Re: [Tutor] OT: How to automate user interactions with GUI elements of closed-source programs?

2015-12-24 Thread Jim Byrnes
Chrome. Both also have user forums. Regards, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Using python 3 on Ubuntu 14.04

2015-12-23 Thread Jim Byrnes
n programs with it? Thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Calculation error with a simple program

2015-12-12 Thread Jim Gallaher
. For example, if I put in a value of 1, it will output 752.12 as the sub total and 753.12 as the grand total. It's off by 1 on sub total and 2 on grand total. Thanks in advance! Jim Gallaher # Car Salesman Calculator # User enters the base price of the car and the program adds tax, license

Re: [Tutor] Calculation error with a simple program

2015-12-12 Thread Jim Gallaher
Hi Alan, I'm 100 percent sure I'm wrong. :-) I verified it when I fixed the mistake. The problem was it was adding in the basePrice and the fixed rates/percentages each time. So I figured it out when Ian said something about that. Thanks for everyone's help! :-)

[Tutor] method conflict?

2015-07-02 Thread Jim Mooney Py3.4.3winXP
def getdata(self): print(self.data) MyClass.setdata function MyClass.setdata at 0x026CACD8 id(MyClass.setdata) 40676568 f = MyClass() g = MyClass() id(f.setdata) 43576616 id(g.setdata) 43576616 d = MyClass() id(d.setdata) 43576616 -- Jim

[Tutor] Are the methods in a class copied or just linked to?

2015-07-02 Thread Jim Mooney Py3.4.3winXP
When an instance uses a class method, does it actually use the method that is in the class object's memory space, or is the method copied to the instance? -- Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options

[Tutor] Is there a way to use with across suite boundaries?

2015-05-22 Thread Jim Mooney Py3.4.3winXP
{}/td.format(*linelist) print(formatted_string, file=ht) print('/tr', file=ht) if __name__ == __main__: make_lines() -- Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman

Re: [Tutor] Getting import to use a variable name

2015-05-21 Thread Jim Mooney Py3.4.3winXP
.__doc__) Thanks. That will save a lot of scrolling - and saving scrolling and typing is half the battle ;') -- Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Getting import to use a variable name

2015-05-19 Thread Jim Mooney Py3.4.3winXP
in useful_helps: print(helper.upper() + ':', helper.__doc__, '\n') -- Jim After not doing dishes for a week and washing spoon after spoon, fork after fork, knife after knife - I suddenly understand the mathematical concept of infinity, which is just one more damn thing after another

Re: [Tutor] Getting import to use a variable name

2015-05-19 Thread Jim Mooney Py3.4.3winXP
importlib importlib.__import__(x) module 'shutil' from 'C:\\Python34\\lib\\shutil.py' If I can get dir to accept x I can parse the output to get rid of the __xxx stuff and print it out. -- Jim After not doing dishes for a week and washing spoon after spoon, fork after fork, knife after knife - I

Re: [Tutor] Getting import to use a variable name

2015-05-19 Thread Jim Mooney Py3.4.3winXP
On 19 May 2015 at 17:25, Jim Mooney Py3.4.3winXP cybervigila...@gmail.com wrote: If I can get dir to accept x I can parse the output to get rid of the __xxx stuff and print it out. By that I mean dir will give me a list of strings I can then use __doc__ on to get all useful help items

Re: [Tutor] Terminology question

2015-05-16 Thread Jim Mooney Py3.4.3winXP
ZeroDivisionError('Here I am') def call_error(): try: make_error() except: print(How do I get the 'Here I am' message to print in the calling routine?) call_error() How do I get the 'Here I am' message to print in the calling routine? -- Jim What a rotten, failed experiment

Re: [Tutor] Terminology question

2015-05-15 Thread Jim Mooney Py3.4.3winXP
the docs but it didn't work. Could you provide a simple example? Sometimes the docs are heavy slogging if you don't already know what's what ;') -- Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https

[Tutor] Terminology question

2015-05-14 Thread Jim Mooney Py3.4.3winXP
: make_table(minimum, maximum, rows, columns) except ValueError as err: # CATCH FUNCTION ERROR HERE INSTEAD OF IN FUNCTION print(Enter min before max.) else: print('Nothing to do.') -- Jim ___ Tutor maillist - Tutor@python.org

Re: [Tutor] pointer puzzlement

2015-05-08 Thread Jim Mooney Py3.4.3winXP
On 7 May 2015 at 18:42, Dave Angel da...@davea.name wrote: Python doesn't have pointers So what is the difference between a python name and a pointer? I'm a bit fuzzy on that. -- Jim What a rotten, failed experiment. I'll start over. Maybe dogs instead of monkeys this time. --God

[Tutor] pointer puzzlement

2015-05-07 Thread Jim Mooney Py3.4.3winXP
): K += 10 return 'the ID is', id(K), K *** Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32. *** testid() ('the ID is', 505991936, 20) testid() ('the ID is', 505991936, 20) testid() ('the ID is', 505991936, 20) -- Jim

Re: [Tutor] pointer puzzlement

2015-05-07 Thread Jim Mooney Py3.4.3winXP
': 'bonkitem', 'clonk': 'clonkitem'}) testid('spam') ('the ID is', 18263656, {'bonk': 'bonkitem', 'clonk': 'clonkitem', 'spam': 'spamitem'}) -- Jim What a rotten, failed experiment. I'll start over. Maybe dogs instead of monkeys this time. --God

Re: [Tutor] key detection

2015-05-06 Thread Jim Mooney Py3.4.3winXP
. -- Jim What a rotten, failed experiment. I'll start over. Maybe dogs instead of monkeys this time. --God ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] key detection

2015-05-06 Thread Jim Mooney Py3.4.3winXP
On 5 May 2015 at 21:51, Mark Lawrence breamore...@yahoo.co.uk wrote: On 06/05/2015 05:30, Jim Mooney Py3.4.3winXP wrote: On 5 May 2015 at 18:32, Steven D'Aprano st...@pearwood.info wrote: https://code.activestate.com/recipes/577977-get-single-keypress/ That only has a stub for Linux

Re: [Tutor] key detection

2015-05-06 Thread Jim Mooney Py3.4.3winXP
On 6 May 2015 at 10:41, Jim Mooney Py3.4.3winXP cybervigila...@gmail.com wrote: I went a further step from the recipes linked to above and got here https://pypi.python.org/pypi/readchar I think that's the one that failed for me Addendum. That only failed in python 3.4. It worked fine

Re: [Tutor] key detection

2015-05-05 Thread Jim Mooney Py3.4.3winXP
decided to just use msvcrt for now, which is quite simple, and put in a try block for win or linux, when I dual boot linux, which I'm working on. (solving the usual driver problems for a toshiba laptop) -- Jim What a rotten, failed experiment. I'll start over. Maybe dogs instead of monkeys this time

Re: [Tutor] key detection

2015-05-05 Thread Jim Mooney Py3.4.3winXP
.py, line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2468: character maps to undefined -- Jim What a rotten, failed experiment. I'll start over. Maybe dogs instead of monkeys this time

Re: [Tutor] key detection

2015-05-05 Thread Jim Mooney Py3.4.3winXP
On 5 May 2015 at 16:47, Jim Mooney Py3.4.3winXP cybervigila...@gmail.com wrote: But that didn't work. How can I get a printout of setup errors so I can post them? I remembered how to copy the DOS console. Here is the error. Error wasn't in setup.py so that wouldn't have worked anyway. C

Re: [Tutor] key detection

2015-05-05 Thread Jim Mooney Py3.4.3winXP
-character-reading-from-stdin/ Anyway, I set up msvcrt for now until I install linux - I'm not interested in the program I mentioned, per se, just the error message - mainly to know, generally, what sort of thing it's choking on. Errors are useful to know. -- Jim

  1   2   3   4   5   6   >