[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

[Tutor] print string using triple quote

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

[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] 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

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

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

[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] 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,

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] 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] 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] 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

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] (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] 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] 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] 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] 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] 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.

[Tutor] Scribbler Robot

2010-09-16 Thread Nick
http://www.georgiarobotics.com/roboteducation/robot-kit.html you can check the robot out at this link. is this a good buy you guys think, or is there a better python compatible robot out there? I just want something to keep me interested in programming and that gives me ideas of programs to

Re: [Tutor] How to print the installed web browser

2010-09-01 Thread Nick Raptis
On 09/01/2010 11:46 AM, Nick Raptis wrote: Alan, let me make a wild guess here. Ubuntu does have little "Preferred applications" config tool. I don't know how or where it stores this data, but my guess is it's the same place xdg (as in xdg-open) gets it's configu

Re: [Tutor] How to print the installed web browser

2010-09-01 Thread Nick Raptis
; Ranjith, get ready for some configuration file parsing. But if you just want to open a url with the default browser, you can just execute "xdg-open your-url" as a subprocess. Hope I shifted you to the right direction. Nick PS-trivia: I got to guess these just

Re: [Tutor] project euler prime factorization problem

2010-08-29 Thread Nick
"Did you test the program? That is one way to tell whether it works perfectly. What you showed above will do one visible thing - it will print "Don't forget to consider primes 2, 3, 5, and 7\n". The rest is a somewhat confusing collection of function definitions and comments. You never call the

[Tutor] project euler prime factorization problem

2010-08-29 Thread Nick
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? #don't forget 2,3,5,7. this function doesn't deliver those as output. def is_prime(b): #checks a number greater than 7 to see if it is prime and returns if is. if b % 2 != 0 and b

Re: [Tutor] input problem

2010-08-22 Thread Nick Raptis
As I understand you never get the prompts, right? Nick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] input problem

2010-08-22 Thread Nick Raptis
ion as an exercise, there is a build in method of string that accomplishes the same effect. Try x=fruit.count(letter) - Give a bit of thought about what would happen if someone enters a whole string instead of a character for letter. How should your program accommodate that? Nick

Re: [Tutor] Writing a prime number program using upper bound of square root of n

2010-08-22 Thread Nick
"1 * 120 = 120 2 * 60 = 120 3 * 40 = 120 4 * 30 = 120 5 * 24 = 120 6 * 20 = 120 8 * 15 = 120 10 * 12 = 120 10.9545 * 10.9545 = 120 12 * 10 = 120 <=== already seen this one! > Also I can write a program that > tests whether the number is a factor of 2, 3, 5, 7, but I think > you're trying to poin

Re: [Tutor] input problem

2010-08-22 Thread Nick Raptis
chine with as editor SPE. Roelof You are using Python 2.x, so you should use raw_input() instead of input(). Note that in Python 3.x, raw_input() has been renamed to just input(), with the old 2.x input() gone. Nick ___ Tutor maillist - Tutor@pytho

Re: [Tutor] Tutor Digest, Vol 78, Issue 100 -- Prime numbers using square root of n

2010-08-21 Thread Nick
"We're still doing too much work. Why go all the way up to n? We know that (say) 93 can't possibly divide into 99, or 57 into 59. The largest number we need to check is the square root of n. The reason is a little subtle, so think about it, don't just take my word. Hint: write down the factors of,

Re: [Tutor] Tutor Digest, Vol 78, Issue 99 -- Prime numbers

2010-08-21 Thread Nick
"Perhaps you should try something a little bit less ambitious. Write a program to test whether a number is divisible by 3. Then write a program to test whether a number is divisible by 3 or 5. Then write a third program to test whether a number is divisible by 3, 5 or 7. Then generalise that third

Re: [Tutor] Tutor Digest, Vol 78, Issue 97

2010-08-21 Thread Nick
From: tutor-bounces+nblack3=student.gsu@python.org [tutor-bounces+nblack3=student.gsu@python.org] on behalf of tutor-requ...@python.org [tutor-requ...@python.org] Sent: Saturday, August 21, 2010 1:25 PM To: tutor@python.org Subject: Tutor Digest,

Re: [Tutor] String replace question

2010-07-28 Thread Nick Raptis
ere, it just get's represented as two. In fact, you should have escaped \. your self writing the line as such: uri.replace('.', '\\.') but since \. is not a special character, python is smart enough to not mind Nick ___ Tu

Re: [Tutor] problem with simple script

2010-07-28 Thread Nick Raptis
but it isn't not for me. Advice, please. Thanks, Dick Moores Split the input before the if. Fork based on the length of the resulting list. :) Nick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Calculating and returning possible combinations of elements from a given set

2010-07-27 Thread Nick Raptis
nk Thank you very much in advance! Take a look in the itertools module http://docs.python.org/library/itertools.html Check the section "*Combinatoric generators:" (website doesn't have an anchor link for that, search around a bit) Nick * ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] need help with msvcrt.getch()

2010-07-27 Thread Nick Raptis
that /getch() gets and debug from there Nick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] nested list help

2010-07-27 Thread Nick Raptis
ript is very basic and it doesn't tend to a lot of things you'd might want, like eliminating double values or sorting, but it should start you on your path. Nick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Searching a text file's contents and comparing them toalist

2010-07-14 Thread Nick Raptis
ses too) For example, print "\n".join(first_run) will get you started. I think the end code you're looking for is something like output = ["\n".join(run) for run in sorted_list] print "\n".join(output) but I'm not sure if you've got the ha

Re: [Tutor] Python Documentation Clarification

2010-07-12 Thread Nick Raptis
g/reference/introduction.html?highlight=brackets#notation Nick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Function returns 'None'

2010-07-11 Thread Nick Raptis
On 07/11/2010 06:50 PM, Luke Paireepinart wrote: I think the new version is harder to understand. Sent from my iPhone On Jul 11, 2010, at 10:43 AM, Nick Raptis wrote: Aww! A critic! You humble me (really, I'm not being sarcastic here, I welcome it gladly) I won't argue about

Re: [Tutor] Function returns 'None'

2010-07-11 Thread Nick Raptis
On 07/11/2010 06:28 PM, Nick Raptis wrote: def recursfac(x,carryover=1): print 'x:',x,'carryover:', carryover if x > 1: carryover *= x carryover = recursfac(x-1, carryover) return carryover And this returns x: 3 carryover: 1 x: 2 carryover

Re: [Tutor] Function returns 'None'

2010-07-11 Thread Nick Raptis
ver And this returns x: 3 carryover: 1 x: 2 carryover: 3 x: 1 carryover: 6 6 Done! What you should learn from this is that, when doing recursion, figuring out what your function should do on the way up is as crucial as what you want it to do on the way down. Nick __

Re: [Tutor] Having a return when subprocess.Popen finishes

2010-07-08 Thread Nick Raptis
rward: use the shortcut output = subprocess.check_output("your command here") Always check latest documentation for your python version too http://docs.python.org/library/subprocess.html Nick On 07/08/2010 04:04 PM, Paul VanGundy wrote: Hi All, I'm trying to get data from sub

Re: [Tutor] Django Read

2010-07-08 Thread Nick Raptis
www.amazon.com/Definitive-Guide-Django-Development-Second/dp/143021936X/ The printed one is a bit more updated (1.1) and pays off it's money because of it's great reference section :) Nick On 07/08/2010 03:48 PM, Dipo Elegbede wrote: Hi all, I have done a little basic on python a

Re: [Tutor] newbie to gui programming

2010-07-08 Thread Nick Raptis
is that after trying wxPython with a book a bit I decided that GUI programming was not my thing at all, and started writing games with pygame. Many similar concepts, twice the fun. Now I'm doing web work. Give it time, trust your gut and don't panic, you'll end up right where you wa

Re: [Tutor] differences between mmap and StringIO

2010-07-07 Thread Nick Raptis
a StringIO instance, copy your file to it, close the file, do whatever you want in memory, open your file again for writing, copy the StringIO to it, close both. I'd consider that overkill for most projects Is there something in particular you want to do? Nick On 07/08/2010 01:52 AM, Eduard

Re: [Tutor] newbie to gui programming

2010-07-07 Thread Nick Raptis
u so much for the answers, you're such a helpful bunch. Nick On 07/07/2010 10:16 AM, Alan Gauld wrote: "Nick Raptis" wrote Really good news is that on this very list on another thread, someone suggested Dabo http://dabodev.com/ It's a python library on top of wxPython and it&

Re: [Tutor] newbie to gui programming

2010-07-06 Thread Nick Raptis
k it might be a good choice for a new python programmer, exactly for the above reasons. I think it might be worth the hurdles and pay off in the end. Nick On 07/06/2010 09:48 PM, Alan Gauld wrote: There are many toolkits but these have as many similarities as differences. But none of them w

Re: [Tutor] [Python-ideas] "value" ~ "data" ~ "object"

2010-04-15 Thread Nick Coghlan
ngs in Python which aren't first class objects, since they reflect lookup entries in some namespace or container, such as the mapping from names to pointers in a class or module __dict__ or a function's locals, or the items stored in a list or set. Cheers, Nick. -- Nick Coghlan

Re: [Tutor] the art of testing

2009-11-24 Thread Nick
As well as the other replies, consider that you are doing "unit" testing: http://en.wikipedia.org/wiki/Unit_test One method is black-box testing, which is where the thing (class, function, module) you are testing is treated as a black box, something that takes input and returns output, and how i

[Tutor] Is pydoc the right API docs?

2009-11-24 Thread Nick
I'm not sure I'm using pydoc correctly. I only seem to get abbreviated help rather than full documentation. It happens often enough that I think I'm doing something wrong. For example, I want to upgrade my scripts to use .format() from using %. $ pydoc format Help on built-in function f

Re: [Tutor] Introduction - log exercise

2009-11-17 Thread Nick Stinemates
> I will read lines from file, with the 'for loop', and then I will check them > for > 'foo' matches with a 'while loop', if matches I (somehow) re-initialise the > list, and if there is no matches for foo, I will append line to the list. > When I > get to a blank line (end of block), write myLis

Re: [Tutor] Can python determine Battery or AC Power?

2009-10-28 Thread Nick Hird
es though.  So what O.S. are you > on? > > On Wed, Oct 28, 2009 at 4:15 PM, Nick Hird wrote: >> >> Is there a way in python to tell if the power source for a laptop is >> ac or battery? I am trying to write a small script to print out my >> system stats and would

[Tutor] Can python determine Battery or AC Power?

2009-10-28 Thread Nick Hird
. Thanks! -Nick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Not storing the PATH in ZipFile?

2009-10-14 Thread Nick Hird
That was it. Thanks so much! I was looking at the docs and didn't think that applied to the path that was stored. Thanks Again! -Nick On Wed, Oct 14, 2009 at 12:16 PM, Kent Johnson wrote: > On Wed, Oct 14, 2009 at 11:38 AM, Nick Hird wrote: >> I was reading another thread and deci

[Tutor] Not storing the PATH in ZipFile?

2009-10-14 Thread Nick Hird
store the path in the zip file? When i decompress the files, i would like them to not be associated with a particular folder or path, just the files. I looked through the docs but didn't see anything to disable the path. Thanks, -Nick ___ Tutor mai

Re: [Tutor] Which version to start with?

2009-10-05 Thread Nick Hird
Thanks all! I think i will install the newly released 2.6.3 and go from there. Its a little intimidating but i guess i gotta jump right in and get my feet wet. Thanks again! -Nick On Mon, Oct 5, 2009 at 5:59 PM, wesley chun wrote: > On Mon, Oct 5, 2009 at 2:24 PM, Nick Hird wrote: >>

[Tutor] Which version to start with?

2009-10-05 Thread Nick Hird
What is the best version of python to start out with? I see some discussions on the net about not going to 3.1 but staying with the 2.x releases. But then i see that 3.1 is better if your just starting. Thanks for any insight on which version to go with. -Nick

Re: [Tutor] To write data in two different fonts?

2009-08-13 Thread Nick Raptis
ng sorted messing things up. Thanks for the insight. Nick ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] To write data in two different fonts?

2009-08-12 Thread Nick Raptis
Dave Angel wrote: As I said, you'd probably get in trouble if any of the lines had '&' or '<' characters in them. The following function from the standard library can be used to escape the line directly, or of course you could use the function Nick supplied.

Re: [Tutor] To write data in two different fonts?

2009-08-12 Thread Nick Raptis
ript you can then code different fonts or sizes according to any logic you want. Won't go into explaining HTML though (hint: use the class HTML attribute) If it sounds more complex than you'd like, it's ok. It's more powerful and more rewarding too. Once you get the basic structu

Re: [Tutor] droplet like behaviour in Python

2009-08-11 Thread Nick Raptis
nstallation specific rather than python/script specific. That turns the question it to a whole new direction for me. Nick Nick Raptis wrote: pedro wrote: #!/usr/bin/env python # encoding: utf-8 import sys theFilePath = sys.argv[1] print theFilePath But when I try to drop something on

Re: [Tutor] droplet like behaviour in Python

2009-08-11 Thread Nick Raptis
tell. (Also put your usual #!/usr/bin/env python in there to work for you) Nick ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] clear screen inside python interpreter

2009-08-06 Thread Nick Raptis
m("clear") I resently made a 'game of life' clone and used the first method to clear the screen. It's good enough for many things! Nick Monte Milanuk wrote: Okay, simple question: is there anything similar to to 'clear' or 'cls' to clean up a

Re: [Tutor] searching for an ip and subnets in a dir of csv's

2009-07-29 Thread Nick Burgess
join(row) On Wed, Jul 29, 2009 at 8:13 AM, Wayne wrote: > On Tue, Jul 28, 2009 at 9:36 PM, Nick Burgess > wrote: >> >> Good evening List, >> >> I am trying to have this script search for an IP or nearest subnet >> match in a dir of csv's. It works

[Tutor] searching for an ip and subnets in a dir of csv's

2009-07-28 Thread Nick Burgess
Good evening List, I am trying to have this script search for an IP or nearest subnet match in a dir of csv's. It works with an absolute match, It will be receiving a whole IP address, so if there is no absolute match no data is returned, however if it is listed somewhere in a subnet I want to kn

Re: [Tutor] converting xls to csv

2009-06-06 Thread Nick Burgess
Thanks everyone, the following code works great. It returns the name of the file and the row that matched the reqex. Is it posible to take the regex compile from user input? To make it take an argument, like > csvSearch.py 10.192.55 af = re.compile(sys.argv[1]) pattern = re.compile(af)

Re: [Tutor] converting xls to csv

2009-06-06 Thread Nick Burgess
or cell in row: if pattern.search(cell): print ', '.join(row) XLS.xls.org1.csv XLS.xls.org2.csv XLS.xls.org3.csv On Sat, Jun 6, 2009 at 3:33 PM, Emile van Sebille wrote: > On 6/6/2009 12:19 PM Nick Burgess said... >> >> Thank you. The data is

Re: [Tutor] converting xls to csv

2009-06-06 Thread Nick Burgess
TypeError: coercing to Unicode: need string or buffer, list found On Sun, May 31, 2009 at 12:45 PM, Richard Lovely wrote: > 2009/5/31 Nick Burgess : >> Got it. >> >> the row is not a string or buffer but the cell is.. >> >> for row in spamReader: >>    for ce

Re: [Tutor] converting xls to csv

2009-05-31 Thread Nick Burgess
Got it. the row is not a string or buffer but the cell is.. for row in spamReader: for cell in row: if pattern.search(cell): print ', '.join(row) On Sun, May 31, 2009 at 5:09 AM, Nick Burgess wrote: > Thank you for your response and my apologies for t

Re: [Tutor] converting xls to csv

2009-05-31 Thread Nick Burgess
9 it returns all of the rows, so I now its reading OK.. Thanks for your time, -nick On Sun, May 31, 2009 at 3:57 AM, Alan Gauld wrote: > > "Nick Burgess" wrote >> >> I am trying to make this code work.  I don't have any experience with >> defining things

[Tutor] converting xls to csv

2009-05-30 Thread Nick Burgess
Hi list, I am trying to make this code work. I don't have any experience with defining things and this is my second program. The error returmed is "SyntaxError: invalid syntax" code: #!/usr/bin/python import cvs def convertXLS2CSV(aFile): '''converts a MS Excel file to csv w/ the same n

Re: [Tutor] returning the entire line when regex matches

2009-05-05 Thread Nick Burgess
forgot to add this at the top, allfiles = [] On Tue, May 5, 2009 at 6:15 PM, Nick Burgess wrote: > for root, dirs, files in os.walk('./'): >    for f in files: >        if f.endswith('.txt'): >            allfiles.append(os.path.join(root, f)) > > This

Re: [Tutor] returning the entire line when regex matches

2009-05-05 Thread Nick Burgess
for root, dirs, files in os.walk('./'): for f in files: if f.endswith('.txt'): allfiles.append(os.path.join(root, f)) This returns a list of the *.txt files. Of course now I am stuck on how to apply the delimiter and search function to the items in the list..? Any clues/ex

Re: [Tutor] returning the entire line when regex matches

2009-05-04 Thread Nick Burgess
Compiling the regular expression works great, I cant find the tutorial Mr. Gauld is referring to!! I searched python.org and alan-g.me.uk. Does anyone have a link? On Mon, May 4, 2009 at 1:46 PM, Martin Walsh wrote: > Nick Burgess wrote: >> So far the script works fine, it avoids pri

Re: [Tutor] returning the entire line when regex matches

2009-05-04 Thread Nick Burgess
the files into one big one before the parse would work but I would need help with that too. the tutelage is much appreciated -nick On Sun, May 3, 2009 at 6:21 PM, Alan Gauld wrote: > > "Alan Gauld" wrote > >>> How do I make this code print lines NOT containing

[Tutor] returning the entire line when regex matches

2009-05-03 Thread Nick Burgess
How do I make this code print lines NOT containing the string 'Domains'? import re for line in log: if re.search (r'Domains:', line): print line This does not work... if re.search != (r'Domains:', line): ___ Tutor maillist - Tutor@pytho

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 - 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
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

[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] 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! ;-) > >

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] 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] 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] 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

[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

[Tutor] lan with python

2008-02-10 Thread Treloar, Nick
hey i was just wondering if any one could tell me if they know if you can make multi player games through lan with python heres the code i want to lan. just hash out the sound files #NiCk TrEloaR PrOgRaMiNg Co. #scissors paper rock #10/6/07 from Tkinter import* import pygame from random

[Tutor] (no subject)

2007-06-22 Thread Nick Treloar
im not sure why this progrm isnt running properly one of the button wont open and it teel me a computer_guess is not defined here is my code #NiCk TrEloaR PrOgRaMiNg Co. #scissors paper rock #10/6/07 from Tkinter import* from random import choice class Application(Frame): def __init__

Re: [Tutor] PyCrust IDE/Shell

2007-06-01 Thread Switanek, Nick
of python installed, so maybe there is some confusion there? If so, I'd be grateful for help understanding what I need to do to resolve it. Thanks, Nick From: Grant Hagstrom [mailto:[EMAIL PROTECTED] Sent: Friday, June 01, 2007 4:33 PM To: Switanek,

Re: [Tutor] PyCrust IDE/Shell

2007-06-01 Thread Switanek, Nick
Hi Alan, Thanks for the path. I find a .py, .pyc, and an icon file name PyCrust, but no .pyw. Any ideas? Thanks, Nick ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] PyCrust IDE/Shell

2007-06-01 Thread Switanek, Nick
y and CreateMacScripts.py, which creates the MS-DOS batch files from the extension-less files), so how should I run pycrust? Thanks in advance for any further help you can provide. Nick -Original Message- From: Hiếu Hoàng [mailto:[EMAIL PROTECTED] Sent: Friday, June 01, 2007 3:42

Re: [Tutor] PyCrust IDE/Shell

2007-06-01 Thread Switanek, Nick
Hi Alan, Your excitement for the PyCrust IDE made me want to check it out, but after downloading wxPython and the "Docs and Demos" at http://www.wxpython.org/download.php#prerequisites I've not been able to find an IDE to launch. Can you explain what I need to do

[Tutor] (no subject)

2007-05-29 Thread Treloar, Nick
how do you import sounds This message is intended for the addressee named and may contain privileged information or confidential information or both. If you are not the intended recipient please delete it and notify the sender. ___ Tutor maillist -

[Tutor] were do i put the random number genorator

2007-05-10 Thread Treloar, Nick
sy") c1.geometry("200x200") Button(c1,text="clear", command = NIck).grid(row=1,column=0) Button(c1,text="new game",).grid(row=1,column=1) def NIck(): child1.box_txt.delete(0.0, END) def child2(): c2 = Toplevel(root) box_

[Tutor] random number guessing game

2007-05-08 Thread Treloar, Nick
i am tying to buil a program using child screens the program is going the make a random number and the user has to guess it . so far i have made the gui but how do i progame it to make the random number This message is intended for the addressee named and may contain privileged information or

[Tutor] number guessing game

2007-05-08 Thread Treloar, Nick
here is my code so far from Tkinter import* root = Tk() root.title("main screen") root.maxsize(width=350,height=200) root.minsize(width=350,height=200) root.resizable(width=YES,height=YES) def child1(): c1 = Toplevel(root) c1.guess_ent = Entry(c1, width = 35,) c1.guess_ent.grid(row = 1

[Tutor] sys.path, managing modules and packages

2007-04-25 Thread Switanek, Nick
my scripts or at the command line. Thanks, Nick ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] python internet archive API?

2007-04-25 Thread Switanek, Nick
ave any suggestions for a way to go about this pythonically? Many thanks, Nick ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] screen scraping web-based email (Alan Gauld)

2007-04-19 Thread Switanek, Nick
Alan, Please let us know when you have a draft of your tutorial on Beautiful Soup and such. I'd be eager to have a look! Thanks, Nick ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

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

  1   2   >