[Python-ideas] Re: "Curated" package repo?

2023-07-24 Thread George Fischhof
Jonathan Crall ezt írta (időpont: 2023. júl. 24., H, 15:29): > If popular packages weren't favored that would be a problem. Popularity > should be correlated with "trustworthiness" or whatever the metric this > curated repo seeks to maximize. I think the important thing is that the > packages are

[Python-ideas] Re: Popular Python Package 'ctx' Hijacked to Steal AWS Keys

2022-05-25 Thread George Fischhof
Turritopsis Dohrnii Teo En Ming ezt írta (időpont: 2022. máj. 25., Sze, 15:49): > Subject: Popular Python Package 'ctx' Hijacked to Steal AWS Keys > > Good day from Singapore, > > Sharing this article for more awareness. > > Article: Popular PyPI Package 'ctx' and PHP Library 'phpass' Hijacked >

[Python-ideas] Re: Please consider adding of functions file system operations to pathlib

2019-11-16 Thread George Fischhof
> > doing thing for FS. > > Le 20/02/2018 à 23:11, George Fischhof a écrit : > > > Good day all, > > > as a continuation of thread "OS related file operations (copy, move, > > > delete, rename...) should be placed into one module" > > > > ht

[Python-ideas] Re: Simpler syntax for async generators

2019-09-16 Thread George Fischhof
Steven D'Aprano ezt írta (időpont: 2019. szept. 16., H 2:55): > On Mon, Sep 16, 2019 at 11:36:45AM +1200, Greg Ewing wrote: > > George Fischhof wrote: > > >With this syntax the use / programmer do not have to write async def, > > >nor await, because after

[Python-ideas] Re: Simpler syntax for async generators

2019-09-15 Thread George Fischhof
Christopher Barker ezt írta (időpont: 2019. szept. 14., Szo, 21:58): > > While I was reading the documentation of asyn generators, >> > which shows the following example: >> > >> > async def ticker(delay, to): >> > """Yield numbers from 0 to *to* every *delay* seconds.""" >> > for i in ra

[Python-ideas] Simpler syntax for async generators

2019-09-14 Thread George Fischhof
Hi All, While I was reading the documentation of asyn generators, which shows the following example: async def ticker(delay, to): """Yield numbers from 0 to *to* every *delay* seconds.""" for i in range(to): yield i await asyncio.sleep(delay) It's came to my mind that

Re: [Python-ideas] __dir__ in which folder is this py file

2018-05-06 Thread George Fischhof
2018-05-06 15:28 GMT+02:00 Cody Piersall : > With PEP 562, the name __dir__ is off limits for this. > > Cody > > On Sun, May 6, 2018, 1:54 AM Yuval Greenfield > wrote: > >> Hi Ideas, >> >> I often need to reference a script's current directory. I end up writing: >> >> import os >> SRC_DIR = os.pa

Re: [Python-ideas] Rewriting file - pythonic way

2018-04-15 Thread George Fischhof
Hi, some similar thing already exist in standard: https://docs.python.org/3/library/fileinput.html fileinput(... inplace=True...) BR, George 2018-04-15 10:57 GMT+02:00 Alexey Shrub : > Hi all, > > I am new in python (i am moving from Perl world), but I always love Python > for hight level, bea

Re: [Python-ideas] Move optional data out of pyc files

2018-04-13 Thread George Fischhof
2018-04-11 2:03 GMT+02:00 Steven D'Aprano : [snip] > I shouldn't think that the number of files on disk is very important, > now that they're hidden away in the __pycache__ directory where they can > be ignored by humans. Even venerable old FAT32 has a limit of 65,534 > files in a single folder,

Re: [Python-ideas] New PEP proposal -- Pathlib Module ShouldContain All File Operations -- version 2

2018-03-25 Thread George Fischhof
Hi folks, according to comments it seems, it would better to propose a new module. I start to work out a new proposal. I created a BitBucket repo to be able to work together with folks who want help ;-) the repo address is: https://bitbucket.org/GeorgeFischhof/pep_for_filesystem_operations.git

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

2018-03-18 Thread George Fischhof
Hi Jason, the status of os and shutil became this because of C functions in implementation (I got something similar answer before) ... What do you think, what would be a good way to solve this - add stuff from os to shutil - add stuff from os and shutil to pathlib - create a new module on top of

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

2018-03-18 Thread George Fischhof
at 12:38 AM, George Fischhof >> wrote: >> > >> > >> > " if new file functions are added, they will go only in pathlib, >> > which makes pathlib effectively mandatory;" >> > Yes but I think this part of the evolution: slowly everyone will s

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

2018-03-18 Thread George Fischhof
2018-03-18 9:05 GMT+01:00 Nick Coghlan : > On 16 March 2018 at 03:15, Chris Angelico wrote: > >> On Fri, Mar 16, 2018 at 12:38 AM, George Fischhof >> wrote: >> > >> > >> > " if new file functions are added, they will go only in pathlib

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

2018-03-18 Thread George Fischhof
2018-03-18 5:41 GMT+01:00 Nathaniel Smith : > On Sat, Mar 17, 2018 at 10:15 AM, Stephen J. Turnbull > wrote: > > (5) perform operations on several objects denoted by Paths at once > > (copy and its multiple operand variants), > > Sure it does: Path.rename and Path.replace. I know why rename a

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations -- version 2

2018-03-17 Thread George Fischhof
2018. márc. 17. 21:34 ezt írta ("Barry" ): On 17 Mar 2018, at 10:42, George Fischhof wrote: Hi folks, I added the list of functions to the proposal, here is the new version. George PEP: Title: Pathlib Module Should Contain All File Operations Author: George Fischhof Sta

[Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations -- version 2

2018-03-17 Thread George Fischhof
Hi folks, I added the list of functions to the proposal, here is the new version. George PEP: Title: Pathlib Module Should Contain All File Operations Author: George Fischhof Status: Draft Type: Standards Track Content-Type: text/x-rst Created: 15-Mar-2018 Python-Version: 3.8 Post

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

2018-03-17 Thread George Fischhof
2018-03-17 7:18 GMT+01:00 Stephen J. Turnbull < turnbull.stephen...@u.tsukuba.ac.jp>: > Joonas Liik writes: > > > then it might be an acceptable compromise to have yet another... > > "There should be one-- and preferably only one -- obvious way to do it." > > The obvious way is to use the existin

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

2018-03-15 Thread George Fischhof
2018-03-13 13:17 GMT+01:00 Steven D'Aprano : > On Mon, Mar 12, 2018 at 09:57:32PM +0100, George Fischhof wrote: > > > Right now we have several modules that contain functions related > > to file-system operations mainly the os, pathlib and shutil. > > For beginners

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

2018-03-12 Thread George Fischhof
2018-03-12 22:16 GMT+01:00 Paul Moore : > On 12 March 2018 at 20:57, George Fischhof wrote: > > Good day all, > > > > as it seemed to be a good idea, I wrote a PEP proposal for pathlib to > > contain file operations. > > > > Here is the draft. What do you

[Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

2018-03-12 Thread George Fischhof
Good day all, as it seemed to be a good idea, I wrote a PEP proposal for pathlib to contain file operations. Here is the draft. What do you think about this? BR, George --- PEP: Title: Pathlib Module Should Contain All File Operations Author: George Fischhof

[Python-ideas] Please consider adding of functions file system operations to pathlib

2018-02-20 Thread George Fischhof
Good day all, as a continuation of thread "OS related file operations (copy, move, delete, rename...) should be placed into one module" https://mail.python.org/pipermail/python-ideas/2017-January/044217.html please consider making pathlib to a central file system module with putting file operati

Re: [Python-ideas] pathlib.Path should handle Pythonpath or package root

2017-07-19 Thread George Fischhof
2017-07-19 3:51 GMT+02:00 Nick Coghlan : > On 19 July 2017 at 06:40, George Fischhof wrote: > > I think yes ;-) > > I would like to use (or I think it would be good to use) something like > > pathlib.Path(package_root) > > so I could use > > > > importlib.

Re: [Python-ideas] pathlib.Path should handle Pythonpath or package root

2017-07-18 Thread George Fischhof
2017-07-18 15:56 GMT+02:00 Nick Coghlan : > On 18 July 2017 at 22:08, George Fischhof wrote: > > Hi there, > > > > I created a program which uses plugins (import them). I started to test > it, > > and found that I need two types of paths: one for file system and an

Re: [Python-ideas] tempfile.TemporaryDirectory() should be able to create temporary directory at a given arbitrary place

2017-07-18 Thread George Fischhof
2017-07-18 14:06 GMT+02:00 Serhiy Storchaka : > 18.07.17 14:55, George Fischhof пише: > >> I used tempfile.TemporaryDirectory(). On first usage it was good, but on >> second one there was a need to create tempopray directory and files in it a >> given place. (It needed

[Python-ideas] pathlib.Path should handle Pythonpath or package root

2017-07-18 Thread George Fischhof
Hi there, I created a program which uses plugins (import them). I started to test it, and found that I need two types of paths: one for file system and another one which is package relative. So I thing this is a good idea, to enhance pathlib to handle package roots. (I know about sys.path, envir

[Python-ideas] tempfile.TemporaryDirectory() should be able to create temporary directory at a given arbitrary place

2017-07-18 Thread George Fischhof
Hi there, I used tempfile.TemporaryDirectory(). On first usage it was good, but on second one there was a need to create tempopray directory and files in it a given place. (It needed for a test). And I found that TemporaryDirectory() is not able to do this. So my idea is to implement this behavio

Re: [Python-ideas] socket module: plain stuples vs named tuples

2017-06-19 Thread George Fischhof
+1 ;-) for example to get IP address of all interfaces we have to use the third (indexed as 2) member of "something" it is much more beatiful to get ip_address: *import *socket *for *ip *in *socket.gethostbyname_ex(socket.gethostname())[2]: print(ip) BR, George 2017-06-13 22:13 GMT+02:00 T

Re: [Python-ideas] Add shutil.ignore_patterns() to shutil.rmtree()

2017-05-10 Thread George Fischhof
2017. máj. 5. du. 7:02 ezt írta ("Oleg Broytman" ): On Fri, May 05, 2017 at 04:50:07PM +0200, George Fischhof < geo...@fischhof.hu> wrote: > yes, something like that ... ;-) but I use windows, and I want the feature > in Python, with a simple and elegant way (1-2 commands

Re: [Python-ideas] Add shutil.ignore_patterns() to shutil.rmtree()

2017-05-05 Thread George Fischhof
yes, something like that ... ;-) but I use windows, and I want the feature in Python, with a simple and elegant way (1-2 commands) 2017-05-05 16:14 GMT+02:00 Oleg Broytman : > On Fri, May 05, 2017 at 03:55:37PM +0200, George Fischhof < > geo...@fischhof.hu> wrote: > > Actuall

Re: [Python-ideas] Add shutil.ignore_patterns() to shutil.rmtree()

2017-05-05 Thread George Fischhof
2017-05-05 13:02 GMT+02:00 Oleg Broytman : > Hi! > > On Fri, May 05, 2017 at 09:58:15AM +0200, George Fischhof < > geo...@fischhof.hu> wrote: > > Hi Folks, > > > > I have a task to synchronize folders but some files should be remained > > untouched. &g

Re: [Python-ideas] Add shutil.ignore_patterns() to shutil.rmtree()

2017-05-05 Thread George Fischhof
2017-05-05 11:52 GMT+02:00 Serhiy Storchaka : > On 05.05.17 10:58, George Fischhof wrote: > >> I have a task to synchronize folders but some files should be remained >> untouched. >> I think this is a very common task. >> >> I found that shutil.copytree() ha

[Python-ideas] Add shutil.ignore_patterns() to shutil.rmtree()

2017-05-05 Thread George Fischhof
Hi Folks, I have a task to synchronize folders but some files should be remained untouched. I think this is a very common task. I found that shutil.copytree() has ignore_patterns() but rmtree() has not. So here comes my idea: add ignore_patterns() to rmtree() it is a good feature and makes the f

Re: [Python-ideas] Augmented assignment syntax for objects.

2017-04-25 Thread George Fischhof
2017. ápr. 25. de. 10:04 ezt írta ("Paul Moore" ): On 25 April 2017 at 03:53, Steven D'Aprano wrote: > On Tue, Apr 25, 2017 at 02:08:05AM +0100, Erik wrote: > >> I often find myself writing __init__ methods of the form: >> >> def __init__(self, foo, bar, baz, spam, ham): >> self.foo = foo >>

[Python-ideas] Third party module in standard library

2017-03-22 Thread George Fischhof
Hi Guys, I would like to ask You: What is the process to propose a module to be part of the standard library? I would like to propose the following modules: requests https://pypi.python.org/pypi/requests and xmltodict https://pypi.python.org/pypi/xmltodict Both of them makes the life easier, an

[Python-ideas] Wrapper for ctypes

2017-03-07 Thread George Fischhof
Hi Guys, right now I had to call functions from a dll, and I started using ctypes. I found this library too https://pypi.python.org/pypi/pywrap/0.1.0 which says (qutation): Replace this: prototype = ctypes.WINFUNCTYPE(wintypes.HANDLE, wintypes.UINT, wintypes.HANDLE)paramflags = (1, "uFormat"

Re: [Python-ideas] Python package index: query and rating

2017-02-15 Thread George Fischhof
2017-02-15 12:35 GMT+01:00 Paul Moore : > On 15 February 2017 at 11:07, Steven D'Aprano wrote: > >> I have two ides to improve the package index: > > > > Thank you for your ideas, but I don't think this is the right place for > > suggesting improvements to PyPI. You could try looking through the

[Python-ideas] Python package index: query and rating

2017-02-13 Thread George Fischhof
rom topic, and do NOT want any framwork reated libraries (django, flask etc) 2.) It would would be good to implement some user rating mechanism like in the webshops or software stores. It would make the choice easier. Best regards, George Fischhof __

Re: [Python-ideas] OS related file operations (copy, move, delete, rename...) should be placed into one module

2017-02-02 Thread George Fischhof
2017-01-12 20:11 GMT+01:00 Todd : > On Thu, Jan 12, 2017 at 11:17 AM, Chris Barker - NOAA Federal < > chris.bar...@noaa.gov> wrote: > >> I agree that this has been a bit of a wart for a long time. >> >> While the old “let’s treat strings as paths” modules are split up like >> you said, pathlib can

Re: [Python-ideas] Settable defaulting to decimal instead of float

2017-01-12 Thread George Fischhof
Thank You, Terry George 2017-01-12 14:50 GMT+01:00 Terry Reedy : > On 1/12/2017 8:09 AM, George Fischhof wrote: > > And if it is mentioned, I would like to ask why binary floating point is >> "better". It is faster, I agree, but why "better"? >> >

Re: [Python-ideas] Settable defaulting to decimal instead of float

2017-01-12 Thread George Fischhof
2017-01-12 13:13 GMT+01:00 Stephan Houben : > Something like: > > from __syntax__ import decimal_literal > > which would feed the rest of the file through the "decimal_literal" > transpiler. > (and not influence anything in other files). > > Not sure if you would want to support multiple transpile

[Python-ideas] Settable defaulting to decimal instead of float

2017-01-12 Thread George Fischhof
Hi There, Settable defaulting to decimal instead of float It would be good to be able to use decimal automatically instead of float if there is a setting. For example an environment variable or a flag file. Where and when accuracy is more important than speed, the user could set this flag, and c

[Python-ideas] OS related file operations (copy, move, delete, rename...) should be placed into one module

2017-01-12 Thread George Fischhof
Hi There, OS related file operations (copy, move, delete, rename...) should be placed into one module... As it quite confusing that they are in two moduls (os and shutil). I have read that one is higher level than other, but actually to use them I have to think which function can be found in whic