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
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
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
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
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
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
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
(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
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
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
be great.
Rob
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
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
.
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
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
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
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
-
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
, 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
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
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
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
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
]. 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
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
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
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
information on how to do it. Thank you very much, Rob.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
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
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
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
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
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
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
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
://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
] ]
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
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
58 matches
Mail list logo