Re: [Tutor] Tutor Digest, Vol 169, Issue 17

2018-03-23 Thread David Holland via Tutor
- Message: 2 Date: Thu, 22 Mar 2018 18:35:17 +0100 From: Peter Otten <__pete...@web.de> To: tutor@python.org Subject: Re: [Tutor] Oracle forms Message-ID: Content-Type: text/plain; charset="ISO-8859-1" David Holland via Tutor wrote: > Is there anyway I can use Py

[Tutor] Oracle forms

2018-03-22 Thread David Holland via Tutor
Is there anyway I can use Python to fill in an Oracle form rather than typing it in myself.I.e take values from a .csv file and put them into an Oracle form.Any ideas (I have googled it) what libraries to use? ___ Tutor maillist - Tutor@python.org T

Re: [Tutor] Tutor Digest, Vol 83, Issue 83

2011-01-19 Thread David Holland
: -- Message: 7 Date: Wed, 19 Jan 2011 17:59:40 - From: "Alan Gauld" To: tutor@python.org Subject: Re: [Tutor] Problems passing a parameter in a GUI Message-ID: Content-Type: text/plain; format=flowed; charset="iso-8859-1";     reply-type=original "David Holland"

Re: [Tutor] Problems passing a parameter in a GUI

2011-01-19 Thread David Holland
, command=self.reveal(x))   File "/home/david/Documents/learnJava2010/v6c.py", line 24, in reveal     self.secret_text.delete(0.0, END) AttributeError: Application instance has no attribute 'secret_text' --- On Tue, 18/1/11, Dave Angel wrote: From: Dave Angel Subject: Re: [Tut

[Tutor] Problems passing a parameter in a GUI

2011-01-18 Thread David Holland
Hi All, I hope this makes sense I am trying to write a GUI where you click on a button and each time you click on the button it shows in the entry text how many times you have clicked.  However when I changed an earlier version of the code to pass a parameter it errors. This works :- from Tkin

Re: [Tutor] Lists in a file

2009-04-27 Thread David Holland
Thanks for all the suggestions.  I will have to try this. --- On Sun, 26/4/09, Kent Johnson wrote: From: Kent Johnson Subject: Re: [Tutor] Lists in a file To: "Robert Berman" Cc: "David Holland" , "tutor python" Date: Sunday, 26 April, 2009, 8:04 PM On Sun, A

[Tutor] Lists in a file

2009-04-26 Thread David Holland
()             for line in lines:     print line     print line[0]       text_file.close() And an example of the type of text :- ['a','b','c'] ['e','d','f'] Any ideas? Thanks in advance David Holland

Re: [Tutor] Idle and windows XP firewall

2008-10-02 Thread David Holland
win, it's an editor by the guy that made the win32all extensions. Or use eclipse with Python plugin, maybe? On Thu, Oct 2, 2008 at 11:31 AM, David Holland <[EMAIL PROTECTED]> wrote: I just using the short cut and nothing happens :(. I have managed to do this before just not in my ne

Re: [Tutor] Idle and windows XP firewall

2008-10-02 Thread David Holland
ROTECTED] Cc: tutor@python.org Date: Thursday, 2 October, 2008, 5:01 PM Where are you running it from?  it needs some weird command line parameters, so you probably need to use the shortcut in the start bar that Python made for you. On Thu, Oct 2, 2008 at 10:55 AM, David Holland <[EMAIL PROTECTE

Re: [Tutor] Idle and windows XP firewall

2008-10-02 Thread David Holland
hon.org Date: Thursday, 2 October, 2008, 4:53 PM On Thu, Oct 2, 2008 at 10:31 AM, David Holland <[EMAIL PROTECTED]> wrote: I am using python 2.5.2.  Is there an alternative to idle that does not have this problem? (I also fixed that this was no longer a problem). Open IDLE witho

Re: [Tutor] Idle and windows XP firewall

2008-10-02 Thread David Holland
I am using python 2.5.2.  Is there an alternative to idle that does not have this problem? (I also fixed that this was no longer a problem). ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Idle and windows XP firewall

2008-10-01 Thread David Holland
IL PROTECTED] Date: Wednesday, 1 October, 2008, 11:35 AM On Wed, Oct 1, 2008 at 5:04 AM, David Holland <[EMAIL PROTECTED]> wrote: > At work I have windows XP service pack 3 and although I have sys admin I can > not use idle. > I have googled but no success - any ideas?

[Tutor] Idle and windows XP firewall

2008-10-01 Thread David Holland
At work I have windows XP service pack 3 and although I have sys admin I can not use idle. I have googled but no success - any ideas? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Python Challenge 2

2007-12-21 Thread David Holland
I did this and got this string :- "i hope you didnt translate it by hand. thats what computers are for. doing it in by hand is inefficient and that's why this text is so long. using string.maketrans() is recommended. now apply on the url" Is that the answer because it does not solve the problem

Re: [Tutor] Python challenge

2006-05-06 Thread David Holland
l would be: http://www.pythonchallenge.com/pc/def/.htmlOn 5/4/06, David Holland < [EMAIL PROTECTED]> wrote: I looked at this and got stuck on the first one :- http://www.pythonchallenge.com/pc/def/0.html It says try changing the url. I assumed that it either meant 2*38 or 2 to the power of

[Tutor] Python challenge

2006-05-04 Thread David Holland
I looked at this and got stuck on the first one :- http://www.pythonchallenge.com/pc/def/0.html It says try changing the url. I assumed that it either meant 2*38 or 2 to the power of 38 but I can't see how to put either of those in the url.What have I missed ?Thanks in advance.

[Tutor] Show us some code

2006-04-13 Thread David Holland
John,Can you please post your code and the exact error message. First they came for the Danes, but I did not speak out because I am not a Dane. Yahoo! Messenge

Re: [Tutor] Tutor Digest, Vol 25, Issue 47

2006-03-19 Thread David Holland
Message: 8Date: Sat, 18 Mar 2006 14:26:15 -0500From: Kent Johnson Subject: Re: [Tutor] Fill in a web formCc: tutor python Message-ID: <[EMAIL PROTECTED]>Content-Type: text/plain; charset=ISO-8859-1; format=flowedDavid Holland wrote:> Is there a way in python to automatically put values in a web pag

[Tutor] Fill in a web form

2006-03-18 Thread David Holland
Is there a way in python to automatically put values in a web page ?  For example I used to travel on a train (I live in the UK) that is always late.  Is there a way to automatically to do this ? I can't think of  how to do it. --

Re: [Tutor] Change files

2006-02-12 Thread David Holland
ngs:1 the indentaion error after for name in files:2 specify full path for the destination arg in shutil.copyOn 2/10/06, David Holland wrote:> I wrote a little program that replaces all files called 'abcde' with the> file in the directory from which you riun the

Re: [Tutor] Change files

2006-02-11 Thread David Holland
on error after for name in files:2 specify full path for the destination arg in shutil.copyOn 2/10/06, David Holland wrote:> I wrote a little program that replaces all files called 'abcde' with the> file in the directory from which you riun the program. However it does not> fin

[Tutor] Change files

2006-02-10 Thread David Holland
I wrote a little program that replaces all files called 'abcde' with the file in the directory from which you riun the program.  However it does not find them (there is another one). What have I done wrong :- #this program copies the file x to all other places in the directory. #however it does not

Re: [Tutor] Copy files

2006-02-06 Thread David Holland
Alan,Thanks for that.  I had the wrong file names, now it works, in case anyone is interested here is the code.  I use it because at work I need to change different versions of sqlnet.ora :-def compare_files(file_name1, file_name2):     x = filecmp.cmp (file_name1, file_name2)     print

Re: [Tutor] Copy files

2006-01-31 Thread David Holland
Alan,Thanks for that.  Hopefully this now is easier to read. The only problem is that despite the fact that as the same user, I can manually change these files (so I must have the right file permissions ?) - the copying does not happening.def compare_files(file_name1, file_name2):    

[Tutor] Copy files

2006-01-30 Thread David Holland
I wrote a small program that compares files test1 and test2 to test3. If the files are different  then it  copies either test1 to test3 or the reverse.The problem is that the although the shutil.copy2 in thefunction change_files  works without error it does not copy.  Can anyone see what is

[Tutor] Books

2005-12-21 Thread David Holland
I would recommend python programming for the absolute beginner. ___ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com ___

[Tutor] Currency conversion

2005-12-12 Thread David Holland
Apologies if anyone has said this and I missed it, but wouldn't it be better to change :- "def rupees_from_dollars(d_doll): return 43*(d_doll) etc to" :- "def conversiond_doll, x): return x*(d_doll) " And in the main for eg dollars to dollar_amount = conversionsion(doll, dollarexchange ra

[Tutor] python books

2005-10-19 Thread David Holland
The best book I found was python programming for the absolute beginner by Michael Dawson. I would strongly recommend it. The only annoying thing is that he uses a games wrapper called livewires, which he modifies from the original but keeps the same name, which does not seem very clever to me. So

[Tutor] python books

2005-10-19 Thread David Holland
The best book I found was python programming for the absolute beginner by Michael Dawson. I would strongly recommend it. The only annoying thing is that he uses a games wrapper called livewires, which he modifies from the original but keeps the same name, which does not seem very clever to me. So

[Tutor] Beautiful soup

2005-10-04 Thread David Holland
I tried to use this script which I found on the web :- import urllib2, pprint from BeautifulSoup import BeautifulSoup def cellToWord(cell): """Given a table cell, return the word in that cell.""" # Some words are in bold. if cell('b'): return cell.first('b').string.strip()

Re: [Tutor] Tutor Digest, Vol 19, Issue 66

2005-09-26 Thread David Holland
--- [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 subject or body > 'help' to > [EMAIL PRO

[Tutor] Focus in tkinter

2005-09-14 Thread David Holland
I want to make the mouse focus in a GUI move to the correct button/text entry widget. Does anyone know how to do this ? Thanks in advance David ___ Yahoo! Messenger - NEW crystal clear PC to PC calling

[Tutor] Listbox help

2005-08-31 Thread David Holland
I can work out how to use most Tkinter widgets. Eg buttons like :- def create_widgets(self): #create GUI Button(self, text = "x", command = self.y).grid(row = 3, column = 3, columnspan = 3) However I am not sure how to use Listboxes. What would be the similar syntax to create

[Tutor] Python and xml

2005-08-13 Thread David Holland
I forgot to say that I am using knoppix 3.9 ___ How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com ___ Tutor

[Tutor] python and xml

2005-08-13 Thread David Holland
What is a good way of using xml and python ? I tried to install PyXML but I get this as an error message :- python setup.py Traceback (most recent call last): File "setup.py", line 127, in ? config_h_vars = parse_config_h(open(config_h)) IOError: [Errno 2] No such file or directory: '/usr/inc

Re: [Tutor] Using urllib to retrieve info

2005-08-09 Thread David Holland
I had a look at urllib2 and I found this example :- import urllib2 # Create an OpenerDirector with support for Basic HTTP Authentication... auth_handler = urllib2.HTTPBasicAuthHandler() auth_handler.add_password('realm', 'host', 'username', 'password') opener = urllib2.build_opener(auth_handler) #

Re: [Tutor] Using urllib to retrieve info

2005-08-09 Thread David Holland
Alan, Sorry of course that is the problem. These pages are password protected Is it possible to download password protected pages (I know the password but I don't how to get the program to use it). David --- Alan G <[EMAIL PROTECTED]> wrote: > > It runs fine but the file saved to disk is

[Tutor] Using urllib to retrieve info

2005-08-08 Thread David Holland
Kent, Sorry I should have put my code. This is what I wrote import urllib import urllib2 f = urllib.urlopen("http://support.mywork.co.uk/index.php?node=2371&pagetree=&fromid=20397&objectid=21897";).read() newfile = open("newfile.html",'w') newfile.write(f) newfile.close() print 'finished' It runs

Re: [Tutor] Tutor Digest, Vol 18, Issue 41

2005-08-08 Thread David Holland
Looking at the slashdot url works fine, I think the problem is because I am trying to download a page with an address of the form url.php?node=5924&pagetree=&fromid=&objectid=25586 And I only download url not url.phpetc. Is there anyway that that can be done ?   David Message: 8Date: Mon, 8 Aug 20

[Tutor] Get information from a web page

2005-08-08 Thread David Holland
Hi All, I am trying to save to disk a webpage (so I can extract useful info) with a urlof type "http://xxx.co.uk/index.php?node=2371&pagetree=&fromid=20397".However the following :-urllib.urlopen, urllib._urlopener, urllib2.Request, urllib2.urlopen,urllib2.urlretrievejust retrieve this webpage :- h

Re: [Tutor] Getting web pages and formatting text

2005-08-05 Thread David Holland
Alan, Kent,   Thanks for that I will have a look and hopefully come back with a complete script next week.   DavidAlan G <[EMAIL PROTECTED]> wrote: > Two questions :-> 1) Is it possible to download to your hard drive using python > various web pages ie if the pages have the structure> http://addres

[Tutor] Getting web pages and formatting text

2005-08-04 Thread David Holland
I am trying to make a report I do easier (ie via a program not manually). Two questions :- 1)  Is it possible to download to your hard drive using python various web pages ie if the pages have the structure http://address/node=xxx&pagretree=&fromdid=nx&objectid=ny So you can download objectid=ny wh

Re: [Tutor] Extract information from an HTML table

2005-08-04 Thread David Holland
Danny,   Thanks for that I will give a go and see how it works.   David Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with voicemail ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Extract information from an HTML table

2005-08-03 Thread David Holland
Hi All, I would like to do the following.  I have an HTML document with a table with 2 columns.I would like to write a program to join the 2 columns together, ideally with same font etc.Ie get all the information between and and the next and and put it together.  Does anyone have any idea on ho

Re: [Tutor] Select rows and columns in excel

2005-07-28 Thread David Holland
Danny and John,   Thanks for the pointers.  As I am leaving the project where I need to do this tomorrow, I don't think I will have time to do this, but thanks for the help anyway.   DavidDanny Yoo <[EMAIL PROTECTED]> wrote: On Wed, 27 Jul 2005, David Holland wrote:> I know how to

[Tutor] Select rows and columns in excel

2005-07-27 Thread David Holland
  David Holland Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with voicemail ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] keylogger

2005-06-09 Thread David Holland
You might want to write a keylogger because you have Children living in your house and you might want to protect them or yourself from their stupidity. (Ie downloading music illegally or giving out their address in a chat room, ideally the logger would sit there and send you an email if someone e

[Tutor] Using python to write games

2005-03-26 Thread David Holland
Is there any material anyone knows about how to use pure python without pygame to write games ? The reason for asking, is that although pygame is good it has the disadvantage of that your users must have pygame. It is also harder to create a stand alone .exe with python ? Send instant messages t

[Tutor] Livewires

2005-03-23 Thread David Holland
If you have any questions on Livewires (do you mean the Scripture Union pygame wrapper ?). We will try to help.Send instant messages to your online friends http://uk.messenger.yahoo.com ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailma

Re: [Tutor] Clear the text in an entry widget

2005-03-13 Thread David Holland
Thanks John, That works, the problem was that I had written self.answer_ent.grid.delete(0.0, END) However when I replaced the 0.0 with a 0, it worked fine. At least I found a work around but your idea is much more elegant. David --- John Fouhy <[EMAIL PROTECTED]> wrote: > David Holl

[Tutor] Clear the text in an entry widget

2005-03-13 Thread David Holland
I have written a simple test your maths program. There is just one question, how do you clear the text in a tkinter widget ? The only way that I could do it was to create a function to create the entry widget and then have it re-created. Is there a better way. This is the way I did :- def cr

[Tutor] make an .exe

2005-03-04 Thread David Holland
Noel Thanks for that info, I did do a search for that but I could not find anything useful Message: 3Date: Fri, 4 Mar 2005 10:11:51 +From: Max Noel <[EMAIL PROTECTED]>Subject: Re: [Tutor] Make a .exeTo: David Holland <[EMAIL PROTECTED]>Cc: tutor@python.orgMessage-ID: <[

[Tutor] Make a .exe

2005-03-04 Thread David Holland
I have a game I wrote using python and pygame that I am trying to change into a .exeI created the script setup.py which has this code :- setup.pyfrom distutils.core import setupimport py2exesetup(console=["Gamename.py"]) In a dos prompt with all the files there I ran :-python setup.py py2exe It Com

[Tutor] Print record x in a file

2005-01-24 Thread David Holland
Kent,   Yes you are right.  I looked at your code and that makes sense now. Thanks for explaining that.   ALL-NEW Yahoo! Messenger - all new features - even more fun! ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/t

[Tutor] Print record x in a file

2005-01-23 Thread David Holland
1. Re: Print record x in a file (Kent Johnson) >2. How would python messure up in performance? > (Kevin) >3. Re: How would python messure up in > performance? (Max Noel) >4. Re: Print record x in a file (David Holland) >5. on the way to find p

Re: [Tutor] Print record x in a file

2005-01-23 Thread David Holland
--- "Jacob S." <[EMAIL PROTECTED]> wrote: > > This will get a random record > > I hope you do not think the comments are > patronising > > but you did say you are new so I did not want to > give > > naked code. > > > > import random > > #the above gives the program the ability to get a > > #pseud

[Tutor] Print record x in a file

2005-01-22 Thread David Holland
This will get a random record I hope you do not think the comments are patronising but you did say you are new so I did not want to give naked code. import random #the above gives the program the ability to get a #pseudo random number file = open('test.rantxt') listcontents = file.readlines() #gi

Re: [Tutor] Crossword program

2005-01-12 Thread David Holland
who wants it ? (Subject to the gpl licence).> Here is the code in case anyone is interested.>> from Tkinter import *> #Crossword program David Holland> class Crossword(Frame):>> def __init__(self, master):> '''Default arguments'''> Frame.__init_

[Tutor] CGI problem

2005-01-11 Thread David Holland
Thanks for the help it solved the problem. Message: 8 Date: Mon, 10 Jan 2005 16:05:59 -0800 From: "Patric Michael" <[EMAIL PROTECTED]> Subject: Re: [Tutor] CGI problem To: tutor@python.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=US-ASCII Hi David... You need to explicit

[Tutor] CGI problem

2005-01-10 Thread David Holland
I am trying to write a CGI program here is the code of the HTML ALL Bromley Lewisham Here is the python #!/usr/bin/env python boroughdict = { 'BROMLEY': 0.5, 'LEWISHAM':0.1 } class dummy:#mocked up input o

[Tutor] Crossword program

2005-01-09 Thread David Holland
I wrote a program to create crosswords in python. It is not perfect but it works, is there any open source place I can put this for it to be used by anyone who wants it ? (Subject to the gpl licence). Here is the code in case anyone is interested. from Tkinter import * #Crossword program David

[Tutor] games written in jython for a web page

2005-01-05 Thread David Holland
Does anyone know about tutorials (or open source projects) about writing in games in pure python (ie without using pygame). The reason is because I wrote a game using pygame but I would like to convert it to a game that can be played in a webpage as a Jython, (like a Java game) of course this is ha

[Tutor] Python on linux

2005-01-05 Thread David Holland
You can use idle while using linux, just type in idle from a command prompt ! ALL-NEW Yahoo! Messenger - all new features - even more fun! ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] CGI help

2005-01-04 Thread David Holland
Rich, That worked although I had to set the address to :- http://127.0.0.1:8000/friends1.html Thanks. ___ ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com __

[Tutor] CGI help

2005-01-03 Thread David Holland
I have written my first cgi script :- The .html code is :- Friends CGI Demo (Static Screen) Friends list for:New User Enter your name> How many friends do you have ? 0 10 25 50 100 The python code is :- #!/usr/bin/env python import cgi reshtml = '''Content-Type: text/html\n Friends CGI Demo (

[Tutor] Using £ in python

2005-01-01 Thread David Holland
so it > is more specific > than "Re: Contents of Tutor digest..." > > > Today's Topics: > > 1. Re: O.T. (Michael Lange) >2. OT (David Holland) >3. ASCII encoding for a ? sign (David Holland) >4. Fwd: ASCII encoding for a ? sign (David &g

[Tutor] Fwd: ASCII encoding for a £ sign

2004-12-31 Thread David Holland
Apologies, I did not see that Kent had already answered this ! Thanks Kent I put that encoding and it works fine. Although surprisingly the other idea :- write the string with '\xc2' did not work. --- David Holland <[EMAIL PROTECTED]> wrote: > Date: Fri, 31 Dec 2004 16:28:59

[Tutor] ASCII encoding for a £ sign

2004-12-31 Thread David Holland
I ran a program with a "£" sign, and I got this message :- "sys:1: DeprecationWarning: Non-ASCII character '\xc2' in file birdgame32a.py on line 93, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details' I looked at the message but I am not sure what encoding to use fo

[Tutor] OT

2004-12-31 Thread David Holland
I am 31 married, living in London UK. I can play guitar but I am not that good. I work in IT as Oracle support but the only languages I know apart from basic python is basic PL/SQL and of course SQL. Of course I know how to use various Oracle applications. I studied Chemistry but sadly there were

[Tutor] Using the £ symbol

2004-12-28 Thread David Holland
I am trying to use a program that usea s '£' symbolon the pygame screen and I get this message :- 'sys:1: DeprecationWarning: Non-ASCII character '\xc2' in file birdgame29e.py on line 88, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details line 86 ' Now I did look th

[Tutor] Mainframe experience

2004-12-18 Thread David Holland
Sadly in my IT company (which I better not name), mainframe experience seems to be a route to redundancy ! Fortunately I work with Oracle. === message truncated === ___ ALL-NEW Yahoo! Messenger - all ne

[Tutor] Pygame problems

2004-12-11 Thread David Holland
I am not sure if this is the right place, apologies if not. Anyway in a game I wrote using pygame, I would like to increase the initial message so it is over several lines. This is the code in the example game if pygame.font: font = pygame.font.Font(None, 36) text = font.render

[Tutor] How to get input from Tkinter app ?

2004-12-10 Thread David Holland
Here is an example create a function eg createwidgets(self) with code like     self.question_ent = Entry(self)    self.question_ent.grid(row=0, column = 4, columnspan = 2, sticky = W) Then in another function eg getinfo(self) which is fired off by a button or something write code like :-

[Tutor] Create a binary for a python game

2004-12-03 Thread David Holland
I have created a simple python game and I would like to convert it into a binary executable that can be used to play it in Linux without needing the various libraries (pygame etc). Is this possible ? ___ Win a castle for