Re: [Tutor] Selecting a browser

2007-12-04 Thread Tim Golden
Ricardo Aráoz wrote: Martin Walsh wrote: And by the way, the '' has special meaning to the webbrowser.get method -- it determines whether a BackgroundBrowser or GenericBrowser object is returned. LOL, another demerit to documentation. Agreed. But it would be more constructive to offer a

Re: [Tutor] Selecting a browser

2007-12-04 Thread Tim Golden
Ricardo Aráoz wrote: These guys have given their free time so that we can enjoy their module, hey could have no documentation at all... That said, my comments about documentation lacking still stand. I think the important thing here is that these guys is you and me. Documentation is exactly

Re: [Tutor] Selecting a browser

2007-12-04 Thread Ricardo Aráoz
Tim Golden wrote: Ricardo Aráoz wrote: Martin Walsh wrote: And by the way, the '' has special meaning to the webbrowser.get method -- it determines whether a BackgroundBrowser or GenericBrowser object is returned. LOL, another demerit to documentation. Agreed. But it would be more

Re: [Tutor] Selecting a browser

2007-12-04 Thread Tim Golden
Ricardo Aráoz wrote: Tim Golden wrote: Ricardo Aráoz wrote: Martin Walsh wrote: And by the way, the '' has special meaning to the webbrowser.get method -- it determines whether a BackgroundBrowser or GenericBrowser object is returned. LOL, another demerit to documentation. Agreed. But it

Re: [Tutor] Selecting a browser

2007-12-04 Thread Ricardo Aráoz
Tim Golden wrote: Ricardo Aráoz wrote: Martin Walsh wrote: And by the way, the '' has special meaning to the webbrowser.get method -- it determines whether a BackgroundBrowser or GenericBrowser object is returned. LOL, another demerit to documentation. Agreed. But it would be more

Re: [Tutor] Selecting a browser

2007-12-04 Thread Kent Johnson
Ricardo Aráoz wrote: Thanks Kent, that was certainly the problem. So I went through it just to hit another wall, when issuing the open method : ff.open('http://www.google.com') Traceback (most recent call last): File input, line 1, in module File E:\Python25\lib\webbrowser.py, line

Re: [Tutor] Selecting a browser

2007-12-04 Thread Kent Johnson
Ricardo Aráoz wrote: Tim Golden wrote: Agreed. But it would be more constructive to offer a simple patch to the webbrowser docs. You don't even need to give a formal patch. Just write the doc change in plain text and submit it as a bug. Ok, I took a look. Nice link to know [1], I've added

Re: [Tutor] Selecting a browser

2007-12-04 Thread Tim Golden
Kent Johnson wrote: Ricardo Aráoz wrote: Tim Golden wrote: Agreed. But it would be more constructive to offer a simple patch to the webbrowser docs. You don't even need to give a formal patch. Just write the doc change in plain text and submit it as a bug. True. But the entry level is

Re: [Tutor] Selecting a browser

2007-12-04 Thread Kent Johnson
Tim Golden wrote: In addition, for those not following that particular story, the Google Highly Open thingy (GHOP) is seeing a bunch of updates, additions and corrections to the docs being submitted pretty much every day. Which can only be a good thing! In fact updating the webbrowser docs

Re: [Tutor] Selecting a browser

2007-12-04 Thread Andre Roberge
Forwarded to the ghop-discussion list :-) Thanks Kent for the suggestion. André On Dec 4, 2007 11:13 AM, Kent Johnson [EMAIL PROTECTED] wrote: Tim Golden wrote: In addition, for those not following that particular story, the Google Highly Open thingy (GHOP) is seeing a bunch of updates,

Re: [Tutor] Selecting a browser

2007-12-04 Thread Doug Hellmann
+1 On Dec 4, 2007, at 10:36 AM, Andre Roberge wrote: Forwarded to the ghop-discussion list :-) Thanks Kent for the suggestion. André On Dec 4, 2007 11:13 AM, Kent Johnson [EMAIL PROTECTED] wrote: Tim Golden wrote: In addition, for those not following that particular story, the Google

[Tutor] Random Number Generator

2007-12-04 Thread earlylight publishing
Hello All, I'm a bare beginner to python (or indeed) any programming. I'm helping myself become more proficient by making a text adventure game. The problem is I need a function (or module) that will generate a random number within a range, say 1-20 for example. The ability to program

Re: [Tutor] Random Number Generator

2007-12-04 Thread Jason Massey
Easy enough. You'll want to import the random module and use the functions in it. Also, http://docs.python.org/lib/lib.html is going to be your best friend. You'll notice on that page among many other things is a section on random number generation. As to your code: import random a =

Re: [Tutor] Random Number Generator

2007-12-04 Thread bhaaluu
Greetings, Take a look at my first Python program for an example: http://www.geocities.com/ek.bhaaluu/python/paperock.py.txt That should give you an idea. Also: You can use Python itself for getting help: help('random') Happy Programming! -- b h a a l u u at g m a i l dot c o m

Re: [Tutor] Random Number Generator

2007-12-04 Thread Alan Gauld
bhaaluu [EMAIL PROTECTED] wrote You can use Python itself for getting help: help('random') Well, well. I've been busily importing everything I wanted help on, not realising I could just quote it! Now that little insight has probably saved me an hour a year or more! Thanks for that ;-)

[Tutor] Time module

2007-12-04 Thread Norman Khine
Hello, I am having difficulties in converting the following to display the difference that has passed in hours and seconds in a nice way. from datetime import datetime now = datetime.now() posted = date difference = now - posted namespace['date'] = date namespace['posted'] = difference when I

Re: [Tutor] Time module

2007-12-04 Thread Kent Johnson
Norman Khine wrote: Hello, I am having difficulties in converting the following to display the difference that has passed in hours and seconds in a nice way. from datetime import datetime now = datetime.now() posted = date difference = now - posted namespace['date'] = date

Re: [Tutor] Selecting a browser

2007-12-04 Thread Ricardo Aráoz
Tim Golden wrote: Ricardo Aráoz wrote: These guys have given their free time so that we can enjoy their module, hey could have no documentation at all... That said, my comments about documentation lacking still stand. I think the important thing here is that these guys is you and me.

Re: [Tutor] lstrip removes '/' unexpectedly

2007-12-04 Thread Ricardo Aráoz
Eric Brunson wrote: Ricardo Aráoz wrote: Danny Yoo wrote: Hello: I'm seeing some strange behavior with lstrip operating on string representations of *nix-style file paths Example: s = '/home/test/' s1 = s.lstrip('/home') s1 'test/' ## '/test/' was expected!

Re: [Tutor] Random Number Generator

2007-12-04 Thread bhaaluu
On Dec 4, 2007 2:29 PM, Alan Gauld [EMAIL PROTECTED] wrote: bhaaluu [EMAIL PROTECTED] wrote You can use Python itself for getting help: help('random') Well, well. I've been busily importing everything I wanted help on, not realising I could just quote it! Now that little insight has

[Tutor] Thanks (was Random Number Generator)

2007-12-04 Thread earlylight publishing
Thank you everyone for your help! I have no idea why it never occured to me to Google it. Thanks for the code. Now let's see if I can get this sucker to work! - Looking for last minute shopping deals? Find them fast with Yahoo!

[Tutor] Button 1 Motion Event

2007-12-04 Thread Johnston Jiaa
I'm creating a drawing program, like MS Paint in Tkinter. I bound the B1-Motion event to my Canvas object. The function it's bound to creates an oval at the event's x and y attributes. This works fine if the user is dragging slowly, but if he does a sudden dragging motion, the ovals are

Re: [Tutor] Button 1 Motion Event

2007-12-04 Thread Luke Paireepinart
Johnston Jiaa wrote: I'm creating a drawing program, like MS Paint in Tkinter. I bound the B1-Motion event to my Canvas object. The function it's bound to creates an oval at the event's x and y attributes. This works fine if the user is dragging slowly, but if he does a sudden

Re: [Tutor] Button 1 Motion Event

2007-12-04 Thread Tiger12506
From your description, it sounds like the number of ovals placed depends only on when the B1-Motion even is sent to your Canvas object. If you want these a little more even, you might take the drawing code out of the function that's bound to the mouse event, so that whenever you process you a

[Tutor] [Fwd: Re: Button 1 Motion Event]

2007-12-04 Thread Luke Paireepinart
Johnston, please reply on-list. You have to either use reply-all or type tutor@python.org as a recipient, because messages aren't sent to tutor@python.org by default when you click reply. Thanks, -Luke ---BeginMessage--- That being said, you should still post your code, because there may

[Tutor] Tkinter Canvas Saving and Opening

2007-12-04 Thread Johnston Jiaa
I know that Tkinter's canvas can output its contents into a postscript file, but can that file be used in turn to restore the image? How can I implement this file-saving and opening feature? ___ Tutor maillist - Tutor@python.org

[Tutor] Time module

2007-12-04 Thread Norman Khine
Hello, I am having difficulties in converting the following to display the difference that has passed in hours and seconds in a nice way. from datetime import datetime now = datetime.now() posted = date difference = now - posted namespace['date'] = date namespace['posted'] = difference when I