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:
>>> 0b101
On 4 February 2013 15:32, Albert-Jan Roskam 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 away on
>
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 wrote:
> Dear Rob,
>
> This caught me out as
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
On 23 August 2012 15:17, Victoria Homsy 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 function
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 dat
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
__
hostbyname("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
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
___
Tuto
4: character maps to
I'm a little confused about a workaround for this, from what I've
googled the approach seems to be to use the codecs.register_error and
codecs.ignore_errors to skip processing of the offending character. I
haven't been able to find an understandable example thou
some (and very quick)
reply.
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 ca
down a bug 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
nny though 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
> <[EMA
the
necessary standard library 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
stead of a retrieved value.
Any help very appreciated.
Also, a point of nettiquette for this list - how do I say thanks to people -
not to the list, but in direct emails?
Thanks all,
Rob
==the ISBNs from my file ===
0006755151
059304083X
0349112150
0141030143
0099740915
0552773123
074759008
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
WnroImpJKqqmEZqeNQCKzhjIkKQHURWLXFw
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
__
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
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 PRO
the time module in the standard library has 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
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
other subdirectory nested one level deeper)
How might 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
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 I'm
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
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
without meaningful 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
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 ye
he master programmer."
-Rob A.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
resented by x[9:14] in the example here.
I haven't yet figured out a way 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
fore the string tells python it's a raw string)
'c:\\' (the first \ telling python to take the second \ at face value)
-Rob A.
On 2/15/07, Mark Bystry <[EMAIL PROTECTED]> wrote:
> Well, immediately I am having problems. Be patient with me.
>
> This what I have.
on which I 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
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
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
ound Python to be simpler & 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
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 goo
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.
Ca
delimited 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
>
>
&
(time.ctime()) for a nice, human-readable time stamp.
Don't forget to "import time" first.
-Rob A.
On 10/12/06, Asrarahmed Kadri <[EMAIL PROTECTED]> wrote:
> Folks,
>
> I am trying to modify the userManagement program given in Core Python
> Programming. It uses a
ing a crack
at those, 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
don't
know 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.o
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 clas
rstand.
I 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
called (and the rest
just clutter 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
ECTED]. 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
occ
> Hello there,
> i have a customer list, each with a number of email address that we
> send notifications to via text message.
> the problem is, there are a number of providers ( just two ) that
> reject our messages.
>
> What error do you get with the rejection?
>
>
> the script goes a little some
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
s. I guess you're one of them.
Best Regards,
Rob Sinclar
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
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
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.
>>
l 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 add
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 wan
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,
&
thirdLine to newFile
currentFile.close() # close currentFile
newFile.close() # close newFile
-Rob
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
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, . , <[EMAIL PROTECTED]> wrote:
> I want the program to say "You're stupid!" When a player fails to guess in
>
few other 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://ww
es listed on
> that page.
I found 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
te a few tutorials to help get you started. Have you
checked out: http://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
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
[2, 1, 2, 8] ]
>>> 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
__
62 matches
Mail list logo