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,
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
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
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
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
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
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
-- 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
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
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
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
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
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
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
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
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
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
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.
---
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.
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
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,
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
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
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
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
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,
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
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.
--
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
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
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
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
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
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.
---
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
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
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
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
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
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
>>
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
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
> _
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
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
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
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)
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
>
> --
>
> 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
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
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
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
801 - 851 of 851 matches
Mail list logo