Re: [Tutor] Tutor Digest, Vol 176, Issue 13

2018-10-12 Thread Adam Eyring
Also, try (works for me in Python3) rivers = {'nile' : 'egypt', 'ohio' : 'US', 'rhine' : 'germany' } for key, value in rivers.items(): print (key) for key, value in rivers.items(): print (value) for key, value in rivers.items(): print ("The " + key + " is in the country of " + value)

Re: [Tutor] Tutor Digest, Vol 176, Issue 13

2018-10-11 Thread Rajnish Sinha
Try for river in rivers: print ("The " + river + " is in the country of " + rivers[river]) On Wed, Oct 10, 2018 at 9:30 PM wrote: > Send Tutor mailing list submissions to > tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/ma

Re: [Tutor] Tutor Digest, Vol 174, Issue 2

2018-08-02 Thread Saket Mehrotra
I am running only one line of code "import requests" Error I am getting is below Traceback (most recent call last): File "/Users/saketmehrotra/Documents/Flaskask.py", line 4, in import requests File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/__

Re: [Tutor] Tutor Digest, Vol 169, Issue 20

2018-03-26 Thread Alan Gauld via Tutor
First of all, please do not repost the entire digest - we have all already seen them - and some people pay by the byte. Secondly... On 26/03/18 21:44, David Brown wrote: > Thanks Joel. That got me going in the right direction. I ended up using a > "while true" statement. The code below seems to

Re: [Tutor] Tutor Digest, Vol 169, Issue 20

2018-03-26 Thread David Brown
Thanks Joel. That got me going in the right direction. I ended up using a "while true" statement. The code below seems to work now. It will accept any key and not just "Y". Haven't gotten that far with it yet. # Fortune Cookie # Displays Random Fortune # Allows user to see repeated fortunes up to

Re: [Tutor] Tutor Digest, Vol 169, Issue 17

2018-03-23 Thread Alan Gauld via Tutor
First, please don't repost the entire digest - we've all seen the messages before and some people pay by the byte. Secondly it makes finding the relevant message pertaining to your question much harder to find. Delete all the irrelevant stuff. The other problem with the digest is that it tends to

Re: [Tutor] Tutor Digest, Vol 169, Issue 17

2018-03-23 Thread David Holland via Tutor
Thank you all for the replies.  I did not make myself clear.I don't want to access the database directly as that would be unsupported by Oracle.I mean Oracle forms which using in Oracle financials, and something that acts like a dumb clerk that takes information from a spreadsheet and puts it in

Re: [Tutor] Tutor Digest, Vol 166, Issue 21

2017-12-28 Thread Peter Otten
anish singh wrote: >>> However, I am stuck. I have below code which is not working. > > I don't know how to achieve this programmatically: sorted by the > number of occurrences in a descending order. If two or more words > have the same count, they should be sorted > alphabetically (in an ascendi

Re: [Tutor] Tutor Digest, Vol 166, Issue 21

2017-12-25 Thread Alan Gauld via Tutor
On 25/12/17 03:46, anish singh wrote: However, I am stuck. I have below code which is not working. I don't know how to achieve this programmatically: sorted by the number of occurrences in a descending order. If two or more words have the same count, they should be sorted alphabetically (in an

Re: [Tutor] Tutor Digest, Vol 166, Issue 21

2017-12-24 Thread anish singh
>> However, I am stuck. I have below code which is not working. I don't know how to achieve this programmatically: sorted by the number of occurrences in a descending order. If two or more words have the same count, they should be sorted alphabetically (in an ascending order). > > Define "not wor

Re: [Tutor] Tutor Digest, Vol 163, Issue 28

2017-09-19 Thread Alan Gauld via Tutor
On 19/09/17 15:45, Saahndong Ransom wrote: > What are the uses of python? > What are easy way to learn python? Python is a general purpose programming language that can be used to build many kinds of software applications from computer administration to web servers to desktop GUI applications. Th

Re: [Tutor] Tutor Digest, Vol 163, Issue 28

2017-09-19 Thread Saahndong Ransom
What are the uses of python? What are easy way to learn python? On Sep 19, 2017 15:07, wrote: Send Tutor mailing list submissions to tutor@python.org To subscribe or unsubscribe via the World Wide Web, visit https://mail.python.org/mailman/listinfo/tutor or, via email, send a me

Re: [Tutor] Tutor Digest, Vol 162, Issue 42

2017-08-17 Thread Alan Gauld via Tutor
On 17/08/17 12:43, Howard Lawrence wrote: > On Aug 17, 2017 3:17 AM, wrote: ... > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Tutor digest..." Please follow the instructions. Change the subject line. And don't post the entire digest, it's hard to fi

Re: [Tutor] Tutor Digest, Vol 162, Issue 42

2017-08-17 Thread Howard Lawrence
On Aug 17, 2017 3:17 AM, wrote: Send Tutor mailing list submissions to tutor@python.org To subscribe or unsubscribe via the World Wide Web, visit https://mail.python.org/mailman/listinfo/tutor or, via email, send a message with subject or body 'help' to tutor-requ...@pyth

Re: [Tutor] Tutor Digest, Vol 162, Issue 25

2017-08-09 Thread Jaroslaw Michalski
> > > The machine I'm on here is writing big endian UTF-16 and UTF-32. > > > > As you note, the 16 and 32 forms are (6 + 1) times 2 or 4 respectively. This > > is because each encoding has a leading byte order marker to indicate the big > > endianness or little endianness. For big endian data that

Re: [Tutor] Tutor Digest, Vol 162, Issue 19

2017-08-06 Thread Howard Lawrence
On Aug 6, 2017 11:00 AM, wrote: Send Tutor mailing list submissions to tutor@python.org To subscribe or unsubscribe via the World Wide Web, visit https://mail.python.org/mailman/listinfo/tutor or, via email, send a message with subject or body 'help' to tutor-requ...@pyth

Re: [Tutor] Tutor Digest, Vol 161, Issue 42

2017-08-02 Thread Borisco Bizaro
ic than "Re: Contents of Tutor digest..." Today's Topics: 1. Re: Tutor Digest, Vol 161, Issue 41 (Borisco Bizaro) 2. Re: Tutor Digest, Vol 161, Issue 41 (Alan Gauld) 3. Re: Tutor Digest, Vol 161, Issue 33 (Borisco Bizaro) -- Forwarded message -- From: B

Re: [Tutor] Tutor Digest, Vol 161, Issue 33

2017-07-30 Thread Borisco Bizaro
Please I have been ask to write python code that ask user to enter a price continuetly until key press to and give the total amount of price I have enter using while loop I don't know how to go about it,please help me This is what I have done, untitled a=1 b=2 while a wrote: > Send Tutor mailing l

Re: [Tutor] Tutor Digest, Vol 161, Issue 41

2017-07-30 Thread Alan Gauld via Tutor
On 30/07/17 19:50, Borisco Bizaro wrote: > Please I have been ask to write python code that ask user to enter a price > continuetly until key press to and give the total amount of price I have > enter using while loop I don't know how to go about it First of all, please do not send the whole diges

Re: [Tutor] Tutor Digest, Vol 161, Issue 41

2017-07-30 Thread Borisco Bizaro
Please I have been ask to write python code that ask user to enter a price continuetly until key press to and give the total amount of price I have enter using while loop I don't know how to go about it,please help me On Jul 29, 2017 17:00, wrote: > Send Tutor mailing list submissions to >

Re: [Tutor] Tutor Digest, Vol 161, Issue 36

2017-07-24 Thread Borisco Bizaro
Please what is the best way to study python programming well. On Jul 24, 2017 17:00, wrote: > Send Tutor mailing list submissions to > tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/tutor > or, via email, s

Re: [Tutor] Tutor Digest, Vol 160, Issue 34

2017-06-27 Thread anish singh
> >> anish singh wrote: > >> > >>> I need a custom comparator. > >>> > >>> dictionary = {a:[b,c], d:[e,f]} > >>> > >>> If both 'b' and 'e' belong to the same bin > >>> then it should be compared based on 'c' and 'f'. > >>> > >>> However, I want to also represent the result of the > >>> sorted opera

Re: [Tutor] Tutor Digest, Vol 160, Issue 26

2017-06-23 Thread Jerry Hill
On Fri, Jun 23, 2017 at 4:18 PM, Jerry Hill wrote: > Try this instead: > > result > ​​ > = search_criteria + "/" + outputs > resultUrl = > ​​urljoin(baseUrl, result) > > > That should get you what you're looking for. > > Sorry, ​I should have tested more carefully. That does NOT actually get wha

Re: [Tutor] Tutor Digest, Vol 160, Issue 26

2017-06-23 Thread Jerry Hill
On Tue, Jun 20, 2017 at 4:34 AM, angela ebirim wrote: > ​​ > baseUrl = " > http://data.parliament.uk/membersdataplatform/services/mnis/members/query"; > search_criteria = " > ​​ > House=Commons" > outputs = " > ​​ > Constituencies" > > headers = {"content-type": "application/json"} > > > *""" so

Re: [Tutor] Tutor Digest, Vol 160, Issue 26

2017-06-20 Thread angela ebirim
Hi, I'm trying to dynamically build a url in python and have tried using: #file.py import json import requests from urllib.parse import urljoin baseUrl = " http://data.parliament.uk/membersdataplatform/services/mnis/members/query"; search_criteria = "House=Commons" outputs = "Constituencies" h

Re: [Tutor] Tutor Digest, Vol 157, Issue 39

2017-03-19 Thread Marc Sebek
Hi Rafael You are appending quit to the list, before checking to see if quit has been typed. You could move the "if Statement" up in the code and add an else statement, so Quit is not appended to the list first thing. while True: activity = input(prompt) if activity == "quit": pr

Re: [Tutor] Tutor Digest, Vol 157, Issue 24

2017-03-10 Thread Alan Gauld via Tutor
On 10/03/17 10:50, Eloka Chima via Tutor wrote: Please post in plain text. Your email is unreadable... And please don't reply to the digest, and if you must, then at least delete the irrelevant bits. We've all seen these messages already and some people pay by the byte. > Thank you so much. Your

Re: [Tutor] Tutor Digest, Vol 157, Issue 24

2017-03-10 Thread Eloka Chima via Tutor
Thank you so much. Your guidance have been helpful, the bugs have been gotten rid of after I reviewed the  code. But 3 out of 6 of the test is correct, the other 3 is incorrect. Take a look at it and tell me where I went wrong.   >> Below is my new code: class ShoppingCart(object):  def __init__(

Re: [Tutor] Tutor Digest, Vol 156, Issue 33

2017-02-14 Thread Alan Gauld via Tutor
As per my offline reply, just send messages to the list and the whole group will act as a virtual mentor. One other thing though. Please start new topics with a new message. Do NOT reply to an existing thread as it messes up the archives. And especially do not reply to a digest message. And use a

Re: [Tutor] Tutor Digest, Vol 156, Issue 33

2017-02-14 Thread Borisco Bizaro
Please l will like to have a mentor how can I have it On Feb 14, 2017 09:53, wrote: > Send Tutor mailing list submissions to > tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/tutor > or, via email, send a me

Re: [Tutor] Tutor Digest, Vol 152, Issue 3

2016-10-02 Thread Alan Gauld via Tutor
On 02/10/16 03:50, anish singh wrote: >> Possibly, but we can't tell because >> a) You don't show us the code that parses your input Thanks, that helps. > import os, sys, getopt > import re > import glob > > > def get_full_path(path, pattern): > for (dirpath, dirnames, filenames) in os.walk(

Re: [Tutor] Tutor Digest, Vol 152, Issue 3

2016-10-02 Thread anish singh
> On 01/10/16 09:16, anish singh wrote: > > I am trying to implement grep to just increase my knowledge > > about regular expression. > > > > Below is the program usage: > > python test.py -i Documents/linux/linux/ -s '\w+_readalarm*' > > > > However, due to my lack of knowledge about string handli

Re: [Tutor] Tutor Digest, Vol 148, Issue 20

2016-06-15 Thread Steve Tenbrink
I was 63 when I started. It's never too late. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Tutor Digest, Vol 147, Issue 52

2016-06-01 Thread marat murad via Tutor
Thanks for your replies,I think I understand it much better now. I Also I wanted to know what the 'None' does in the second program. Thanks in Advance Minhaj On Wed, Jun 1, 2016 at 1:59 AM, wrote: > Send Tutor mailing list submissions to > tutor@python.org > > To subscribe or unsubscri

Re: [Tutor] Tutor Digest, Vol 147, Issue 30

2016-05-19 Thread Crusier
Dear Peter & Alan, Thanks alot. Have a great day Cheers, Hank On Fri, May 20, 2016 at 12:00 AM, wrote: > Send Tutor mailing list submissions to > tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/tutor > or

Re: [Tutor] Tutor Digest, Vol 147, Issue 10

2016-05-03 Thread Crusier
Thanks, Alan. Have a great day. Henry On Wed, May 4, 2016 at 12:00 AM, wrote: > Send Tutor mailing list submissions to > tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/tutor > or, via email, send a messa

Re: [Tutor] Tutor Digest, Vol 146, Issue 22

2016-04-21 Thread Chris C via Tutor
Gustavo,    Reading your description, it sounds like you opening a Windows Explorer window and double clicking on pip.exe expecting it to run like a Windows application.  But pip is a command line tool and you need to open a command line windows/console (cmd.exe) first before running pip.   Op

Re: [Tutor] Tutor Digest, Vol 146, Issue 9

2016-04-09 Thread khalil zakaria Zemmoura
Hi, there is one place i think you have to have a look at it and it's the python official site. One thing i love about python is the so well written documentation, i remember when i was learning ruby and had to go to the official doc! it was hard to understand for the beginner how i was. so, here

Re: [Tutor] Tutor Digest, Vol 146, Issue 9

2016-04-08 Thread Alan Gauld
On 08/04/16 17:44, Jason Willis wrote: > there are hard-coded content dependant entries. I solved this by changing > all instances of the word "elite" and changing them to "standard" and the > program works! Glad you got it working. > I agree with you that taking a few hours to learn python > w

Re: [Tutor] Tutor Digest, Vol 146, Issue 9

2016-04-08 Thread Jason Willis
My apologies for the word wrap. It seemed to look ok in my web client (gmail). Thank you for the pointer to other instances in the program where there are hard-coded content dependant entries. I solved this by changing all instances of the word "elite" and changing them to "standard" and the progra

Re: [Tutor] Tutor Digest, Vol 145, Issue 7

2016-03-04 Thread Alan Gauld
On 04/03/16 16:49, justin walters wrote: > I personally use pycharm community edition. It has helped me learn a lot. > It is quite heavy though. I think your best bet would be sublime text(mac, > windows, and linux) or gedit(linux only I believe). Thanks for the comments Justin but please in futur

Re: [Tutor] Tutor Digest, Vol 145, Issue 7

2016-03-04 Thread justin walters
I personally use pycharm community edition. It has helped me learn a lot. It is quite heavy though. I think your best bet would be sublime text(mac, windows, and linux) or gedit(linux only I believe). On Mar 3, 2016 9:00 AM, wrote: > Send Tutor mailing list submissions to > tutor@python.o

Re: [Tutor] Tutor Digest, Vol 143, Issue 77

2016-01-22 Thread samuel kirwin
Semantic errors are when a program acts incorrectly and doesn't give a error, this came up yesterday. Samuel Kirwin Samvelk On Fri, Jan 22, 2016 at 9:02 AM -0800, wrote: Send Tutor mailing list submissions to tutor@python.org To subscribe or unsubscribe via the World Wide Web,

Re: [Tutor] Tutor Digest, Vol 143, Issue 17

2016-01-06 Thread Tahir Hafiz
On Wed, Jan 6, 2016 at 9:07 PM, yehudak . wrote: > Alan, Tahir & friends, > My post was not a question, merely an observation. > I hope there's no objection to my mail. > > Yehuda > > On Wed, Jan 6, 2016 at 10:59 PM, wrote: > > > Send Tutor mailing list submissions to > > tutor@python.or

Re: [Tutor] Tutor Digest, Vol 143, Issue 17

2016-01-06 Thread yehudak .
Alan, Tahir & friends, My post was not a question, merely an observation. I hope there's no objection to my mail. Yehuda On Wed, Jan 6, 2016 at 10:59 PM, wrote: > Send Tutor mailing list submissions to > tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, visit >

Re: [Tutor] Tutor Digest, Vol 143, Issue 15

2016-01-06 Thread Joel Goldstick
On Wed, Jan 6, 2016 at 9:57 AM, yehudak . wrote: > Not a question, just ranting. > > My 2 commonest coding errors are forgetting the : before a block, and > mismatch between the number of ('s and )'s. The error message is a simple > 'Syntax Error', but the line quoted is not the offending line. I

Re: [Tutor] Tutor Digest, Vol 143, Issue 15

2016-01-06 Thread yehudak .
Not a question, just ranting. My 2 commonest coding errors are forgetting the : before a block, and mismatch between the number of ('s and )'s. The error message is a simple 'Syntax Error', but the line quoted is not the offending line. I would love a much more explicit 'syntax error'. Anyone her

Re: [Tutor] Tutor Digest, Vol 143, Issue 6

2016-01-04 Thread Alan Gauld
On 04/01/16 17:22, yehudak . wrote: > Dear gentlemen. > This discussion gave me the pleasure of watching two programmers clash head > to head. I'm not sure we were clashing. I actually agreed with most of what Steve said. I simply clarified the intent of one aspect of his post. To summarize: For

Re: [Tutor] Tutor Digest, Vol 143, Issue 6

2016-01-04 Thread yehudak .
Dear gentlemen. This discussion gave me the pleasure of watching two programmers clash head to head. I got here a lot of knowledge that no book covers. Thank you Alan & Steve. Yehuda On Mon, Jan 4, 2016 at 7:00 PM, wrote: > Send Tutor mailing list submissions to > tutor@python.org > >

Re: [Tutor] Tutor Digest, Vol 143, Issue 4

2016-01-03 Thread yehudak .
Thank you ALL for your kind help. Yehuda On Sun, Jan 3, 2016 at 3:12 PM, wrote: > Send Tutor mailing list submissions to > tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/tutor > or, via email, send a mess

Re: [Tutor] Tutor Digest, Vol 142, Issue 11

2015-12-14 Thread Crusier
in some sort of equation. However, > it looks like these are meant to be a flat fee. > >> # Add the total misc charges together >> subTotal = float(tax + license + dealerPrep + destinationCharge) >> >> # Add all the misic charges and include the base pricem >> gr

Re: [Tutor] Tutor Digest, Vol 142, Issue 10

2015-12-12 Thread Ken Hammer
I have a more simple-minded solution. The error appears to occur in testing without revealing the problem by use of $1 base price in the test. Using $10,000 as the base price in the test reveals absurd numbers. I think the real problem lies in the inclusion of base price inappropriately, twi

Re: [Tutor] Tutor Digest, Vol 141, Issue 11

2015-11-12 Thread Laura Creighton
In a message of Wed, 11 Nov 2015 17:18:06 +0500, Burhan ul haq writes: >Continuing "Run Python 2.7 on Android Tablet" > >Hi, > >I am constrained to install anything on my official laptop, therefore I >need to have an "online life saver" for Python Learning. > >I have already tried "pythonanywhere"

Re: [Tutor] Tutor Digest, Vol 141, Issue 11

2015-11-11 Thread Danny Yoo
>> I am constrained to install anything on my official laptop, therefore I >> need to have an "online life saver" for Python Learning. > > > You might look into repl.it: > > https://repl.it/languages/python As for tutorial material, you might look into: https://wiki.python.org/moin/Begi

Re: [Tutor] Tutor Digest, Vol 141, Issue 11

2015-11-11 Thread Danny Yoo
On Wed, Nov 11, 2015 at 4:18 AM, Burhan ul haq wrote: > Continuing "Run Python 2.7 on Android Tablet" > > Hi, > > I am constrained to install anything on my official laptop, therefore I > need to have an "online life saver" for Python Learning. You might look into repl.it: https://repl.it/l

Re: [Tutor] Tutor Digest, Vol 141, Issue 11

2015-11-11 Thread Burhan ul haq
Continuing "Run Python 2.7 on Android Tablet" Hi, I am constrained to install anything on my official laptop, therefore I need to have an "online life saver" for Python Learning. I have already tried "pythonanywhere" but could not get it going, even for a basic "hello world" script. I could not

Re: [Tutor] Tutor Digest, Vol 139, Issue 29 Calling instance method in IDLE magically calls __len__?

2015-09-18 Thread Dino Bektešević
Hello all, > Hi Dino, > > > I'm afraid I cannot replicate that behaviour. Also the output seems > strange -- the "len is called" is printed on the same line as the > prompt, and e.toFile( afterwards. > > If you quit idle and restart it, do you get the same behaviour? What's > the exact version of

Re: [Tutor] Tutor Digest, Vol 136, Issue 27

2015-06-15 Thread Laura Creighton
This doesn't quite do what you want but should give you some ideas as to how to proceed. https://mail.python.org/pipermail/tkinter-discuss/2012-January/003041.html Laura ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription opti

Re: [Tutor] Tutor Digest, Vol 136, Issue 27

2015-06-15 Thread Ali Moradi
let me put it this way: the listbox should be on the same frame under the entry widget and the whole list should be visible, when the user types the word in Entry widger and clicks on search button, the listbox narrows down to that word only and now just (for example: waterakvo) are visible. do

Re: [Tutor] Tutor Digest, Vol 135, Issue 12

2015-05-12 Thread Laura Creighton
In a message of Tue, 05 May 2015 09:55:32 +0100, Alan Gauld writes: >On 05/05/15 08:17, Siya 360 wrote: > >> Twice i unsubscribed to this mailing list, and i still continue to get them, >> why? > >The web page is the only way to unsubscribe. Nobody else >on the list can unsubscribe you. This is

Re: [Tutor] Tutor Digest, Vol 135, Issue 12

2015-05-05 Thread Alan Gauld
On 05/05/15 08:17, Siya 360 wrote: Twice i unsubscribed to this mailing list, and i still continue to get them, why? I don't know. Are you doing it via the web page? Please remove with immediate effect The web page is the only way to unsubscribe. Nobody else on the list can unsubscribe yo

Re: [Tutor] Tutor Digest, Vol 135, Issue 12

2015-05-05 Thread Siya 360
Hi, Twice i unsubscribed to this mailing list, and i still continue to get them, why? Please remove with immediate effect as this course has not served me well too many of my enquires went unanswered so i see no use for it, just flooding my mailbox Kind Regards, Siya > On 05 May 2015, at 1

Re: [Tutor] Tutor Digest, Vol 134, Issue 89

2015-04-26 Thread Steven D'Aprano
Hi Juanald, or Jon if you prefer, You're still replying to the digest, which means we're still getting six or eight pages of messages we've already seen. My answer to your question is below: On Sat, Apr 25, 2015 at 11:02:56PM -0400, Juanald Reagan wrote: > Sorry for not providing all the relev

Re: [Tutor] Tutor Digest, Vol 134, Issue 89

2015-04-26 Thread Juanald Reagan
Sorry for not providing all the relevant info, let me provide some additional details: When I run this code: from ipwhois import IPWhois file=open('ip.txt', 'r') ipaddy=file.read() obj = IPWhois(ipaddy) results = [obj.lookup()] print results [0] I receive this output: Jo

Re: [Tutor] Tutor Digest, Vol 134, Issue 86

2015-04-25 Thread Juanald Reagan
Okay, so it doesn't look like that worked...here is the traceback. I don't understand the second part of your request. Jons-desktop:whois-0.7 2 jon$ python pythonwhois.py 8.8.8.8 Traceback (most recent call last): File "pythonwhois.py", line 14, in print results.asn_registry AttributeE

Re: [Tutor] Tutor Digest, Vol 132, Issue 57

2015-02-27 Thread Rishi Ganesh V
Dear tutor, how to pass the argument in the command line i have the input file as csv and output file as txt both input file and output file i am passing the value to an argument in the command line in the script it is like def convert(inputfile, outputfile): reader = csv.reader(open(inputfile,

Re: [Tutor] Tutor Digest, Vol 132, Issue 57

2015-02-27 Thread Rishi Ganesh V
how to pass the argument in the command line i have the input file as csv and output file as txt both input file and output file i am passing the value to an argument like inputfile=sys.argv[1] , output file=sys.argv[2] convert(inputfile,outputfile) how to pass the value in argument On Fri, Fe

Re: [Tutor] Tutor Digest, Vol 132, Issue 51

2015-02-21 Thread Alan Gauld
On 21/02/15 16:48, Tim Johnson wrote: Hi Guys, Hi, please don't send the entire digest, some folks pay by the byte. Ideally send a new mail to tutor@python.org instead of replying to an existing digest. Also change the subject to something meaningful so folks an find it in the archives. *d

Re: [Tutor] Tutor Digest, Vol 132, Issue 51

2015-02-21 Thread Danny Yoo
On Feb 21, 2015 8:49 AM, "Tim Johnson" wrote: > > Hi Guys, > Very simple question, I imagine. > > this code throws of off a "counter not defined error". > Can you help? > > *def word_counter(word, string):* > *counter = 0* > *for item in string:* > *if item == word:* > *

Re: [Tutor] Tutor Digest, Vol 132, Issue 51

2015-02-21 Thread Tim Johnson
Hi Guys, Very simple question, I imagine. this code throws of off a "counter not defined error". Can you help? *def word_counter(word, string):* *counter = 0* *for item in string:* *if item == word:* *counter = counter + 1* *print counter* Thanks, Tim -- Tim Johnso

Re: [Tutor] Tutor Digest, Vol 131, Issue 59 Order loop from methos on class (jarod...@libero.it)

2015-01-26 Thread Sydney Shall
On 26/01/2015 14:41, Dino Bektešević wrote: 2015-01-26 14:54 GMT+01:00 jarod...@libero.it : Thanks so much!! Now I understood it is a stupid thing! So, could you elpme to decompose the problem? I initiazlizate the class with the file to use so all the function have all the parameters that I need

Re: [Tutor] Tutor Digest, Vol 131, Issue 59 Order loop from methos on class (jarod...@libero.it)

2015-01-26 Thread Dino Bektešević
2015-01-26 14:54 GMT+01:00 jarod...@libero.it : > Thanks so much!! Now I understood it is a stupid thing! > So, could you elpme to decompose the problem? > I initiazlizate the class with the file to use so all the function have all > the parameters that I need. > > At the moment I have in mind only

Re: [Tutor] Tutor Digest, Vol 131, Issue 59 Order loop from methos on class (jarod...@libero.it)

2015-01-26 Thread Dino Bektešević
> Message: 1 > Date: Mon, 26 Jan 2015 11:48:52 +0100 (CET) > From: "jarod...@libero.it" > To: tutor@python.org > Subject: [Tutor] order loop from methos on class > Message-ID: > <2044122047.125321422269332108.JavaMail.defaultUser@defaultHost> > Content-Type: text/plain; charset=UTF-8 > > >

Re: [Tutor] Tutor Digest, Vol 131, Issue 38

2015-01-16 Thread bw_dw
THANKS EMILE!!! I downloaded the e-book and am having fun with it!! Much appreciate :-] > > Hello, > > I'm new the the group and new to programming in Python. > > Snipped.. > > Sincere thanks > > d > > > From: Emile van Sebille > > Check out http://it-ebooks.info/book/172/ > > Emile _

Re: [Tutor] Tutor Digest, Vol 131, Issue 38

2015-01-16 Thread bw_dw
> Hello, > I'm new the the group and new to programming in Python. > Snipped.. > Sincere thanks > d > From: Emile van Sebille > Check out http://it-ebooks.info/book/172/ > Emile ___ Tutor maillist - Tutor@python.org To unsubscribe or chang

Re: [Tutor] Tutor Digest, Vol 131, Issue 14

2015-01-03 Thread pramod gowda
Hello , I have chaged the code as per your input, except port number. If i change the port number it give me error as Traceback (most recent call last): File "C:\Users\Pramod\Desktop\client.py", line 7, in client_socket.connect((server_address,server_port)) ConnectionRefusedError: [WinErr

Re: [Tutor] Tutor Digest, Vol 130, Issue 47

2015-01-01 Thread Tammy Miller
This is regarding the Python drop-down list response. I would like to create a GUI that has a drop down list containing the data and displayed based on the stats of the list contents. I am interested in using Tkinter, wxPython or PyGTK. My data is coming from a csv file. I am using Python 2.79

Re: [Tutor] Tutor Digest, Vol 130, Issue 28

2014-12-16 Thread Alan Gauld
On 16/12/14 12:16, Jim Gallaher wrote: Sunil Bharuchi, I have that same book so I can answer this question. The code can be found at the author's site. programgames.com Thanks for answering the question but please, in future, provide a meaningful subject line (for archive purposes) and also

Re: [Tutor] Tutor Digest, Vol 130, Issue 28

2014-12-16 Thread Jim Gallaher
Sunil Bharuchi, I have that same book so I can answer this question. The code can be found at the author's site. programgames.com > On Dec 16, 2014, at 05:00, tutor-requ...@python.org wrote: > > Send Tutor mailing list submissions to >tutor@python.org > > To subscribe or unsubscribe via t

Re: [Tutor] Tutor

2014-12-05 Thread Ben Finney
Marina Woodson writes: > I am looking for a tutor. I have a project due in a couple of days and > cannot complete the code on my own. How does this system here work? Welcome! This system works by discussing, in this public forum, your code and the questions you have. This is not a forum for get

Re: [Tutor] Tutor

2014-12-05 Thread Danny Yoo
On Fri, Dec 5, 2014 at 12:05 PM, Joel Goldstick wrote: > On Fri, Dec 5, 2014 at 11:37 AM, Marina Woodson > wrote: >> I am looking for a tutor. I have a project due in a couple of days and >> cannot complete the code on my own. How does this system here work? > > You may find someone who would be

Re: [Tutor] Tutor

2014-12-05 Thread Alan Gauld
On 05/12/14 16:37, Marina Woodson wrote: I am looking for a tutor. You've just found several hundred... :-) I have a project due in a couple of days and cannot complete the > code on my own. How does this system here work? We won't do your code for you but you can post samples and ask for

Re: [Tutor] Tutor

2014-12-05 Thread Joel Goldstick
On Fri, Dec 5, 2014 at 11:37 AM, Marina Woodson wrote: > I am looking for a tutor. I have a project due in a couple of days and cannot > complete the code on my own. How does this system here work? You may find someone who would be willing to help you, but the way this works is you state your pr

Re: [Tutor] Tutor Digest, Vol 129, Issue 22

2014-11-11 Thread Alan Gauld
On 11/11/14 11:24, Ben Smith wrote: Hi - I'm a teacher & sometimes when we're holding a two minute silence > for an important occasion an email comes through & makes > my computer ping loudly. > Is there a python script to stop these kind of things happening? I've no idea but why not just mute

Re: [Tutor] Tutor Digest, Vol 129, Issue 22

2014-11-11 Thread Ben Smith
Hi - I'm a teacher & sometimes when we're holding a two minute silence for an important occasion an email comes through & makes my computer ping loudly. Is there a python script to stop these kind of things happening? ;) -Original Message- From: Tutor [mailto:tutor-bounces+ben.smith=arn

Re: [Tutor] Tutor Digest, Vol 128, Issue 33

2014-10-15 Thread אופיר לירון
Help with the Guess mu number,Hi All,Thanks for yours comments.Alan's comment has helped me to resolve this situation.Removing the indentaion was the solution.ThanksOfir שולח: tutor-requ...@python.org, נושא: Tutor Digest, Vol 128, Issue 33

Re: [Tutor] Tutor Digest, Vol 128, Issue 22

2014-10-10 Thread Alan Gauld
On 10/10/14 09:32, Henry wrote: I am new to programming. Welcome to tutor. Please set a meaningful subject line in your messages. It helps people doing a search and will attract interested readers so you get more chance of help. After I created two text files(the text file is most consist of

Re: [Tutor] Tutor Digest, Vol 128, Issue 22

2014-10-10 Thread Henry
Hi I am new to programming. After I created two text files(the text file is most consist of numbers), its class is "", how can I compare this class with two text files? Please give me a hint which area I should look under? Set? List? Thanks Henry On Fri, Oct 10, 2014 at 12:04 PM, wrote: > Se

Re: [Tutor] Tutor Digest, Vol 127, Issue 12

2014-09-04 Thread Danny Yoo
>> I downloaded notepad++. Can you please help me how to run python script in >> notepad++? > > > I only played with notepad++ briefly but I seem to recall it had a menu with > commands to 'make' and 'run' a file. You could configure the commands > associated with those menus in the settings somewh

Re: [Tutor] Tutor Digest, Vol 127, Issue 12

2014-09-04 Thread Marc Tompkins
On Thu, Sep 4, 2014 at 3:26 PM, Alan Gauld wrote: > On 04/09/14 21:37, Najam Qasim wrote: >> I downloaded notepad++. Can you please help me how to run python script in >> notepad++? > > I only played with notepad++ briefly but I seem to recall it had a menu with > commands to 'make' and 'run' a fi

Re: [Tutor] Tutor Digest, Vol 127, Issue 12

2014-09-04 Thread Alan Gauld
On 04/09/14 21:37, Najam Qasim wrote: Please do not include the entire digest in your mail, especially since none of it seems relevant to your post. Some members pay by the byte. I downloaded notepad++. Can you please help me how to run python script in notepad++? I only played with notep

Re: [Tutor] Tutor Digest, Vol 127, Issue 12

2014-09-04 Thread Najam Qasim
I downloaded notepad++. Can you please help me how to run python script in notepad++? Thanks. Najam > On Sep 4, 2014, at 4:23 PM, tutor-requ...@python.org wrote: > > Send Tutor mailing list submissions to >tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, visit >

Re: [Tutor] Tutor Digest, Vol 126, Issue 86

2014-08-30 Thread Crush
Thank you Allan for your criticism. Please see the below changes. As far as the embedded loops, I know no other way to achieve the same out come. def kill_proc(process1, process2): i = psutil.Popen(["ps", "cax"], stdout=PIPE) out, err = i.communicate() for proc in psutil.process_iter():

Re: [Tutor] Tutor Digest, Vol 126, Issue 64

2014-08-27 Thread Alan Gauld
On 27/08/14 02:41, Najam Qasim wrote: What is preferable method to debug and execute python code in Mac? I do not like the cmd/terminal execution. That is a very personal choice. You don't tell us what you don't like about the terminal or what features you consider important in your choice of t

Re: [Tutor] Tutor Digest, Vol 126, Issue 64

2014-08-27 Thread Najam Qasim
What is preferable method to debug and execute python code in Mac? I do not like the cmd/terminal execution. Thank you. > On Aug 26, 2014, at 6:00 AM, tutor-requ...@python.org wrote: > > Send Tutor mailing list submissions to >tutor@python.org > > To subscribe or unsubscribe via the World W

Re: [Tutor] Tutor

2014-08-18 Thread Ben Finney
"BALDWIN, CATHY L (Legal)" writes: > "I'm in Grand Prairie, TX and need a tutor. This forum is dedicated to tutoring people *here*, in the forum, in public. This is a great benefit because all participants (including you) can observe the discussions and learn from them. > Anybody out there up

Re: [Tutor] Tutor

2014-08-18 Thread Alan Gauld
On 18/08/14 16:23, BALDWIN, CATHY L (Legal) wrote: "I'm in Grand Prairie, TX and need a tutor. Someone I can meet with who can explain it to me like I'm 4 years old. Anybody out there up for the challenge. That's not really how the tutor list works. Instead, you try to learn the language (eith

Re: [Tutor] Tutor Digest, Vol 124, Issue 21

2014-06-10 Thread Jon Engle
Thank you for taking the time to help me understand, here is what I am trying to accomplish: Client FW Server - 1024 | Allow | 1024 1025 | Deny | 1025 1026 | Allow | 1026 65535 | | 65535 I am trying to test the outbound configuration of a firewall (treat it like a bl

Re: [Tutor] Tutor Digest, Vol 120, Issue 27

2014-05-15 Thread Charles Agriesti, DDS
On 2/6/2014 1:48 AM, tutor-requ...@python.org wrote: Send Tutor mailing list submissions to tutor@python.org To subscribe or unsubscribe via the World Wide Web, visit https://mail.python.org/mailman/listinfo/tutor or, via email, send a message with subject or body 'help' to

Re: [Tutor] Tutor Digest, Vol 123, Issue 27

2014-05-08 Thread Kevin Johnson
Alan and Steven, Many thanks for both your help. *Alan* Although I understand that the method you described is the most efficient way of guessing a random number, I was trying so that my program would have the computer making repeated random guesses between a decreasing range of its last two clos

  1   2   3   4   5   6   7   8   >