Re: Tools to help with text mode (i.e. non-GUI) input

2025-01-20 Thread Lele Gaifax via Python-list
://pypi.org/project/questionary/, seems very close to what you are looking for and very simple to drive. Another package is https://github.com/petereon/beaupy, that seems a good fit as well. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comi

Re: editor recommendations?

2021-03-03 Thread Lele Gaifax
Cameron Simpson writes: > My fingers know vim. Some others' fingers know emacs. Emacs has also an Evil[1] mode, that mimics some vi/vim features. I suggest taking a look at Doom Emacs[2], a popular so-called "Emacs distribution", that provides an out-of-the-box great experience with a modular c

Re: Strange namespace issue

2020-08-11 Thread Lele Gaifax
if callable(v): print(" a callable, returning", v()) else: print(" a value,", v) In this case, it would be less practical to determine what the script defined: by any chance this case is the first I wrote, and here the choice to pass the t

Strange namespace issue

2020-08-10 Thread Lele Gaifax
est" nor the name "cv" are defined... Thanks in advance for any enlightenment! ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list

Re: Data model and attribute resolution in subclasses

2020-03-02 Thread Lele Gaifax
ve confused its meaning: >>> class Base: ... pass ... >>> class Derived(Base): ... pass ... >>> print(Base.__subclasses__()) [] ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò a

Re: Cython, producing different modules from the same .pyx

2019-12-20 Thread Lele Gaifax
Ethan Furman writes: > If you don't get an answer here, you can try the Cython Users group: Thanks, reposted the same question there. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi

Re: Cython, producing different modules from the same .pyx

2019-12-20 Thread Lele Gaifax
Greg Ewing writes: > You could try creating a set of top-level .pyx stubs, each of > which just 'include' the real code. Thank you, will try this approach! ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad a

Cython, producing different modules from the same .pyx

2019-12-19 Thread Lele Gaifax
n't find a way to alter that name. Did I miss something, or is the only way to duplicate the source .pyx file to a different name? Thanks in advance, ciao, lele. (*) https://github.com/lelit/pglast/blob/master/setup.py#L76 -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri

Re: functions vs methods

2018-07-21 Thread Lele Gaifax
is correct, why not make len also as a part of list > class itself? Yes, that's correct. For the reason, see https://docs.python.org/3/faq/design.html#why-does-python-use-methods-for-some-functionality-e-g-list-index-but-functions-for-other-e-g-len-list ciao, lele. -- nickname: Lele Gaifax

Re: syntax oddities

2018-05-17 Thread Lele Gaifax
top-posting? >> The answers that precede the questions >>> What's the most boring thing in e-mails? :-) ciao, lele. -- nickname: Lele Gaifax | Perché è contrario al normale senso di lettura real: Emanuele Gaifas | > Cosa c'è di male nel rispondere in cima? l...@metapensier

Re: f-string anomaly

2018-05-14 Thread Lele Gaifax
Ken Kundert writes: > Lele, > I am using Python3.6. d has to be an object of mydict. My bad, sorry, I completely missed the premise :-|. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi co

Re: f-string anomaly

2018-05-14 Thread Lele Gaifax
st recent call last): File "", line 1, in ValueError: Invalid format specifier Which Python version are you using? ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list

Re: f-string anomaly

2018-05-14 Thread Lele Gaifax
} >>> print(f'this is {k} and {v}') this is 1 and 2 >>> print(f'Email: {d:{{k}} {{v}}}') Traceback (most recent call last): File "", line 1, in NameError: name 'd' is not defined ciao, lele. -- nickname: Le

Re: Right way to io.open(...) an existing file object in Python 2.7?

2018-01-16 Thread Lele Gaifax
Skip Montanaro writes: > I don't see any sort of "fdopen" or "freopen" equivalent mentioned in the io > module documentation. Is this possible in a clean way? > There is an os.fdopen(), so maybe newf = os.fdopen(fp.fileno()) ciao, lele. -- nickname: Lele G

Re: Simple graphic library for beginners

2018-01-12 Thread Lele Gaifax
ling lucky" Google advices. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list

Re: Generating SVG from turtle graphics

2018-01-11 Thread Lele Gaifax
http://pyx.sourceforge.net/ to produce the images for a book[1] on the Carrom game, and I enjoyed its simplicity. ciao, lele. [1] https://bitbucket.org/lele/cta -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi c

Re: RegExp - please help me!

2017-12-27 Thread Lele Gaifax
ery/blob/43ce2e8cdf54e4e1e8b0352e37adbd72e568e100/src/postgres/include/nodes/parsenodes.h [4] https://github.com/lelit/pg_query/blob/master/pg_query/enums/parsenodes.py -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapen

Re: Stackoverflow question: Is there a built-in identity function in Python?

2017-12-07 Thread Lele Gaifax
Chris Angelico writes: > On Fri, Dec 8, 2017 at 6:29 AM, Lele Gaifax wrote: >> Chris Angelico writes: >> >>> On Fri, Dec 8, 2017 at 5:53 AM, Peter Otten <__pete...@web.de> wrote: >>>> >>>> Hm, what does -- and what should -- >

Re: Stackoverflow question: Is there a built-in identity function in Python?

2017-12-07 Thread Lele Gaifax
'spam', 'eggs', 7) \ == identity(('spam', 'eggs', 7)) \ == identity((('spam', 'eggs', 7),)) \ == identity'spam', 'eggs', 7),),)) should yield True? ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list

Re: SystemError: error return without exception set

2017-12-07 Thread Lele Gaifax
NULL. > > Mmm true. Forgot about that part. So, yes, that's a different type > of failure that could be happening. Makes the audit a bit harder. More probably the problem is not directly from a Python API, as most of the time when such APIs return NULL they also call PyErr_SetX

Re: Easiest way to access C module in Python

2017-11-07 Thread Lele Gaifax
fe.so >>> dir(life) ['__builtins__', '__doc__', '__file__', '__name__', '__package__', '__test__', 'life'] Can you try to import the "life" module and print its "dir()" to see the symbols it expose

Re: Easiest way to access C module in Python

2017-11-07 Thread Lele Gaifax
he case you mentioned, but obviously that function can very well come from a library. > People use languages like Python to get away from this stuff. Which people? The OP explicitly asked for a way to access a C module from Python, and Cython surely is one option to accomplish that. ciao, le

Re: Easiest way to access C module in Python

2017-11-07 Thread Lele Gaifax
hon-36m-x86_64-linux-gnu.so $ python -c "import life; print(life.life())" 42 As other said, for a single function accepting no arguments and returning a single value Cython may be an heavy tool, but I bet you can imagine more complex situations... ciao, lele. -- nickname: Lele Gaif

Re: Invoking return through a function?

2017-10-29 Thread Lele Gaifax
he point, MacroPy! See https://github.com/azazel75/macropy for a 3.5+ version. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero,

Re: Compression of random binary data

2017-10-24 Thread Lele Gaifax
p3.zip.zip.zip", while the other would be "movie.avi.zip.zip.zip.zip.zip"... some sort of https://en.wikipedia.org/wiki/Water_memory applied to file system entries :-) ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comin

Re: choice of web-framework

2017-10-22 Thread Lele Gaifax
Chris Warrick writes: > Zope is effectively dead these days. Except it's alive and kicking: https://blog.gocept.com/ :-) ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapen

Re: why del is not a function or method?

2017-10-16 Thread Lele Gaifax
cs.python.org/3/faq/design.html#why-does-python-use-methods-for-some-functionality-e-g-list-index-but-functions-for-other-e-g-len-list and the next one. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l

Re: The "loop and a half"

2017-10-08 Thread Lele Gaifax
If it's just a matter of "finding one", look no further and try out Emacs's TRAMP :-) ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it |

Re: OT again sorry [Re: Interactive scripts (back on topic for once) [was Re: The "loop and a half"]]

2017-10-08 Thread Lele Gaifax
7;s difficult-to-impossible to get a one-size-fits-all configuration that satisfies everybody (where the cardinality of "everybody" exceeds 1, of course). ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura

Re: newb question about @property

2017-10-03 Thread Lele Gaifax
ails of *where* a logger writes the messages are better left to a configuration done at another level :) ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortu

Re: PyYaml not using Yaml 1.2?

2017-08-04 Thread Lele Gaifax
ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list

Re: YAML in std lib?

2017-07-31 Thread Lele Gaifax
rg/pypi/ruamel.yaml, that seems actively maintained: it supports YAML 1.2 for example. But I agree with you, I do not see a good enough reason to include it in the standard library. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comince

Re: Openpyxl cell format

2017-06-05 Thread Lele Gaifax
ould be wrong: I bet that the cell is marked as containing a datetime value, and that's what you are getting. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it |

Re: Openpyxl cell format

2017-06-05 Thread Lele Gaifax
h an automatic conversion? I'm not 100% sure, but I think that is a "feature" of the spreadsheet application you used to write the document, that assumed "4-Feb" to be actually a timestamp, instead of a plain string. It would be otherwise hard to explain why you get 2016 as

Re: Backward compatible of Python 2 and Python 3

2017-06-05 Thread Lele Gaifax
is by using https://pypi.python.org/pypi/six/1.10.0 ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mail

Re: Manager for project templates, that allows "incremental" feature addition

2017-06-02 Thread Lele Gaifax
Lele Gaifax writes: > Paul Moore writes: > >> On Thursday, 23 March 2017 15:56:43 UTC, Paul Moore wrote: >> >> Sadly, it doesn't support Windows, which is what I use. > > FYI, I just saw https://pypi.python.org/pypi/what/0.4.0, that seems a

Re: How to install Python package from source on Windows

2017-05-17 Thread Lele Gaifax
e! ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to install Python package from source on Windows

2017-05-17 Thread Lele Gaifax
ect, and download a plain zip archive from https://github.com/python/cpython/archive/master.zip. Getting a specific branch is left as an exercize for the reader. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver

Re: Metaclass conundrum - binding value from an outer scope

2017-04-20 Thread Lele Gaifax
return _underlying(self._instance, *args) help? ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman

Re: Temporary variables in list comprehensions

2017-04-06 Thread Lele Gaifax
en [(tmp, tmp + 1) for x in data with expensive_calculation(x) as tmp if tmp is not None] that fits the usual "with" syntax. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapen

Re: Spam user

2017-03-31 Thread Lele Gaifax
Ricardo A Baila writes: > Could someone remove wucbad...@gmx.com from the group? Strange, I could not see such messages, neither in the newsgroup (gmane) nor on the ML archives. Are you sure you are not receiving those as private messages? ciao, lele. -- nickname: Lele Gaifax | Quando vi

Re: Manager for project templates, that allows "incremental" feature addition

2017-03-24 Thread Lele Gaifax
nly :-\ If you can try it under Windows, maybe I could be convinced in contributing some Py3 compatibility fixes, and try to support that too in my tinject. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura

Re: Manager for project templates, that allows "incremental" feature addition

2017-03-23 Thread Lele Gaifax
Paul Moore writes: > Sadly, it doesn't support Windows, which is what I use. I'm sorry, there is little I can do on that front, but if you come up with an alternative library, please let me know. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri r

Re: Manager for project templates, that allows "incremental" feature addition

2017-03-22 Thread Lele Gaifax
thon.org/pypi/metapensiero.tool.tinject It seems to fit some, but not all, of your requested features. Hope this helps, ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it |

Re: When will os.remove fail?

2017-03-14 Thread Lele Gaifax
7;othersfile'? y $ ls -l *file* ls: cannot access '*file*': No such file or directory my 0.02€ ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list

Re: When will os.remove fail?

2017-03-12 Thread Lele Gaifax
file, not on the file itself. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list

Re: problem with Python 3.6 + PyX

2017-02-10 Thread Lele Gaifax
ed? If so, is it "reachable" by your $PATH variable? A quick test to re-render my PyX-based images with Python 3.6 didn't reveal any problem... ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver p

Re: Different behaviour of regexp in 3.6.0b2

2016-10-15 Thread Lele Gaifax
Serhiy Storchaka writes: > Seems the documentation is not accurate. Could you file a report on > https://bugs.python.org/ ? Thank you everybody answered! Here it is: http://bugs.python.org/issue28450 ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ier

Re: Different behaviour of regexp in 3.6.0b2

2016-10-14 Thread Lele Gaifax
Ned Batchelder writes: > On Friday, October 14, 2016 at 12:50:44 PM UTC-4, Lele Gaifax wrote: >> Chris Angelico writes: >> >> > There's a shift as of 3.6 to make unrecognized alphabetic escapes into >> > errors, or at least warnings. >>

Re: Different behaviour of regexp in 3.6.0b2

2016-10-14 Thread Lele Gaifax
Lele Gaifax writes: > And the documentation as well, to clarify the fact immediately, without > assuming one will scroll down to the "changed in version" part (at least, that > is what seem the rule in other parts of the manual). Also, I'd prefer the "Changed in 3

Re: Different behaviour of regexp in 3.6.0b2

2016-10-14 Thread Lele Gaifax
Chris Angelico writes: > There's a shift as of 3.6 to make unrecognized alphabetic escapes into > errors, or at least warnings. But we are talking about raw strings here, specifically r'\s+'. I agree that with plain strings it's a plus. ciao, lele. -- nickname: Lel

Re: Different behaviour of regexp in 3.6.0b2

2016-10-14 Thread Lele Gaifax
Peter Otten <__pete...@web.de> writes: > Lele Gaifax wrote: > >> The original intent is to replace spaces within a string with the regular >> expression \s+ (see >> ... >> Accordingly to the documentation >> (https://docs.python.org/3.6/library/re.htm

Different behaviour of regexp in 3.6.0b2

2016-10-14 Thread Lele Gaifax
documentation (https://docs.python.org/3.6/library/re.html#re.sub) “unknown escapes [in the repl argument] such as \& are left alone”. Am I missing something, or is this a regression? In the meantime, I will alert the pgcli people. Thanks in advance, bye, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list

Re: ANN: dedent 0.5 released

2016-09-29 Thread Lele Gaifax
https://docs.python.org/3.6/library/textwrap.html#textwrap.dedent ? ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list

Re: [RELEASE] Python 3.6.0b1 is now available

2016-09-13 Thread Lele Gaifax
ecall we had a very brief exchange on this at the time, and I event spent a few days trying a quick&dirty approach (basically passing also the ordered list of keywords...). Anyway, we are in a new millenium now, and two major versions forward! ;-) Thank you all, ciao, lele. -- nickname: Lele Ga

Re: Anonymous hyperlinks in restructuredtext

2016-05-28 Thread Lele Gaifax
his helps, ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list

Re: Untrusted code execution

2016-04-08 Thread Lele Gaifax
Paul Rubin writes: > Lua is supposed to be easy to embed and sandbox. It might be > interesting to write Python bindings for the Lua interpreter sometime. Isn't this something similar to already existing https://pypi.python.org/pypi/lupa/? ciao, lele. -- nickname: Lele Gaifax | Q

Re: netrc and password containing whitespace

2016-03-24 Thread Lele Gaifax
netrc-xxx, and comes from net/netrc.el. Cfr. also https://www.emacswiki.org/emacs/GnusAuthinfo. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depe

netrc and password containing whitespace

2016-03-24 Thread Lele Gaifax
te = 'a' elif nextchar in self.quotes: if not self.posix: self.token = nextchar self.state = nextchar ... I was not able to lookup an exact definition of netrc's syntax, so I wonder: is the implementation somewhat flawed, or am I missing something? Thanks in a

Re: Unable to use python 3.5

2015-12-23 Thread Lele Gaifax
Chris Warrick writes: >> I am maters student in India, > > We don’t care (expect that you made a typo there). Oh, really? Surprisingly, he's not alone :-) ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad

Re: Python 3 virtualenvs

2015-11-29 Thread Lele Gaifax
n support on Debian systems, but I think Daniele is missing the package "pythonX.Y-venv": they install the needed stuff, and in particular /usr/bin/pyvenv-X-Y. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver p

Re: Most Pythonic way to store (small) configuration

2015-08-04 Thread Lele Gaifax
Rustom Mody writes: > Does yaml have comments? Yes, the same syntax as Python's. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depe

Re: Most Pythonic way to store (small) configuration

2015-08-02 Thread Lele Gaifax
ite these days for this kind of things. http://intellimath.bitbucket.org/axon/ ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929.

Re: Camelot a good tool for me

2015-05-24 Thread Lele Gaifax
t;> type(res) >>> type(res[0]) >>> type(res[0].name) >>> type(res[0][0]) >>> res[0].name == res[0][0] True ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list

Re: Camelot a good tool for me

2015-05-24 Thread Lele Gaifax
Chris Angelico writes: > On Sat, May 23, 2015 at 5:12 AM, Lele Gaifax wrote: >> You are conflating two different layers, core and ORM. ORM relationships can >> be declared either on the parent or on the child, it's up to your taste. > > Not sure why that's distin

Re: Camelot a good tool for me

2015-05-22 Thread Lele Gaifax
Chris Angelico writes: > On Sat, May 23, 2015 at 3:24 AM, Lele Gaifax wrote: >> Laura Creighton writes: >> >>> In my corner of the world, everybody uses SQL. >>> [...] >>> The people who have tried SQLAlchemy really didn't like it, and of cou

Re: Camelot a good tool for me

2015-05-22 Thread Lele Gaifax
live in a very strange corner! ;-) ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list

Re: Strategies for using cffi with C++ code?

2015-05-22 Thread Lele Gaifax
Skip Montanaro writes: > I also figure there must be some established best practices for exposing C++ > classes to Python. Maybe http://docs.cython.org/src/userguide/wrapping_CPlusPlus.html? bye, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele

Re: Dict comprehensions - improvement to docs?

2015-03-17 Thread Lele Gaifax
=dict()" 1000 loops, best of 3: 0.113 usec per loop $ python3 -m timeit "d={}" 1000 loops, best of 3: 0.0601 usec per loop ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver p

Re: time.monotonic() roll over

2014-12-04 Thread Lele Gaifax
ed down too, and act accordingly? just-for-the-sake-of-arguing-ly, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list

Re: sqlite3.OperationalError: near ".": syntax error

2014-09-19 Thread Lele Gaifax
ort sqlite3 >>> con = sqlite3.connect('development.db') >>> cur = con.cursor() >>> res = cur.execute("select * from sqlite_master where type='table'") >>> print(list(res)) [('table', 'clubs', 'clubs', 2, '

Re: hg, git, fossil, ...

2014-08-29 Thread Lele Gaifax
they live. Darcs patch theory "promises" that non-conflicting patches may be applied in any order (they can be commuted at will), that's what makes "cherry-picking" a very common/no fuss operation. OTOH, that's also exactly the main reason (the other is performance...

Re: Adapt bash readline operate-and-get-next

2014-08-19 Thread Lele Gaifax
Skip Montanaro writes: > On Tue, Aug 19, 2014 at 3:44 AM, Lele Gaifax wrote: >> Given these lines in the history: >> >> >>> a=10 >> >>> a-=1 >> >>> print(a) >> 9 > > Suppose you have the above, as you ind

Re: Coding challenge: Optimise a custom string encoding

2014-08-19 Thread Lele Gaifax
r byte in s_utf8]) Minor nit: you defined a local alias for bytemap for faster access, but didn't actually used it. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it |

Re: Adapt bash readline operate-and-get-next

2014-08-19 Thread Lele Gaifax
Lele Gaifax writes: > Chris Angelico writes: > >> On Tue, Aug 19, 2014 at 10:17 AM, Steven D'Aprano >> wrote: >> >>> Can you create a feature request for it on the bug tracker, mark me >>> (steven.daprano) as interested, and upload your diff?

Re: Adapt bash readline operate-and-get-next

2014-08-19 Thread Lele Gaifax
"nosy"), too Sure, will do that ASAP. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list

Re: Adapt bash readline operate-and-get-next

2014-08-19 Thread Lele Gaifax
>>> a-=1 >>> print(a) 5 >>> a-=1[#] where the "[#]" is the input cursor. > When you are finished with a series of Ctl-O > keystrokes I presume you (as the user) press Ctl-U or Ctl-K to clear > the input buffer? Yes. ciao, lele. -- ni

Adapt bash readline operate-and-get-next

2014-08-18 Thread Lele Gaifax
Steven D'Aprano writes: > On Mon, 21 Jul 2014 17:57:22 +0200, Lele Gaifax wrote: >> Granted, the readline library exposes a "operate-and-get-next" function, >> by default bound to \C-o... > > Have you actually got that working in Python with the readline

Re: Network/multi-user program

2014-07-22 Thread Lele Gaifax
Monte Milanuk writes: > On 2014-07-22, Lele Gaifax wrote: >> On the other hand, it has good and extensive examples, so the learning >> curve is not so steep (I'm clearly biased here, but I introduced several >> young developers to that environment and that'

Re: Unicode, stdout, and stderr

2014-07-22 Thread Lele Gaifax
hly (the actual code is written in C) > > sys.stdout.buffer.write(repr(x).encode( > sys.stdout.encoding, "backslashreplace")) Ah-moment! Thanks, ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | cominc

Re: Unicode, stdout, and stderr

2014-07-22 Thread Lele Gaifax
t; print(repr('\u2119')) 'ℙ' Uhm, it must be related to the fact that on Py3 the repr() of something is a unicode object too, so the output machinery tries to encode it to the output encoding Still, I miss the difference between stdout and stder

Re: Unicode, stdout, and stderr

2014-07-22 Thread Lele Gaifax
unicode spam(mer) doesn't reach the newsgroup anymore... :-) -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list

Re: Network/multi-user program

2014-07-22 Thread Lele Gaifax
option: I used Pyjamas (btw, did it survive the schism?) to build one non trivial application, and while it allows using the language we all know and love, it introduces one more step of indirection between you and the actual code that the browser run, so in the end I didn't repeat the experience

Re: Unicode, stdout, and stderr

2014-07-21 Thread Lele Gaifax
r* of the string, the latter tries to encode it to CP437, which you console seems to be using. One approach could be changing the "code page" (that is, the encoding) of the "terminal" (see the "chcp" command), to select one that actually have that glyph. But I'

Re: Network/multi-user program

2014-07-21 Thread Lele Gaifax
Monte Milanuk writes: > On 2014-07-21, Lele Gaifax wrote: >> Monte Milanuk writes: >>> How hard was it to migrate from a desktop app to what you have now? >> >> Well, basically I rewrote everything, there's nothing in common. The >> original applica

Re: Network/multi-user program

2014-07-21 Thread Lele Gaifax
Monte Milanuk writes: > On 2014-07-21, Lele Gaifax wrote: >> I manage small events with a single notebook and a low cost printer, >> without network connection, while major events with a network connection >> may be managed online. >> >> You can try it out at

Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!

2014-07-21 Thread Lele Gaifax
emory is faulty. ciao, lele. [1] http://ftp.vim.org/languages/python/python/contrib-09-Dec-1999/System/Pyrl.README -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list

Re: Network/multi-user program

2014-07-21 Thread Lele Gaifax
ith a network connection may be managed online. You can try it out at http://sol3.arstecnica.it/, using guest/guest as username/password. Hope this helps, ciao, lele. [1] https://pypi.python.org/pypi/SoL -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Ema

Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!

2014-07-21 Thread Lele Gaifax
library exposes a "operate-and-get-next" function, by default bound to \C-o, with the same behaviour as the cmd.exe one. I find it very handy in the scenario you picted. So again, "feature" and "bug" may be effectively subjective :-) ciao, lele. -- nickname: Lele Gai

Re: Unicode Chars in Windows Path

2014-04-04 Thread Lele Gaifax
Python\TestCases\list_dir_script.txt" > > or just use forward slashes: > > u"c:/automation_common/Python/TestCases/list_dir_script.txt" The latter should be preferred, in case Python3 compatibility is a goal. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di que

Re: checking if two things do not equal None

2014-03-29 Thread Lele Gaifax
Steven D'Aprano writes: > if not (a is b is None): ... > > Or if you prefer: > > if a is not b is not None: ... >>> 1 is not 1 is not None False So definitely the former! ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: E

Re: Strange behavior with sort()

2014-02-26 Thread Lele Gaifax
* return the object they are applied (self that is). This works though: >>> box = [1,3,2] >>> sorted(box) == [1,2,3] True hth, ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi m

Re: ur'foo' syntax under Python 3

2014-02-08 Thread Lele Gaifax
Thank you Peter and Mark for the links. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python

ur'foo' syntax under Python 3

2014-02-08 Thread Lele Gaifax
t just a glitch? thanks in advance, bye, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list

Re: Highlighting program variables instead of keywords?

2014-01-27 Thread Lele Gaifax
bout this. Dunno how far it has gone wrt Python support, but the following mode appeared in MELPA archives in the last couple of days: https://github.com/ankurdave/color-identifiers-mode hth, ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | com

Re: Retrieving possible list for use in a subsequent INSERT

2013-11-02 Thread Lele Gaifax
lue) VALUES (%s, %s)" % (myid, myvalue) >>> print(mysql) INSERT INTO sometable (theid, thevalue) VALUES (theid, Italy, Europe) ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-23 Thread Lele Gaifax
Gregory Ewing writes: > Steven D'Aprano wrote: >> On Tue, 22 Oct 2013 09:38:16 +0200, Lele Gaifax wrote: >> >>>The actual syntax would be >>> >>> [object method: arg1 withSomething: arg2 withSomethingElse: arg3] >> >> I don't

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-22 Thread Lele Gaifax
The actual syntax would be [object method: arg1 withSomething: arg2 withSomethingElse: arg3] and IMHO once you train your eyes the result is very readable, and closely resembles Python's keywords (and I took advantage of the similarity when I enjoyed developing PyObjC :) ciao, lele. -- nickna

PyPI and TestPyPI registration problems

2013-08-25 Thread Lele Gaifax
from the underlying nginx... I was finally able to register an account with the "manual" method on the live site, but I'd prefer to learn the upload procedure on the test site... Are these known problems? Thanks in advance, bye, lele. -- nickname: Lele Gaifax | Quando vivrò di quell

Re: python3-sqlalchemy and debian repo

2013-08-22 Thread Lele Gaifax
Chris Angelico writes: > It may be that the -ext accelerator isn't available for Py3 in package > form, or it might be incorporated, I don't know. AFAICT, the Py3 accelerators will be available with SA 0.9. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho p

  1   2   >