[Tutor] (no subject)

2014-05-12 Thread munazah zaidi
i want help   ___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] (no subject)

2014-05-12 Thread Alan Gauld

On 11/05/14 16:50, munazah zaidi wrote:

i want help


3 and -3 are square roots of 9.
Did that help?

If not, you will need to be a lot more specific about
what kind of help you want.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] (no subject)

2014-05-12 Thread Steven D'Aprano
On Sun, May 11, 2014 at 08:50:15PM +0500, munazah zaidi wrote:
> i want help 

Obviously.

What would you like help about? We cannot read your mind.


-- 
Steven
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Real world experience

2014-05-12 Thread Alan Gauld

On 12/05/14 01:12, C Smith wrote:

I have never known anyone that works in this industry. I got one job
transforming xml (should have used xslt, ended up using sed and python
regex scripts) where the guy asked me how much I wanted and I threw
200 bucks out there because I could get a room for two weeks at that
cost. He just laughed and handed me the money.


I'm sure he did. That would be a reasonable rate per day
for contract IT staff.


I am still completely in the dark about what level of difficulty I
would be facing in the professional world.


You would be expected to work on bigger projects that you have likely 
seen before (think 10,000 lines of code to upwards of 10 million lines.)


You could be expected to work as pat of a team - anything from 4 to 400 
other developers. That will involve following standardized practices, 
using standard notations and naming conventions and so on.


You could be expected to work on things that, if they go wrong, could 
kill people - think aircraft control software, or railroad signalling 
systems - or bring the world finance system to its knees - think

high speed stock trading systems...

You might be expected to write comprehensive documentation - 
requirements, project plans, quality plans, architecture,

design, test specifications, user guides, installation guides,
tech support notes etc. on top of writing the code.


If this is difficult at all for me, is there hope to think about
making money in this field?


Sure, there are lots of small web type companies building sites for 
other small businesses that churn out pretty standard online presence. 
Many of those folks are not University trained (although they probably 
have done a lot of coding)



What level of experience are the people at who make 100k a year?


Usually experience of many different types of project from small
1-4 man teams up to very large 100+ teams and short (few days or weeks)
to long term (several years). They probably also have management 
experience, looking after teams of programmers. They should also

have some experience of dealing with non technical business
types and of managing budgets. And of course a wide knowledge of
the IT industry and its technologies (networks, databases,
hardware interfaces...) as well as probably a specialised area of 
knowledge in business - banking, call centres, telecomms, gaming etc



Sorry if this is off-topic for the list


Way off topic! :-)
But probably of interest to a significant minority of the readers.

Maybe you could look at newsgroups like comp.software-eng to
see the kind of stuff pros discuss. The kinds of problems
they are asking questions about.

Also look at the job sites and read the job specs carefully.
Ask how much of whats being asked could I do?



--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Please give a sensible subject (was (no subject))

2014-05-12 Thread Mark Lawrence

On 11/05/2014 16:50, munazah zaidi wrote:

i want help



http://www.catb.org/esr/faqs/smart-questions.html

http://www.sscce.org/

--
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.


Mark Lawrence

---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Help with Python

2014-05-12 Thread jitendra gupta
Hi
This will solve your purpose:
Yes we can write in better way also :
--
#The Dice Game
#add libraries needed
import random

#the main function
def main():
print
#initialize variables
playerOne = 'No Name'
playerTwo = 'No Name'
endProgram ="no"

#call to inputNames
playerOne, playerTwo = inputNames(playerOne, playerTwo)
#while loop to run program again
while endProgram == 'no':
#call to rollDice
winnersName = rollDice(playerOne, playerTwo)

#call to displayInfo
print "Winner is ", winnersName
endProgram = raw_input('Do you want to end program? (Enter yes or
no): ')



#this function gets the players names
def inputNames(playerOne, playerTwo):
playerOne = raw_input("Enter Name")
playerTwo = raw_input("Enter Name")

return playerOne, playerTwo
#this function will get the random values
def rollDice(playerOne, playerTwo):
p1number = random.randint(1, 6)
p2number = random.randint(1, 6)

#this function displays the winner

if p1number == p2number:
winnerName = "TIE"
elif p1number > p2number:
winnerName = playerOne
else:
winnerName = playerTwo
return winnerName

if __name__ == "__main__":
# calls main
main()



On Sun, May 11, 2014 at 8:46 AM, Glen Chan  wrote:

> Hello, I am a student trying to figure out Python. I am getting errors
> that I don't know how to fix. What do you do after you get the error
> message and something is highlighted? Does that have to be deleted? Anyway,
> here is what I mean...
>
>
> #>>> The Dice Game
> #add libraries needed
> import random
> #the main function
> def main():
> print
> #initialize variables
> playerOne = 'No Name'
> playerTwo = 'No Name'
>
> #call to inputNames
> playerOne, playerTwo = inputNames(playerOne, playerTwo)
> #while loop to run program again
> while endProgram == 'no':
> #initialize variables
>  winnersName = 'NO NAME'
>  p1number = 0
>  p2number = 0
> #call to rollDice
>  winnerName = rollDice(p1number, p2number, playerOne, playerTwo,
> winnerName)
>
> #call to displayInfo
>  winnerName
> endProgram = raw_input('Do you want to end program? (Enter yes or
> no): ')
>
>
>
> #this function gets the players names
> def inputNames(playerOne, playerTwo):
> playerOne = raw_input("Enter Name")
> playerTwo = raw_input("Enter Name")
>
> return playerOne, playerTwo
> #this function will get the random values
> def rollDice(p1numer, p2numer, playerOne, playerTwo, winnerName):
>  p1number = random.randint(1, 6)
>  p1number = random.randint(1, 6)
>
> #this function displays the winner
>
> if p1number == p2number:
> winnerName = "TIE"
> elif p1number > p2number:
> winnerName = playerOne
> else:
> winnerName = playerTwo
> return winnerName
>
> # calls main
> main()
>
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Real world experience

2014-05-12 Thread Danny Yoo
>> I have never known anyone that works in this industry.

Just as a side comment: there are probably several folks on this
mailing list whose job description would match "working in industry".


> You could be expected to work as pat of a team - anything from 4 to 400
> other developers. That will involve following standardized practices, using
> standard notations and naming conventions and so on.

Seconded.  Being able to work well with others is one of the biggest
skills of the professional programmer.  It's a matter of exposure and
practice.  That programming doesn't have to be a solitary thing needs
to be strongly emphasized, because the media likes to exaggerate,
especially for the sake of a sexy story: it seems really enamored to
portray programming as some lone, antisocial activity.  In industry,
you work with other people: if the problems are small, they still
involve interacting with others.

Mailing lists like this one are one way to get some social interaction
and experience.  Programmer user groups are also a valuable way to get
in contact with experienced folks.  If you have an organization
nearby, like Hacker Dojo, you may want to look into those kinds of
things.

http://www.hackerdojo.com/About

I don't know where you're geographically located, but if you are close
to Hacker Dojo, they're good people.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Real world experience

2014-05-12 Thread leam hall
On Mon, May 12, 2014 at 1:47 PM, Danny Yoo  wrote:

> >> I have never known anyone that works in this industry.
>
> Just as a side comment: there are probably several folks on this
> mailing list whose job description would match "working in industry".
>

One big step is "program for someone else". Whatever you do scratches your
own interests and itches. Once you start programming for someone else's
changing requirements and lack of understanding of coding limitations you
really find out if you "know" the language.

Leam

-- 
Mind on a Mission 
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Real world experience

2014-05-12 Thread Alan Gauld

On 12/05/14 18:47, Danny Yoo wrote:


practice.  That programming doesn't have to be a solitary thing needs
to be strongly emphasized, because the media likes to exaggerate,


Yes, This can't be stressed too much. Industrial coding is a team 
activity not a solo process.


In fact one well known and respected management book(*) had as a maxiom 
- "Beware of the man in a darkened room". What it meant was be 
suspicious of the lone wolf coder who doesn't tell you what he'sd doing, 
where he's at etc.

His code will likely not work with any one else's (and he'll blame
them of course!) and it will be late because its always 95%
complete...

There are a few lone shark geniuses out there, I've met maybe 2 in
my 40 years in IT. But 99.9% of coders work best in a team.


(*)Software Project Survival Guide by Steve McConnell
(also author of Code Complete etc)
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Real world experience

2014-05-12 Thread C Smith
Thanks to everyone.

>> practice.  That programming doesn't have to be a solitary thing needs
>> to be strongly emphasized, because the media likes to exaggerate,
>Yes, This can't be stressed too much. Industrial coding is a team activity not 
>a solo process.

This is particularly good advice for me. Although I realized that a
big project would involve many people, I was thinking of myself as
"coding alone in dark room " without being able to go over ideas with
a team. I would probably get less frustrated that way.

>One big step is "program for someone else"

This is something I need to practice.

>Just as a side comment: there are probably several folks on this
>mailing list whose job description would match "working in industry".

I was thinking IRL. Thanks for the sense of community though.

>I don't know where you're geographically located, but if you are close
>to Hacker Dojo, they're good people.

That looks pretty amazing. I am in Atlanta, but I may take a bus out
there just to check it out. I lived in LA for a little while and
venice beach, santa monica, and the desert-y hills around mulholland
drive were beautiful.

>or a significant contribution to the industry.

I will keep this in mind.

>involve following standardized practices, using standard notations and naming 
>conventions and so on.

This is another very relevant thing for me to keep in mind. My
variables are usually interesting animals or spells from final fantasy
1.

Thanks

On Mon, May 12, 2014 at 4:55 PM, Alan Gauld  wrote:
> On 12/05/14 18:47, Danny Yoo wrote:
>
>> practice.  That programming doesn't have to be a solitary thing needs
>> to be strongly emphasized, because the media likes to exaggerate,
>
>
> Yes, This can't be stressed too much. Industrial coding is a team activity
> not a solo process.
>
> In fact one well known and respected management book(*) had as a maxiom -
> "Beware of the man in a darkened room". What it meant was be suspicious of
> the lone wolf coder who doesn't tell you what he'sd doing, where he's at
> etc.
> His code will likely not work with any one else's (and he'll blame
> them of course!) and it will be late because its always 95%
> complete...
>
> There are a few lone shark geniuses out there, I've met maybe 2 in
> my 40 years in IT. But 99.9% of coders work best in a team.
>
>
> (*)Software Project Survival Guide by Steve McConnell
> (also author of Code Complete etc)
>
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> http://www.flickr.com/photos/alangauldphotos
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Finding Hostname-IP DNS mappings and if machine is dead or alive

2014-05-12 Thread KIRAN D.S.
Hi,

I have a UNIX shell script that:
a.  lists out the Hostname-IP DNS mappings
b.  checks whether the machine is pingable, and prints "dead" or "alive" 
depending on status.

I want to write this program in Python but am struggling.  Can someone help 
please ?

Here's my script and output run
===
(I have changed my company name to "company", and machine names for privacy 
reasons)

pqr49: / >
pqr49: / > cat 72-network-IP-DNS-checker
#!/bin/bash
i=1
while [ $i -lt 255 ]; do
  hostip=10.145.72.$i
  echo -n "$hostip "
  hn=None
  host $hostip > /dev/null 2>&1
  if [ "$?" -ne 0 ]; then
    echo -n NoDNS
   else
    echo -n DNS
    hn=`host $hostip | awk '{print $NF}'`
  fi
  ping $hostip 1 > /dev/null 2>&1
  if [ "$?" -eq 0 ]; then
    echo -n " alive "
   else
    echo -n " dead "
  fi
  echo $hn
  i=`expr $i + 1`
done
exit
pqr49: / >
pqr49: / > ./72-network-IP-DNS-checker
10.145.72.1 DNS alive piedmont22-1257-rtr-1-v3007.us.company.com.
10.145.72.2 NoDNS dead None
10.145.72.3 NoDNS dead None
10.145.72.4 NoDNS dead None
10.145.72.5 NoDNS alive None
10.145.72.6 DNS dead golf-nwk1k.us.company.com.
10.145.72.7 DNS alive golf-nwk2a.us.company.com.
10.145.72.8 DNS alive golf-nwk2c.us.company.com.
10.145.72.9 NoDNS dead None
10.145.72.10 DNS alive pqr585.us.company.com.
10.145.72.11 DNS alive pqr585-sp.us.company.com.
10.145.72.12 DNS alive pqr585-2540-1.us.company.com.
10.145.72.13 DNS alive pqr585-2540-2.us.company.com.
10.145.72.14 DNS alive xyz-efgh101.us.company.com.
10.145.72.15 DNS alive xyz-efgh101-pqrst.us.company.com.
10.145.72.16 DNS alive xyz-efgh102.us.company.com.
10.145.72.17 DNS alive xyz-efgh102-pqrst.us.company.com.
10.145.72.18 DNS alive xyz-def-ib102.us.company.com.
10.145.72.19 DNS dead pqr294-sp.us.company.com.
10.145.72.20 DNS alive pqr582.us.company.com.
10.145.72.21 DNS alive pqr582-sp.us.company.com.
10.145.72.22 DNS alive pqr580.us.company.com.
10.145.72.23 DNS alive pqr580-sp.us.company.com.
10.145.72.24 DNS alive pqr550.us.company.com.
10.145.72.25 DNS dead pqr551.us.company.com.
10.145.72.26 DNS alive pqr551-sp.us.company.com.
10.145.72.27 DNS^C
pqr49: / >
pqr49: / >


Thank you and regards,
Kiran
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] (no subject)

2014-05-12 Thread Chris Acreman


From: munazah zaidi 
Sent: Sunday, May 11, 2014 10:50 AM
To: tutor@python.org 
Subject: [Tutor] (no subject)

i want help  


Could you be a little more vague?
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Finding Hostname-IP DNS mappings and if machine is dead or alive

2014-05-12 Thread Emile van Sebille
How far have you gotten?  Post your code to show us where you're at and 
we can point you in the right direction.


Emile


On 5/12/2014 2:44 PM, KIRAN D.S. wrote:

Hi,

I have a UNIX shell script that:
a.  lists out the Hostname-IP DNS mappings
b.  checks whether the machine is pingable, and prints "dead" or "alive"
depending on status.

I want to write this program in Python but am struggling.  Can someone
help please ?

Here's my script and output run
===
(I have changed my company name to "company", and machine names for
privacy reasons)

pqr49: / >
pqr49: / > cat 72-network-IP-DNS-checker
#!/bin/bash
i=1
while [ $i -lt 255 ]; do
   hostip=10.145.72.$i
   echo -n "$hostip "
   hn=None
   host $hostip > /dev/null 2>&1
   if [ "$?" -ne 0 ]; then
 echo -n NoDNS
else
 echo -n DNS
 hn=`host $hostip | awk '{print $NF}'`
   fi
   ping $hostip 1 > /dev/null 2>&1
   if [ "$?" -eq 0 ]; then
 echo -n " alive "
else
 echo -n " dead "
   fi
   echo $hn
   i=`expr $i + 1`
done
exit
pqr49: / >
pqr49: / > ./72-network-IP-DNS-checker
10.145.72.1 DNS alive piedmont22-1257-rtr-1-v3007.us.company.com.
10.145.72.2 NoDNS dead None
10.145.72.3 NoDNS dead None
10.145.72.4 NoDNS dead None
10.145.72.5 NoDNS alive None
10.145.72.6 DNS dead golf-nwk1k.us.company.com.
10.145.72.7 DNS alive golf-nwk2a.us.company.com.
10.145.72.8 DNS alive golf-nwk2c.us.company.com.
10.145.72.9 NoDNS dead None
10.145.72.10 DNS alive pqr585.us.company.com.
10.145.72.11 DNS alive pqr585-sp.us.company.com.
10.145.72.12 DNS alive pqr585-2540-1.us.company.com.
10.145.72.13 DNS alive pqr585-2540-2.us.company.com.
10.145.72.14 DNS alive xyz-efgh101.us.company.com.
10.145.72.15 DNS alive xyz-efgh101-pqrst.us.company.com.
10.145.72.16 DNS alive xyz-efgh102.us.company.com.
10.145.72.17 DNS alive xyz-efgh102-pqrst.us.company.com.
10.145.72.18 DNS alive xyz-def-ib102.us.company.com.
10.145.72.19 DNS dead pqr294-sp.us.company.com.
10.145.72.20 DNS alive pqr582.us.company.com.
10.145.72.21 DNS alive pqr582-sp.us.company.com.
10.145.72.22 DNS alive pqr580.us.company.com.
10.145.72.23 DNS alive pqr580-sp.us.company.com.
10.145.72.24 DNS alive pqr550.us.company.com.
10.145.72.25 DNS dead pqr551.us.company.com.
10.145.72.26 DNS alive pqr551-sp.us.company.com.
10.145.72.27 DNS^C
pqr49: / >
pqr49: / >


Thank you and regards,
Kiran



___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor




___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Finding Hostname-IP DNS mappings and if machine is dead or alive

2014-05-12 Thread Danny Yoo
On Mon, May 12, 2014 at 2:44 PM, KIRAN D.S.
 wrote:
> Hi,
>
> I have a UNIX shell script that:
> a.  lists out the Hostname-IP DNS mappings
> b.  checks whether the machine is pingable, and prints "dead" or "alive"
> depending on status.

There will be a few things you'll want to look at.  In particular, if
you can avoid calling out to the shell, that would be nice.


To get the host name given its IP address, you can use
socket.gethostbyaddr(), which does that lookup for you:

https://docs.python.org/2/library/socket.html#socket.gethostbyaddr

http://stackoverflow.com/questions/2575760/python-lookup-hostname-from-ip-with-1-second-timeout


To check dead-or-liveness of the site, you could shell out to ping.
See the subprocess library for details on how to do that:

https://docs.python.org/2/library/subprocess.html

But alternatively, there may be native ping libraries out there for
Python that you can reuse.  A Google search for the term "Python Ping"
hits a few pure-Python ping libraries that people have written.


For command line processing, look into argparse:

https://docs.python.org/2/howto/argparse.html#id1



If you can say more of where you're getting stuck, we can give more
specific advice.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Real world experience

2014-05-12 Thread Danny Yoo
>>I don't know where you're geographically located, but if you are close
>>to Hacker Dojo, they're good people.
>
> That looks pretty amazing. I am in Atlanta, but I may take a bus out
> there just to check it out. I lived in LA for a little while and
> venice beach, santa monica, and the desert-y hills around mulholland
> drive were beautiful.

Scanning Atlanta

...
...

I do not know what the status of this is in real life, since I don't
live in Atlanta, but you might want to check on:

https://wiki.freesideatlanta.org/fs/Info


Alternatively, check your local meetups in the area.  For example:

http://www.meetup.com/Geekspace-Gwinnett/

http://www.meetup.com/python-atlanta/


There are probably many others out there in your local area.  Start
searching.  :P


Good luck to you!
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Real world experience

2014-05-12 Thread C Smith
Freeside is more makers. I haven't gone but have known people that
have. You might find some arduino supposedly, but not much coding
otherwise and you have to pay membership fees. It is more social than
technical, I think. And your car will probably be broken into. I will
check out the python-atlanta group though, thanks.

On Mon, May 12, 2014 at 7:42 PM, Danny Yoo  wrote:
>>>I don't know where you're geographically located, but if you are close
>>>to Hacker Dojo, they're good people.
>>
>> That looks pretty amazing. I am in Atlanta, but I may take a bus out
>> there just to check it out. I lived in LA for a little while and
>> venice beach, santa monica, and the desert-y hills around mulholland
>> drive were beautiful.
>
> Scanning Atlanta
>
> ...
> ...
>
> I do not know what the status of this is in real life, since I don't
> live in Atlanta, but you might want to check on:
>
> https://wiki.freesideatlanta.org/fs/Info
>
>
> Alternatively, check your local meetups in the area.  For example:
>
> http://www.meetup.com/Geekspace-Gwinnett/
>
> http://www.meetup.com/python-atlanta/
>
>
> There are probably many others out there in your local area.  Start
> searching.  :P
>
>
> Good luck to you!
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Real world experience

2014-05-12 Thread Martin A. Brown

Hello,

  10 Pick one favorite specific topic, any topic (XML parsing; Unix 
 process handling; databases).  The topic matters for you.  
 Learn it deeply.  Keep learning it.  The topic matters less for 
 others (unless it is specifically within the computer science
 discipline).  You have just begun. [0]

  20 Pick a toolkit (minidom, etree; os, multiprocessing, threading,
 subprocess; sqlite, psycopg, sqlalchemy, mysql).  Learn why 
 people solved the problem differently each time.  Ask.

  30 Write a program that does something interesting with this.
 Try a different toolkit.  What was hard?  What was easy?
 What could you simply not accomplish?  Look at the source code 
 for the tool you used?  Why couldn't you accomplish what you 
 wanted?

  40 Read all of the documentation.  Read it again.  Read papers and 
 books listed in the documentation footnotes.  Read the 
 documentation again.  Realize that all of this is a (fallible) 
 human endeavor.

  45 Find other, related mailing lists.  Subscribe.  Listen.  Post.

  46 Talk to somebody who has solved the problem.  How?  What tools 
 did that person use [1]?

  48 If reference to something that was new or you did not 
 understand, GOTO 40.

  50 Write a brand new program to solve the same problem.  Examine 
 what you did differently.  Ask somebody to review your code.

  52 Read your old code.

  53 Talk to somebody who has solved the problem in his/her own 
 way, potentially with different tools. [2]

  59 If MASTERY and BORED, GOTO 10.

  60 GOTO 20 [3]

This discipline can be approached in depth-first or breadth-first 
traversal pattern.  Most people on more technical mailing lists 
appreciate the depth-first traversal.

Time waits for nobody (Oh! I need to go eat!),

-Martin

 [0] For these purposes, mine was IP networking.
 [1] What!?!  Not Python?!  Why?  There are reasons to choose 
 something else.  Do not be blind to those resaons.
 [2] Find people who are motivated as you are and are working on 
 similar problems.  Work for them.  Keep reading.  Hire them.
 Keep writing.  Keep reading.
 [3] Oops.  I learned on BASIC.  I hope I do not get banned from
 the list.

-- 
Martin A. Brown
http://linux-ip.net/
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Finding Hostname-IP DNS mappings and if machine is dead or alive

2014-05-12 Thread Alex Kleider

On 2014-05-12 16:36, Danny Yoo wrote:

For command line processing, look into argparse:

https://docs.python.org/2/howto/argparse.html#id1


Although the above is the standard library recommended solution, I would 
recommend you try docopt instead.

http://docopt.org/
https://github.com/docopt/docopt
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Real world experience

2014-05-12 Thread C Smith
I think that is going to be my new wallpaper.

On Mon, May 12, 2014 at 8:25 PM, Martin A. Brown  wrote:
>
> Hello,
>
>   10 Pick one favorite specific topic, any topic (XML parsing; Unix
>  process handling; databases).  The topic matters for you.
>  Learn it deeply.  Keep learning it.  The topic matters less for
>  others (unless it is specifically within the computer science
>  discipline).  You have just begun. [0]
>
>   20 Pick a toolkit (minidom, etree; os, multiprocessing, threading,
>  subprocess; sqlite, psycopg, sqlalchemy, mysql).  Learn why
>  people solved the problem differently each time.  Ask.
>
>   30 Write a program that does something interesting with this.
>  Try a different toolkit.  What was hard?  What was easy?
>  What could you simply not accomplish?  Look at the source code
>  for the tool you used?  Why couldn't you accomplish what you
>  wanted?
>
>   40 Read all of the documentation.  Read it again.  Read papers and
>  books listed in the documentation footnotes.  Read the
>  documentation again.  Realize that all of this is a (fallible)
>  human endeavor.
>
>   45 Find other, related mailing lists.  Subscribe.  Listen.  Post.
>
>   46 Talk to somebody who has solved the problem.  How?  What tools
>  did that person use [1]?
>
>   48 If reference to something that was new or you did not
>  understand, GOTO 40.
>
>   50 Write a brand new program to solve the same problem.  Examine
>  what you did differently.  Ask somebody to review your code.
>
>   52 Read your old code.
>
>   53 Talk to somebody who has solved the problem in his/her own
>  way, potentially with different tools. [2]
>
>   59 If MASTERY and BORED, GOTO 10.
>
>   60 GOTO 20 [3]
>
> This discipline can be approached in depth-first or breadth-first
> traversal pattern.  Most people on more technical mailing lists
> appreciate the depth-first traversal.
>
> Time waits for nobody (Oh! I need to go eat!),
>
> -Martin
>
>  [0] For these purposes, mine was IP networking.
>  [1] What!?!  Not Python?!  Why?  There are reasons to choose
>  something else.  Do not be blind to those resaons.
>  [2] Find people who are motivated as you are and are working on
>  similar problems.  Work for them.  Keep reading.  Hire them.
>  Keep writing.  Keep reading.
>  [3] Oops.  I learned on BASIC.  I hope I do not get banned from
>  the list.
>
> --
> Martin A. Brown
> http://linux-ip.net/
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor