Re: [Tutor] More on unit testing - tests for external data...

2009-12-10 Thread Modulok
So, this, 'test environment', this is just like a directory where I place my code and associated files to test for the existence (and non-existence) of various stuff, right? Any real-world examples/case studies to point to? It seems like there are a lot of people on this list interested in getting

Re: [Tutor] What books do you recommend?

2009-12-10 Thread Alan Gauld
"Becky Mcquilling" wrote Good points. I guess being as new as I am I'm not always sure of the obvious way to do something or what I think is right, One thing to remember is that it is always subjective. There is no such thing as an absolute "right way to do it" There are too many factors an

Re: [Tutor] Trying to send a URL via XMPP

2009-12-10 Thread Wayne Werner
On Thu, Dec 10, 2009 at 3:29 PM, Stephen Nelson-Smith wrote: > Hi, > > I'm trying to send a message to a user via XMPP - but I want them to > receive a clickable word. > > I'm using Python 2.4 on RHEL 5.4 and python-xmpp-0.4.1-6 from EPEL. > > I've tried variations on: > > >>> jid = xmpp.protocol

[Tutor] Trying to send a URL via XMPP

2009-12-10 Thread Stephen Nelson-Smith
Hi, I'm trying to send a message to a user via XMPP - but I want them to receive a clickable word. I'm using Python 2.4 on RHEL 5.4 and python-xmpp-0.4.1-6 from EPEL. I've tried variations on: >>> jid = xmpp.protocol.JID('motherin...@jabber.sekrit.org.uk') >>> cl = xmpp.Client(jid.getDomain())

Re: [Tutor] What books do you recommend?

2009-12-10 Thread Becky Mcquilling
Good points. I guess being as new as I am I'm not always sure of the obvious way to do something or what I think is right, may not be an having explained examples are best, particularly after I've spent time solving the problem. But others may not find this useful. I admit that learning this stu

Re: [Tutor] parsing Spreadsheet document

2009-12-10 Thread Emile van Sebille
On 12/9/2009 10:05 PM Christopher Spears said... I want to fill a database with the contents of a spreadsheet. The spreadsheet was created by OpenOffice and is a .sxc document. What is the best way to do this? I think the best approach is to save the spreadsheet as a .csv document and then

Re: [Tutor] More on unit testing - tests for external data...

2009-12-10 Thread spir
Wayne Werner dixit: > On Wed, Dec 9, 2009 at 6:15 PM, Alan Gauld wrote: > > > > > Remember, in testing you are not trying to prove it works but rather to > > demonstrate that it doesn't! > > > > So in that way it's a bit like the the scientific method (or exactly like)? > You create a hypothesi

Re: [Tutor] More on unit testing - tests for external data...

2009-12-10 Thread Kent Johnson
On Thu, Dec 10, 2009 at 11:20 AM, Wayne Werner wrote: > On Wed, Dec 9, 2009 at 6:15 PM, Alan Gauld > wrote: >> >> Remember, in testing you are not trying to prove it works but rather to >> demonstrate that it doesn't! > > So in that way it's a bit like the the scientific method (or exactly like)

Re: [Tutor] Sound problems

2009-12-10 Thread Wayne Werner
On Thu, Dec 10, 2009 at 8:40 AM, Dave Angel wrote: > If I may make a guess (I've never used pygame), I'd suggest that the sound > playing logic counts on using the event loop for its timing. So without an > event loop, no sound. > Also, livewires is a pretty ancient - AFAICT they haven't had a

Re: [Tutor] More on unit testing - tests for external data...

2009-12-10 Thread Wayne Werner
On Wed, Dec 9, 2009 at 6:15 PM, Alan Gauld wrote: > > Remember, in testing you are not trying to prove it works but rather to > demonstrate that it doesn't! > So in that way it's a bit like the the scientific method (or exactly like)? You create a hypothesis and design tests to invalidate your hy

Re: [Tutor] Sound problems

2009-12-10 Thread Dave Angel
Tim Goddard wrote: I'm still learning, and this may be better served on a pygame mailing list but I thought I'd try here first. I'm following the python programming for absolute beginners which uses livewires and pygame to do some simple games. My difficulty comes from not using the module vers

[Tutor] Rép. : parsing Spreadsheet document

2009-12-10 Thread Luhmann
If you just want to load the data into python one time, rather than connecting to the file, it would be more handy to paste the cells from the clipboard.  Here's how I do it on windows: from win32clipboard import * #("pywin32" module required) def pastetable(): OpenClipboard() try: a=GetCli

[Tutor] Still making Cribbage game, NEED HELP Please

2009-12-10 Thread Christopher schueler
I am still working on my cribbage game.. if you want rules or an outline of the rules/project information, it is HERE -> http://jongarvin.com/cawthra/files/ics3u/cribbage_project.pdf I have attached a copy of what i have so far.. i have built a deck with 52 cards AND made a dictionary

Re: [Tutor] parsing Spreadsheet document

2009-12-10 Thread Alan Gauld
"Christopher Spears" wrote I want to fill a database with the contents of a spreadsheet. The spreadsheet was created by OpenOffice and is a .sxc document. I think the best approach is to save the spreadsheet as a .csv document If you have control over the document then yes I'd go that way