Re: [Tutor] smtplib alternative???

2005-11-20 Thread Nick Lunt
that helps, Nick . -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Adisegna Sent: 20 November 2005 14:26 To: Danny Yoo Cc: tutor@python.org Subject: Re: [Tutor] smtplib alternative??? Hi Danny, Yes, when sending an email your mail client will always send th

Re: [Tutor] reduce with comprehension

2005-11-24 Thread Nick Lunt
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > >>> def f(x, y): > ... return x + y > ... > >>> arr = range(10) > >>> sum(arr) # Our target > 45 > >>> tmp = [0] > >>> [f(x, y) for x in arr for y in [tmp[-1]] if tmp.append(f(x, > y)) or True][-1] >

Re: [Tutor] Books

2005-12-22 Thread Nick Lunt
Web/Network programming here http://www.amazon.com/gp/product/0596100329/qid=1135198935/sr=2-1/ref=pd_bbs _b_2_1/103-4720029-4050242?s=books&v=glance&n=283155 Not CGI specific, and I haven't bought it yet, but I bet it's a blinder :) > -Original Message- > From: [EMAIL PROTECTED] [mailt

Re: [Tutor] Learning books

2005-12-23 Thread Nick Lunt
you good luck with your python learning experience, and I'm sure that you will find it's also a very cool language to use. I can't help but feel that it is inevitable that it will eventually overtake perl as the scripting language of choice. I hope none of that went too far o

Re: [Tutor] problems with the shebang line and linux

2006-02-16 Thread Nick Lunt
ou need any vi or linux commandline help (altho ive never used ubuntu so anything ubuntu specific I wont be much use with). Good luck, Nick . > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Brian van den Broek > Sent: 16 February 2006 13:

Re: [Tutor] problems with the shebang line and linux

2006-02-16 Thread Nick Lunt
Take no notice of this, others have already answered. My emails to the tutor list seem to take about 5 hours to get thru for some reason. Nick . > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Nick Lunt > Sent: 16 February 2006 14:27 >

[Tutor] setting lists

2007-01-10 Thread Switanek, Nick
I'd like to remove redundant items from a list, and have read that using set() is an effective way to do it. But I often get the following error, and I'd be glad for your help understanding what's wrong. >>> z = ['test','test',1,2,1] >>> set(z) set(['test', 1, 2]) >>> list(set(z))# Works a

[Tutor] converting tab-delimited text files to csv

2007-01-26 Thread Switanek, Nick
are combinations of integers and character strings (some of which include double quotes). Do I need to alter the 'dialect' or what? Many thanks in advance for your help! Nick ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] index swap?

2007-02-23 Thread Switanek, Nick
wap. I'm sure I'm overlooking something basic, and I'd be grateful for your help pointing it out. Many thanks in advance, Nick ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] fine in interpreter, hangs in batch

2007-03-16 Thread Switanek, Nick
hing that works in the interpreter, but not when I run the script. Thanks in advance, Nick N = [2,3,4,5] ngramlist = [wordlist] for n in N: ngrams = [' '.join(wordlist[i:i+n]) for i in range(len(wordlist)-n+1)] "Finished the %d-gram list." % n ___

Re: [Tutor] fine in interpreter, hangs in batch

2007-03-19 Thread Switanek, Nick
yLucene would help create frequency dictionaries, but I can't figure it out from the online material available. Any suggestions? Thanks, Nick -Original Message- From: Jerry Hill [mailto:[EMAIL PROTECTED] Sent: Friday, March 16, 2007 12:52 PM To: Switanek, Nick Cc: tutor@python.org

[Tutor] 180MB

2008-05-27 Thread Switanek, Nick
oincidence that each package would be within a few MB of the next. Any insight into whether there is something wrong here, and if so, what I've done? Thanks, Nick ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] pygame event.type == QUIT

2008-07-04 Thread Nick Marmion
I am learning pygame using begining game development w/ python and pygame. I am doing 'Hello World Redux" #!/usr/bin/env python background_image_filename = 'sushiplate.jpg'mouse_image_filename = 'fugu.png' import pygamefrom pygame.locals import *from sys import exit pygame.init() screen = pyga

Re: [Tutor] New to pythong

2008-07-07 Thread Nick Scholtes
Thanks for the info on the Think Python book, and thanks Jeremiah, for posing this question. That book is one of the best Python learning resources I've yet found! Makes it really easy to understand! Nick On Mon, Jul 7, 2008 at 12:43 PM, Marc Tompkins <[EMAIL PROTECTED]> wrote: >

Re: [Tutor] New to python(g)=python" g=(embarrassing)

2008-07-07 Thread Nick Scholtes
Thank you so much for that horrendous imagery. I think I'll go learn C# instead. : ) Nick On Mon, Jul 7, 2008 at 3:28 PM, Marc Tompkins <[EMAIL PROTECTED]> wrote: > I did wonder whether there was a joke there... is the Pythong the hot new > trend in beachwear? > >

Re: [Tutor] I need a Python mentor

2008-08-08 Thread Nick Scholtes
Hi, I'm a beginner in python, so I can't be a mentor, but here are some links that may help: http://uselesspython.com/ Python Wiki at: http://wiki.python.org/ Also google Think Python. It is a great resource. Nick On Fri, Aug 8, 2008 at 4:22 PM, A. Joseph <[EMAIL PROT

Re: [Tutor] Question

2008-11-08 Thread Nick Scholtes
Last I checked, Notepad ++ works with Python. I've never used it for Python, so I don't know how it works. Nick On Sat, Nov 8, 2008 at 9:22 PM, Bap <[EMAIL PROTECTED]> wrote: > Can I use notepad++ for Python? > > Thank you! ;-) > >

[Tutor] Python - Data Mining?

2009-01-04 Thread Nick Scholtes
o see patterns in the data. Where should I start? Does Python do this? If not, what language is used for this? Thank you very much, Nick -- Art: http://www.coroflot.com/bellsoffreedom ___ Tutor maillist - Tutor@python.org http://mail.python.org/ma

Re: [Tutor] Python - Data Mining?

2009-01-04 Thread Nick Scholtes
imals show up in "x" location, or at "xyz" time of year. This could help in re-focuses efforts more efficiently. I'm going to start going over those links and sample code, but beware! I'll probably be dropping a bunch more questions soon! Take care, Nick On Sun, Jan

Re: [Tutor] Python - Data Mining?

2009-01-04 Thread Nick Scholtes
Thanks, Alan. Good to know. I think I'll explore both routes, as it will at least get me some practice with Python. Nick On Sun, Jan 4, 2009 at 3:45 PM, Alan Gauld wrote: > > "Nick Scholtes" wrote > > mind. For instance, I work with some groups that rescue homel

Re: [Tutor] Python - Data Mining?

2009-01-04 Thread Nick Scholtes
Thanks, Alan. Good to know. I think I'll explore both routes, as it will at least get me some practice with Python. Oh, wait. Can Python be used to mine an Openoffice spreadsheet or database? Nick On Sun, Jan 4, 2009 at 3:45 PM, Alan Gauld wrote: > > "Nick Scholtes"

Re: [Tutor] Python on Ubuntu 10.10?

2011-01-15 Thread Nick Stinemates
Python comes pre installed on Ubuntu, as most of the GUI is written in it. Nick On Friday, January 14, 2011, Joel Knoll wrote: > > > > > > Hello, > > I am new to programming and to Python.  I've been using Python with IDLE on > Windows Vista for a few weeks now.

Re: [Tutor] OOP question

2011-01-18 Thread Nick Stinemates
Updated inline. Check the updated definiton of winAmount. Nick On Tue, Jan 18, 2011 at 9:25 AM, Ben Ganzfried wrote: > Hey guys, > > I'm trying to get a version of Roulette working and I had a quick > question. Here is my code: > > class Outcome: > >

Re: [Tutor] OOP question

2011-01-19 Thread Nick Stinemates
.odds: return True return False Make sense? Nick On Wed, Jan 19, 2011 at 9:07 AM, Ben Ganzfried wrote: > yeah I was actually pretty confused about those methods as well. I mean I > get the general idea that we are testing to see if two outcomes are the same > (hence

Re: [Tutor] Sound question

2011-04-08 Thread Nick Stinemates
x27;ve only played with it on Windows but it > claims to work across platforms... > Personally I've only played with it on Linux so it seems we have it covered :) Nick > > -- > Alan Gauld > Author of the Learn to Program web site > http://www.alan-g.me.uk/ > > > &

Re: [Tutor] short url processor

2011-05-13 Thread Nick Raptis
estion would be, can you use the cursor as an iterator (but without hitting the database for each new record)? Then you can skip the worst part of loading all the values in giant_list. Just an idea for Alan and the others to answer. Nick ___ Tuto

Re: [Tutor] (no subject)

2011-10-17 Thread Nick Zarr
t: ")) sample(range(base, upper), quantity) http://docs.python.org/library/random.html#random.sample -- Nick Zarczynski <http://rentageekit.com> Blog 4 <http://nickzarr.com> ___ Tutor maillist - Tutor@python.org To unsubs

Re: [Tutor] A total newbie…sorry

2011-10-27 Thread Nick Zarr
The syntax has changed from 2.x to 3.x. 2.x: >>> print "Hello" Hello 3.x: >>> print("Hello") Hello -- Nick Zarczynski <http://rentageekit.com> Blog 4 <http://nickzarr.com> ___ Tutor maillist - Tuto

Re: [Tutor] Trying to access a random value in a list

2012-01-12 Thread Nick W
first problem: easy fix just remember that len() returns the actual number of items in the list but that list is indexed starting at 0 so just replace your line of pick = len(names) with: pick = len(names) - 1 and for problem #2: just use string formating... like for example instead

[Tutor] Help with else

2015-10-09 Thread Nick Brodsky
name = raw_input("What is your name") print "Great! Now %s, are you a boy or a girl?" % (name) gender = raw_input("") if gender == "boy": print " I can see that, you are very strong": if gender == "girl": print ' Yes, and a beautiful one': else: print "Your choice" I don't understand why

Re: [Tutor] Set Reply-To field to Tutor@python.org

2013-01-29 Thread Nick W
he list address. Nick On Tue, Jan 29, 2013 at 7:44 AM, Albert-Jan Roskam wrote: > > > > > > To summarize existing opinions on this matter: > > > > http://marc.merlins.org/netrants/listreplyto.html > > > > You might want to familiarize yourself with ex

Re: [Tutor] operator order

2013-01-31 Thread Nick W
because python process the expression on the right side of the assignment first. ie d *= 3+4 basically is the equivalent of writing (2) * (3+4). Hope that explains it. Nick On Thu, Jan 31, 2013 at 10:36 AM, heathen wrote: > why is this: > > >>> d = 2 > >>> d *= 3

Re: [Tutor] Read from large text file, parse, find string, print string + line number to second text file.

2013-02-01 Thread Nick W
file (which is nasty waste of resources) if 'myString' in line: with open(thenewfile', 'w') as f: f.write("Line #%d has string: %s" (index, line)) That will print the whole line into the new file, If you only want the characters b

Re: [Tutor] Read from large text file, parse, find string, print string + line number to second text file.

2013-02-02 Thread Nick W
I'd suggest having the newfile open after outfile is defined also a close statement on newfile - or use it with 'with' such as: ... and replace the last line like so: with open(outfile, 'w') as newfile: main(mystring, infile, newfile) (and looking muchly improved,

[Tutor] Project Euler #8

2013-05-31 Thread Nick Shemonsky
n range(0, len(str_num)) if len(str_num[i:i+5])==5] integers = [int(i) for i in strings[0]] def product(x): p = 1 for n in integers: p*=n return p print product(integers) Thanks in advance! Nick ___ Tutor maillist - Tutor@python.org

Re: [Tutor] Project Euler #8

2013-05-31 Thread Nick Shemonsky
ting the product when googling around but I didn't really understand what it was doing so I refrained from using it. More to explore I guess... Thanks again guys! On Fri, May 31, 2013 at 4:10 PM, Alan Gauld wrote: > On 31/05/13 19:23, Nick Shemonsky wrote: > >> or maybe it'd

Re: [Tutor] Coursera Python Course starts today

2013-08-21 Thread Nick Raptis
.coursera.org/course/programming1 so that others interested may find it. Nick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] input loop

2013-09-01 Thread Nick Wilson
Hi, I am trying to create a portfolio of shares, each share is entered manually while checking it against a list of actual share codes.Its working mostly as intended at the moment, except when I print the table out at the end, I want all entered details printed as such Enter command: addEnter sh

[Tutor] (no subject)

2014-03-05 Thread coffer . nick
Hey I just need help plz! Sent via the Samsung GALAXY S®4 Active™, an AT&T 4G LTE smartphone___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] print string using triple quote

2015-03-17 Thread Nick Nguyen
last backslash, unless I put "\\". print(        '''         _       __  __   _     /  _    \   | |     / /    |   ___|    |  _     \                '''        ) RESULT:          _       __  __   _     /  _    \  |  |     / /    |  ___|

<    1   2