[issue41382] print() unpredictable behaviour

2020-07-24 Thread n-io
n-io added the comment: Redirecting the stdout of the command to a file (script.py > out) shows the output being produced correctly. The bug seems therefore unrelated to python, my apologies. Thanks though! FYI, "$cat out" will reproduce the bug, while "$vi out"

[issue41382] print() unpredictable behaviour

2020-07-24 Thread n-io
n-io added the comment: The first call you requested (as hinted before, this looks fine to me): $ python3.8 Python 3.8.3 (default, May 14 2020, 22:09:32) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more in

[issue41382] print() unpredictable behaviour

2020-07-24 Thread n-io
New submission from n-io : There seems to be a behavioural issue with the print() function. Using python3.8 and the following line: >>> print("\t".join(['arith_int_512-cuda.sfeat', >>> '__hipsyclkernel$wrapped_kernelname$MicroBenchArithmeticKernel_512_1', &g

Re: Having trouble importing the python turtle on idle

2020-05-16 Thread KINGHAMED io
On Sat, 16 May 2020 at 4:38 PM KINGHAMED io wrote: > Hello my name is Hamed > I have purchased python for kids. > I have installed idle and Python launcher 3.8.3 with my 11 inch MacBook > Air (Mac OS Sierra)version 10.12.6 > I have followed all the instructions all

[issue38958] asyncio REPL swallows KeyboardInterrupt while editing

2019-12-02 Thread Io Mintz
New submission from Io Mintz : "python3 -m asyncio" swallows KeyboardInterrupt while editing a line. Problem steps: == - run python -m asyncio - press ^C Expected behavior (normal CPython REPL, as well as pyth

[issue38366] dataclasses: generate the _hash_action table from the if-else tree

2019-10-03 Thread Io Mintz
New submission from Io Mintz : The dataclasses._hash_action table is currently a bit hard to read. It could be generated once from the if-else tree written in https://bugs.python.org/issue32929#msg312829 instead, which would both be easier to read and easier to maintain, while still

HTTP GET REQUEST WITH PARAMETERS

2013-04-02 Thread io
HI, everyone, how can i make a HTTP GET REQUEST using python and passing parameters? I would like to recall my script from within openoffice basic and pass parameters to it. Some of the GET or POST are here : https://www.bitstamp.net/api/ thanks for anyhelp --

Re: Read csv file and create a new file

2013-03-04 Thread io
What you wrote seems interesting but i haven't understood. Can you explain in simple words considering i'm italian and i'm not understanding so well some terms you use. Sorry, i'm sure you are suggesting something really valid but can't understand it. Marco. --

Python script not working on windows 7 but works fine on linux

2013-03-04 Thread io
(response.read()) f = open(/home/io/btc_trading/markets.csv,wb) c = csv.writer(f) #apre un file di testo e legge il contenuto del file inserendolo in una stringa esclusioni_file = open('/home/io/btc_trading/exclusions.txt','r') esclusioni = [] for line in esclusioni_file: esclusioni.append(line.strip

Re: Python script not working on windows 7 but works fine on linux

2013-03-04 Thread io
Genius! The code i posted was an example. My real code was c:\btc_trading i was just missing the double slashes! Thanks , thankyou very much. :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python script not working on windows 7 but works fine on linux

2013-03-04 Thread io
Thanks, btw ...i'm the IT guy! I was missing the double slash as dougas suggested!++Thanks anyway. -- http://mail.python.org/mailman/listinfo/python-list

Import web content to csv only if values are different from those of an excel sheet

2013-02-28 Thread io
url = http://bitcoincharts.com/t/markets.json; response = urllib.urlopen(url); data = json.loads(response.read()) f = open(/home/io/markets.csv,wb) c = csv.writer(f) # write headers c.writerow([Currency,Symbol,Bid, Ask, Volume]) for d in data : if d[currency] SLL: #esclude la valuta di

Read csv file and create a new file

2013-02-28 Thread io
Hi, i have to files. First file is a csv file Second file is a plain text file where each row has a value (text) I want to be able to create a third file using data from the first file excluding the values listed in the second file. Example: First file: --- mtgoxeur12

Re: Read csv file and create a new file

2013-02-28 Thread io
I'm a noob in python but my code looks like this : import json import urllib import csv url = http://bitcoincharts.com/t/markets.json; response = urllib.urlopen(url); data = json.loads(response.read()) f = open(/home/io/markets.csv,wb) c = csv.writer(f) #apre un file di testo e legge il

Re: Read csv file and create a new file

2013-02-28 Thread io
Iterate over the file instead of looping manually. for line in esclusioni_file: esclusioni.append(line.strip()) print(esclusioni) the print was only to see if it was reading correct data but iìm not needing to see it. Why are you checking d[symbol] instead of d[currency]? Maybe

Re: Read csv file and create a new file

2013-02-28 Thread io
Neil, it works great! Just one question : what can i do for ignoring the case sensitive of the symbol? It wasn't working initially, then i wrote the values respecting case sensitive in the file esclusioni and all worked as a charm. I would just like to know if i could ignore the case senstive

Re: Read csv file and create a new file

2013-02-28 Thread io
The final working code is : import json import urllib import csv url = http://bitcoincharts.com/t/markets.json; response = urllib.urlopen(url); data = json.loads(response.read()) f = open(/home/io/markets.csv,wb) c = csv.writer(f) #apre un file di testo e legge il contenuto del file

Re: Read csv file and create a new file

2013-02-28 Thread io
Just use a tolower() method on both strings when you're comparing them. Of course, that may not work well with international character sets. Some characters in some languages have no lowercase equivalent, and using toupper() has the same problem in other languages. Also, the approach to

Re: Import Json web data source to xls or csv

2013-02-20 Thread io
Il Wed, 20 Feb 2013 06:59:46 +, Cousin Stanley ha scritto: io wrote: How do i manage to read the data source from http://bitcoincharts.com/t/markets.json I just need currency, symbol, bid, ask, volume Following is a simple way load the json data and write

Re: Import Json web data source to xls or csv

2013-02-20 Thread io
That worked perfectley! Thanks alot. -- http://mail.python.org/mailman/listinfo/python-list

Import Json web data source to xls or csv

2013-02-19 Thread io
Hi, i'm new to python and programming with it and so for json format. I have my excel 2010 program with vba that does the following : - read the data flow from http://bitcoincharts.com/t/markets.json - elaborate it and puts it in excel 2010 for further calculations What i'm willing to do is the

Re: Import Json web data source to xls or csv

2013-02-19 Thread io
Hi Michael (name of my son) and thanks for the big help. I'm starting to love python sintax (did they call it python for the slim it is compared to other languages?) Your code didn't work immediatley as it was givin an indentation error that i sorted out quickly fixing the last two lines. It