Re: [Tutor] Regular expressions question

2012-12-05 Thread Brett Ritter
with : which doesn't appear in your string. -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Regular expressions question

2012-12-05 Thread Brett Ritter
is that you have a space in the string (after the colon), but \b is a zero-width match. -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo

Re: [Tutor] Beginner's question

2012-11-23 Thread Brett Ritter
) make it a mental challenge for us because our first approach is disallowed. Don't be disheartened at the difficulty, and don't fear it being this hard all along. -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org

Re: [Tutor] help on dic creation

2012-11-05 Thread Brett Ritter
options: http://mail.python.org/mailman/listinfo/tutor -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] help on dic creation

2012-11-05 Thread Brett Ritter
FYI - Gmail's new compose feature makes it WAY too easy to miss trimming the quotes. :( On Mon, Nov 5, 2012 at 3:37 PM, Brett Ritter swift...@swiftone.org wrote: (way too much) -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist

Re: [Tutor] Lotka-Volterra Model Simulation Questions

2012-09-29 Thread Brett Ritter
of variables in research rather than studies about programming variable names (my google-fu is weak) -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http

Re: [Tutor] simon says

2012-09-10 Thread Brett Ritter
the sequence and add an additional step. Player would have to enter the longer sequence in. Continue until player loses (and game made an angry buzz). It was quite addictive. -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor

Re: [Tutor] finally without try or except

2012-07-30 Thread Brett Ritter
everything everywhere (be that good or bad). -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] breeds of Python .....

2012-03-31 Thread Brett Ritter
with Python2 - most major projects haven't made the switch and I'd expect another year or two before they do so. Many tutorials and examples are Python 2-based and there are not that many differences to unlearn in terms of habits. -- Brett Ritter / SwiftOne swift...@swiftone.org

Re: [Tutor] specific recommendation for a Python book, to move from baby-level to intermediate-level

2012-02-15 Thread Brett Ritter
use) -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] What the difference between the two RE?

2012-02-09 Thread Brett Ritter
important to note that nothing in these REs require it to be a word. So both of the above will match the hello in hellonwheels for example. -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change

Re: [Tutor] Return T/F vs print T/F

2012-02-04 Thread Brett Ritter
that mode prints the return. When you are using it your program, the caller decides what to do. The flip side is that printing a value does NOT return it. -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org

[Tutor] Logging to different directories

2011-09-24 Thread Brett Ritter
will let me write to filenames based on date, but it won't alter the path (in fact, the entire logging module seems to be built on the assumption of no subdirectories). Have I missed something? -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor

[Tutor] Strange zip syntax

2011-09-15 Thread Brett Ritter
) # Group in sets of 2 elements -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Intro

2011-08-29 Thread Brett Ritter
? -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Standard way to create debian packages for python programs?

2011-08-18 Thread Brett Ritter
competent enough on the subject to give proper feedback. :) Are you looking for distutils advice, or .deb advice? They are pretty different. How are you expecting your users to install your package? Via easy_install? Apt-get? Something else? -- Brett Ritter / SwiftOne swift...@swiftone.org

Re: [Tutor] When to use def __init__ when making a class?

2011-08-02 Thread Brett Ritter
syntax class Name: pass instance = Name() instance.man = Fred print instance.man -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman

Re: [Tutor] Mailing list documentation

2011-07-31 Thread Brett Ritter
question. There is nothing of concern here. -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] List methods inside a dictionary of list

2011-07-11 Thread Brett Ritter
', 'j']]) Can you understand how this behaves differently than 8*[[0]] ? Check the Python docs for array multiplication if you're confused, but the basic idea is that [0] isn't getting evaluated freshly for every piece in the array for 8*[[0]], but in a list comprehension it is. -- Brett Ritter

Re: [Tutor] Using a dict value in the same dict

2011-07-05 Thread Brett Ritter
they must be set separately. -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread Brett Ritter
) and I can't recall of such behavior. All works fine with me. I've had this as well, and as Steven says, it only occurs with a partiuclar recipient. If you send to the list only (or in fact anyone other than that person), you'll not receive this. -- Brett Ritter / SwiftOne swift...@swiftone.org

Re: [Tutor] using python to write web page

2011-06-15 Thread Brett Ritter
to. There are multiple modules for such templates. This is assuming that you generate the HTML in the first place instead of trying to edit someone elses existing HTML. In that case you'd proceed as you described. -- Brett Ritter / SwiftOne swift...@swiftone.org

Re: [Tutor] Floating Point Craziness

2011-06-12 Thread Brett Ritter
that helps! -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Q

2011-06-08 Thread Brett Ritter
this to occur when your chances are up, right? So why is it _inside_ the while loop? Your basic approach is fine, you just have some extra stuff going on unnecessarily and I'm guessing it's confused you as to your logic. Give it another shot and let us know how it goes. -- Brett Ritter / SwiftOne

Re: [Tutor] Strategy to read a redirecting html page

2011-06-02 Thread Brett Ritter
message page and not the redirection one.) -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python Interview Questions..

2011-05-27 Thread Brett Ritter
and excessive abstraction, elimination of verbs, and horrendous naming habits. I'm curious to see if any of these habits change if/when Java adds functions as first-class objects. -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor

Re: [Tutor] upload xml file via pycurl

2011-05-16 Thread Brett Ritter
On Mon, May 16, 2011 at 2:00 PM, Rayon evosw...@hotmail.com wrote: I am trying to upload a xml file via pycurl, I really need some help here. What is the error your are receiving? Did you fix the fact that you had starting whitespace as I mentioned to your last email? -- Brett Ritter

Re: [Tutor] python file upload

2011-05-14 Thread Brett Ritter
error, -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python program with multiple answers

2011-05-11 Thread Brett Ritter
limited in scope rather than trying to take it all in at once. -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Printing output from Python program to HTML

2011-05-10 Thread Brett Ritter
-and-paste strings to/from other places (for example, template files, raw HTML files, etc). Hope that helps! -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http

Re: [Tutor] folder and file list

2011-05-10 Thread Brett Ritter
escape it: scandir('c:\\tmp') After that your code should work fine (it runs on my system, but I'm not on windows). This filepath issue has many details you can look up or ask about, but this should get you started. -- Brett Ritter / SwiftOne swift...@swiftone.org

Re: [Tutor] Graphic interface

2011-05-10 Thread Brett Ritter
-based application, I'd start by googling TkInter and going from there. There are alternatives, but that's well-supported and widely used. -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change

Re: [Tutor] Python assignment

2011-05-09 Thread Brett Ritter
results) * Give a clear question to answer. If you haven't gotten this from someone else, then consider this that response :) -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription

Re: [Tutor] learnpython.org - Free Interactive Python Tutorial

2011-04-21 Thread Brett Ritter
for beginners like me. Could you pls provide the link. tq To all: The link is in the subject line: http://learnpython.org -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options

Re: [Tutor] Replying

2011-03-28 Thread Brett Ritter
: Yes, that's perfectly acceptable. *bites tongue to resist going off on a rant about TL;DR* Hope that was helpful! -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options

Re: [Tutor] Python3 Tutorial question about a[:] = []

2011-02-16 Thread Brett Ritter
the variable a to refer to a new list a[:] = [] This replaces the existing content of a with empty contents. Check out this example in interactive mode a = [1,2,3] b = a a = [] print a [] print b [1, 2, 3] Versus: a = [1,2,3] b = a a[:] = [] print a [] print b [] -- Brett Ritter

Re: [Tutor] python packaging systems

2011-02-10 Thread Brett Ritter
that the motivation need not be obfuscation. I myself like to package standalone programs for non-techie friends and family to use. For them, Run this is a good first instruction versus Install Python... (regardless of how much their lives might be improved by the latter :) ) -- Brett Ritter / SwiftOne swift

Re: [Tutor] ideas for a simple program

2011-01-25 Thread Brett Ritter
, but for #2 I recommend small games. A blackjack game or a computer that can play tic-tac-toe with you are great ways to work on a well-defined problem that won't take forever. Once you feel sufficiently confident, helping on an open source project as others suggest is a great way. -- Brett Ritter

Re: [Tutor] ideas for a simple program

2011-01-25 Thread Brett Ritter
program could do it in seconds and a bad program would take hours (if it didn't run out of memory first). -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http

Re: [Tutor] Beginning Python and other resources (was Re: SlicingTuples)

2011-01-13 Thread Brett Ritter
of some other way to obtain it for less than $45? Half.com is always my stop of choice for programming books. I see a copy there for $16. -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change

Re: [Tutor] regex question

2011-01-04 Thread Brett Ritter
are great for trying to do powerful and complicated things - and as such may be too complicated if you're trying to do a simple thing. -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change

Re: [Tutor] Choice of Python

2010-12-28 Thread Brett Ritter
on your field. If you want a useful tool that will improve your understanding of other tools in addition to being useful in its own right, Python is absolutely a good choice. All that said, I doubt you'll find many Python Nay-sayers on the Python Tutors mailing list :) -- Brett Ritter / SwiftOne

Re: [Tutor] Choice of Python

2010-12-28 Thread Brett Ritter
without hoop-jumping? -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] vim as a python editor

2010-12-22 Thread Brett Ritter
an environment perfectly tailored (yay for virtualenv) I'll have a screen session manage the entire thing until the project is done, just reconnecting to it when I'm working on it. I highly recommend both screen and virtualenv to anyone that is unfamiliar with them. -- Brett Ritter / SwiftOne swift

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-20 Thread Brett Ritter
On Mon, Dec 20, 2010 at 4:19 PM, Steven D'Aprano st...@pearwood.info wrote: Goal : I am trying to parse a ginormous ( ~ 1gb) xml file. I sympathize with you. I wonder who thought that building a 1GB XML file was a good thing. XML is like violence: if it isn't working, try more. -- Brett

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-20 Thread Brett Ritter
of XML usage I've encountered. As to the original post: Yes, as others have suggested you're going to want an event-based parser along the lines of SAX. Sadly (for you) this means a mental shift in how you address your code, but it's not terrible - just different. -- Brett Ritter / SwiftOne swift

Re: [Tutor] PHP

2010-12-04 Thread Brett Ritter
maintenance/testing/reuse that much harder, even moreso when working on a team with different skill specialties. -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http

Re: [Tutor] Which non SQL Database ?

2010-12-04 Thread Brett Ritter
is pretty much interchangeable with SQLite in terms of functionality. I much prefer SQLite. If your web application intends to have multiple users interacting with the same data, neither is probably a good fit. -- Brett Ritter / SwiftOne swift...@swiftone.org