Re: [Tutor] help with subprocess module

2017-08-19 Thread Peter Otten
kay Cee wrote: > I made a python script that will update a Ubuntu Server every second and > writes asuccess message and date to a log file, but for some reason the > file is not being written to. > > Here is the Script: > > > #!/usr/bin/python3 > > > > import subprocess > > import time >

Re: [Tutor] Help....

2017-08-17 Thread Alan Gauld via Tutor
On 17/08/17 14:17, edmundo pierre via Tutor wrote: > I am trying to write a code to solve a system of equation at 2 variables. > I used Tkinter to do it. More significantly you used numpy to do it and that seems to be where the issues lie, not in Tkinter. Numpy is part of SciPy which has a

Re: [Tutor] help with macOS version 10.12.5

2017-07-10 Thread Carlton Banks
Have you tried brew install python3 Updating Homebrew... ==> Auto-updated Homebrew! Updated 3 taps (caskroom/cask, homebrew/core, homebrew/science). ==> Updated Formulae berkeley-dbhomebrew/science/nco percona-server bitrisehugo

Re: [Tutor] Help - What is the best package to learn programming in Python?

2017-05-18 Thread Abdur-Rahmaan Janhangeer
for IDE, you have pycharm which works well i use Wing IDE personal. Nice for me. Don't forget to check the in-built IDLE tutorialspoint for python 2 or 3 is a nice quick reference. Learning how to do things the python way helps to ease jobs. else, python has become more than an average

Re: [Tutor] Help finishing a function

2017-05-17 Thread Alan Gauld via Tutor
Please use Reply-All or Reply-List when replying to the list, otherwise it only goes to me. On 17/05/17 17:21, Grace Sanford wrote: > Syntactically speaking, how can I check if an element in the list > "board" at position p equals "_" and then change that element to "0"? You can use the ==

Re: [Tutor] Help - What is the best package to learn programming in Python?

2017-05-17 Thread Alan Gauld via Tutor
On 17/05/17 19:17, keith quach wrote: > I hope you could help. I am new to the Python community. I am looking > for your recommendation for a Windows 10 (64 bit) Python 3.6 > distribution package that covers all the necessary installtions/files. It depends on what you want to do. There is no

Re: [Tutor] Help finishing a function

2017-05-17 Thread Alan Gauld via Tutor
On 17/05/17 14:31, Grace Sanford wrote: > I am wondering if someone can help/advise me on finishing the code for this > function: Please only send one email for a given i8ssue it gets confusing when people start responding to two different threads about the same question. Also please give us

Re: [Tutor] Help with function scoping

2017-03-23 Thread Alan Gauld via Tutor
On 23/03/17 10:15, Richard Mcewan wrote: > #loop to check guess and report > while userGuess != computerGuess: > if userGuess < computerGuess: > print('Too low') > userGuess = getUser() > elif userGuess > computerGuess: > print('Too high') >

Re: [Tutor] Help with function scoping

2017-03-23 Thread Mats Wichmann
On 03/22/2017 03:17 PM, Richard Mcewan wrote: > Hi > > I wonder if you can help. > > I'm confused about how functions should work. Below is some code I write to > check my understanding. > > I'm expecting two functions to be defined. Then called. One returns a random > number. The other

Re: [Tutor] Help with function scoping

2017-03-22 Thread Alan Gauld via Tutor
On 22/03/17 21:17, Richard Mcewan wrote: > I'm expecting two functions to be defined. Then called. And thats what you've got. But... > One returns a random number. The other user input (guessing the number). And thats also what you've got but you don't do anything with the returned value you

Re: [Tutor] Help with function scoping

2017-03-22 Thread Joel Goldstick
On Wed, Mar 22, 2017 at 5:17 PM, Richard Mcewan wrote: > Hi > > I wonder if you can help. > > I'm confused about how functions should work. Below is some code I write to > check my understanding. > > I'm expecting two functions to be defined. Then called. One returns a

Re: [Tutor] Help!! Code ridden with Bugs

2017-03-09 Thread Alan Gauld via Tutor
On 09/03/17 18:42, Eloka Chima via Tutor wrote: > Is my code okay. > > THERE IS AN ERROR/BUG IN YOUR CODE > Results: Traceback (most recent call last): File "python/nose2/bin/nose2", > line 8, Evidently not. But the error messages are unreadable, please send in plain text. -- Alan G Author

Re: [Tutor] Help!! Code ridden with Bugs

2017-03-09 Thread Alan Gauld via Tutor
On 09/03/17 13:28, Eloka Chima via Tutor wrote: > My assignment below is ridden with bugs So tell us what they are don;t make us guess and don't expect us to run code which is by your own admission faulty! If you get error messages post them, in full. If it runs but misbehaves tell us what

Re: [Tutor] Help!! Code ridden with Bugs

2017-03-09 Thread Mats Wichmann
On 03/09/2017 12:32 PM, Joel Goldstick wrote: > On Thu, Mar 9, 2017 at 8:28 AM, Eloka Chima via Tutor > wrote: >> I am new to programming but an immersive study in the past few weeks have >> brought me to speed so I can play around with codes but not really mastered >>

Re: [Tutor] Help!! Code ridden with Bugs

2017-03-09 Thread Eloka Chima via Tutor
Is my code okay. Sent from Yahoo Mail on Android On Thu, 9 Mar 2017 at 7:41 pm, Eloka Chima wrote: Your Code Solution Has Errors THERE IS AN ERROR/BUG IN YOUR CODE Results: Traceback (most recent call last): File "python/nose2/bin/nose2", line 8, in discover()

Re: [Tutor] Help!! Code ridden with Bugs

2017-03-09 Thread Eloka Chima via Tutor
Your Code Solution Has Errors THERE IS AN ERROR/BUG IN YOUR CODE Results: Traceback (most recent call last): File "python/nose2/bin/nose2", line 8, in discover() File "/usr/local/lib/python2.7/dist-packages/nose2-0.5.0-py2.7.egg/nose2/main.py", line 300, in discover return main(*args,

Re: [Tutor] Help!! Code ridden with Bugs

2017-03-09 Thread Sri Kavi
def checkout(self, cash_paid): self.cash_paid = cash_paid if self.cash_paid < self.total: self.total -= self.cash_paid return self.total return "Cash paid is not enough" You cannot return two values. Sri On Thu, Mar 9, 2017 at 6:58 PM, Eloka Chima via Tutor

Re: [Tutor] Help!! Code ridden with Bugs

2017-03-09 Thread Joel Goldstick
On Thu, Mar 9, 2017 at 8:28 AM, Eloka Chima via Tutor wrote: > I am new to programming but an immersive study in the past few weeks have > brought me to speed so I can play around with codes but not really mastered > them.My assignment below is ridden with bugs and I've done

Re: [Tutor] help with and

2017-03-01 Thread Steven D'Aprano
On Wed, Mar 01, 2017 at 09:29:04AM +, Alan Gauld via Tutor wrote: > You need to be explicit: > >if hours_worked > 40 and hours_worked < 60: > > You can also write what you intend in a slightly > different form: > >if (40 < hours_worked < 60): > > Note: > The second form an unusual

Re: [Tutor] help with and

2017-03-01 Thread Peter Otten
darrickbled...@gmail.com wrote: > For some reason I am getting a syntax error when I try and write my second > If statement. I cannot find anything wrong with the statement because it > is set up the same as all the others I see online. Perhaps someone can > inform me why I am getting this.

Re: [Tutor] help with and

2017-03-01 Thread Alan Gauld via Tutor
On 01/03/17 06:21, darrickbled...@gmail.com wrote: > wage = eval(input("Enter in the employees hourly wage: ")) #get wage > hours_worked = eval(input("Enter in the number of hours worked: ")) Don't use eval() like this it is a security risk and is a very bad habit to get into. Instead use an

Re: [Tutor] Help with this question

2017-02-27 Thread Alan Gauld via Tutor
On 27/02/17 22:00, Johnny Hh wrote: > write a python function called find_most_freq() that returns the element of > a given list that occurs the most frequently. If there are ties, take the > number found first. OK, You've shown us the exercise, now show us your attempt at a solution. Here is a

Re: [Tutor] Help with random in Tkinter

2017-02-13 Thread Alan Gauld via Tutor
On 13/02/17 13:30, Lisa Hasler Waters wrote: > It runs fine when we use IDLE. But, we love PyCharmEDU as it is much more > user-friendly and so we hope to run the same programs in it as we can in > IDLE. That shouldn't make much difference unless PyCharm sets its default folders differently?

Re: [Tutor] Help

2017-02-10 Thread Joaquin Alzola
>Please assist with this assignment >Write a function my_sort which takes in a list of numbers (positive >integers). >The function should return a list of sorted numbers such that odd numbers >come first and even numbers come last. You can search for even or odd numbers with the modulo (%)

Re: [Tutor] Help

2017-02-10 Thread Alan Gauld via Tutor
On 10/02/17 02:05, Sasiliyu Adetunji wrote: > Please assist with this assignment > > Write a function my_sort which takes in a list of numbers (positive > integers). > > The function should return a list of sorted numbers such that odd numbers > come first and even numbers come last. def

Re: [Tutor] Help with Multiple Inheritance in Classes

2017-02-09 Thread Alan Gauld via Tutor
On 09/02/17 10:42, Vusa Moyo wrote: > Thanks so much. You've been a great help. > > You have confirmed that the lecture's question is flawed. It is not, it is exactly right. (Albeit unusual in its use of class attributes) but there is nothing wrong with the code, only the way you were trying to

Re: [Tutor] Help with Multiple Inheritance in Classes

2017-02-09 Thread Vusa Moyo
Thanks so much. You've been a great help. You have confirmed that the lecture's question is flawed. Appreciate the help. Regards Vusa On Thu, Feb 9, 2017 at 12:02 PM, Alan Gauld via Tutor wrote: > On 09/02/17 09:25, Vusa Moyo wrote: > > > class Cat: > > name = "" > >

Re: [Tutor] Help with Multiple Inheritance in Classes

2017-02-09 Thread Alan Gauld via Tutor
On 09/02/17 09:25, Vusa Moyo wrote: > class Cat: > name = "" > kind = "cat" > color = "" > value = 100.00 > > def description(self): > desc_str = "%s is a %s %s cat worth R%.2f." % (self.name, > self.color, self.kind, self.value) > return desc_str > > The

Re: [Tutor] Help with Multiple Inheritance in Classes

2017-02-09 Thread Vusa Moyo
Hi Alan. You are correct with the indentation. class Cat: name = "" kind = "cat" color = "" value = 100.00 def description(self): desc_str = "%s is a %s %s cat worth R%.2f." % (self.name, self.color, self.kind, self.value) return desc_str The above code is

Re: [Tutor] Help on this assignment

2017-02-09 Thread Alan Gauld via Tutor
On 09/02/17 08:10, Sasiliyu Adetunji wrote: > Write a function called remove_duplicates which will take one argument > called string. This string input will only have characters between a-z. > > The function should remove all repeated characters in the string and return > a tuple with two

Re: [Tutor] Help on shoppingcart

2017-02-08 Thread Alan Gauld via Tutor
On 08/02/17 10:04, Sasiliyu Adetunji wrote: > Pls help me on this shoppingcart assignment Sure. You have a very specific set of tasks. Which bit are you stuck on? What have you tried? Show us your code and we can help get it working. > Create a class called ShoppingCart > Create a

Re: [Tutor] Help with Multiple Inheritance in Classes

2017-02-08 Thread Alan Gauld via Tutor
On 08/02/17 07:11, Vusa Moyo wrote: > I have a suspicion my lecturer's question is flawed, so I'd like to pose it > to you guys to confirm my suspicions. I think your interpretation of the question is flawed. See Peter's reply for why. However another point is > class Cat: > name = ""

Re: [Tutor] Help with Multiple Inheritance in Classes

2017-02-08 Thread Peter Otten
Vusa Moyo wrote: > I have a suspicion my lecturer's question is flawed, so I'd like to pose > it to you guys to confirm my suspicions. > > Here goes.. > > I've gone and created a Class Cat1(cat): <-- inherited class, but cant > seem get the code right which allows the test code to run

Re: [Tutor] Help with this work

2017-02-07 Thread Alan Gauld via Tutor
On 07/02/17 04:08, Sasiliyu Adetunji wrote: > I have been working on yhis assignment You are asking for help but in what regard? There is no question or problem statement in your post? I've put some general comments below... > class ShoppingCart(object): > > def __init__(self): >

Re: [Tutor] Help Please on python

2017-02-07 Thread Alan Gauld via Tutor
On 07/02/17 02:12, Laura Garcia wrote: > I need to create a python code that should simulate throwing darts by > random landing between (a random x and a random y)0 and 1. and the program > should print out number of darts that land within a rectangle. Look in the random module. There are a

Re: [Tutor] Help with a Conversion

2017-01-05 Thread S. P. Molnar
On 01/05/2017 01:10 PM, Peter Otten wrote: S. P. Molnar wrote: I have just started attempting programming in Python and am using Spyder with Python 3.5.2 on a Linux platform. (I first started programing in Fortran II using punched paper tape. Yes, am a rather elderly . . .). I have bumbled

Re: [Tutor] Help with a Conversion

2017-01-05 Thread Steven D'Aprano
On Thu, Jan 05, 2017 at 08:29:33AM -0500, S. P. Molnar wrote: [...] > To change the frequency to wave length I did the following: > > > p=1/1e7 > wave_length = p*np.array(frequency) > > (The relationship between wavelength and frequency is: wavelength = > 1.0e7/frequency, where 1e7 is the

Re: [Tutor] Help with a Conversion

2017-01-05 Thread Peter Otten
S. P. Molnar wrote: > I have just started attempting programming in Python and am using Spyder > with Python 3.5.2 on a Linux platform. (I first started programing in > Fortran II using punched paper tape. Yes, am a rather elderly . . .). > > I have bumbled through, what I foolishly thought

Re: [Tutor] Help with a Conversion

2017-01-05 Thread S. P. Molnar
On 01/05/2017 11:41 AM, Alan Gauld via Tutor wrote: On 05/01/17 13:29, S. P. Molnar wrote: Fortran II using punched paper tape. Yes, am a rather elderly . . .). You are not the only one, there are at least 2 more of us on this list that started in that era... short program to change

Re: [Tutor] Help with a Conversion

2017-01-05 Thread Alan Gauld via Tutor
On 05/01/17 13:29, S. P. Molnar wrote: > Fortran II using punched paper tape. Yes, am a rather elderly . . .). You are not the only one, there are at least 2 more of us on this list that started in that era... > short program to change frequency to wavelength for a plot of > ultraviolet

Re: [Tutor] help :making window

2016-12-31 Thread Alan Gauld via Tutor
On 31/12/16 16:05, syafiqah amir via Tutor wrote: > Hello,Im trying to execute the code but the window does not come out. Please always post python code in plain text, otherwise the html gets wrapped and it becomes illegible. > (script from Maya python for games and film) This group is for

Re: [Tutor] help :making window

2016-12-31 Thread Alex Kleider
On 2016-12-31 09:35, Joel Goldstick wrote: Semicolon (;) isn't used in python as a statement separator alex@X301n3:/mnt$ python3 Python 3.4.3 (default, Nov 17 2016, 01:11:57) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for more information. gee = "really";

Re: [Tutor] help :making window

2016-12-31 Thread Joel Goldstick
On Sat, Dec 31, 2016 at 11:05 AM, syafiqah amir via Tutor wrote: > > > On Saturday, December 31, 2016 3:55 PM, syafiqah amir > wrote: > > > Hello,Im trying to execute the code but the window does not come out.(script > from Maya python for games

Re: [Tutor] Help on Software Design decisions

2016-11-29 Thread Juan C.
On Tue, Nov 29, 2016 at 7:12 AM, Alan Gauld via Tutor wrote: > I just noticed the last bit. > Is this a client side API or a server side API? > In other words are you building a set of services on the > server or are you building a module that makes it easy > for client side

Re: [Tutor] Help on Software Design decisions

2016-11-29 Thread Alan Gauld via Tutor
On 29/11/16 02:02, Juan C. wrote: >>> I have to build my own Moodle API to be consumed by my program, I just noticed the last bit. Is this a client side API or a server side API? In other words are you building a set of services on the server or are you building a module that makes it easy for

Re: [Tutor] Help on Software Design decisions

2016-11-29 Thread Juan C.
On Mon, Nov 28, 2016 at 11:33 PM, Alan Gauld via Tutor wrote: > > On 28/11/16 21:53, Juan C. wrote: > > I'm a student and my university uses Moodle as their learning management > > system (LMS). > > Never heard of it but hopefully that doesn't matter :-) > > > 1. Bachelor's

Re: [Tutor] Help on Software Design decisions

2016-11-28 Thread Alan Gauld via Tutor
On 28/11/16 21:53, Juan C. wrote: > I'm a student and my university uses Moodle as their learning management > system (LMS). Never heard of it but hopefully that doesn't matter :-) > 1. Bachelor's Degree in Computer Science (duration: 8 semesters) > > 1.1. Unit 01: Mathematics Fundamental

Re: [Tutor] Help with Python Queue

2016-11-26 Thread Joaquin Alzola
>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() > print("q is taken out") > q.taskdone() Per documentation it is task_done

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

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

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

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

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 =

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

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 >

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

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

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

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

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

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,

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

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

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

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.

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

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

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

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