CSV

2017-02-22 Thread Braxton Alfred
Why does this not run? It is right out of the CSV file in the Standard Lib. Python ver 3.4.4, 64 bit. import csv """ READ EXCEL FILE """ filename = 'c:\users\user\my documents\Braxton\Excel\personal\bp.csv' with open (filename, newline = ' ') as bp: dialect = csv.excel reade

Re: JSON-encoding very long iterators

2014-10-01 Thread Alfred Morgan
Excellent, thank you. http://bugs.python.org/issue14573 -alfred -- https://mail.python.org/mailman/listinfo/python-list

Re: JSON-encoding very long iterators

2014-10-01 Thread Alfred Morgan
On Wednesday, October 1, 2014 3:55:19 PM UTC-7, Chris Angelico wrote: > At some point, you'll have to port your patch to the latest codebase Okay, done. https://github.com/Zectbumo/cpython/compare/master Iterators for JSON is now Python 3 ready. -- https://mail.python.org/mailman/listinfo/pytho

Re: JSON-encoding very long iterators

2014-10-01 Thread Alfred Morgan
On Wednesday, October 1, 2014 6:07:23 AM UTC-7, Chris Angelico wrote: > On Wed, Oct 1, 2014 at 8:13 PM, Alfred Morgan wrote: > > What do you think now? > > I think that you're adding features to Python 2.7, which isn't getting > new features. That won't be merged

Re: JSON-encoding very long iterators

2014-10-01 Thread Alfred Morgan
On Monday, September 29, 2014 7:10:18 PM UTC-7, Ian wrote: > This would cause things that aren't lists to be encoded as lists. > Sometimes that may be desirable, but in general if e.g. a file object > sneaks its way into your JSON encode call, it is more likely correct > to raise an error than to s

JSON-encoding very long iterators

2014-09-29 Thread alfred
I would like to add the ability to JSONEncode large iterators. Right now there is no way to do this without modifying the code. The JSONEncoder.default() doc string suggests to do this: For example, to support arbitrary iterators, you could implement default like this::

Re: split lines from stdin into a list of unicode strings

2013-08-28 Thread kurt . alfred . mueller
On Wednesday, August 28, 2013 1:13:36 PM UTC+2, Dave Angel wrote: > On 28/8/2013 04:32, Kurt Mueller wrote: > > For some text manipulation tasks I need a template to split lines > > from stdin into a list of strings the way shlex.split() does it. > > The encoding of the input can vary. > Does that

Re: right adjusted strings containing umlauts

2013-08-28 Thread kurt . alfred . mueller
On Wednesday, August 28, 2013 12:23:12 PM UTC+2, Dave Angel wrote: > On 28/8/2013 04:01, Kurt Mueller wrote: > > Because I cannot switch to Python 3 for now my life is not so easy:-) > > For some text manipulation tasks I need a template to split lines > > from stdin into a list of strings the way

Reading file bit by bit

2010-06-07 Thread Alfred Bovin
Hi all. I'm working on something where I need to read a (binary) file bit by bit and do something depending on whether the bit is 0 or 1. Any help on doing the actual file reading is appreciated. Thanks in advance -- http://mail.python.org/mailman/listinfo/python-list

Re: complex numbers

2005-01-10 Thread Alfred Z. Newmane
J|rgen Exner wrote: > [EMAIL PROTECTED] wrote: >> #python supports complex numbers. > [...] > > So? > >> # Perl doesn't support complex numbers. But there are packages that >> supports it. > > The Math::Complex module is part of the standard installation > already, no need for any "packages" (whate

python programming help

2004-12-06 Thread Alfred Canoy
Hello, Thanks for the input:-) I made a mean, median & mode program. I'm trying to figure how can I store this program in another file and opens the file to display. Any idea what to add in my source code. Thanks!     # compute the Mean, Median & Mode of a list of numbers:   sum = 0.0   prin

Programming help

2004-12-05 Thread Alfred Canoy
Hello,   I'm stuck in the end of my source code. I'm trying to print all the numbers. How can I print all the list of numbers that I selected?      Source code:# compute the Mean, Median & Mode of a list of numbers:sum = 0.0print 'This program will take several numbers then average them'cou

Re: [Python-Help] Programming help

2004-12-05 Thread Alfred Canoy
;, current_count,":",number sum = sum + number print " [x,...,x] ?" Al _ _ _ _ Alfred Canoy Agana, Guam Pacific time [EMAIL PROTECTED] - Original Message - From: "Matthew Dixon Cowles" <[EMAIL PROTECTED]> To: "Alfred Canoy" <[EMAIL PROTE

Re: Python-Help ( Mean,Median & Mode)

2004-12-05 Thread Alfred Canoy
eback (most recent call last): File "C:\Python24\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "A:\SLP5.py", line 23, in ? for x in number: TypeError: iteration over non-sequence Thank you much!

Re: [Python-Help] (fwd)

2004-12-04 Thread Alfred Canoy
r 0 to exit the loop' while number != 0: number = input ('Enter a number: ') count = count + 1 sum = sum + number count = count -1 print ' The average is:', sum/count Greatly appreciates it! Al _ _ _ _ Alfred Canoy Agana, Guam Pacific time [EMAIL PROTECTED] -- http:/

problem solving help

2004-12-04 Thread Alfred Canoy
Dear Sir/Madam, Hello! I'm just new to programming and would like to ask for help.. Can you please give me clue how I should start solving the following problem below? Write a program that allows you to do the following five operations: Prompt the user to input a list of numbe

Programming help

2004-12-04 Thread Alfred Canoy
Dear Sir/Madam, Hello! I'm just new to programming and would like to ask for help.. Can you please give me clue how I should start solving the following problem below? -Build a module that contains three functions that do the following: Compute the average of a list of number