Re: [Tutor] Help with Python Queue

2016-11-26 Thread Alan Gauld via Tutor
On 26/11/16 09:07, anish singh wrote: > I have below code but it is giving this error: > AttributeError: Queue instance has no attribute 'taskdone' Please post the full error not just a summary. Also please post the actual code... > import threading > from Queue import Queue I get an import

[Tutor] Help with Python Queue

2016-11-26 Thread anish singh
I was just writing to read a file using popen and wanted to use queue along with it. I have below code but it is giving this error: AttributeError: Queue instance has no attribute 'taskdone' import threading from Queue import Queue def worker(q): while True: dataset = q.get()

Re: [Tutor] Help please

2016-10-20 Thread Alan Gauld via Tutor
On 20/10/16 21:25, Karen Palladino wrote: > I am new to python and programming for that matter. Basically, I don't know > much at all. I have python on my p/c which was put there by a former > co-worker who wrote a program that extracts bites of information to generate > a report. The format of

[Tutor] Help please

2016-10-20 Thread Karen Palladino
HI, I am new to python and programming for that matter. Basically, I don't know much at all. I have python on my p/c which was put there by a former co-worker who wrote a program that extracts bites of information to generate a report. The format of the text file used to extract the

Re: [Tutor] Help regarding reg exp.

2016-10-05 Thread Alan Gauld via Tutor
On 05/10/16 10:03, rakesh sharma wrote: > Hi all > > I have a string of pattern ({A,BC},{(A,B),(B,C)(C,A)}. I'm not sure what you mean, can you send some real examples of the data rather than just a generic pattern? For example what do A,B and C signify? Are they literals? Are they uppercase

[Tutor] Help regarding reg exp.

2016-10-05 Thread rakesh sharma
Hi all I have a string of pattern ({A,BC},{(A,B),(B,C)(C,A)}. I want to extract the inner brackets {A,B,C} etc. Please help. I have tried various methods of re to no avail. Get Outlook for Android ___ Tutor maillist -

Re: [Tutor] Help!!

2016-09-27 Thread Alan Gauld via Tutor
On 26/09/16 23:50, Shooby Herrmann wrote: > I am using JES. I've never heard of JES and know nothing about it. Fortunately it doesn't look like this problem has much to do with JES so that's not a problem this time... However in future when you submit a question (whether on this list or

[Tutor] Help!!

2016-09-27 Thread Shooby Herrmann
Hi, I am using JES. I need to write a program and find all pixels in a circle and in a square. Here is what I have written with the more detailed purpose of the program. I know this is not correct, but I'm not sure how to fix it. Please help. #The purpose of this assignment is to give you

Re: [Tutor] help with Numpy

2016-09-22 Thread Oscar Benjamin
On 22 September 2016 at 04:47, eryk sun wrote: > On Wed, Sep 21, 2016 at 10:35 PM, Oscar Benjamin > wrote: >> I would have given the same advice a year or so ago. It's worth noting >> though that the situation with pip, wheel etc has improved

Re: [Tutor] help with Numpy

2016-09-21 Thread eryk sun
On Wed, Sep 21, 2016 at 10:35 PM, Oscar Benjamin wrote: > I would have given the same advice a year or so ago. It's worth noting > though that the situation with pip, wheel etc has improved significantly > recently. It's now straightforward to pip install Numpy, scipy,

Re: [Tutor] help with Numpy

2016-09-21 Thread Oscar Benjamin
On 21 Sep 2016 22:29, "Alan Gauld via Tutor" wrote: > > On 21/09/16 15:53, Paul Dentinger wrote: > > Hello, > > Sorry for such a basic question, but I am trying to get Numpy to work. I > > have python 3.5 and working in IDLE. I need Numpy and Scipy and may need > > matplotlib.

Re: [Tutor] help with Numpy

2016-09-21 Thread Alan Gauld via Tutor
On 21/09/16 15:53, Paul Dentinger wrote: > Hello, > Sorry for such a basic question, but I am trying to get Numpy to work. I > have python 3.5 and working in IDLE. I need Numpy and Scipy and may need > matplotlib. To be honest while you can install all the bits separately I normally recommend

Re: [Tutor] help with Numpy

2016-09-21 Thread eryk sun
On Wed, Sep 21, 2016 at 2:53 PM, Paul Dentinger wrote: > > I need Numpy and Scipy and may need matplotlib. So I tried to call Numpy and > it > can't be found. So I go online and find Numpy and download it. Read the following docs on Python packaging and pip:

Re: [Tutor] Help with Max Number and Min number script

2016-09-18 Thread Alan Gauld via Tutor
On 17/09/16 00:08, Sharon Wallace wrote: > largest = None > smallest = None > > while True: > num = raw_input('Enter a number: ') > if num = 'done' : break should use == to test equality a single = is an assignment and would give an error here print num try :

Re: [Tutor] Help with Max Number and Min number script

2016-09-17 Thread Alan Gauld via Tutor
On 17/09/16 00:08, Sharon Wallace wrote: > inp = raw_input > largest = None > smallest = None > > while True: > num = raw_input('Enter a number: ') > if num = 'done' : break > print num > try : > num = float(inp)

Re: [Tutor] Help with Max Number and Min number script

2016-09-17 Thread Bob Gailer
On Sep 17, 2016 4:55 PM, "Sharon Wallace" wrote: > > Would you please help me with the last piece of this assignment? > > > > This is my code: > > > > largest = None > > smallest = None > > > > while True: > > num = raw_input("Enter a number: ") > >

Re: [Tutor] Help with Max Number and Min number script

2016-09-16 Thread Bob Gailer
On Sep 16, 2016 8:12 PM, "Sharon Wallace" wrote: > In addition to showing us your code , Please show us whatever Trace back you got when you ran the code. I would guess you are either getting an indentation error or syntax error in the vicinity of line that begins if

Re: [Tutor] Help with Max Number and Min number script

2016-09-16 Thread Joel Goldstick
On Fri, Sep 16, 2016 at 7:08 PM, Sharon Wallace wrote: > inp = raw_input The above doesn't do what you think. It creates a name called inp which is bound to the function raw_input > > largest = None > > smallest = None > > > > while True: > > num =

[Tutor] Help with Max Number and Min number script

2016-09-16 Thread Sharon Wallace
inp = raw_input largest = None smallest = None while True: num = raw_input('Enter a number: ') if num = 'done' : break print num try : num = float(inp) except :

Re: [Tutor] Help with NameError

2016-09-01 Thread Peter Otten
Bryan Callow wrote: > Could someone help me with a NameError that I can't seem to figure out. > The program asks for an input and then runs two DC motors. It worked for > a while and then when I reopened the program today I keep getting this > error. Thank you. -Bryan [...] > print('Which

Re: [Tutor] Help with NameError

2016-09-01 Thread Alan Gauld via Tutor
On 01/09/16 02:29, Bryan Callow wrote: > Could someone help me with a NameError that I can't seem to figure out. It is hard for us to figure out without seeing the error message. It should tell you which name is in error and where. Please repost with the full error message included. -- Alan G

[Tutor] Help with NameError

2016-09-01 Thread Bryan Callow
Could someone help me with a NameError that I can't seem to figure out. The program asks for an input and then runs two DC motors. It worked for a while and then when I reopened the program today I keep getting this error. Thank you. -Bryan import RPi.GPIO as GPIO from time import sleep

Re: [Tutor] Help

2016-08-04 Thread Peter Otten
CJ wrote: > Hi, > I’m coding a game for fun and i keep trying to run it but this keeps > showing up: > traceback (most recent call last): > File "/Volumes/name/box move thing(wed).py", line 13, in > player_img = PhotoImage(file="astronaut.png") > File >

[Tutor] Help

2016-08-04 Thread CJ
Hi, I’m coding a game for fun and i keep trying to run it but this keeps showing up: traceback (most recent call last): File "/Volumes/name/box move thing(wed).py", line 13, in player_img = PhotoImage(file="astronaut.png") File

Re: [Tutor] Help on Assignments - trivia game

2016-07-30 Thread Alan Gauld via Tutor
On 30/07/16 16:28, Justin Korn via Tutor wrote: > trivia_game.py > import sys > import random > import Question.py You do not include the .py extension in an import statement. It should read import Question Also by convention modules use lowercase names. > questions = [ > Question("How

Re: [Tutor] Help on Assignments - Turtle

2016-07-30 Thread Alan Gauld via Tutor
On 30/07/16 16:28, Justin Korn via Tutor wrote: > I have been working on these assignments for a week and a half, > and I can't make any progress. I also been dealing with a > sick relative, so please help me out immediately. While I sympathise with your circumstances we are all volunteers here

[Tutor] Help on Assignments

2016-07-30 Thread Justin Korn via Tutor
To whom it may concern, I need someone to help me to develop programs for the following assignments. I have been working on these assignments for a week and a half, and I can't make any progress. I also been dealing with a sick relative, so please help me out immediately. I use the version

Re: [Tutor] Help on Assginments

2016-07-30 Thread Alan Gauld via Tutor
On 30/07/16 05:31, Justin Korn via Tutor wrote: > ...I need someone to help me to develop programs for the following > assignments: That's not really how tutor list works. We will answer your questions and give you hints when you get stuck. But it is the whole list membership helping you, not a

[Tutor] Help on Assginments

2016-07-30 Thread Justin Korn via Tutor
To whom it may concern, I need someone to help me to develop programs for the following assignments: 1. Define a new kind of Turtle, TurtleGTX, that comes with some extra features: it can jump forward a given distance, and it has an odometer that keeps track of how far the turtle has

Re: [Tutor] Help with error in paramiko

2016-07-24 Thread Alan Gauld via Tutor
On 23/07/16 09:12, José de Jesus Marquez Rangel wrote: > Hello. > > I have a problem because when I connect to the remote server via SSH gives > me an error with paramiko library, but I connect to the same server with > programs like putty, ssh and another there is no error. > > Here the

[Tutor] Help with error in paramiko

2016-07-24 Thread José de Jesus Marquez Rangel
Hello. I have a problem because when I connect to the remote server via SSH gives me an error with paramiko library, but I connect to the same server with programs like putty, ssh and another there is no error. Here the screenshot: *Script.* [image: Imágenes integradas 1] *the result of run*

Re: [Tutor] Help me out please

2016-07-20 Thread Danny Yoo
On Tue, Jul 19, 2016 at 4:31 AM, Marc Sànchez Quibus wrote: > Hi, > First of all I'm gonan introduce myself. My name is Marc and I'm a student > and also a python's programmer begginer. I've been studying/learning python > and now I need some help to finish my project. >

Re: [Tutor] Help me out please

2016-07-19 Thread Bob Gailer
On Jul 19, 2016 9:24 AM, "Marc Sànchez Quibus" wrote: > > Hi, > First of all I'm gonan introduce myself. My name is Marc and I'm a student > and also a python's programmer begginer. I've been studying/learning python > and now I need some help to finish my project. > I

Re: [Tutor] Help me out please

2016-07-19 Thread Alan Gauld via Tutor
On 19/07/16 12:31, Marc Sànchez Quibus wrote: > and now I need some help to finish my project. > I have two scripts, one of them in python (the main script) and the other > one written in html. Well, is just a brief javascript (an app) that I took > by Github. I need to change a variable inside

[Tutor] Help me out please

2016-07-19 Thread Marc Sànchez Quibus
Hi, First of all I'm gonan introduce myself. My name is Marc and I'm a student and also a python's programmer begginer. I've been studying/learning python and now I need some help to finish my project. I have two scripts, one of them in python (the main script) and the other one written in html.

Re: [Tutor] help with exercise 15 of zed shaw's LPTHW

2016-07-06 Thread Alan Gauld via Tutor
On 06/07/16 15:04, loh...@tuta.io wrote: > script, filename = argv > txt = open (filename) > > print "Here's your file %r: " % filename > print txt.read() > > print "Type the filename again: " > file_again = raw_input("> ") > > txt_again = open(file_again) > print txt_again.read() > why do I

Re: [Tutor] help with exercise 15 of zed shaw's LPTHW

2016-07-06 Thread Michael Selik
On Wed, Jul 6, 2016 at 10:59 AM wrote: > why do I have to create a variable txt_again to assign it to the open > function and them print the file? > why is it that I can't only write something like open(file_again).read()? > Good insight. In fact you don't need to create the

Re: [Tutor] help with exercise 15 of zed shaw's LPTHW

2016-07-06 Thread lohecn
first, sorry everyone for having attached the file instead of just typing it here. second, thanks a lot for the replies; even though I gave you no code it was quite helpful! the code was this: from sys import argv script, filename = argv txt = open (filename) print "Here's your file %r: " %

Re: [Tutor] help with exercise 15 of zed shaw's LPTHW

2016-07-06 Thread Peter Otten
loh...@tuta.io wrote: > hey everyone. this is my first time trying this -- actually, I've been > studying python only for some days now, and I'm afraid my questions are > going to be rally simple, but I can't seem to understand this piece of > code and thus can't move on. You seem to be

Re: [Tutor] help with exercise 15 of zed shaw's LPTHW

2016-07-06 Thread Alan Gauld via Tutor
On 06/07/16 00:56, loh...@tuta.io wrote: > hey everyone. this is my first time trying this Welcome, but... > you probably know the book, Sorry, I don't and I suspect I'm not alone. It's probably a fine book, but we don't all know it. > so you know that zed always makes us write code > so

Re: [Tutor] help with exercise 15 of zed shaw's LPTHW

2016-07-06 Thread Michael Selik
On Tue, Jul 5, 2016 at 8:24 PM wrote: > I'm having trouble with most of the lines here. > It looks like you tried to attach a file. This mailing list does not allow attachments. Instead, could you paste the code into your email? > things that I don't understand: > 1. the need

Re: [Tutor] help with exercise 15 of zed shaw's LPTHW

2016-07-05 Thread Steven D'Aprano
Hi Heloisa, and welcome. Do you have a link to the code? Or better still, if it is short (say under fifty lines) can you copy it into an email and send it? On Wed, Jul 06, 2016 at 12:56:19AM +0100, loh...@tuta.io wrote: [...] > 1. the need to put script into an estipulation for argv (line 3)

Re: [Tutor] help with exercise 15 of zed shaw's LPTHW

2016-07-05 Thread boB Stepp
Welcome! On 07/05/2016 06:56 PM, loh...@tuta.io wrote: hey everyone. this is my first time trying this -- actually, I've been studying python only for some days now, and I'm afraid my questions are going to be rally simple, but I can't seem to understand this piece of code and thus can't

[Tutor] help with exercise 15 of zed shaw's LPTHW

2016-07-05 Thread lohecn
hey everyone. this is my first time trying this -- actually, I've been studying python only for some days now, and I'm afraid my questions are going to be rally simple, but I can't seem to understand this piece of code and thus can't move on. you probably know the book, so you know that

Re: [Tutor] Help

2016-06-28 Thread David Palao
2016-06-28 7:54 GMT+02:00 Aaron Johnson : > I have a program that is telling my i need your digital snake, but i dont > want a snake. Help > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription

Re: [Tutor] Help

2016-06-28 Thread Alan Gauld via Tutor
On 28/06/16 06:54, Aaron Johnson wrote: > I have a program that is telling my i need your digital snake, but i dont > want a snake. Help I'm not sure what you expect us to do based on the information you've given. Can you be more specific? What OS are you running? On what platform (phone,

[Tutor] Help

2016-06-28 Thread Aaron Johnson
I have a program that is telling my i need your digital snake, but i dont want a snake. Help ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] help with comparing list of tuples in python 2

2016-06-20 Thread Lulu J
at 8:34 AM, Muhubo Yusuf <muhuboyu...@gmail.com> wrote: > > > From: Alan Gauld via Tutor <tutor@python.org> > Date: Fri, Jun 17, 2016 at 6:36 PM > Subject: Re: [Tutor] help with comparing list of tuples in python 2 > To: tutor@python.org > > > On 17/06/16 2

Re: [Tutor] help with comparing list of tuples in python 2

2016-06-18 Thread Peter Otten
Lulu J wrote: > Hi there, > > My apologies if this is a trivial question but I am sort of new to python. > Here is my problem: > I have a list of dictionaries. Each dictionary has a word and its position > in the text the positions are in the form of a tuple. > Here is an example: > [ >

Re: [Tutor] help with comparing list of tuples in python 2

2016-06-18 Thread Michael Selik
On Fri, Jun 17, 2016, 6:12 PM Lulu J wrote: > Hi there, > > My apologies if this is a trivial question but I am sort of new to python. > Here is my problem: > I have a list of dictionaries. Each dictionary has a word and its position > in the text the positions are in

Re: [Tutor] help with comparing list of tuples in python 2

2016-06-17 Thread Alan Gauld via Tutor
On 17/06/16 20:18, Lulu J wrote: > I have a list of dictionaries. Each dictionary has a word and its position > in the text the positions are in the form of a tuple. > Here is an example: > [ > {'position': (5, 4), 'term': u'happy',}, > {'position': (5, 5), 'term': u'something'} > ] > > for

[Tutor] help with comparing list of tuples in python 2

2016-06-17 Thread Lulu J
Hi there, My apologies if this is a trivial question but I am sort of new to python. Here is my problem: I have a list of dictionaries. Each dictionary has a word and its position in the text the positions are in the form of a tuple. Here is an example: [ {'position': (5, 4), 'term': u'happy',},

Re: [Tutor] Help with 'if' statement and the concept of None

2016-05-31 Thread Ben Finney
marat murad via Tutor writes: > The author introduced a new way of coding the Boolean NOT operator > with the 'if' statement I have highlighted the relevant > area,apparently this if statement actually means if money != 0,which I > understood Not quite. The statement actually

Re: [Tutor] Help with 'if' statement and the concept of None

2016-05-31 Thread Steven D'Aprano
On Tue, May 31, 2016 at 04:16:21PM +0100, marat murad via Tutor wrote: > money = int(input("How many dollars do you slip the Maitr D'? ")) > *if money:* > print("Ah I think I can make something work") > else: > print("Please sit ,it may be a while") All values in Python can be used where

Re: [Tutor] Help with 'if' statement and the concept of None

2016-05-31 Thread Alan Gauld via Tutor
On 31/05/16 16:16, marat murad via Tutor wrote: > program whose code I have pasted below. The author introduced a new way of > coding the Boolean NOT operator with the 'if' statement I have highlighted > the relevant area,apparently this if statement actually means if money != > 0,which I

[Tutor] Help with 'if' statement and the concept of None

2016-05-31 Thread marat murad via Tutor
Hi I'm learning how to code with python an I have purchased the book 'Python Programming for the absolute beginner,third edition' by Michael Dawson. There is one concept that is confusing me in chapter 3 page 71 there is a program whose code I have pasted below. The author introduced a new way of

Re: [Tutor] Help with python

2016-04-19 Thread Alan Gauld
On 19/04/16 10:13, Tim Golden wrote: > In any recent version of Windows (ie Vista & later) the most common way > to find a program is to press the "Start" button or the "Windows" key > and just start typing its name Interesting, I've been using Windows 10 since it came out and didn't know

Re: [Tutor] Help with python

2016-04-19 Thread Tim Golden
On 19/04/2016 10:03, Alan Gauld wrote: However, for now, you probably want to use IDLE which should come with Python. (It is sometimes called Python GUI on Windows too.) You should find it under Python in your All Programs view. In any recent version of Windows (ie Vista & later) the most

Re: [Tutor] Help with python

2016-04-19 Thread Alan Gauld
On 19/04/16 02:20, Bereke via Tutor wrote: > Hello there: > > i am facing some problem with my python programming language which is > already installed in My laptop lenovo, 8.1 OS. I'm assuming that means Windows 8.1? > The existing language says "python 27 ". when i click on it, > it turns

[Tutor] Help with python

2016-04-19 Thread Bereke via Tutor
Hello there:   i am facing some problem with my python programming language which is already installed in My laptop lenovo, 8.1 OS. The existing language says "python 27 ". when i click on it, it turns to "python or pythonw". I can write on its dark surface, but it does not have tools like

Re: [Tutor] Help with recursion

2016-03-22 Thread Martin A. Brown
Greetings and welcome Lucas (Beterraba), >Hello, I'm new to both Python and such a mailling list. >I'm not sure how it works (if it does). First, welcome to Python! We hope you like Python and are happy to help you figure out how to get started. The mailing list etiquette is like most

Re: [Tutor] Help with recursion

2016-03-22 Thread Joel Goldstick
On Tue, Mar 22, 2016 at 8:27 AM, Steven D'Aprano wrote: > On Tue, Mar 22, 2016 at 09:12:18AM +, Lucas Cavalcante wrote: > > Hello, I'm new to both Python and such a mailling list. > > I'm not sure how it works (if it does). > > I would really appreciate if anyone could

Re: [Tutor] Help with recursion

2016-03-22 Thread Steven D'Aprano
On Tue, Mar 22, 2016 at 09:12:18AM +, Lucas Cavalcante wrote: > Hello, I'm new to both Python and such a mailling list. > I'm not sure how it works (if it does). > I would really appreciate if anyone could help me with a small piece of > code I'm implementing in order to learn some recursion.

[Tutor] Help with recursion

2016-03-22 Thread Lucas Cavalcante
Hello, I'm new to both Python and such a mailling list. I'm not sure how it works (if it does). I would really appreciate if anyone could help me with a small piece of code I'm implementing in order to learn some recursion. Cheers, Beterraba ___ Tutor

Re: [Tutor] Help with an error

2016-03-05 Thread Alan Gauld
On 05/03/16 19:36, Saad Mabror wrote: > i've installed python 2.7 on my laptop (running windows 7 ) > i started receveing syntax error dialogues on IDLE even > if i'm writing just one simple line such as ( print "hello world") . The most likely reason is that you have somehow installed

Re: [Tutor] Help with an error

2016-03-05 Thread boB Stepp
On Sat, Mar 5, 2016 at 1:36 PM, Saad Mabror wrote: > Hello , So i'm totally new to programming and i decided to start with python > , i've installed python 2.7 on my laptop (running windows 7 ) at first i > started following a begginer's guide and everything was fine . But

[Tutor] Help with an error

2016-03-05 Thread Saad Mabror
Hello , So i'm totally new to programming and i decided to start with python , i've installed python 2.7 on my laptop (running windows 7 ) at first i started following a begginer's guide and everything was fine . But later i started receveing syntax error dialogues on IDLE even if i'm writing

Re: [Tutor] Help with Python code

2016-02-29 Thread Alan Gauld
On 29/02/16 17:31, Donald Woolfolk wrote: > Hello, > > I am new to Python 3.5 and I am writing code to get data > from a session api call and load that data into a csv file > or a MySQL database. That's great, we can help with that, but... > I am able to make the session call and also to

[Tutor] Help with Python code

2016-02-29 Thread Donald Woolfolk
Hello, I am new to Python 3.5 and I am writing code to get data from a session api call and load that data into a csv file or a MySQL database. I am able to make the session call and also to connect to the MySQL db, but I am not able to convert the result (JSON) data. I would like assistance

Re: [Tutor] Help with date range

2016-02-09 Thread Joel Goldstick
On Tue, Feb 9, 2016 at 10:34 AM, Chelsea G wrote: > So what I am trying to do is take in a csv file and the format of the csv > file is: > something, something1, something2,something3, something4, something5, > something6, something7. > Then in the csv file I want to

Re: [Tutor] Help with date range

2016-02-09 Thread Martin A. Brown
Greetings Chelsea, >So what I am trying to do is take in a csv file and the format of >the csv file is: While I do not have a suggestion to you about the Python you have sent to the list, I have a few suggestions about how to approach the problem differently. I hope that this may make your

[Tutor] Help with date range

2016-02-09 Thread Chelsea G
So what I am trying to do is take in a csv file and the format of the csv file is: something, something1, something2,something3, something4, something5, something6, something7. Then in the csv file I want to search for a certain range of dates like 1/3/2016 - 2/3/2016. I can get individual dates

Re: [Tutor] Help with date range

2016-02-09 Thread Alan Gauld
On 09/02/16 15:34, Chelsea G wrote: > Then in the csv file I want to search for a certain range of dates like > 1/3/2016 - 2/3/2016. I can get individual dates but not a range of dates. Can ytou simplify the problem momentaruily? Can you create a list of dates then search that list for a range

[Tutor] Help needed

2016-02-04 Thread Tom Brodle
I am very new to Python. I am just practicing code using a simple plug board. The code is working as I want it to but the last message and the original looping makes me have questions. Because the main code works I will just abbreviate it. import GPIO import time Gpio setmode (BCM) led_pin

Re: [Tutor] Help needed

2016-02-04 Thread Joel Goldstick
On Thu, Feb 4, 2016 at 6:26 PM, Tom Brodle wrote: > I am very new to Python. I am just practicing code using a simple plug > board. The code is working as I want it to but the last message and the > original looping makes me have questions. Because the main code works I

Re: [Tutor] Help needed

2016-02-04 Thread Alan Gauld
On 04/02/16 23:26, Tom Brodle wrote: > While true: > Turn LED on > sleep 5 seconds > Turn LED off > sleep .5 seconds > # Coming from the world of Basic I did/do not understand what made the > program loop > # back to while True: line of

Re: [Tutor] Help with error

2016-02-02 Thread Joel Goldstick
First, Please try to be more creative with your message subject line. Help, isn't -- helpfull Second. Don't paraphrase the error, copy it from your actual terminal screen and paste it here. See below On Tue, Feb 2, 2016 at 10:37 AM, Chelsea G wrote: > Hi, > When I run

[Tutor] Help with error

2016-02-02 Thread Chelsea G
Hi, When I run my code I am getting an error it says "Attribute Error: Dictionary instance has no attribute 'search'. So the whole idea for my code is to input a csv file and output results that we want. This specific piece of code def search is to search the csv file for any keyword like 'issues'

Re: [Tutor] Help with error

2016-02-02 Thread Alan Gauld
On 02/02/16 15:37, Chelsea G wrote: > 'issues' and output those results into a text file. I just need some help > with figuring out how to fix the error I am receiving. Joel has already pointed out the indentation error in your class. However there is another problem... but possibly not with

Re: [Tutor] Help with printing to text file

2016-02-01 Thread Alan Gauld
On 01/02/16 14:07, Chelsea G wrote: > So I am trying to get my function search to print in a text file, but I > can only get it to print to Powershell. I have tried several things to get > it to print in its own text file but nothing I have tried is working. Can > someone tell me what I am doing

Re: [Tutor] Help with printing to text file

2016-02-01 Thread Cameron Simpson
On 01Feb2016 20:41, ALAN GAULD wrote: On 01/02/16 14:07, Chelsea G wrote: So I am trying to get my function search to print in a text file, but I can only get it to print to Powershell. I have tried several things to get it to print in its own text file but nothing

[Tutor] Help with printing to text file

2016-02-01 Thread Chelsea G
Hi, So I am trying to get my function search to print in a text file, but I can only get it to print to Powershell. I have tried several things to get it to print in its own text file but nothing I have tried is working. Can someone tell me what I am doing wrong? import csvimport sysimport

Re: [Tutor] Help with printing to text file

2016-02-01 Thread Joel Goldstick
On Mon, Feb 1, 2016 at 9:07 AM, Chelsea G wrote: > Hi, > > So I am trying to get my function search to print in a text file, but I > can only get it to print to Powershell. I have tried several things to get > it to print in its own text file but nothing I have tried is

Re: [Tutor] Help with printing to text file

2016-02-01 Thread Steven D'Aprano
On Mon, Feb 01, 2016 at 08:41:31PM +, Alan Gauld wrote: > On 01/02/16 14:07, Chelsea G wrote: > > Hi, > > > > So I am trying to get my function search to print in a text file, but I > > can only get it to print to Powershell. I have tried several things to get > > it to print in its own text

Re: [Tutor] Help with printing to text file

2016-02-01 Thread Alan Gauld
On 01/02/16 14:07, Chelsea G wrote: > Hi, > > So I am trying to get my function search to print in a text file, but I > can only get it to print to Powershell. I have tried several things to get > it to print in its own text file but nothing I have tried is working. Can > someone tell me what I

Re: [Tutor] Help

2016-01-26 Thread boB Stepp
In case you cannot see what we are talking about in how your message is not keeping its proper indentation, go to the Tutor Mail Archive at: https://www.mail-archive.com/tutor@python.org/msg73411.html and perhaps you can better see the difficulty we are having reading your message. boB

[Tutor] Help!

2016-01-26 Thread Chelsea G
Hi, I am working on a python script to automate reporting. And I am working on creating a keyword search. For example, if I want to search for the word Tool in the value and see what keys are associated with that. So say the value I have to search is Tool World and I want to know what key is

[Tutor] help!

2016-01-26 Thread Chelsea G
Hi, I am working on a python script to automate reporting. And I am working on creating a keyword search. For example, if I want to search for the word Tool in the value and see what keys are associated with that. So say the value I have to search is Tool World and I want to know what key is

Re: [Tutor] help!

2016-01-26 Thread Joel Goldstick
On Tue, Jan 26, 2016 at 1:05 PM, Chelsea G wrote: > Hi, > I am working on a python script to automate reporting. And I am working on > creating a keyword search. For example, if I want to search for the word > Tool in the value and see what keys are associated with that.

Re: [Tutor] help!

2016-01-26 Thread Alan Gauld
On 26/01/16 18:05, Chelsea G wrote: > creating a keyword search. For example, if I want to search for the word > Tool in the value and see what keys are associated with that. So say the > value I have to search is Tool World and I want to know what key is > associated with Tool World I search

[Tutor] Help

2016-01-26 Thread Chelsea G
Hi, I am working on a python script to automate reporting. And I am working on creating a keyword search. For example, if I want to search for the word Tool in the value and see what keys are associated with that. So say the value I have to search is Tool World and I want to know what key is

Re: [Tutor] Help

2016-01-26 Thread Alan Gauld
On 26/01/16 20:57, Chelsea G wrote: > ...I have the basic code for it... Sorry, when I said paste it in the message I should have also pointed out that you need to ensure the mail tool is sending plain text, otherwise we lose all indentation. But this looks like the same code as before so I'm

[Tutor] Help!

2016-01-25 Thread Chelsea G
Hi, I am trying to create a keyword search, so that someone can type in a key phrase and then the output be the value with the key. I have some code already done but having some trouble getting it to work. import csv import json import sys from collections import defaultdict from collections

Re: [Tutor] Help!

2016-01-25 Thread Alan Gauld
On 25/01/16 17:39, Chelsea G wrote: > Hi, > I am trying to create a keyword search, so that someone can type in a key > phrase and then the output be the value with the key. I'm not completely clear what you mean by a key phrase? Do you mean a phrase matching the keys in your dictionary?(In

Re: [Tutor] Help!

2016-01-17 Thread Steven D'Aprano
On Fri, Jan 15, 2016 at 11:33:24AM -0500, Chelsea G wrote: > Hi, [snip stuff which is, as far as I can see, irrelevant] > What I am having issues with is the def txt_output that is where I am > trying to take the .csv off and add the .txt but keep the filename the > same. For example, having a

[Tutor] Help!

2016-01-15 Thread Chelsea G
Hi, So what I am working on is taking a csv file and only taking 2 columns from the spreadsheet and out putting that to a text file. Then taking those two columns and organize them by product(key) and outputting the description(values) that are associated. Some products have a lot of duplicate

Re: [Tutor] Help!

2016-01-15 Thread Peter Otten
Chelsea G wrote: > What I am having issues with is the def txt_output that is where I am > trying to take the .csv off and add the .txt but keep the filename the > same. For example, having a filename "weekly_20160102.csv" and then create > a txt filename with "weekly_20160102.txt" and have all

[Tutor] Help!

2016-01-15 Thread Chelsea G
Hi, So what I am working on is taking a csv file and only taking 2 columns from the spreadsheet and out putting that to a text file. Then taking those two columns and organize them by product(key) and outputting the description(values) that are associated. Some products have a lot of duplicate

Re: [Tutor] HELP!!

2016-01-12 Thread Joel Goldstick
On Tue, Jan 12, 2016 at 3:36 PM, Chelsea G wrote: > So I am importing a csv file to textfile and the first column is product > names and the second is a description of each. I am trying to find the sum > of all descriptions using sum(c.values)). Here is my code so far: >

[Tutor] HELP!!

2016-01-12 Thread Chelsea G
So I am importing a csv file to textfile and the first column is product names and the second is a description of each. I am trying to find the sum of all descriptions using sum(c.values)). Here is my code so far: import csv import json import sys #from sys import argv from collections import

<    1   2   3   4   5   6   7   8   9   10   >