Re: What's wrong with these codes as failed to read the strings in Chinese? Is it because Chinese characters can't be read on Mac? Many thanks

2018-11-09 Thread Kevin Hu
Dear Annie, Looks like you’re trying to read in a file with encoded characters. By default Python3 reads file in bytes, and you’ll need to decode it. Looks like it’s utf-8 encoding. More at: https://docs.python.org/3/howto/unicode.html You can si

Cloud platform with GPU

2018-11-09 Thread denis meng
Good day all, I am looking for a good cloud platform to do all my python development for machine learning with GPU availability, so far I have used Amazon ec2, google colab, kaggle etc but none of them was very satisfactory. Anyone has good experience with other options? please share and TIA Den

Anyone running Python on MS Azure?

2018-11-09 Thread Malcolm Greene
Curious to hear if any of you are running Python scripts/apps on MS Azure cloud services? What services are you using and what has your experience been? Advice? Background: Customer migrating to Azure. I'm trying to get ahead of the curve regarding how Python-friendly the Azure platform is. Thanks

Re: Windows file associations fix

2018-11-09 Thread eryk sun
On 11/9/18, David Raymond wrote: > > And why does the Python installer have a check box for "Associate files with > Python" if it then promptly proceeds to destroy all those associations? > Could we maybe get that part of the installer fixed for future versions? The installer configures the HKCR

Re: Windows file associations fix

2018-11-09 Thread boB Stepp
On Fri, Nov 9, 2018 at 10:02 AM David Raymond wrote: > Currently: Windows 7. Attempting to run a .py file opens up the "Open with" > dialog with a bunch of other programs listed. Clicking browse to manually > select the new python.exe doesn't add it to the list and won't let me do the > associ

ANN: Wing Python IDE 6.1.2 released

2018-11-09 Thread Wingware
Hi, We've just released Wing 6.1.2 , which allows creating a new virtualenv from the New Project dialog, implements VI mode inner/all text object operations such as ciw and das, exits VI insert mode when jk is t

Re: [Tutor] SyntaxError: can't assign to literal while using ""blkid -o export %s | grep 'TYPE' | cut -d"=" -f3" % (fs)" using subprocess module in Python

2018-11-09 Thread Cousin Stanley
srinivasan wrote: > Even after changing as per the below > "blkid -o export %s | grep 'TYPE' | cut -d'=' -f3" > or: > 'blkid -o export %s | grep "TYPE" | cut -d"=" -f3' > or: > "blkid -o export %s | grep \"TYPE\" | cut -d\"=\" -f3" > > Still my output is: > */dev/mmcblk1p1: LABEL="efi" UUID="1084

Re: pandas read_csv

2018-11-09 Thread Venkatesh Adiga
Sharan I had similar issue of reading different column sized csv file... Instead of using pandas I used csv reader which handles with no error... Regards Venkat On Fri, 9 Nov 2018, 8:28 pm Sharan Basappa, wrote: > are there any requirements about the format of the CSV file when using > read_csv

Re: pandas read_csv

2018-11-09 Thread Peter Otten
Sharan Basappa wrote: > are there any requirements about the format of the CSV file when using > read_csv from pandas? For example, is it necessary that the csv file has > to have same number of columns in every line etc. > ParserError: Error tokenizing data. C error: Expected 1 fields in line 8,

Re: pandas read_csv

2018-11-09 Thread Rob Gaddi
On 11/9/18 6:54 AM, Sharan Basappa wrote: are there any requirements about the format of the CSV file when using read_csv from pandas? For example, is it necessary that the csv file has to have same number of columns in every line etc. I am trying to load a csv file and I get the following err

Windows file associations fix

2018-11-09 Thread David Raymond
Would some kind person be so good as to point me to instructions on how to fix Windows file associations and default programs for the various Python extensions (.py/.pyw/etc)? I know I've fixed this before after installing a new version, but didn't save the instructions, and apparently my search

pandas read_csv

2018-11-09 Thread Sharan Basappa
are there any requirements about the format of the CSV file when using read_csv from pandas? For example, is it necessary that the csv file has to have same number of columns in every line etc. I am trying to load a csv file and I get the following error. I really don't know what the issue is ..

​PyDev 7.0.3 Released

2018-11-09 Thread Fabio Zadrozny
PyDev 7.0.3 Release Highlights --- * **Mypy** * PyDev can now use Mypy when doing code analysis. * **Black Formatter** * PyDev can now use black as the code formatting engine. * **Virtual environments** * It's now possible to use pipenv for managing vir

Re: [Tutor] SyntaxError: can't assign to literal while using ""blkid -o export %s | grep 'TYPE' | cut -d"=" -f3" % (fs)" using subprocess module in Python

2018-11-09 Thread Chris Angelico
On Fri, Nov 9, 2018 at 11:11 PM Anssi Saari wrote: > > Chris Angelico writes: > > > No helper needed. Safe against command injection. Uses the known > > format of the command's output; if you want other information as well > > as the type, you could get that too. > > Can someone let me in on this

Re: [Tutor] SyntaxError: can't assign to literal while using ""blkid -o export %s | grep 'TYPE' | cut -d"=" -f3" % (fs)" using subprocess module in Python

2018-11-09 Thread Anssi Saari
Chris Angelico writes: > No helper needed. Safe against command injection. Uses the known > format of the command's output; if you want other information as well > as the type, you could get that too. Can someone let me in on this secret helper module? Doesn't seem to match the helper module in

Re: What's wrong with these codes as failed to read the strings in Chinese? Is it because Chinese characters can't be read on Mac? Many thanks

2018-11-09 Thread Peter Otten
Cameron Simpson wrote: > In Python 3 the loop is much cleaner: > > with open('namelist.txt', encoding='utf-8') as f: > for line in f: > line = line.strip() > print("line =", line) In Python 2.7 you can use io.open(): import io with io.open('namelist.txt', encoding='utf-8') a

Re: how can I solve this problem simply and clearly

2018-11-09 Thread Karsten Hilbert
On Fri, Nov 09, 2018 at 09:45:50AM +0800, lampahome wrote: > def __Init__(): There's a typo right there. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list