Re: [Python-Dev] PEP 564: Add new time functions with nanosecond resolution
On 10/30/2017 10:18 AM, Guido van Rossum wrote: I have read PEP 564 and (mostly) followed the discussion in this thread, and I am happy with the PEP. I am hereby approving PEP 564. Congratulations Victor! Congrats, Victor! ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Convert Sqlite Function from cx_Oracle
Hello. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there are Python developers who participate in it; you may get a faster, and probably more complete, answer there. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. On Mon, Oct 30, 2017 at 05:41:20PM -0200, Carlos Eugeniowrote: > == > SQLITE3 Function > > def get_db(): > def dict_factory(cursor, row): > d = {} > for idx, col in enumerate(cursor.description): > d[col[0]] = row[idx] > return d > > db = getattr(g, '_database', None) > if db is None: > db = g._database = sqlite3.connect(DATABASE) > db.row_factory = dict_factory > return db > > > I try this form but isnt ok . Can I help me ? > > > import cx_Oracle > con = cx_Oracle.connect('/@xxx/xxx') > > cur = con.cursor() > cur.execute("select * from test") > > desc = [d[0] for d in cur.description] > > result = [dict(zip(dec,line))for line in cur] > > print (result) > > cur.close() > > -- > Carlos Eug??nio Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Migrate python-dev to Mailman 3?
On Mon, 30 Oct 2017 at 09:36 Mariatta Wijayawrote: > > Except of Antoine Pitrou, does everybody else like the new UI? :-) > > I love the new UI. +1000 for migrating. > I personally prefer MM3 + HyperKitty compared to MM2 + pipermail. -Brett > > > > Mariatta Wijaya > > On Mon, Oct 30, 2017 at 8:57 AM, Stefan Krah wrote: > >> On Mon, Oct 30, 2017 at 07:46:42AM -0700, Guido van Rossum wrote: >> > I love MM3 and hyperkitty. But I rarely peruse the archives -- I only >> go to >> > pipermail to get a link to a specific message from the past so I can >> copy >> > it into a current message. IIUC that functionality is actually better in >> > hyperkitty because when a pipermail archive is rebuilt the message >> numbers >> > come out differently. >> >> Yes, I use the archives differently. When I'm temporarily unsubscribed >> due to overload I scan the archives for interesting topics and indeed >> sometimes read whole threads. >> >> I think Pipermail is great for that. Quiet design, nice font, good >> contrast >> for speed reading. >> >> >> >> Stefan Krah >> >> >> >> ___ >> Python-Dev mailing list >> Python-Dev@python.org >> https://mail.python.org/mailman/listinfo/python-dev >> > Unsubscribe: >> https://mail.python.org/mailman/options/python-dev/mariatta.wijaya%40gmail.com >> > > ___ > Python-Dev mailing list > Python-Dev@python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/brett%40python.org > ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Convert Sqlite Function from cx_Oracle
== SQLITE3 Function def get_db(): def dict_factory(cursor, row): d = {} for idx, col in enumerate(cursor.description): d[col[0]] = row[idx] return d db = getattr(g, '_database', None) if db is None: db = g._database = sqlite3.connect(DATABASE) db.row_factory = dict_factory return db I try this form but isnt ok . Can I help me ? import cx_Oracle con = cx_Oracle.connect('/@xxx/xxx') cur = con.cursor() cur.execute("select * from test") desc = [d[0] for d in cur.description] result = [dict(zip(dec,line))for line in cur] print (result) cur.close() -- Carlos EugĂȘnio ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] PEP 564: Add new time functions with nanosecond resolution
I have read PEP 564 and (mostly) followed the discussion in this thread, and I am happy with the PEP. I am hereby approving PEP 564. Congratulations Victor! -- --Guido van Rossum (python.org/~guido) ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Migrate python-dev to Mailman 3?
> Except of Antoine Pitrou, does everybody else like the new UI? :-) I love the new UI. +1000 for migrating. Mariatta Wijaya On Mon, Oct 30, 2017 at 8:57 AM, Stefan Krahwrote: > On Mon, Oct 30, 2017 at 07:46:42AM -0700, Guido van Rossum wrote: > > I love MM3 and hyperkitty. But I rarely peruse the archives -- I only go > to > > pipermail to get a link to a specific message from the past so I can copy > > it into a current message. IIUC that functionality is actually better in > > hyperkitty because when a pipermail archive is rebuilt the message > numbers > > come out differently. > > Yes, I use the archives differently. When I'm temporarily unsubscribed > due to overload I scan the archives for interesting topics and indeed > sometimes read whole threads. > > I think Pipermail is great for that. Quiet design, nice font, good contrast > for speed reading. > > > > Stefan Krah > > > > ___ > Python-Dev mailing list > Python-Dev@python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: https://mail.python.org/mailman/options/python-dev/ > mariatta.wijaya%40gmail.com > ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Migrate python-dev to Mailman 3?
On Mon, Oct 30, 2017 at 07:46:42AM -0700, Guido van Rossum wrote: > I love MM3 and hyperkitty. But I rarely peruse the archives -- I only go to > pipermail to get a link to a specific message from the past so I can copy > it into a current message. IIUC that functionality is actually better in > hyperkitty because when a pipermail archive is rebuilt the message numbers > come out differently. Yes, I use the archives differently. When I'm temporarily unsubscribed due to overload I scan the archives for interesting topics and indeed sometimes read whole threads. I think Pipermail is great for that. Quiet design, nice font, good contrast for speed reading. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Migrate python-dev to Mailman 3?
I love MM3 and hyperkitty. But I rarely peruse the archives -- I only go to pipermail to get a link to a specific message from the past so I can copy it into a current message. IIUC that functionality is actually better in hyperkitty because when a pipermail archive is rebuilt the message numbers come out differently. On Mon, Oct 30, 2017 at 4:15 AM, Stefan Krahwrote: > On Mon, Oct 30, 2017 at 12:00:22PM +0100, Victor Stinner wrote: > > Except of Antoine Pitrou, does everybody else like the new UI? :-) > > No, I don't like it. If there is a promise to keep an additional, MHonArc > or Pipermail archive *with an implicit promise of long term support*, I > don't > care. > > > Despite the mentioned shortcomings of Pipermail, it is 5 times faster > for me to navigate and less stressful to look at. > > > > Stefan Krah > > > > ___ > Python-Dev mailing list > Python-Dev@python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: https://mail.python.org/mailman/options/python-dev/ > guido%40python.org > -- --Guido van Rossum (python.org/~guido) ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Migrate python-dev to Mailman 3?
On Mon, Oct 30, 2017 at 12:00:22PM +0100, Victor Stinner wrote: > Except of Antoine Pitrou, does everybody else like the new UI? :-) No, I don't like it. If there is a promise to keep an additional, MHonArc or Pipermail archive *with an implicit promise of long term support*, I don't care. Despite the mentioned shortcomings of Pipermail, it is 5 times faster for me to navigate and less stressful to look at. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Migrate python-dev to Mailman 3?
On 30 October 2017 at 11:00, Victor Stinnerwrote: > Except of Antoine Pitrou, does everybody else like the new UI? :-) As I said, I don't particularly like it, but I don't expect to need it if we get an archived-at header in the mails, and Google indexes individual mails in the archive correctly. Paul ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] If aligned_alloc() is missing on your platform, please let us know.
2017-10-27 10:17 GMT+02:00 Stefan Krah: > Victor wrote a patch and would like to avoid adding a (probably unnecessary) > emulation function. I agree with that. > (...) > So if any platform does not have some form of aligned_alloc(), please > speak up. I'm not really opposed to implement an aligned allocator on top of an existing allocator. I only propose to discuss that in a separated issue. I wrote "PEP 445 -- Add new APIs to customize Python memory allocators" to implement tracemalloc, but also because I was working on a Python version patched to use custom memory allocators, different than malloc()/free(): https://www.python.org/dev/peps/pep-0445/#rationale IMHO only users of PyMem_SetAllocators() would need such "fallback". I expect all modern platforms to provide a "aligned" memory allocator. Victor ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Migrate python-dev to Mailman 3?
2017-10-26 12:01 GMT+02:00 Antoine Pitrou: >> We are using Mailman 3 for the new buildbot-status mailing list and it >> works well: >> >> https://mail.python.org/mm3/archives/list/buildbot-sta...@python.org/ >> >> I prefer to read archives with this UI, it's simpler to follow >> threads, and it's possible to reply on the web UI! > > Personally, I really don't like that UI. Is it possible to have a > pipermail-style UI as an alternative? > (...) >> I don't know pipermail. Do you have an example? > https://mail.python.org/pipermail/python-dev/ :-) Oh, I didn't know that Mailman 2 archives are called "pipermail". Well, there are already other archives already available if you want another UI: http://code.activestate.com/lists/python-dev/ http://dir.gmane.org/gmane.comp.python.devel -- using NNTP https://groups.google.com/forum/#!forum/dev-python https://lists.gt.net/python/dev/ And maybe others. -- It's really hard to design an UI liked by everyone :-) I prefer Mailman 3 UI (HyperKitty), I prefer to get all emails of a thread on a single page, and the new UI has a few nice features like "Most active discussions", "Activity Summary", "favorites", tags, etc. Except of Antoine Pitrou, does everybody else like the new UI? :-) I expect that Mailman 3 is more actively developed than Mailman 2. By the way, I hope that Mailman 3 and HyperKity support and runs on Python 3, whereas Mailman 2 is more likely stuck at Python 2, no? ;-) Victor ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com