Re: The future is bright for Python

2017-05-11 Thread Gregory Ewing
Steve D'Aprano wrote: https://medium.com/@trstringer/the-future-is-looking-bright-for-python-95a748a4ef3e I hope it doesn't mean that Python users are getting more and more confused! -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: import docx error

2017-05-11 Thread Pavol Lisy
On 5/11/17, Grant Edwards wrote: > On Wed, May 10, 2017 at 05:14:22PM -0700, somebody wrote: >> I have downloaded Anaconda to Cinnamon Mint 18.1 64 bit where Python >> 3.6 exists. >> >> It will not start up. > > The anaconda that I know about is the RedHat installer program (which > was original

Re: import docx error

2017-05-11 Thread Pavol Lisy
On 5/10/17, Grant Edwards wrote: > On 2017-05-10, RRS1 via Python-list wrote: > >> I am very new to Python, have only done simple things >>>print("hello >> world") type things. I've really been looking forward to using Python. I >> bought Two books, downloaded Python 3.6.1 (32 & 64) and eac

The future is bright for Python

2017-05-11 Thread Steve D'Aprano
https://medium.com/@trstringer/the-future-is-looking-bright-for-python-95a748a4ef3e -- Steve Emoji: a small, fuzzy, indistinct picture used to replace a clear and perfectly comprehensible word. -- https://mail.python.org/mailman/listinfo/python-list

Re: Embedded Python import fails with zip/egg files (v3.6.1)

2017-05-11 Thread eryk sun
On Thu, May 11, 2017 at 9:02 PM, Griebel, Herbert wrote: > > 07:59:04,3205458python.exe4224CreateFile > C:\Users\hansi\Downloads\python-emb\python36.zipSUCCESS Desired Access: > Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO > Non-Alert, Open Reparse Point

Re: import docx error

2017-05-11 Thread Grant Edwards
[Please keep this on the list so that others can benefit (and so that I can deal with it via my NNTP client). Further replies will only happen on-list.] On Wed, May 10, 2017 at 05:14:22PM -0700, somebody wrote: > I need to go back before John, I guess. Sorry, I have no idea what that means. >

Embedded Python import fails with zip/egg files (v3.6.1)

2017-05-11 Thread Griebel, Herbert
Hello, I am having trouble importing python modules on certain machines. On some machines import works, on some not (all machines are Win7 64bit). Python is not installed on any of these machines but used embedded. I tried to analyze the problem but did not succeed so here is what I found. Fi

Re: Out of memory while reading excel file

2017-05-11 Thread Mahmood Naderan via Python-list
Thanks a lot for suggestions. It is now solved. Regards, Mahmood -- https://mail.python.org/mailman/listinfo/python-list

Re: Ten awesome things you are missing out on if you're still using Python 2

2017-05-11 Thread Cholo Lennon
On 09/05/17 03:01, Rustom Mody wrote: On Monday, May 8, 2017 at 12:48:03 PM UTC+5:30, Steven D'Aprano wrote: http://www.asmeurer.com/python3-presentation/slides.html#1 Nice list thanks! Do you have a similar list of 10 awesome features of Python that you can't use because you refuse to upgrad

Re: Repeatedly crawl website every 1 min

2017-05-11 Thread Steve D'Aprano
On Thu, 11 May 2017 12:18 pm, liyucun2...@gmail.com wrote: > Hi Everyone, > > Thanks for stoping by. I am working on a feature to crawl website content > every 1 min. I am curious to know if there any good open source project > for this specific scenario. I agree with Iuri: crawling a website ev

Re: Out of memory while reading excel file

2017-05-11 Thread Peter Otten
Mahmood Naderan via Python-list wrote: > Excuse me, I changed > > csv.writer(outstream) > > to > > csv.writer(outstream, delimiter =' ') > > > It puts space between cells and omits "" around some content. If your data doesn't contain any spaces that's fine. Otherwise you need a way to dist

Re: Repeatedly crawl website every 1 min

2017-05-11 Thread Iuri
Unless you are authorized, don't do it. It literally costs a lot of money to the website you are crawling, in CPU and bandwidth. Hundreds of concurrent requests can even kill a small server (with bad configuration). Look scrapy package, it is great for scraping, but be friendly with the websites

Re: Out of memory while reading excel file

2017-05-11 Thread Mahmood Naderan via Python-list
Excuse me, I changed csv.writer(outstream) to csv.writer(outstream, delimiter =' ') It puts space between cells and omits "" around some content. However, between two lines there is a new empty line. In other word, the first line is the first row of excel file. The second line is empty ("\

Re: Out of memory while reading excel file

2017-05-11 Thread Mahmood Naderan via Python-list
Thanks. That code is so simple and works. However, there are things to be considered. With the CSV format, cells in a row are separated by ',' and for some cells it writes "" around the cell content. So, if the excel looks like CHR1 11,232,445 The output file looks like CHR1,"11,232,4

Re: Why am I getting a 'sqlite3.OperationalError'?

2017-05-11 Thread Mark Summerfield via Python-list
The ? is indeed for variable substitution, but AFAIK only for field values, not for table names, which is why your first example doesn't work and your second and third examples do work. -- https://mail.python.org/mailman/listinfo/python-list

Re: Out of memory while reading excel file

2017-05-11 Thread Peter Otten
Mahmood Naderan via Python-list wrote: > I wrote this: > > a = np.zeros((p.max_row, p.max_column), dtype=object) > for y, row in enumerate(p.rows): > for cell in row: > print (cell.value) > a[y] = cell.value In the line above you overwrite the row in the numpy array

Re: Out of memory while reading excel file

2017-05-11 Thread Mahmood Naderan via Python-list
I wrote this: a = np.zeros((p.max_row, p.max_column), dtype=object) for y, row in enumerate(p.rows): for cell in row: print (cell.value) a[y] = cell.value print (a[y]) For one of the cells, I see NM_198576.3 ['NM_198576.3' 'NM_198576.3' 'NM_198576.3' 'NM_1985