Re: [Tutor] syntax error with a simple print command

2008-10-02 Thread Luke Paireepinart
On Thu, Oct 2, 2008 at 11:42 AM, David <[EMAIL PROTECTED]> wrote: > Thanks, Luke, that makes sense. > This is only applicable to the interpreter, though. It's perfectly legal to have a statement on the line immediately following a loop when you're writing code files. Also,

Re: [Tutor] Idle and windows XP firewall

2008-10-02 Thread Luke Paireepinart
On Thu, Oct 2, 2008 at 12:00 PM, David Holland <[EMAIL PROTECTED]> wrote: > > That works thanks > You should send e-mails to the list in plaintext, because it's really hard to reply to your e-mails in HTML mode. I mean, it's not hard for me to convert them, but it's just one of those minor nuisance

Re: [Tutor] dealing with user input whose value I don't know

2008-10-02 Thread Luke Paireepinart
On Thu, Oct 2, 2008 at 12:06 PM, David <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to do some exercises in John Zelle's book (chapter 4). > I got stuck: > > "Write a program that finds the average of a series of numbers entered by > the user. The program should first ask the user how many n

Re: [Tutor] Hands-on beginner's project?

2008-10-03 Thread Luke Paireepinart
On Fri, Oct 3, 2008 at 8:50 AM, nathan virgil <[EMAIL PROTECTED]> wrote: > > > On Fri, Oct 3, 2008 at 9:19 AM, David <[EMAIL PROTECTED]> wrote: >> >> > Okay, I'm resurrecting this project. >> Where is this project code? > It seems like good code, It's not. > # Content > # retrieve data for curren

Re: [Tutor] How trustworthy are pseudo-random numbers?

2008-10-03 Thread Luke Paireepinart
Is your math correct? That's ridiculously large. On Fri, Oct 3, 2008 at 10:03 AM, Andre Engels <[EMAIL PROTECTED]> wrote: > On Fri, Oct 3, 2008 at 4:11 PM, Daniele <[EMAIL PROTECTED]> wrote: >> >From here >> http://en.wikipedia.org/wiki/Pseudorandom_number_generator#Periodicity >> and here >> htt

Re: [Tutor] Python Basic Help

2008-10-13 Thread Luke Paireepinart
smells like homework. On Mon, Oct 13, 2008 at 12:52 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hey > > My name is Tanya and i am new to python programmin. I have few questions > which hopefully will clear my doubts. > > > First question, we are given a list > > L = [ 345 , 32525 , 525 , 53

[Tutor] Fwd: Technical aspect of os.path.isfile()

2008-10-14 Thread Luke Paireepinart
Oops, replied off-list accidentally. -- Forwarded message -- From: Luke Paireepinart <[EMAIL PROTECTED]> Date: Tue, Oct 14, 2008 at 9:10 AM Subject: Re: [Tutor] Technical aspect of os.path.isfile() To: W W <[EMAIL PROTECTED]> File renames are much faster than file

[Tutor] Fwd: how to see a number as two bytes

2008-10-20 Thread Luke Paireepinart
-- Forwarded message -- From: Luke Paireepinart <[EMAIL PROTECTED]> Date: Mon, Oct 20, 2008 at 11:00 AM Subject: Re: [Tutor] how to see a number as two bytes To: shawn bright <[EMAIL PROTECTED]> high, low = ((num % 2**16) >> 8, num % 2**8) or something thereab

Re: [Tutor] Fwd: how to see a number as two bytes

2008-10-20 Thread Luke Paireepinart
checking to make sure i get what you wrote. > shawn > > On Mon, Oct 20, 2008 at 11:00 AM, Luke Paireepinart > <[EMAIL PROTECTED]> wrote: >> -- Forwarded message -- >> From: Luke Paireepinart <[EMAIL PROTECTED]> >> Date: Mon, Oct 20, 2008 at

Re: [Tutor] Fwd: how to see a number as two bytes

2008-10-20 Thread Luke Paireepinart
i ment num = 600, not 6 > thanks > > On Mon, Oct 20, 2008 at 11:16 AM, Luke Paireepinart > <[EMAIL PROTECTED]> wrote: >> No, I'm not sure what you mean. >> Given this number >> >> 100101010101101011 >> >> the operation will slice off bit

Re: [Tutor] how to see a number as two bytes

2008-10-21 Thread Luke Paireepinart
Nice mention of the struct module, Alan. I had forgotten about it and I just finished an app that really could've been simplified by it. I might retool it to use struct when I have to revisit it for the next part of my class assignment. On Tue, Oct 21, 2008 at 3:34 PM, shawn bright <[EMAIL PROTE

Re: [Tutor] Problems with Calculator Program

2008-10-30 Thread Luke Paireepinart
Seems like when they press "op" you assume that the current number is done being executed and save the value. Then when they press another op, you evaluate the previous op with the new value. You don't update the display until they start typing again. However, when they press =, you evaluate the

Re: [Tutor] reading inputs from keyboard

2008-12-14 Thread Luke Paireepinart
A more gentle nudging in the correct direction is generally more well-received. Honestly, it doesn't help anyone to be rude, and we'll all just think less of you for this unnecessary divergence. If you're not going to at be witty and subtle about it, you may as well direct them to Eric Raymond's a

Re: [Tutor] Top posters to tutor list for 2008

2009-01-01 Thread Luke Paireepinart
Yeah, I agree. Interesting script, Kent. Surprisingly short. I didn't realize I wasn't in the top 5 posters for 2008! I guess I have a new year's resolution to be more helpful. Happy New Year, everyone! On Thu, Jan 1, 2009 at 9:23 AM, jadrifter wrote: > On Thu, 2009-01-01 at 09:34 -0500, Kent

Re: [Tutor] good day

2009-01-07 Thread Luke Paireepinart
On Wed, Jan 7, 2009 at 4:35 AM, A.T.Hofkamp wrote: > Kgotlelelo Legodi wrote: >> >> good day >> >> I just started using python and i want to know how can i solve a boundary > > value problem for ordinary differential equations using shooting method in > python.use the general equation to demonstra

Re: [Tutor] Is Python useful for emulating?

2010-11-28 Thread Luke Paireepinart
It probably won't be fast enough. I wrote an NES emu in python and I ran into a lot of performance issues. If you're new to emu scene, start with David winters' doc and write a chip-8 emu. I will help you learn the structure and process of writing an emulator. Then reimplememt it in c afterward

Re: [Tutor] permutations?

2010-12-02 Thread Luke Paireepinart
Instead of nested fors which will grow exponentially in running time, consider this for removing reversals: newlist = [] tempdict = {} for i in oldlist: try: tempdict[i] except: tempdict[i] = 1 tempdict[i.reverse()] = 1 newlist.append(i) That's the gneral

Re: [Tutor] Question about the "main" Python help list

2010-12-04 Thread Luke Paireepinart
Next time you email tutor, start a new email msg instead of clearing out the contents of a reply to a different e-mail. When you do it like that it breaks threading, so all these emails are in the same thread as the "need help" one even though they aren't related to that e-mail. ---

Re: [Tutor] Help with using the ctypes module

2010-12-13 Thread Luke Paireepinart
I confess I don't know a lot about C so I may be off base here... But it looks like your c func extendarray returns a pointer to the new extended array, but you are not capturing this pointer in your python when you call the c func. So the python code is pointing at the old deallocated array.

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

2010-12-20 Thread Luke Paireepinart
If you can assume a well formatted file I would just parse it linearly, should be much faster. Read the file in as lines if the XML is already in human readable form, or just read in blocks and append to a list and do a join() when you have a whole match. - Sent from

Re: [Tutor] AttributeError: 'list' object has no attribute 'find'

2010-12-21 Thread Luke Paireepinart
Read() does return a string. I guess the better question would be... Are you using read? 'cause in the example you sent you used readlines() which returns a list of lines. - Sent from a mobile device with a bad e-mail client. - On Dec 21,

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

2010-12-21 Thread Luke Paireepinart
You're not going to win any friends here Dave. Steven is well known on this list. He is sometimes abrasive but it's rarely if ever malicious. Anytime he's ever been rude to me it was deserved. Like how I top post from my phone. Or giving bad advice to newbies. People are getting irritated becau

Re: [Tutor] REGEX EXPLANATION

2010-12-21 Thread Luke Paireepinart
Which part of the regexes do you not understand? Have you tried figuring themselves out yourself first? We don't typically give out answers here. This is a tutor list, not a solve your problems for you list. We're here to teach you how to fish, not cook for you. So show us where you're stuck and

Re: [Tutor] test- why no traffic?

2011-01-11 Thread Luke Paireepinart
i see you. did you change your settings so you don't get e-mails? On Tue, Jan 11, 2011 at 12:17 PM, wrote: > hmmm, wonder if my membership went belly up... no traffic arriving... > hmmm... > > ___ > Tutor maillist  -  tu...@python.org > To unsubscribe

Re: [Tutor] python hyperlinks question

2011-01-12 Thread Luke Paireepinart
Not really a python question, but maybe look at that pyexcel or whatever. Should be able to add links to it that way. Csv is jus a data interchange format though, if excel supports passing links thru it then you can do it, otherwise don't use csv for this. - Sent fro

Re: [Tutor] question regarding regular expression compile

2011-01-12 Thread Luke Paireepinart
No. Did you try that? It doesn't evn look like valid python code to me. You want a single string with the r before it, not 3 separate strings. - Sent from a mobile device. Apologies for brevity and top-posting. - On Jan 12, 2011, at 8:02 AM,

Re: [Tutor] Sorting a List

2011-01-12 Thread Luke Paireepinart
Remember the sorted() method takes a key function, have this key function take in each filename and compare the numbers and you're all set! - Sent from a mobile device. Apologies for brevity and top-posting. - On Jan 12, 2011, at 8:17 PM, B

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

2011-01-13 Thread Luke Paireepinart
Also check bigwords.com, they aggregate lots of other book sites and will get you a great deal, especially if you are buying multiple books because it smartly combines shipping and all. - Sent from a mobile device. Apologies for brevity and top-posting. --

Re: [Tutor] (no subject)

2011-01-13 Thread Luke Paireepinart
On Thu, Jan 13, 2011 at 4:53 PM, Steven D'Aprano wrote: > lmho...@jacks.sdstate.edu wrote: >> >> Hello All, >> I am having an issue with lists and am not sure where to go from here any >> advice appreciated. I colored the areas of concern. >> blue my comments >> purple example of output >> red are

Re: [Tutor] Why super does not work !

2011-01-17 Thread Luke Paireepinart
I think it might be related to your multiple inheritance, maybe super is calling the init of observable on the listbox portion or something? I hardly ever do multiple inheritance so I'm not sure. What happens if you swap observable to be the first one? - Sent from a

Re: [Tutor] Facebook

2011-01-27 Thread Luke Paireepinart
And what have you tried? What libs are you using? Which part is confusing you? - Sent from a mobile device. Apologies for brevity and top-posting. - On Jan 27, 2011, at 9:08 AM, Christopher King wrote: > Dear Tutors, > I'm using the Fa

Re: [Tutor] List sorting issues

2011-03-28 Thread Luke Paireepinart
Sort returns none because it changes your list in-place. Print your list out after calling sort and you should see the new one. - Sent from a mobile device. Apologies for brevity and top-posting. - On Mar 28, 2011, at 11:53 AM, Eric Stevens

Re: [Tutor] Python on TV

2011-04-14 Thread Luke Paireepinart
I don't see how a content provider preventing you from accessing content internationally that they probably don't have international distribution rights to as censorship. It's not like your ISP is blocking your access. - Sent from a mobile device. Apologies for brevit

Re: [Tutor] Type error: must be string or read-only character buffer, not seq

2011-04-19 Thread Luke Paireepinart
It's saying one of your variables is not a string. Is one of them a sequence? Perhaps Mir-seq? If so, you need to come up with a way to build a string from this object. You can call the str method and pass in your object or you can explicitly create a string from the data in the object. ---

Re: [Tutor] Python GUI

2011-06-28 Thread Luke Paireepinart
The error message tells you everything... On line 60, you try to add to "number" but the variable hasn't been defined. We aren't going to debug your code for you, do YOU think it will work apart from this? Have you tried running any of the code? It's almost always better to build small parts an

Re: [Tutor] How have I transgressed??

2011-08-21 Thread Luke Paireepinart
Same here as Andre said. I've gotten that email probably a dozen times by now. It's based on an amount of absence I believe. - Sent from a mobile device. Apologies for brevity and top-posting. - On Aug 21, 2011, at 2:37 PM, Andre Engels wr

Re: [Tutor] FW: (no subject)

2012-12-01 Thread Luke Paireepinart
matically with the system time. points = [] > for i in range(0, 1): > > x=random.uniform(0,1) > > y=random.uniform(0,1) > > points.append ( (x, y) ) > Also you could use a generator for all these lines, points = [(random.uniform(0,1), random.uniform(0,1)) for

Re: [Tutor] FW: (no subject)

2012-12-02 Thread Luke Paireepinart
On Sun, Dec 2, 2012 at 8:41 PM, Ashfaq wrote: > Luke, > > Thanks. The generator syntax is really cool. > I misspoke, the correct term is "list comprehension". A generator is something totally different! Sorry about the confusion, my fault. I type too fast sometime

Re: [Tutor] Help with writing a program

2012-12-02 Thread Luke Paireepinart
One effort you could make would be to find the relevant Python 3 document discussing strings and check if it has some references to finding substrings. Let me know what you try and I'll help you if you get stuck. Thanks, -Luke On Sun, Dec 2, 2012 at 11:31 PM, fantasticrm wrote: > The

Re: [Tutor] Tutor Digest, Vol 106, Issue 5

2012-12-03 Thread Luke Paireepinart
On Mon, Dec 3, 2012 at 9:24 AM, Steven D'Aprano wrote: > On 04/12/12 00:55, Spectral None wrote: > >> From:"tutor-requ...@python.org**" >> To:tutor@python.org >> Sent: Sunday, 2 December 2012, 17:34 >> Subject: Tutor Digest, Vol 106, Issue 5 >> >> Send Tutor mailing list submissions to >>

Re: [Tutor] Tutor Digest, Vol 106, Issue 5

2012-12-03 Thread Luke Paireepinart
it. But I can easily see how someone new to the list would get confused. I also did not read the original e-mail due to its cluttered nature. Thanks, -Luke ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Coursera Python Course starts today

2013-08-20 Thread Luke Pettit
gt; >> last time as life got in the way. Hope to succeed this time. > >> > >> https://class.coursera.org/programming1-002/class/index > >> > >> Leam > >> > > -- > > http://31challenge.net > > http://31challenge.net/insight > _

Re: [Tutor] why do i keep getting syntax errors in python when this runs

2013-09-07 Thread Luke Pettit
ice of homework in my first year > Undergrad exactly like this. > > -- > > > James Griffin: jmz at kontrol.kode5.net > > A4B9 E875 A18C 6E11 F46D B788 BEE6 1251 1D31 DC38 > ___ > Tutor maillist - Tutor@python.org > T

Re: [Tutor] A Byte of Python or Learn python the hard way

2014-04-13 Thread Luke Pettit
nsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor > -- Luke Pettit ,,, ^..^,,, http://lukepettit-3d.blogspot.com/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] IDLE/tk in 10.6

2011-07-15 Thread Luke Thomas Mergner
ons/2.7/lib/python2.7/lib-tk/Tkinter.py", line 39, in import _tkinter # If this fails your Python may not be configured for Tk ImportError: No module named _tkinter Luke Mergner lmerg...@gmail.com___ Tutor maillist - Tutor@pyt

[Tutor] Logger object not passed between modules

2011-07-25 Thread Luke Thomas Mergner
y comfortable with obviously. Thanks in advance. Code snippets and prints follow. Luke # File / module one. import FrameMaker # instantiates the subclassed wx.Frame object and fills it. class App(wx.App): def __init__(self) self.logger = self.Log() def Log(self)

[Tutor] Debugging While Loops for Control

2012-02-15 Thread Luke Thomas Mergner
ying to learn a few things in my spare time. Thanks in advance. Luke ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Debugging While Loops for Control

2012-02-16 Thread Luke Thomas Mergner
> > -- > > Message: 1 > Date: Wed, 15 Feb 2012 23:57:08 -0500 > From: Luke Thomas Mergner > To: tutor@python.org > Subject: [Tutor] Debugging While Loops for Control > Message-ID: > Content-Type

[Tutor] Datetime objects

2012-03-16 Thread Luke Thomas Mergner
on specific to a library (sqlalchemy). If it matters, I'm playing around with a small web log application built on Werkzeug, Sqlalchemy, and Jinja2. I'm actually very impressed with the progress I've made. Luke Mergner Mechanicsville, MD lmerg...@gmail.com___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] writing effective unittests

2013-01-02 Thread Luke Thomas Mergner
good tutorial that I've missed. Based on the O'Reilly 2-Part introduction, I hope that learning to write tests will make my code better. Thanks, -- Luke Thomas Mergner Glendale, CA Sent from Mutt. ___ Tutor maillist - Tutor@python.org

Re: [Tutor] writing effective unittests

2013-01-03 Thread Luke Thomas Mergner
half the audio. https://www.youtube.com/watch?v=jTJHQ-zQMk4 Marakana Tech TV: https://www.youtube.com/watch?v=xdY7svOz6n4 At O'Reilly: http://onlamp.com/pub/a/python/2004/12/02/tdd_pyunit.html - Luke Mergner ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

<    4   5   6   7   8   9