Re: [Tutor] Python script errors

2018-12-12 Thread Steven D'Aprano
On Wed, Dec 12, 2018 at 06:57:09AM -0600, Ravi Kumar wrote: > I know this occurs when the api response is nulls but how do I handle this? if response is None: handle None case else: handle non-None case -- Steve ___ Tutor maillist - Tutor@

Re: [Tutor] Python script errors

2018-12-12 Thread Peter Otten
Ravi Kumar wrote: > Hi, > > I have developed a python script to get api calls for meraki > clientlogevents Thanks for all the help previously I am facing few errors > such as > > Json_string=r.json() > > raw_decode > raise JSONDecodeError("Expecting value", s, err.value) from None > json.d

Re: [Tutor] Python script errors

2018-12-12 Thread Alan Gauld via Tutor
On 12/12/2018 12:57, Ravi Kumar wrote: > '{0:20} {1:30} {2:16} {3:18} {4:10} {5:11} '.format( > deviceserial, type, macaddress,occurredAt, details)) > TypeError: unsupported format string passed to NoneType.__format__ You have 6 format holders in your string but you only pass 5 values

Re: [Tutor] Python Script Testing

2018-03-15 Thread Alan Gauld via Tutor
Please always use Reply All or Reply List when responding to list emails. Farwarding to list... On 15/03/18 17:47, Gaurav Parashar wrote: > Opening the file inside the script seems the only possible solution. > As far as I remember about the coursera course, the gave the input > file, and we need

Re: [Tutor] Python Script Testing

2018-03-15 Thread Alex Kleider
On 2018-03-15 09:56, Preeti Saxena wrote: Hi, I am new to python. I am trying to test my program, like a coursera submission, which takes run time arguments using "raw_input()". Is there a way I can write all the input data into a file and pass it from command line to the script? 1. I have t

Re: [Tutor] Python Script Testing

2018-03-15 Thread Alan Gauld via Tutor
On 15/03/18 16:56, Preeti Saxena wrote: > Hi, >I am new to python. I am trying to test my program, like a coursera > submission, which takes run time arguments using "raw_input()". Is there a > way I can write all the input data into a file and pass it from command > line to the script? In nor

Re: [Tutor] Python Script

2016-11-10 Thread Alan Gauld via Tutor
On 10/11/16 00:18, Jordan Trudell wrote: > Hello, I need help running a script, as I am getting an error. OK, But we need to know what version of Python and which OS you use. Also post the script and the full error message you get. (Don't send attachments because they usually get stripped by the

Re: [Tutor] Python script for ganglia

2015-12-22 Thread Steven D'Aprano
On Wed, Dec 23, 2015 at 03:15:49AM +0530, Rahul Kumar wrote: > Hi, > I would like to know about how python can be use to get data from > ganglia monitoring tool. This may be a bit too specialised for a beginner's list like this, but we can try. Is there a Ganglia discussion list or forum where y

Re: [Tutor] python script

2015-02-20 Thread Mark Lawrence
On 20/02/2015 03:56, rohit poddaturi wrote: Hi I am really new to python and have been given a assignment which is quite complex for my standard.The following is the assignment The program runs through the word document and when it sees a date ( the date might be in a variety of forms, but w

Re: [Tutor] python script

2015-02-20 Thread Alan Gauld
On 20/02/15 03:56, rohit poddaturi wrote: The program runs through the word document and when it sees a date > ( the date might be in a variety of forms, but will always list the particular month) > it goes to a new row in the excel sheet and lists that date. OK, The first question that sp

Re: [Tutor] Python script

2014-12-26 Thread Alex Kleider
On 2014-12-25 23:58, Ben Finney wrote: Nothing in that thread says otherwise, do you have more current information to the contrary? I do not. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.o

Re: [Tutor] Python script

2014-12-26 Thread Ben Finney
Alex Kleider writes: > On 2014-12-25 16:59, Ben Finney wrote: > > > http://sscce.org/>. > > It may be that this link will go away. > http://www.coderanch.com/t/628405/Ranch-Office/SSCCE-org-document-disappearing Almost certainly at some future time, but not because of that. As discussed in th

Re: [Tutor] Python script

2014-12-25 Thread Alex Kleider
On 2014-12-25 16:59, Ben Finney wrote: http://sscce.org/>. It may be that this link will go away. http://www.coderanch.com/t/628405/Ranch-Office/SSCCE-org-document-disappearing ___ Tutor maillist - Tutor@python.org To unsubscribe or change subsc

Re: [Tutor] Python script

2014-12-25 Thread Ben Finney
Mamy Rivo DIANZINGA writes: > Good morning Sir, merry Xmas. I have a question, please Sir if you do > not mind. Thank you for being so polite; we are usually quite informal here. > In this file E_vs_cutoff1.pdf, i represent the energy vs radial > cutoff. And in the python script, i specified th

Re: [Tutor] Python Script: Downloading Youtube videos by search result

2013-04-19 Thread Amit Saha
On Fri, Apr 19, 2013 at 9:44 PM, Sayan Chatterjee wrote: > Dear All, > > I want to download some music from youtube.There are already marvellous > python scripts like youtube-dl which downloads videos and playlists from > numerous sites,but what I want to do is to download videos from youtube with

Re: [Tutor] python script

2010-11-23 Thread Alan Gauld
"Laura Jessen" wrote How would i write a simple python script to issue a scsi inquiry to a drive? Depending on what you want to do and how you define "simple" it may not be possible. If its just to read data from a scsi device then once mounted it should be accesible like any other device.

Re: [Tutor] Python Script Problem. Simple sql problem & py problems.

2005-12-06 Thread w chun
> I wrote my first script (ever) in Python. > : > The second one is more python specific I guess. The programs prints > the "Exiting" string on exit one time for every action I do. Which > means that if I add 4 users, I'll see 4 time exiting printed. If I add > 2 users and delete 1 us