If I try to teach myself Python through YouTube videos, why would anyone hire
me over someone who has a 2-year Computer Science degree? And why would anyone
hire someone who has a 2-year Computer Science degree over someone who has a
4-year Computer Science degree?
Would I be hired if I showed
Thanks. What do you mean when you say "find a written tutorial"?
From: Tutor on behalf of
Leam Hall
Sent: Saturday, December 30, 2017 6:39 AM
To: tutor@python.org
Subject: Re: [Tutor] IDLE
On 12/30/2017 04:07 AM, Alan Gauld via Tutor wrote:
> Videos are good
I spent a lot of time watching 18 different Python tutorials made by "The Bad
Tutorials." I realized finally that they were not for me,
because in my opinion, the speaker on the videos skips steps. Also, he had his
own personal name "put in" to his Python, but on my version, it just says the
wo
ad it produces a value greeter than
the supposed maximum while still keeping it as an int. I’m confused. If
sys.maxsize _isn’t_ the largest possible value then how do I determine what is?
Jon Paris
jon.f.pa...@gmail.com
___
Tutor maillist - Tuto
On Jul 23, 2015, at 8:23 PM, Alan Gauld wrote:
> On 23/07/15 20:10, Jon Paris wrote:
>
>> Anyway - thanks again. You’re the first “friendly face” I’ve encountered
>> here.
>
> Hi Jon, that slightly worries me as list moderator.
>
> Can you explain what yo
On Jul 23, 2015, at 5:02 PM, Laura Creighton wrote:
> In a message of Thu, 23 Jul 2015 15:10:14 -0400, Jon Paris writes:
>>> You may find this program useful.
>>> http://www.macupdate.com/app/mac/40735/href=%27
>>>
>>> But you still have to go
On Jul 23, 2015, at 4:42 PM, Laura Creighton wrote:
> In a message of Thu, 23 Jul 2015 16:23:29 -0400, Jon Paris writes:
>
>> Well I confess that is what I was expecting, and certainly you have been
>> very friendly for which I thank you. It did feel a little odd to come
On Jul 23, 2015, at 4:14 PM, Laura Creighton wrote:
> In a message of Thu, 23 Jul 2015 15:10:14 -0400, Jon Paris writes:
>>
>> Thanks for the info Laura - I don’t think I can use it though unless it
>> provides for activation against only one email account. For the va
On Jul 23, 2015, at 2:55 PM, Laura Creighton wrote:
> In a message of Thu, 23 Jul 2015 10:54:09 -0400, Jon Paris writes:
>> I’ve been posting to many different sites for twenty plus years and never
>> had this kind of complaint. I can’t even find a way of telling my email
>&g
On Jul 23, 2015, at 11:58 AM, Laura Creighton wrote:
> In a message of Thu, 23 Jul 2015 09:59:22 -0400, Jon Paris writes:
>> I am not familiar with the term “top post” - I’m guessing you mean that my
>> reply came before your original message.
>>
>> My email does
On Jul 23, 2015, at 10:18 AM, Alan Gauld wrote:
> On 23/07/15 14:59, Jon Paris wrote:
>
>> I am not familiar with the term “top post”
>
> See this wikipedia article which describes in detail all the
> alternatives along with their relative merits.
>
> ht
On Jul 23, 2015, at 10:41 AM, Steven D'Aprano wrote:
> On Thu, Jul 23, 2015 at 09:59:22AM -0400, Jon Paris wrote:
>
>> I am not familiar with the term “top post” - I’m guessing you mean
>> that my reply came before your original message.
>
> Yes, it means "
On Jul 22, 2015, at 5:31 PM, Mark Lawrence wrote:
> On 22/07/2015 15:16, Jon Paris wrote:
>> Yup - the “xxx_todo_changeme” was the part that I meant.
>>
>> That might not constitute a “problem” for you but, for someone just starting
>> out, exactly what is needed to
you are on the V3
list.
Jon Paris
jon.f.pa...@gmail.com
On Jul 21, 2015, at 8:16 PM, Alan Gauld wrote:
> On 21/07/15 21:19, Jon Paris wrote:
>> The one example I specifically remember was this one
>> http://code.activestate.com/recipes/
>
> For Activestate check the lan
Yup - the “xxx_todo_changeme” was the part that I meant.
That might not constitute a “problem” for you but, for someone just starting
out, exactly what is needed to correct it was not obvious. I have subsequently
resolved the issue.
Jon Paris
jon.f.pa...@gmail.com
On Jul 22, 2015, at 9:52
practice to begin with - but what do I know. Most of the other examples
2to3 converted (once I discovered it existed and how to use it in my setup) or
I was able to decipher myself.
I’ll take a look at your tutorial - thanks.
Jon Paris
jon.f.pa...@gmail.com
On Jul 21, 2015, at 1:35 PM, Alan
I’m having problems identifying sites that feature V3 code. My learning is
being hampered by having to worry about conversion for the vast majority of the
examples I encounter.
Any suggestions on how to deal with this?
Jon Paris
jon.f.pa...@gmail.com
Thank you for your help, this definitely gets me going in the right
direction!
On Wed, Jun 11, 2014 at 4:16 AM, Marc Tompkins
wrote:
> On Tue, Jun 10, 2014 at 4:08 PM, Jon Engle wrote:
> > Ok, so when I run the code it immediately terminates and never 'listens'
> to
>
Ok, so when I run the code it immediately terminates and never 'listens' to
the ports in the loop. I have verified by running netstat -an | grep 65530
and the startingPort is not binding.
***Server***
Jons-Mac:Desktop Jon$ python response.py
Please enter starting port: 65530
Jons-M
call last):
File "response.py", line 31, in
thread.start_new_thread(setup(port))
TypeError: start_new_thread expected at least 2 arguments, got 1
On Tue, Jun 10, 2014 at 4:23 PM, Marc Tompkins
wrote:
> On Tue, Jun 10, 2014 at 9:28 AM, Jon Engle wrote:
>
>
Thank you for your help! This updated code does not "bind" the selected
port to a "listen" state, it simply exits. I feel like part of this has to
do with the creation of a procedure. Any ideas/recommendations on how to
make this loop "bind" to a socket?
#!/usr/bin/python # This is s
or] python sockets
> Message-ID:
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 10/06/14 00:33, Jon Engle wrote:
> > I am trying to open ports 1025-65535 with the following code
>
> Why would you want to do that?
> It sounds like a great way to
I am trying to open ports 1025-65535 with the following code (Mostly found
online with small modifications). I am unable to "bind" anything other than
the one port which is selected as input. What am I missing and how do I
bind all the ports simultaneously?
#!/usr/bin/python # This is se
Could you link me to some beginners tutorials/idle codes thank you.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Dive into Python: http://diveintopython.org/ is what you're looking for.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Just as a matter of curiosity piqued by having to understand someone
else's code. Is the difference here just a matter of style, or is one
better somehow than the other?
>>> l
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
>>> ','.join([str(x) for x in l])
'0,1,2,3,4,5,6,7,8,9,10'
>>> ','.join(map(lambda x:
and the
python used for the original text processing is in the same directory at
itin-processing.py. It's a big ugly mess full of naive notes to myself, if
anyone cares to look at it and offer any comments or advice I could not be
anything but grate
All,
Something I don't understand (so what else is new?) about quoting and
escaping:
s = """ "some" \"thing\" """
s
' "some" "thing" '
I've got strings like this:
s = """[{"title" : "Egton, Yorkshire", "start" : new Date(1201,1,4),
"description" : "Hardy's long name: Egton, Yorkshire.
to put the bits together with re.sub() (or str.replace()
?) in the right sort of loop. How can I return the string with _all_ the
dates changed in place thus:
"""{"title" : "Hebertot, Normandie", "start" : "1203-11-07"... etc.
instead of
heck everything that was going on. the appended merged dict got a
"merged" key and the two dictionaries that were merged each got a
"processed" key, then I post processed the list to remove the 'processed'
dictionaries **whew**. Thanks f
Bob, and Kent, Many thanks!
Sounds like the key 'processed' is created by the assignment x['processed'] =
True. So those dictionaries that have not experienced this assignment have no
such key. You should instead use: if 'processed' in x:
Doh! Now that WAS obvious
Try lst.remove(x)
Now t
ire', 'end': datetime.date(1216, 10, 2),
'start': datetime.date(1216, 9, 28), 'long-name': u'Lincoln,
Lincolnshire.'}
{'placename': u'Lincoln, Lincolnshire', 'processed': True, 'end':
datetime.date(1216, 9, 30), 'start': datetime.date(1216, 9, 28),
'long-name': u'Lincoln, Lincolnshire.'}
{'placename': u'Lincoln, Lincolnshire', 'processed': True, 'end':
datetime.date(1216, 10, 2), 'start': datetime.date(1216, 10, 1),
'long-name': u'Lincoln, Lincolnshire.'}
But if I try to call events() thus:
for x in events(lst):
if x['processed'] == True:
print x
I get a KeyError.
Could someone explain what's going on here?
Thanks,
Jon
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
found a way for doing it.
But still I don't really understand why I don't get two "1" lines printed.
It seems that every line is read in "for startline f.read()" so "for endline
in f.read()" will start reading but find no data, am I right?
Thanks, Jon.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
You can find Dive into Python online here:
http://diveintopython.org/toc/index.html
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
What about this?
dic = {}
for line in file("findvalue.dat"):
a,b,c,d = line.split()
dic [a] = (float(b), float(c), float(d))
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
>From http://diveintopython.org/getting_to_know_python/index.html, we can get
this solution which works no matter the size of the dictionaries:
print ' '.join(["%s" % (v,) for k,v in menu_specials.items()])
It generates a formatted string for value in the dictionary and then joins
them using whit
Thanks Kent. I didn't see it.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Cool! It works :-)
But I don't get it. Where is the redirection?
Thanks Ken.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Tout,ETSL8)\r\n'
' ELSE_SLEEP\r\n'
'\r\n'
The file I got as a result won't work. I just wan't the pattern replaced.
Do you know how could I do it?
Thanks again, Jon.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Sorry, I think I should have explained what I was expecting to get.
I wanted plain text back in my file. Real line feed and carrier returns
instead of \r and \n, and so on.
Thanks again, Jon.
___
Tutor maillist - Tutor@python.org
http://mail.python.org
tried without raw strings:
re.sub('LOOP','PRUEBALOOP',line)
but I got the same result.
Any hint?
Thanks, Jon.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
>
> This is my favourite all time beginner book
> http://ibiblio.org/obp/thinkCS/python/english2e/html/index.html. IT is
> in html, I don't know if you can get it in pdf.
>
You can find an revised PDF version here:
http://www.greenteapress.com/thinkpython/
It should be more up to date.
_
There's also a specially tailored solution for dictionaries:
print "%(breakfast)s %(lunch)s %(dinner)s" % menu_specials
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On Sun, 5 Aug 2007, Kent Johnson wrote:
Hmm...actually, isupper() works fine on unicode strings:
In [18]: s='H\303\211RON'.decode('utf-8')
In [21]: print 'H\303\211RON'
HÉRON
In [22]: s.isupper()
Out[22]: True
:-)
I modified uppers to include only the latin characters, and added the
apostroph
Kent, Many thanks again, and thanks too to Paul at
http://tinyurl.com/yrl8cy.
That's very effective, thanks very much for the detailed explanation;
however, I'm a little surprised that it's necessary. I would have thought
that there would be some standard module that included a unicode
equivalent
I'm parsing a utf-8 encoded file with lines characterized by placenames in
all caps thus:
HEREFORD, Herefordshire.
..other lines..
HÉRON (LE), Normandie.
..other lines..
I identify these lines for parsing using
for line in data:
if re.match(r'[A-Z]{2,}', line):
but of course this catches
; Out[3]: <_sre.SRE_Match object at 0x11c1f00>
Of course. I was misinterpreting why things were failing. It wasn't the
regex, it was the decode() encode() round-trip. (a powerful argument for
getting familiar with try/except error handling!)
Again, many thanks for the education!
Jon
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Terry, thanks.
Sadly, I'm still missing something.
I've tried all the aliases in locale.py, most return
locale.Error: unsupported locale setting
one that doesn't is:
locale.setlocale(locale.LC_ALL, ('fr_fr'))
'fr_fr'
but if I set it thus it returns:
Angoul?äMe, Angoumois.
I'm running pyth
ively?
Many thanks,
Jon
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Kent,
That's damned clever! Your solution hovers right at the limit of my
understanding, but the print statements illustrate very clearly the
operation of the function.
Many thanks!
Jon
On Sun, 27 May 2007, Kent Johnson wrote:
>> Here's a puzzle that should be simple, but I
Dear all,
Here's a puzzle that should be simple, but I'm so used to words that
numbers tend to baffle me.
I've got fields that look something like this:
1942. Oct. 1,3,5,7,8,9,10
I need to parse them to obtain something like this:
The xml representation is incidental, the basic problem is
Kent,
Thanks so much. It's easy when you know how. Now that I know, I only need
the encode('utf-8') step since geopy does the urlencode step.
On Thu, 17 May 2007, Kent Johnson wrote:
> It's two steps. First convert to utf-8, then urlencode:
c = u'\xe2'
c
> u'\xe2'
c.encode('utf-8
Dear all,
I've got a python list of data pulled via ElementTree from an xml file
that contains mixed str and unicode
strings, like this:
[u'Jumi\xe9ge, Normandie', 'Farringdon, Hampshire', 'Ravensworth,
Durham', 'La Suse, Anjou', 'Lions, Normandie', 'Lincoln, Lincolnshire',
'Chelmsford, Esse
igure
this out.
Thanks so much for your time!
Jon
>
> You might find the following definitions helpful:
>
> #
> def get_siblings_to_next_anchor(anchor):
>"""Anchor Tag -> element list
>
>
A.*$')})
for x in anchors:
print x
x = x.next
while getattr(x, 'name') != 'a':
print x
And get into endless loops. I can't help thinking there are simple and
obvious ways to do this, probably many, but as a rank beginner,
I will be Out of the Office
Start Date: 8/4/2006.
End Date: 8/12/2006.
If you are in need of immediate support:
Don’t call the Help Desk
The Help Desk (590-9000) consultants are not trained to provide Command
Center support.
While they might attempt to assist you with your problem, the resul
o an excel spreadsheet and then write it to an html file and allow me to
also click on the link to the excel spreadsheet.
Is this possible to do with python?
--
Jon Whitehouse
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
All that does is reverse the hole!?!?x:2o:4x:7o:0x:80:5 O | | X - | O | O - | X | X On 02/02/06,
Wolfram Kraus <[EMAIL PROTECTED]> wrote:
Jon Moore wrote:[...]> Thanks to André, there is a way to win every time if you take the first> move (se
On 02/02/06, Alan Gauld <[EMAIL PROTECTED]> wrote:
Bob,>> Write a new computer_move() function for the tic-tac-toe game to plug>> the hole in the computers stratergy. See if you can create an opponent>> that is unbeatable!>>
>> My main problem is that I can not see how the computers stratergy can>>
ote:
On 31/01/06, Jon Moore <[EMAIL PROTECTED]> wrote:> Improve the function ask_number() so that the function can be called with a> step value. Make the default value of step 1.
>> The function looks like this:>> def ask_number(question, low, high):> """
e] = EMPTY
# since no one can win on next move, pick best open square for move in BEST_MOVES:
if move in legal_moves(board): print move
return move-- Best Regards
Jon Moore
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
ors is to have a member of the target
> audience "test" the book. You Jon have done that but at some cost to you> and those of us on this list.One advantage of doing my book as a web site first was that I had plentyof testers before committing to print (over 100k visitors). Mind y
DannyMany thanks for that, I notice a few erratas that I am yet to come up against. This will save my sanity (well some of it)1JonOn 31/01/06,
Danny Yoo <[EMAIL PROTECTED]> wrote:
On Tue, 31 Jan 2006, Jon Moore wrote:> I have been looking for contact details for the author to ask him wha
/01/06, Bob Gailer <[EMAIL PROTECTED]> wrote:
Jon Moore wrote:> Hi,>> I am still working my way through my 'Python for absolute beginners> book' and have hit a brick wall with one of the end of chapter exercises.>> The challenge says:
>> Improve the function
I guess I am not going mad then!I will skip this exercise and move on.ThanksJonOn 31/01/06, Alan Gauld <
[EMAIL PROTECTED]> wrote:Hi Jon,> Improve the function ask_number() so that the function can be called with
> a> step value. Make the default value of step 1.If its any consolati
;step values' in anyway that I can see in the proceeding chapters!HELP!-- Best Regards
Jon Moore
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
etty interesting exercise.PaulOn Thursday 26 January 2006 12:52 pm, Bob Gailer wrote:> At 08:44 AM 1/25/2006, Jon Moore wrote:>> Hi,>
> I have written the program below as an exercise from a book I am working my> way through.>> Objective from book:> Write a character c
KentThanks again. I have a question (see below).On 26/01/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
Jon Moore wrote:> Hi,>> I have the following dictionary:>> pairs = {"Jon Moore": ["Tony Moore", "Stanley Moore"],
> "
Hi,I have the following dictionary:pairs = {"Jon Moore": ["Tony Moore", "Stanley Moore"], "Simon Nightingale": ["John Nightingale", "Alan Nightingale"],
"David Willett": ["Bernard Willet", "Rober
KentThanks! I have not come accross string formatting yet, but I can see how the for statement works.How would I modify this to just print either the values or keys?Jon
On 26/01/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
Jon Moore wrote:> Hi>> Is there anyway to print in
Hi
Is there anyway to print informtation from dictionaries better than this?:
>>> pairs = {"Jon Moore": "Tony Moore", "Simon Nightingale": "John Nightingale", "David Willett": "Bernard Willet", "J
Alan
Many thanks, that is really useful.
I will go through this a bit at a time over the next few days to ensure I understand what I am doing!
I think functions come in the next chapter!
Jon
On 25/01/06, Alan Gauld <[EMAIL PROTECTED]> wrote:
Hi Jon,> 1. I am sure I have written
Hi,I have written the program below as an exercise from a book I am working my way through.Objective from book:Write a character creator program for a role-playing-game. The player should be given a pool of 30 points to spend on four attributes: strength, health, wisdom and dexterity. The player sh
ord jumble game and need to link the randomly chosen word to a hint should the user need one.-- Best Regards
Jon Moore
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
HiI hope someone can help me!I am currently learning
Python using a book by Michael Dawson. In one of the exercises I have
to right a program that will guess a number chosen by the user.It
is partly working, however it does not seem to keep state of numbers
that should have already been ruled out a
I am new to Python, about 1 day. And I downloaded from
python.org Pythong2.4, it has the command line and
junk. But what actuall program compiles the source of
python into a program? Any of the programs included in
the package? And also, is Python capable of writing an
OS?
Jon
ut I receive is as follows:
Traceback (most recent call last):
File "C:\Documents and
Settings\Administrator\Desktop\python-components\getuser2.py", line 20, in
?
win32con.LOGON32_PROVIDER_DEFAULT
pywintypes.error: (1326, 'LogonUser', 'Logon failure: unknown user name or
bad pa
77 matches
Mail list logo