JSON Object to CSV file

2015-06-17 Thread Saran A
I would like to have this JSON object written out to a CSV file so that the keys are header fields (for each of the columns) and the values are values that are associated with each header field. Is there a best practice for working with this? Ideally I would like to recursively iterate through t

Re: New to Programming: Adding custom functions with ipynotify classes

2015-04-03 Thread Saran A
On Friday, April 3, 2015 at 12:40:11 PM UTC-4, Denis McMahon wrote: > On Thu, 02 Apr 2015 18:30:42 -0700, Saran A wrote: > > > Here is the program that I am trying to write (with specs): > > Saran, please stop prefacing every subject with "New to programming:" -

Re: Strategy/ Advice for How to Best Attack this Problem?

2015-04-03 Thread Saran A
On Friday, April 3, 2015 at 6:46:21 AM UTC-4, Peter Otten wrote: > Saran A wrote: > > > I debugged and rewrote everything. Here is the full version. Feel free to > > tear this apart. The homework assignment is not due until tomorrow, so I > > am currently also experimentin

Re: Strategy/ Advice for How to Best Attack this Problem?

2015-04-03 Thread Saran A
On Friday, April 3, 2015 at 8:05:14 AM UTC-4, Dave Angel wrote: > On 04/02/2015 07:43 PM, Saran A wrote: > > > > > I debugged and rewrote everything. Here is the full version. Feel free to > > tear this apart. The homework assignment is not due until tomorrow, so

New to Programming: Adding custom functions with ipynotify classes

2015-04-02 Thread Saran A
Hello All: Here is the program that I am trying to write (with specs): * Monitors a folder for files that are dropped throughout the day * When a file is dropped in the folder the program should scan the file o IF all the records in the file have the same length (line length) o THEN the file

Re: New to Programming: TypeError: coercing to Unicode: need string or buffer, list found

2015-04-02 Thread Saran A
On Thursday, April 2, 2015 at 8:03:53 PM UTC-4, Dennis Lee Bieber wrote: > On Thu, 2 Apr 2015 05:46:57 -0700 (PDT), Saran A > declaimed the following: > > > > >@ChrisA - this is a smaller function that will take the most updated file. > >My intention is the following

Re: Strategy/ Advice for How to Best Attack this Problem?

2015-04-02 Thread Saran A
On Thursday, April 2, 2015 at 5:11:20 PM UTC-4, Dave Angel wrote: > On 04/02/2015 09:06 AM, Saran A wrote: > > > > > Thanks for your help on this homework assignment. I started from scratch > > last night. I have added some comments that will perhaps help clarify m

Re: New to Programming: TypeError: coercing to Unicode: need string or buffer, list found

2015-04-02 Thread Saran A
On Thursday, April 2, 2015 at 9:06:49 AM UTC-4, Chris Angelico wrote: > On Thu, Apr 2, 2015 at 11:46 PM, Saran A wrote: > > @ChrisA - this is a smaller function that will take the most updated file. > > My intention is the following: > > > > * Monitor a folder

Re: Strategy/ Advice for How to Best Attack this Problem?

2015-04-02 Thread Saran A
On Wednesday, April 1, 2015 at 7:52:27 PM UTC-4, Dave Angel wrote: > On 04/01/2015 09:43 AM, Saran A wrote: > > On Tuesday, March 31, 2015 at 9:19:37 AM UTC-4, Dave Angel wrote: > >> On 03/31/2015 07:00 AM, Saran A wrote: > >> > >> > @DaveA: This is a h

Re: New to Programming: TypeError: coercing to Unicode: need string or buffer, list found

2015-04-02 Thread Saran A
On Thursday, April 2, 2015 at 8:26:51 AM UTC-4, Peter Otten wrote: > Saran A wrote: > > > Good Morning: > > > > I understand this error message when I run this code. However, I am > > curious to know what the most pythonic way is to convert the list to

Re: New to Programming: TypeError: coercing to Unicode: need string or buffer, list found

2015-04-02 Thread Saran A
On Thursday, April 2, 2015 at 8:26:01 AM UTC-4, Chris Angelico wrote: > On Thu, Apr 2, 2015 at 11:02 PM, Saran A wrote: > > I understand this error message when I run this code. However, I am curious > > to know what the most pythonic way is to convert the list to a string? I

New to Programming: TypeError: coercing to Unicode: need string or buffer, list found

2015-04-02 Thread Saran A
Good Morning: I understand this error message when I run this code. However, I am curious to know what the most pythonic way is to convert the list to a string? I use Python 2.7. "Traceback (most recent call last): before = dict([(f, None) for f in os.listdir(dirlist)]) TypeError: coercing to

Re: Addendum to Strategy/ Advice for How to Best Attack this Problem?

2015-04-01 Thread Saran A
On Sunday, March 29, 2015 at 8:33:43 AM UTC-4, Peter Otten wrote: > Saran Ahluwalia wrote: > > > On Sunday, March 29, 2015 at 7:33:04 AM UTC-4, Saran Ahluwalia wrote: > >> Below are the function's requirements. I am torn between using the OS > >> module or some other quick and dirty module. In add

Re: Strategy/ Advice for How to Best Attack this Problem?

2015-04-01 Thread Saran A
On Tuesday, March 31, 2015 at 9:19:37 AM UTC-4, Dave Angel wrote: > On 03/31/2015 07:00 AM, Saran A wrote: > > > @DaveA: This is a homework assignment. Is it possible that you > could provide me with some snippets or guidance on where to place your > suggestions (for y

Re: Strategy/ Advice for How to Best Attack this Problem?

2015-03-31 Thread Saran A
On Monday, March 30, 2015 at 2:36:02 PM UTC-4, Dave Angel wrote: > On 03/30/2015 12:45 PM, Saran A wrote: > > On Sunday, March 29, 2015 at 10:04:45 PM UTC-4, Chris Angelico wrote: > >> On Mon, Mar 30, 2015 at 12:08 PM, Paul Rubin > >> wrote: > >>> Saran A

Re: Strategy/ Advice for How to Best Attack this Problem?

2015-03-30 Thread Saran A
On Sunday, March 29, 2015 at 10:04:45 PM UTC-4, Chris Angelico wrote: > On Mon, Mar 30, 2015 at 12:08 PM, Paul Rubin wrote: > > Saran Ahluwalia writes: > >> cross-platform... > >> * Monitors a folder for files that are dropped throughout the day > > > > I don't see a cross-platform way to do that

Re: Addendum to Strategy/ Advice for How to Best Attack this Problem?

2015-03-29 Thread Saran A
Thank you for the feedback - I have only been programming for 8 months now and am fairly new to best practice and what is considered acceptable in public forums. I appreciate the feedback on how to best address this problem. On Sunday, March 29, 2015 at 8:33:43 AM UTC-4, Peter Otten wrote: > Sa