[Tutor] for loop question

2012-07-04 Thread Jim
Hello Friends, I apologize for being such a bother. This problem has been evading me all day. Can you please give me a hint as to why I cannot put the variable UpperCaseSentence outside of the for loop? I can do it in other instances but not in this one. Thank you so much, Jim #Main function

[Tutor] Using venv

2017-01-27 Thread Jim
ffice calc 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/ ___

Re: [Tutor] Using venv

2017-01-28 Thread Jim
On 01/27/2017 04:49 PM, Cameron Simpson wrote: On 27Jan2017 15:47, jim 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 to me, I'm sure I

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

[Tutor] Please explain part of this code

2017-02-15 Thread Jim
ods require parameters) to the variable. I sort of understand 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

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] 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] 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 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 possible to change env to env35 for

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 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

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 wrote: On 04/16/2017 10:10 AM, Chris Warrick wrote: On 16 April 2017 at 16:45, Jim 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

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

2017-05-05 Thread Jim
There 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 _

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

2017-05-14 Thread Jim
d()) wid = wid[len(wid) - 11 : len(wid) - 3] x = '2540' #'1924' y = '537' print('***calibre***') subprocess.call(['xdotool', 'windowmove', str(wid), x, y]) I did some googling and it seems that subprocess 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] 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 spe

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 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

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 the

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

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 writes: It has been suggested

Re: [Tutor] When to use classes

2017-08-20 Thread Jim
e ability to create powerful, full featured GUIs has trumped the easy to use, 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

[Tutor] Virtual environment question

2018-03-11 Thread Jim
I started 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] 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 wrote: It was my understanding that using a virtual environment kept everything isolat

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 wrote: home = /usr/bin include-system-site-packages = false [...] resp = opener.open(request, timeout=self._timeout) File "/usr/lib/python3.5/urllib/request.py", line 466, in open This is norma

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 wrote: On 03/12/2018 04:04 AM, eryk sun wrote: On Mon, Mar 12, 2018 at 12:44 AM, Jim wrote: home = /usr/bin include-system-site-packages = false [...] resp = opener.open(request, timeout=self._timeout

[Tutor] Need help with FileNotFoundError

2018-04-26 Thread Jim
py list_comps.py __pycache__ unlucky_numbers.py dictionarys.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 _

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 automa

[Tutor] pip stopped working gives error

2018-05-03 Thread Jim
tual environment 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 exper

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

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 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

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, but no

[Tutor] Need help with a virtual environment mess

2018-05-06 Thread Jim
tkinter', please install 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.

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 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 virtual environment. The fix was to use

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

[Tutor] Virtual environment can't find uno

2018-06-13 Thread Jim
runs 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] 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

Re: [Tutor] Using pip

2018-07-05 Thread Jim
minal (which ever your OS 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

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

2018-07-10 Thread Jim
) #ADG print(ltrs[0][0]+ltrs[1][2]+ltrs[2][1]) #AEG . . . print(ltrs[0][1]+ltrs[1][2]+ltrs[2][3]) #BEI thanks, 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 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 fai

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 bu

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

2018-07-14 Thread Jim
raries. 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

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

2018-07-25 Thread Jim
g a bunch of if statements 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 ___ Tutor maillist - Tutor@python.org To

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 s

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

2018-07-25 Thread Jim
over each item using a bunch of if statements 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&#

[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] 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

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-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

[Tutor] Python 3.6 update?

2018-10-25 Thread Jim
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] 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] 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'

[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

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 The

[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] 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] Problem creating a search

2010-01-30 Thread jim serson
Hi I am pretty new to python and programming in general. I am trying to create a search that takes a user input for a file location and user input to find a group of numbers or a phrase in that file count how many times it appears then display it. I have gone through a tutorials and searched I/

[Tutor] Shashwat Anand you helped with search

2010-02-02 Thread jim serson
I am trying to have the search return several numbers or words in a single sentences now. I don't know if I am using the wrong format I am trying to use the split method because I thought I could return several parts of a sentence with it. For example if it had 1 2 3 4 5 I thought I could sear

[Tutor] running split and count + looping to check for numbers in same line

2010-02-10 Thread jim serson
I am getting an error when I try and run split and count I seem to get it to work with one or the other but not together. python wants a character buffer but I am not sure how to use it. I would also like to use readline to check and see if several numbers are in the same line but I think

Re: [Tutor] running split and count + looping to check for numbers in same line

2010-02-10 Thread jim serson
Thanks for the information > Date: Wed, 10 Feb 2010 21:50:53 -0500 > Subject: Re: [Tutor] running split and count + looping to check for numbers > in same line > From: ken...@tds.net > To: fubarni...@hotmail.com > CC: tutor@python.org > > On Wed, Feb 10, 2010 at 6:

[Tutor] Using and

2010-02-21 Thread jim serson
Can anyone tell me if I can have my program check to see if something is true the add to count For example something like if c_1 and c_2 and c_3 true: count + 1 or if I can use it after splitting an input the problem is the input is variable so I don't know if I can do such a thi

Re: [Tutor] Guess my number? Guess what's wrong!

2010-04-17 Thread Jim Byrnes
.." guess = int(raw_input("Take a guess: ")) tries += 1 Move the above two lines to align with "else" so they become part of the while loop. print "You guessed it! The number was", the_number print "and it only took you", tries, "trie

[Tutor] PIL problem

2010-05-07 Thread Jim Byrnes
ortError: No module named ImageTk What have I gotten wrong? Thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] PIL problem

2010-05-07 Thread Jim Byrnes
Martin Walsh wrote: Jim Byrnes wrote: Running Unbuntu 9.10. The Synaptic Pkg Mgr reports python-imaging - 1.1.6-3ubuntu1 - Python Imaging Library is installed. But trying to import PhotoImage gives these results: from ImageTk import PhotoImage Traceback (most recent call last): File

Re: [Tutor] PIL problem

2010-05-07 Thread Jim Byrnes
Alex Clark wrote: On 2010-05-07, Jim Byrnes wrote: Running Unbuntu 9.10. The Synaptic Pkg Mgr reports python-imaging - 1.1.6-3ubuntu1 - Python Imaging Library is installed. But trying to import PhotoImage gives these results: from ImageTk import PhotoImage Traceback (most recent call last

Re: [Tutor] Trying to get this to work - attached is the source code

2010-05-17 Thread Jim Byrnes
er entry. I would guess that this means he types the program from the book, saves it and then runs it. I often do this also, I find that it slows me down and I tend to pay more attention to what I am reading. Regards, Jim Walter ___ Tut

[Tutor] OOP clarification needed

2010-06-01 Thread Jim Byrnes
is the relationship between kind=Toplevel in the first line and win=kind() further down. Isn't "kind" a variable and "kind()" a method? I've probable overlooked something fundamental but a explanation would be appreciated. Regards, Jim __

Re: [Tutor] OOP clarification needed

2010-06-02 Thread Jim Byrnes
Steve Willoughby wrote: On Tue, Jun 01, 2010 at 03:19:17PM -0500, Jim Byrnes wrote: def viewer(imgdir, kind=Toplevel, cols=None): win = kind() What is the relationship between kind=Toplevel in the first line and win=kind() further down. Isn't "kind" a variable and &q

Re: [Tutor] OOP clarification needed

2010-06-02 Thread Jim Byrnes
Alan Gauld wrote: "Jim Byrnes" wrote Whenever I teach myself a new language I have great difficulty understanding the nuts and bolts of it's OO implementation. Do you understand the OO concepts OK? Is it only the language semantics you struggle with or the underlying O

Re: [Tutor] OOP clarification needed

2010-06-02 Thread Jim Byrnes
fault value and the name of the inner variable, I would say it is expected to produce a window object, so any function or class that returns a window object will be suitable. I completely overlooked this expectation, which led to my confusion. Thanks for the explanation. Regards, Jim ___

[Tutor] Tkinter - master attribute

2010-06-08 Thread Jim Byrnes
r example is it similar to Buttton(text='spam) where text in this case has special meaning. I've goolged and found references to "widgets master attributes" but nothing to really explain it. Could someone point me to a good reference so that I could bette

Re: [Tutor] Tkinter - master attribute

2010-06-15 Thread Jim Byrnes
Alan Gauld wrote: "Jim Byrnes" wrote in When reading code examples I see things like theframe.master.title('spam) def __init__(self, master): frame = Frame(master) When I encounter these I tend to get bogged down trying to decide if "master" has special mean

Re: [Tutor] Tkinter - master attribute

2010-06-16 Thread Jim Byrnes
learning Python. If I get the time I will try to track this down further now that you have piqued my curiosity. HTH, It does, I finally feel like I have a handle on it. Thanks for your time and patience. Regards, Jim Alan G. ___ Tu

[Tutor] os.startfile?

2010-06-24 Thread Jim Byrnes
I am trying to run an example program that contains the line os.startfile('socket-nongui.py') which is Windows only. What would be the command to use on Linux? All files are in the same folder. Thanks, Jim ___ Tutor maillist - Tutor@

Re: [Tutor] os.startfile?

2010-06-24 Thread Jim Byrnes
Nethirlon wrote: On Thu, Jun 24, 2010 at 7:36 PM, Jim Byrnes wrote: I am trying to run an example program that contains the line os.startfile('socket-nongui.py') which is Windows only. What would be the command to use on Linux? All files are in the same folder. Th

Re: [Tutor] Help with choices for new database program

2010-07-03 Thread Jim Byrnes
. It seems to have ended in April without a clear resolution. So is there a package available so I can use the Ubuntu package manager to install it? Thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Help with choices for new database program

2010-07-04 Thread Jim Byrnes
Martin Walsh wrote: On 07/03/2010 10:25 AM, Jim Byrnes wrote: Jeff Johnson wrote: [snip] http://dabodev.com/ Please check it out. And go to www.leafe.com and subscribe to the dabo-user email list. I would like to try out Dabo, but I don't see it in the Ubuntu repositories and I

[Tutor] Path?

2010-07-11 Thread Jim Byrnes
files in the current directory? Thanks, Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Path?

2010-07-13 Thread Jim Byrnes
Steven D'Aprano wrote: My apologizes to Steven and the list, when I replied originally I messed up and sent it to him privately which was not my intention. > On Mon, 12 Jul 2010 03:42:28 am Jim Byrnes wrote: >> I am running Ubuntu. I downloaded the source code examples f

Re: [Tutor] Path?

2010-07-13 Thread Jim Byrnes
Adam Bark wrote: On 13 July 2010 14:43, Jim Byrnes wrote: Steven D'Aprano wrote: My apologizes to Steven and the list, when I replied originally I messed up and sent it to him privately which was not my intention. On Mon, 12 Jul 2010 03:42:28 am Jim Byrnes wrote: I am running Ubunt

Re: [Tutor] Path?

2010-07-13 Thread Jim Byrnes
be easier to just keep using the terminal. I've only been using Ubuntu for a few months so I was surprised that the program could not see a file that is in the same directory. Regards, Jim The problem is ubuntu doesn't run the script from the directory it's in so i

Re: [Tutor] Path?

2010-07-14 Thread Jim Byrnes
Adam Bark wrote: On 14 July 2010 02:53, Jim Byrnes wrote: Adam Bark wrote: If I use the terminal to start the program it has no problem using the file. There are multiple files in multiple directories so I was looking for a way to just double click them and have them run. If it turns

Re: [Tutor] Path?

2010-07-15 Thread Jim Byrnes
Adam Bark wrote: On 14 July 2010 17:41, Jim Byrnes wrote: Adam Bark wrote: On 14 July 2010 02:53, Jim Byrnes wrote: Adam Bark wrote: If I use the terminal to start the program it has no problem using the file. There are multiple files in multiple directories so I was

[Tutor] Re: Tutor Digest, Vol 11, Issue 30

2005-01-09 Thread Jim Kelly
This script did not run properly jk nj --- [EMAIL PROTECTED] wrote: > Send Tutor mailing list submissions to > tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, > visit > http://mail.python.org/mailman/listinfo/tutor > or, via email, send a message with subjec

[Tutor] Re: Tutor Digest, Vol 11, Issue 29

2005-01-09 Thread Jim Kelly
i had the same probblem with xp. on mac os x i can double click on the file and it will open. xp opens the python file and closes it immediately apon double click open the python file via the Start Menu in xp. Then hit f5 and the script will run jk nj --- [EMAIL PROTECTED] wrote: > Send T

[Tutor] Can't figure out AttributeError message

2005-07-07 Thread Jim Roush
I'm getting the following error message: AttributeError: 'tuple' object has no attribute 'seek' below is the code that produced the error. The line in question is marked with arrow in the left margin. Any help would be appreciated. def build_sp500_rand(): sp500_csv = open('c:/indic

Re: [Tutor] Python fast enough for ad server?

2007-05-09 Thread jim stockford
there's also the question of the delivery architecture: if there are multiple machines in a clustered configuration, even something such as DNS round robin, then improving performance is a matter of throwing machines at the front end. On May 9, 2007, at 1:17 PM, Alan Gauld wrote: > > "OkaMth

Re: [Tutor] Inherit from int?

2007-05-12 Thread jim stockford
the problem is in the return. if you append a print statement to the class function such as print "number is ",number # (properly indented, of course) you'll get 8 On May 12, 2007, at 5:11 PM, John Fouhy wrote: > On 13/05/07, Marilyn Davis <[EMAIL PROTECTED]> wrote: >> #!/usr/bin/env python

Re: [Tutor] gmail

2007-05-29 Thread jim stockford
i'd be curious to see what happens if you use the tag around your (properly) indented code, e.g. this = 1 that = 0 if this == 1 : that = 1 print that On May 29, 2007, at 9:24 AM, Adam Urbas wrote: > Hey, > > I have gmail now, but I'm not sure how to turn off HTML. > ___

Re: [Tutor] Command Line Promps

2007-06-03 Thread jim stockford
sounds like threading is a solution. On Jun 3, 2007, at 2:05 PM, Jason Coggins wrote: > I am using Linux and yes I am wanting the program to run another > program. I > have tried these before but, if I remember correctly, these methods > caused > the original program to "freeze" while waiting

Re: [Tutor] Key Error

2007-07-08 Thread jim stockford
On Jul 8, 2007, at 9:45 AM, Alan Gauld wrote: > (The tests at the end > are poorly written too. If one of my team produced code like > this I'd be having strong words with them!) If you'd be willing to share your strong words, I'd be grateful to learn better alternatives. __

Re: [Tutor] Good writeup on Python assignment semantics

2007-07-17 Thread jim stockford
as I understand things... there's a writeup somewhere that uses the term "bind" instead of "assign" for the operation a = b for example, in Python a = 1 the value 1 now has a name of a associated with it. b = a the value 1 now has two names, a and b, associated with it the value 1 exists as an o

Re: [Tutor] interpreter restarts

2007-07-17 Thread jim stockford
$ who am i unohoo $ which python /usr/bin/python $ python Python 2.3.4 (#1, Mar 20 2006, 00:23:47) [GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> print 1 1 >>> help() help> quit >>> $ $ vi doit.py $ ls doit.py $

Re: [Tutor] IDLE Usage - was Interpreter Restarts

2007-07-17 Thread jim stockford
change "small" to "large" and you're right. Vim is Vi improved. Any tutorial or reference on Vi ought to work for Vim. On Jul 17, 2007, at 10:09 AM, Sara Johnson wrote: > I initially thought Vim was sort of the same as Vi, just a few small > differences or upgrades.  Or have I got that confused

Re: [Tutor] IDLE Usage - was Interpreter Restarts

2007-07-17 Thread jim stockford
you want a very brief set of vi(m) commands-- a get-you-started tutorial that's nearly painless? I'll send if "yes". jim On Jul 16, 2007, at 9:26 PM, Sara Johnson wrote: > First off, yes, I was referring to (I guess you could say) a > non-python editor.  I use an SSH

Re: [Tutor] IDLE Usage - was Interpreter Restarts

2007-07-19 Thread jim stockford
here's a link to the very brief vi get-started web page: http://www.sf-lug.com/How2vi.html On Jul 17, 2007, at 11:01 AM, Sara Johnson wrote: > Sure, sounds good.  Should I assume that 'any' Unix version allows Vim? >   > Thanks, > Sara > > ----- Original M

Re: [Tutor] Simple way to compare Two lists

2007-08-16 Thread jim stockford
Why is a dict lookup constant time. I.e. if there's a loop that walks a (shorter) list and compares each element with each element of a dict, what's going on to make this faster than an outer loop walking a list and an inner loop walking a second list? On Aug 16, 2007, at 5:01 PM, Stephen McIne

Re: [Tutor] Is there any logic in this?

2007-09-01 Thread jim stockford
seems to me this is an artifact of the language. reading right to left: "make a list that contains 10,40,30,20, then create a name 'a' to be used as a label to identify that list, then (next line) create a label 'b' to attach to whatever is the thing 'a' refers to, then (next line) modify

Re: [Tutor] Is there any logic in this?

2007-09-01 Thread jim stockford
Thanks for your explenation, so essentialy a = b, copys the pointer of > a > to b rather than the actual content. This explains why a[:] does work. > > Do you have an explenation why this is not the case with integers ie. > >>>> a, b = 10, a >>>> b = b

[Tutor] about modules, classes, methods, functions

2007-09-02 Thread jim stockford
and returns a single value. What's the definition of a function in python? how is a method different from a function? Is it just that a method is a member of a class, i.e. can a class have both methods and functions? thanks in advance. jim ___

[Tutor] random number generator

2007-10-04 Thread Jim Hutchinson
er guess = float(raw_input("Make a guess: ")) tries = 1 # the guess loop while (guess != number): if (guess > number): print "Lower..." else: print "Higher..." guess = float(raw_input("Make another guess: ")) tries += 1 print &q

[Tutor] random number generator

2007-10-06 Thread Jim Hutchinson
01): if guess > number: print "Lower..." elif guess < number: print "Higher..." tries += 1 if guess != number: guess = float(raw_input("Make another guess: ")) print "\nCongratulations! You guessed my number! The numbe

Re: [Tutor] 2 problems in a small script

2007-10-12 Thread jim stockford
On Oct 12, 2007, at 11:48 AM, Kent Johnson wrote: > If all you want to do is copy the list, then >lstB = lstA[:] > is fine, or you can use >lstB = list(lstA) why choose one over the other? is there a performance or other difference? ___ Tutor

Re: [Tutor] global is bad but ...

2007-11-13 Thread jim stockford
On Nov 13, 2007, at 3:11 PM, Alan Gauld wrote: > Rather than answer your question directly can I ask, do > you know *why* wiser heads say global is bad? What > problems does using global introduce? What problems > does it solve? i'll try: globals are good because they provide common data to

  1   2   3   4   5   6   >