[Tutor] pygame module

2014-10-03 Thread Rob Ward
i downloaded the 3.4 version of python but there is no matching binary file for pygame ive tried every 1.9.1 file and still cant import pygame would an older version of python work rob ___ Tutor maillist - Tutor@python.org To unsubscribe or change

Re: [Tutor] Concatenating numeric data in Python 3.3

2013-04-24 Thread Rob Day
So, for example, you'd be trying to concatenate the binary data 01010101 and 10101010, and get 0101010110101010? You can do that by shifting the bits: (0b01010101 8) + 0b10101010 21930 which is equivalent to: 0b0101010110101010 21930 You can also do it with numerical data: 0b10101010 170

Re: [Tutor] nose, git, post-commit hook

2013-02-04 Thread Rob Day
On 4 February 2013 15:32, Albert-Jan Roskam fo...@yahoo.com wrote: I am using git VCS and I read about the possibility to use post-commit hooks for nose tests. That sounds pretty cool, but does this also have disadvantages? It would be very annoying if I couldn't check in code, safely tucked

[Tutor] newb help reading lines from csv

2012-10-22 Thread Dewhirst, Rob
import csv ifile = open('test.csv', r) reader = csv.reader(ifile) for row in reader: print row for row in reader: print row ifile.close() This is a simplified version of what I am trying to do - loop through a CSV file twice. Why does the second for loop not execute at all? The

Re: [Tutor] newb help reading lines from csv

2012-10-22 Thread Dewhirst, Rob
Thanks Matt and Lazlo. I knew I must have been missing some counter not being reset. Both of those options work fine. You want to do ifile.seek(0) not reader.seek(0) at least from my testing. On Mon, Oct 22, 2012 at 2:27 PM, Matt Williams m...@doctors.org.uk wrote: Dear Rob, This caught me

Re: [Tutor] Error message...

2012-08-23 Thread Rob Day
On 23 August 2012 15:17, Victoria Homsy victoriaho...@yahoo.com wrote: def isPalindrome(s): if len(s) = 1: return True else: return s(0) == s(-1) and isPalindrome (s[1:-1]) I don't see why this wouldn't work... Many thanks in advance. Kind regards, Victoria Parentheses are used for

Re: [Tutor] Error in apparently correct code

2012-08-20 Thread Rob Day
Your problem is in this line, as the traceback shows: return reduce(lambda x,y:x*y, [data[row][i] for i in range(col, col+4)]) So the thing you have to think about is - what values can col be? The answer is then in this line: for col in range(len(data[row])) And since each row of your data

[Tutor] Question on import foobar vs from foobar import *

2010-01-08 Thread Rob Cherry
(www.google.com) vs import socket googleip = socket.gethostbyname(www.google.com) Is there any difference between these concepts? Is there an easy google search term for me to research the difference to death? Thanks in advance! Rob ___ Tutor maillist

Re: [Tutor] Question on import foobar vs from foobar import *

2010-01-08 Thread Rob Cherry
Extending on this advice somewhat - is it *ever* correct to import foobar. There are countless examples of import os,sys etc,etc. Strictly speaking should we always be using from to only get what we know we need? Thanks, Rob ___ Tutor maillist

[Tutor] Can't start IDLE 2.6 on Mac

2008-10-19 Thread Rob Stevenson
wrong? Unfortunately I'm very new to Macs so although I'd be happy to investigate logs, registry etc on Windows, I don't know where to begin on OSX. Other progs I've installed in this way work fine, btw, Thanks Rob ___ Tutor maillist - Tutor

[Tutor] UnicodeEncodeError

2008-10-03 Thread Rob Sutherland
be great. Rob ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] __init__ arguments storage

2008-09-20 Thread Rob Kirkpatrick
where it looked like an argument was being mis-passed and I wanted to use pdb to see how it was handled pre- and post-init. Cheers, Rob ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] __init__ arguments storage

2008-09-20 Thread Rob Kirkpatrick
. Thanks again! Rob On Sat, Sep 20, 2008 at 12:44 PM, Kent Johnson [EMAIL PROTECTED] wrote: On Sat, Sep 20, 2008 at 1:32 PM, Rob Kirkpatrick [EMAIL PROTECTED] wrote: Hi All, In between an object's creation and call to __init__, where are the __init__ arguments stored

[Tutor] Possible to import imports?

2008-06-23 Thread Rob Kirkpatrick
mods in the script/module that specifically uses them so either what I want to do is not possible or a bad idea. Thoughts? Cheers, Rob ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Possible to import imports?

2008-06-23 Thread Rob Kirkpatrick
that I did try using something like foo.datetime but I must have buggered up something cause I couldn't get it to work... Thanks Kent! On Mon, Jun 23, 2008 at 12:03 PM, Kent Johnson [EMAIL PROTECTED] wrote: On Mon, Jun 23, 2008 at 1:27 PM, Rob Kirkpatrick [EMAIL PROTECTED] wrote: I've googled

[Tutor] How to (a) write to files, (b) use try/except (clarification)

2008-02-09 Thread Rob Stevenson
by amazon ID in my message I meant my web services license number. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] How to... (a) write to files, (b) use try/except

2008-02-09 Thread Rob Stevenson
- not to the list, but in direct emails? Thanks all, Rob ==the ISBNs from my file === 0006755151 059304083X 0349112150 0141030143 0099740915 0552773123 0747590087 0571224121 0552997706 0099490730 0141009128 0670852473 0044409672 0722540523 0375720979 1862074534 0571169945 08685506 0330481886 0333618815

[Tutor] conditionals with slicing not seeming to work

2008-01-27 Thread Rob Stevenson
PBuijeoTSpsVLaOGuLVjMZXkBvVXwUuHfBihziiavGSYofPNeKsTXruMUumRRPQJzvSzJkKbtSipiqBd h = range(len(s)-9) for i in h: j=s[i:i+8] if j[0].islower(): if j[1:3].isupper(): if j[5:7].isupper(): print j Any help much appreciated! Rob ___ Tutor maillist - Tutor@python.org

Re: [Tutor] How Do I Make Imports Work

2007-12-27 Thread Rob Andrews
Can you show us an example of the code where you're attempting to import and the error you get? -Rob A. On Dec 27, 2007 7:40 AM, [EMAIL PROTECTED] wrote: Hi, I am just starting to learn about making classes, so I wanted to put some code into a module and use it. I know the code works

Re: [Tutor] Beat me over the head with it

2007-12-08 Thread Rob Andrews
Need help with a motivational disorder? ;) When you say you want to learn Python, what's the nature of the want to part? Looking to write a game, land a job, parse a log file? Perhaps if you focus on what it is you want to do, that will lead the way. On Dec 8, 2007 9:08 PM, Theyain [EMAIL

Re: [Tutor] Timers in Python

2007-10-04 Thread Rob Andrews
sleep(x), where x is in seconds. The Python Library Reference, section 14.2, goes into a bit more detail. -Rob A. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] how to specify working directory from within python app?

2007-09-20 Thread Rob Andrews
I best go about calling these 3rd-party apps? On this project, the directories are created dynamically, and there can be quite a few. -Rob A. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] how to specify working directory from within python app?

2007-09-20 Thread Rob Andrews
Thanks (to Alan, as well). I had a wild suspicion that there would be a fairly standard solution to this one. I've just never had to really look into it before. On 9/20/07, Kent Johnson [EMAIL PROTECTED] wrote: Rob Andrews wrote: I've got a weekly project here in which I have to take

Re: [Tutor] Fw: KeyError list?

2007-08-16 Thread Rob Andrews
I wasn't familiar with it prior to this thread, as previously I'd had the good fortune to use normalized data. I guess more pristine data environments spoiled me into writing less robust code. So although I asked what turned out to be the wrong question, I seem to be getting a consensus answer

[Tutor] KeyError list?

2007-08-15 Thread Rob Andrews
Is there a comprehensive list of dictionary KeyError meanings? I could sure use one these days and haven't had much luck tracking one down yet. -Rob ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Fw: KeyError list?

2007-08-15 Thread Rob Andrews
At my current day job, I'm handed a wild variety of data from customers, and most of it hasn't been normalized in any reasonable way. File formats are inconsistent, numbers of fields are randomly inconsistent with the headers, etc. Attempting to massage these into files I can process has involved

Re: [Tutor] Python Editors .. which do you reccomend for a amateur?

2007-08-04 Thread Rob Andrews
complaint. Part of my reasoning for that, though, is that it enables me to use the same familiar environment for python, perl, javascript PHP. -Rob On 8/4/07, Tony Noyeaux [EMAIL PROTECTED] wrote: I've been using Python IDLE,.. tried DrPython,.. had a try of ActiveState Komodo IDE, Active Python

Re: [Tutor] Python IDE

2007-06-11 Thread Rob Andrews
Personally, I use and love Komodo (the full version, although Komodo Edit is nice). I didn't *expect* to like it, but it won me over with ease. On 6/11/07, scott [EMAIL PROTECTED] wrote: Could someone suggest a few good IDE's for me to look at.

Re: [Tutor] IDE / development environment

2007-04-22 Thread Rob Andrews
What does everyone use as their development environment for Python, particularly web dev? Komodo (by ActiveState). For web dev in dynamic languages, it's tough to actually beat. I scored mine at a $100 discount thanks to a coupon ActiveState handed out at PyCon this year. -Rob

Re: [Tutor] Best IDE for python?

2007-03-09 Thread Rob Andrews
It may be worthwhile to note that laziness isn't necessarily a derogatory term in programming circles. To quote Eric S. Raymond, who turned me on to Python as much as any other (in _The Art of Unix Programming_), Constructive laziness is one of the cardinal virtues of the master programmer. -Rob

[Tutor] sorting question

2007-03-06 Thread Rob Andrews
to apply sort() to this problem, although I'm certain the failing is my own. -Rob A. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Convert my .bat and .vbs to .py

2007-02-15 Thread Rob Andrews
before copying it (or deleting it), which can save a good bit of heartache. shutil can be used for not only copying files, but even copying entire directory trees. -Rob A. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Convert my .bat and .vbs to .py

2007-02-15 Thread Rob Andrews
have python running is a Windows machine, and it's agnostic about the operating systems of the network drives from which the data is gathered. Quite handy and not even a very long program after the try/except bulletproofing is added. -Rob A. On 2/15/07, Eric Walstad [EMAIL PROTECTED] wrote: Hey

[Tutor] [OT?] PyCon

2007-01-29 Thread Rob Andrews
I hope it's not unforgivably off-topic to ask if anyone's planning on attending PyCon in Feb. My manager gave a thumbs-up for me to attend today. -Rob ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Best way to learn python

2006-12-29 Thread Rob Andrews
more obvious, so if you have a bit of programming at all your experience is likely as good as mine was at the time. What's your programming background? What sort of programming would you most immediately like to do? And Ruby's also a fine language. -Rob A. On 12/29/06, Daniel kavic [EMAIL

Re: [Tutor] what is PIL..???

2006-10-21 Thread Rob Andrews
On 10/21/06, Asrarahmed Kadri [EMAIL PROTECTED] wrote: May I ask someone to tell what PIL is and how can it be helpful in drawing 2-dimensional graphs... PIL = Python Imaging Library PIL provides a bunch of nifty tools for handling images and is well worth a google. -Rob

Re: [Tutor] Help with basic user-data file

2006-10-12 Thread Rob Andrews
text file. On 10/12/06, Asrarahmed Kadri [EMAIL PROTECTED] wrote: It means there is no need of entering the data in the dictionary,?? How will I then implement the uniqueness of loginnames??? Thanks for the support. regards, Asrar On 10/12/06, Rob Andrews [EMAIL PROTECTED] wrote

[Tutor] Fwd: Help with basic user-data file

2006-10-12 Thread Rob Andrews
I'm forwarding this to the tutor list, as I'm swamped at work. -- Forwarded message -- From: Asrarahmed Kadri [EMAIL PROTECTED] Date: Oct 12, 2006 9:17 AM Subject: Re: [Tutor] Help with basic user-data file To: Rob Andrews [EMAIL PROTECTED] Thanks. Can you please also tell me

Re: [Tutor] What after Learning Python 2nd

2006-10-09 Thread Rob Andrews
, you'll surely want to do some things that will give you a good idea of what resources you need to tackle next. -Rob A. On 10/9/06, josip [EMAIL PROTECTED] wrote: Hi. Hi I have finished Learning Python 2nd ed. What to do next? Should I go with Programming Python book or Python Cookbook

[Tutor] CGI / HTTP

2006-09-13 Thread Rob
how to properly use HTTP headers from within a python CGI script. Is there a way to submit form data to a CGI script and not have anything returned? Thanks, -- Rob ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] howto keep a program organised?

2006-09-11 Thread Rob Vogel
my view in the IDE). Any advice about how you organise this kind of things, is very much appreciated. Thanks, Rob ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] howto keep a program organised?

2006-09-11 Thread Rob Vogel
think I will make a usb class to keep it better organised. I have attached the module that contains the usb and related code, to give a better view of what I'm talking, and I would appreciate any feedback on it. Thanks, Rob On 9/11/06, Alan Gauld [EMAIL PROTECTED] wrote: Hi Rob, For example

Re: [Tutor] howto keep a program organised?

2006-09-11 Thread Rob Vogel
Thanks for the info. I will use a module. Regards, Rob On 9/11/06, Alan Gauld [EMAIL PROTECTED] wrote: The functions do not share variables, I don't use global vars, and I don't need a new instance. In that case you don't need a class. A module should do all you need by providing

[Tutor] smtp error from cgi script

2006-08-02 Thread Rob
]. The first was the recipient and the second was the sender. Thanks in advance. -- Rob SMTPRecipientsRefusedPython 2.3.5: /usr/bin/pythonWed Aug 2 20:17:33 2006 A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred

Re: [Tutor] I am not really convinced using Python...

2006-07-25 Thread Rob Sinclar
no difference between Python and the C language (our only one real and verifiable religion) . But they can't be compared as C produces native code. As a high-level language -with all this involves- Python simply rules it all. Particulary for scientists. I guess you're one of them. Best Regards, Rob

Re: [Tutor] IDE for Python

2006-07-25 Thread Rob Sinclar
On Tuesday 25 July 2006 18:51, Mike Hansen wrote: Dear All, I am new to Python. I want to know which IDE I should use for programming. If so from where can I get it? Thanks in advance. - Raj I personally use VIM. The closest thing to an IDE I've

[Tutor] Query

2006-03-06 Thread Rob Lane
Hey,I am currently working on a final year project in college building a 3-D virtual model of a building in a python based program called Vizard. I have prepared a set of tutorials on powerpoint which i would like to access by clicking on various objects in the building. e.g. Click on a Window/Air

[Tutor] TKinter Question

2005-11-07 Thread Rob Dowell
information on how to do it. Thank you very much, Rob. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Style/Conceptual Help

2005-11-02 Thread Rob Dowell
the work to make it easier to follow. Thanks again for the input and I will post back here for more advice when I get these changes completed. Oh, and about the email addresses, ebgreen is an account I use when doing email via a web interface (i.e. I'm not at home) and this is my home address. Rob

Re: [Tutor] Style/Conceptual Help

2005-11-02 Thread Rob Dowell
Thanks, I'll do that. Danny Yoo wrote: On Wed, 2 Nov 2005, Rob Dowell wrote: Oh, and about the email addresses, ebgreen is an account I use when doing email via a web interface (i.e. I'm not at home) and this is my home address. [meta: list administration] Hi Rob, No problem. What

[Tutor] Tkinter problem (.create_image)

2005-10-26 Thread Rob Dowell
I am having a problem with Tkinter. The goal is a program that will copy images from one folder to another then delete them from the source dir after it is verified that they made it to the target dir. I have the base functionality figured out (comments on that are welcome of course). Now I

Re: [Tutor] directory recursion

2005-09-12 Thread Rob Andrews
Thanks! That did the trick after very modest head scratching. -Rob On 9/9/05, Danny Yoo [EMAIL PROTECTED] wrote: What's a nice, clean way to recursively scan through directories with an arbitrary number of subdirectories? Hi Rob, You may want to look at os.walk

Re: [Tutor] Guess my number?

2005-08-07 Thread Rob Andrews
the test for the number of tries to a separate if statement running before the if you had already included, so if the user guesses too many times, it won't continue to run through the guess-checking routine. And I used sys.exit() to get out cleanly when the user exceeds the guess limit. -Rob On 8/7/05

[Tutor] file IO tutorial

2005-07-31 Thread Rob Andrews
resources at the end where the student can pursue further information. I'd appreciate if anyone interested would check it over for anything incorrect, misleading, dangerous, or otherwise in need of amendment. -Rob -- Golf with an attitude: http://www.ragingolf.com

Re: [Tutor] replaying

2005-07-19 Thread Rob Andrews
the arguments on the link you shared adequately persuasive. -Rob -- Golf with an attitude: http://www.ragingolf.com/ ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] PLEASE HELP ON PYTHON

2005-07-16 Thread Rob Andrews
://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.html ? namaste, Rob -- Golf with an attitude: http://www.ragingolf.com/ ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Matrix

2004-12-19 Thread Rob Kapteyn
] ] print my_matrix_as_lists[1][1] 5 Rob On Dec 19, 2004, at 1:31 PM, Brian van den Broek wrote: Bugra Cakir said unto the world upon 2004-12-19 10:33: hi, I want to create a matrix in Python. For example 3x4 how can i create this? thanks ___ Tutor maillist

Re: [Tutor] Matrix

2004-12-19 Thread Rob Kapteyn
Juan: Thanks for the tip, but the correct address seems to be: http://www.scipy.com/ the .org does not answer. Now I have to check out the graphing tools they have:-) Rob On Dec 19, 2004, at 8:01 PM, Juan Shen wrote: Try SciPy. http://www.scipy.org/ It has mat class to handle matrix and much