Re: [Tutor] Input

2011-09-30 Thread Mark Lybrand
There is apparently a livewires package that may be of someuse. On Sep 30, 2011 1:25 PM, "Dave Angel" wrote: > On 09/30/2011 03:24 PM, Cameron Macleod wrote: >> Hi, >> >> When you type >> >> Input("\n\nPress The Enter Key To Exit") >> >> it forces you to press the enter key to close the program. W

[Tutor] The Perennial 3.2 vs 2.7

2011-11-17 Thread Mark Lybrand
Okay, so I am about to take up the banner of learning Python again. I had started with 3.2 and I have a book that I like. But all of the things that I want to use Python for appear to be 2.x specific. Will I be setting myself up for failure if I continue learning 3 and then try to write programs

[Tutor] Fwd: Re: The Perennial 3.2 vs 2.7

2011-11-19 Thread Mark Lybrand
Whoops. Hit reply only again. Sorry terry. -- Forwarded message -- From: "Mark Lybrand" Date: Nov 19, 2011 11:02 AM Subject: Re: [Tutor] The Perennial 3.2 vs 2.7 To: "Terry Carroll" Based on what everyone has said and the fact that my learning material is f

[Tutor] Is there a way to add paths in Eric?

2011-11-20 Thread Mark Lybrand
I am using Windows Vista. I have some python scripts I have been developing in my learning folder. Can I add the path to the folder in eric to call them interactively, or will I need to move them? -- Mark :) ___ Tutor maillist - Tutor@python.org T

Re: [Tutor] Is there a way to add paths in Eric?

2011-11-20 Thread Mark Lybrand
Okay, I have answered my own question import sys sys.append() Sorry for bothering. Mark On Sun, Nov 20, 2011 at 6:21 PM, Mark Lybrand wrote: > I am using Windows Vista. I have some python scripts I have been > developing in my learning folder. Can I add the path to the folder i

[Tutor] Critique and Question

2011-11-28 Thread Mark Lybrand
Okay, so I just started to learn Python. I have been working through Dive Into Python 3 and the Google stuff (great exercises IMHO, totally fun). However, with Dive, I had an issue with him referencing the files in the example directory, which from the website seem very unhandy. Although I have

Re: [Tutor] Critique and Question

2011-11-28 Thread Mark Lybrand
just be 'w'-ing. I will look when I get home. Thanks Mark Also a little bummed that subprocess module doesn't appear to work on windows. I probably (hopefully) won't need it, but it still bums me. On Nov 28, 2011 4:27 AM, "Dave Angel" wrote: > On 11/28/2011 04

Re: [Tutor] Critique and Question

2011-11-28 Thread Mark Lybrand
Just so y'all know, I replaced all the urlopen, read, write, nonsense with the following: urllib.request.urlretrieve(url_root + this_file, os.path.join(file_root, this_file)) and it's all good :) Mark ___ Tutor maillist - Tutor@python.org To unsubscr

[Tutor] useful function or reinventing the wheel??

2011-11-28 Thread Mark Lybrand
I am a habitual wheel re-inventor, so it would not surprise me, but I made this little function that I was kinda proud of (seeing that I have only been learning python like a week now): It just takes a directory and checks to see if all the directories, sub-directories exist and creates them if th

Re: [Tutor] useful function or reinventing the wheel??

2011-11-28 Thread Mark Lybrand
> > >> I couldn't follow your code, but finally concluded that it's trying to > create a directory, creating the directories parents also if they don't > exist either. It would be much simpler if written recursively, but there's > no need. > > Check out os.makedirs(), and see if it meets your nee

Re: [Tutor] useful function or reinventing the wheel??

2011-11-29 Thread Mark Lybrand
> > > You're welcome. I'd look forward to seeing your rewrite, and whether it's > really shorter and more straightforward. > > Another advantage is doing less disk I/O if you start by trying the > requested directory directly, and only recursing to parents if you can't > make the requested directo

[Tutor] Programming Collective Intelligence Study Group

2011-11-29 Thread Mark Lybrand
Over on the Machine Learning Class, I mentioned the idea of setting up some online resources to go through the Programming Collective Intelligence book as a group. This would include a group or discussion board of some type, maybe a Google+ or Facebook page, and a wiki. Then we would set a pace an

Re: [Tutor] Programming Collective Intelligence Study Group (Mark Lybrand)

2011-11-29 Thread Mark Lybrand
ging the list at > > tutor-ow...@python.org > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of Tutor digest..." > > > > > > Today's Topics: > > > > 1. Re: How to handle try an

Re: [Tutor] Programming Collective Intelligence Study Group

2011-11-29 Thread Mark Lybrand
> > What are the Machine Learning Class and the Programming Collective > Intelligence book? Should I have heard of them before? > > Sorry for being unclear. Machine Learning Class is one of the free classes offered online by Stanford. http://www.ml-class.org This one started in October. Another

[Tutor] Treating lists as lists

2011-11-29 Thread Mark Lybrand
I am pretty sure I saw this somewhere but now I can't. Here's the problem: list = ['hello', 'world'] template = '%s %s' print template % list But it appears that list is just one (list) when I want to treat it as two (items). I can do that right? How, pretty please? Mark __

Re: [Tutor] Treating lists as lists

2011-11-29 Thread Mark Lybrand
Thanks everyone. Right before quitting time my brain froze up :) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Programming Collective Intelligence Study Group

2011-11-29 Thread Mark Lybrand
Before I launch in on my master scheme. I have come across another couple of interesting Machine Learning/Python books: Mining the Social Web by Matthew Russell. O'Reilly ISBN-13: 978-1449388348 Machine Learning: An Algorithmic Perspective by Stephen Marsland. ISBN-13: 978-1420067187 Okay, thi

[Tutor] Python Saved the Day

2011-12-04 Thread Mark Lybrand
No question. Last weekend I buckled down and learned as much Python as I could (just because I have had an interest to do so for a while). When I got to work on Monday, there was a serious database issue that needed addressing. As I was trying to assess the situation, I employed Python to help

[Tutor] Fwd: Python Saved the Day

2011-12-04 Thread Mark Lybrand
Forgot to include the list. Sorry. -- Forwarded message -- From: Mark Lybrand Date: Sun, Dec 4, 2011 at 12:59 AM Subject: Re: [Tutor] Python Saved the Day To: wesley chun The quick process of trying out different ideas, first in IDLE and then in script was a biggie. List

[Tutor] TypeError in class destructor

2011-12-10 Thread Mark Lybrand
I am working on the Files chapter of Dive into Python 3, and have implemented the example script at the end of this message. The first input prints to the terminal as expected, the second value prints to the file as expected. Then the script tries to destroy in the class instance and bombs with:

Re: [Tutor] TypeError in class destructor

2011-12-10 Thread Mark Lybrand
def __exit__(self, *args): Thanks guys. This is the solution I implemented and it works great. Mark :) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] ez_setup.py for Python3 64-bit on Vista

2011-12-31 Thread Mark Lybrand
I have found this script: http://peak.telecommunity.com/dist/ez_setup.py But I can see that this is Python 2.x Is there a Python 3 version, or should I be doing something else to install an .egg on my system? Thanks in advance. -- Mark :) __

Re: [Tutor] ez_setup.py for Python3 64-bit on Vista

2011-12-31 Thread Mark Lybrand
... you'll see the newly installed script. Additionally you can then > trivially also install "pip", by executing: > > easy_install pip > > Does this triviality depend on where the pip files are that I wish to "easy install"? I would assume that the answer is "yes". In which case, if those pip f

Re: [Tutor] ez_setup.py for Python3 64-bit on Vista

2011-12-31 Thread Mark Lybrand
I think I got it actually. Thanks. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] want to chat with someone - phone, skype, or email

2012-01-02 Thread Mark Lybrand
On Jan 2, 2012 12:22 PM, "Tamar Osher" wrote: > > Hi! I have never before learned a programming language, and I started learning Python a couple of days ago. I am wondering: How does a person make the leap from reading about Python to doing Python? Not directly responding to the petition for ch

Re: [Tutor] Teaching an 8-year-old programming.

2012-05-20 Thread Mark Lybrand
Have you considered this book: http://www.amazon.com/Hello-World-Computer-Programming-Beginners/dp/1933988495 Mark On Sun, May 20, 2012 at 2:41 PM, boB Stepp wrote: > On Sun, May 20, 2012 at 4:15 PM, Devin Jeanpierre > wrote: >> I've heard remarkable things about http://www.programbydesign.org

[Tutor] Bar Operator ??

2013-03-09 Thread Mark Lybrand
I am working through the Django tutorial and I have come across some syntax I am unfamiliar with. From the context it makes perfect sense what it does, but I haven't seen it before and was wondering if it is documented anywhere (BTW I see other examples in the Django documentation, like date forma

Re: [Tutor] Bar Operator ??

2013-03-11 Thread Mark Lybrand
Thanks. I think I kind of get it. It probably will take a while for the nuances of the filter to sink. Some things are filters that don't seem like they should be, but that seems like my problem. Mark :) On Sun, Mar 10, 2013 at 11:33 PM, Danny Yoo wrote: > > > > It's a filter: > > > > https:

[Tutor] Random Python Tip

2013-03-15 Thread Mark Lybrand
I seem to remember a web page that generated a random Python programming tip. However my Google Fu is weak today. Does anyone recall the URL of what I am talking about? -- Mark :) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscr

Re: [Tutor] trouble installing library

2013-04-24 Thread Mark Lybrand
What tutorial are you using BTW? On Wed, Apr 24, 2013 at 6:29 AM, eryksun wrote: > On Wed, Apr 24, 2013 at 8:51 AM, Lolo Lolo wrote: > > Thanks for the help guys > > > >>> Scripts\activate.bat is a relative path, assuming your current working > >>> directory is that of the virtual environment.