Re: WANT: bad code in python (for refactoring example)

2017-02-14 Thread Steven D'Aprano
On Wed, 15 Feb 2017 07:44:03 +0900, Makoto Kuwata wrote: > Hi, > > Is there any *just right* python code to refactor? > In other words, I'm finding bad code example in python. Try looking at the ActiveState website for recipes in Python. Especially look at the ones with negative ratings, but e

Re: WANT: bad code in python (for refactoring example)

2017-02-14 Thread Irmen de Jong
On 14-2-2017 23:44, Makoto Kuwata wrote: > Hi, > > Is there any *just right* python code to refactor? > In other words, I'm finding bad code example in python. > > (background) > I'm teaching Python to some novice programmer, and > want to show refactoring example to them. > > (required) > * not

WANT: bad code in python (for refactoring example)

2017-02-14 Thread Makoto Kuwata
Hi, Is there any *just right* python code to refactor? In other words, I'm finding bad code example in python. (background) I'm teaching Python to some novice programmer, and want to show refactoring example to them. (required) * not good code * not too large (for novice programmer) * not too co

Re: Doubt with files

2017-02-14 Thread Peter Pearson
On Tue, 14 Feb 2017 09:13:48 -0800 (PST), José Manuel Suárez Sierra wrote: > hello, > im trying to read a rtf or txt file with this python script: > > with open(dirFichero,'r') as reader: > for line in reader: > print line > > the problem is that shown is : [suppressing blank lines] >

Re: Doubt with files

2017-02-14 Thread boB Stepp
On Tue, Feb 14, 2017 at 11:31 AM, Joaquin Alzola wrote: > >>with open(dirFichero,'r') as reader: > > for line in reader: > > print line >> >>the problem is that shown is : >>{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf810 >>{\fonttbl\f0\fswiss\fcharset0 Helvetica;} >>{\colortbl;\red2

Re: Doubt with files

2017-02-14 Thread boB Stepp
On Tue, Feb 14, 2017 at 11:13 AM, José Manuel Suárez Sierra wrote: > hello, > im trying to read a rtf or txt file with this python script: > > with open(dirFichero,'r') as reader: > for line in reader: > print line > > the problem is that shown is : > > {\rtf1\ansi\ansicpg1252\cocoartf

RE: Doubt with files

2017-02-14 Thread Joaquin Alzola
>with open(dirFichero,'r') as reader: > for line in reader: > print line > >the problem is that shown is : >{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf810 >{\fonttbl\f0\fswiss\fcharset0 Helvetica;} >{\colortbl;\red255\green255\blue255;} >{\*\expandedcolortbl;;} >\paperw11900\paperh1

Doubt with files

2017-02-14 Thread José Manuel Suárez Sierra
hello, im trying to read a rtf or txt file with this python script: with open(dirFichero,'r') as reader: for line in reader: print line the problem is that shown is : {\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf810 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\gr

memory access ordering between processes in python 3.6

2017-02-14 Thread c . curtit
Hi everyone, I'm looking at building an application that allows lockless interprocess data passing using a ring buffer style (sorta) shared memory zone. My initial plan is to create a shared memory zone (probably using C functions thru ctypes), then write data to it with a writer process, then