Re: P2P text chat engine

2009-05-20 Thread Kirill
On 7 май, 21:23, "Diez B. Roggisch" wrote: > Navanjo schrieb: > > > If you have the source code of a p2p text chat engine please send to me > > I found that & a pot of gold under my bed. Care to give me your address > so that I can send it to you? > > SCNR, > Diez Hello, can you sent it to me ? a

Re: The best, friendly and easy use Python Editor.

2013-01-25 Thread Kirill Pekarov
> I think PyCharm is ideal for you. > http://www.jetbrains.com/pycharm/ +1 for PyCharm. I used many editors, and PyCharm (IDEA) is just perfect. -- http://mail.python.org/mailman/listinfo/python-list

[ANN] PyYAML-3.10: YAML parser and emitter for Python

2011-05-29 Thread Kirill Simonov
tp://pyyaml.org/wiki/PyYAML description: YAML parser and emitter for Python keywords: [YAML, serialization, configuration, persistance, pickle] Copyright = The PyYAML module is written by Kirill Simonov . PyYAML is released under the MIT license. -- http://mail.python.org/mailman/listinfo/python-list

Performance of map vs starmap.

2017-10-30 Thread Kirill Balunov
Sometime ago I asked this question at SO [1], and among the responses received was paragraph: - `zip` re-uses the returned `tuple` if it has a reference count of 1 when the `__next__` call is made. - `map` build a new `tuple` that is passed to the mapped function every time a `__next__` call is

What is the future of the PEP 467?

2017-11-10 Thread Kirill Balunov
What is the future of the PEP 467 ("Minor API improvements for binary sequences")? It was not accepted and was not rejected, although there was a rather active discussion. In addition to what is stated in the PEP, I would like to know your opinion on the additional issue: At present, the repr() an

Using the variable type annotation syntax as a placeholder in a nonlocal scope?

2017-12-20 Thread Kirill Balunov
I've asked the same question on StackOverflow, but it seems to me that it is opinion based and will be ignored. So I ask for advice here: Since PEP 526 -- Syntax for Variable Annotations was approved, in Python 3.6+ it is possible to provide type hint i

Fwd: property decorator?

2017-12-21 Thread Kirill Balunov
2017-12-21 2:56 GMT+03:00 Irv Kalb : > My questions about this are really historical. From my reading, it looks > like using an @property decorator is a reference to an older approach using > a built in "property" function. But here goes: > > 1) Why were these decorator names chosen? These two

Re: Problem with assignment. Python error or mine?

2017-12-21 Thread Kirill Balunov
2017-12-21 22:06 GMT+03:00 John Ladasky : > On Thursday, December 21, 2017 at 7:37:39 AM UTC-8, MRAB wrote: > > > Python never makes a copy unless you ask it to. > > > > What x1=X does is make the name x1 refer to the same object that X > > refers to. No copying. > > Well, except with very simple,

Using the variable type annotation syntax as a placeholder in a nonlocal scope?

2017-12-22 Thread Kirill Balunov
Any suggestions? Thank you. With kind regards, -gdg On Dec 20, 2017 22:43, "Kirill Balunov" wrote: > I've asked the same question on StackOverflow, but it seems to me that it > is opinion based and will be ignored. So I ask for advice here: > > Since PEP 526 -- Synt

Default annotations for variables

2017-12-27 Thread Kirill Balunov
Will there be any implications (or is it possible) if all variables will have an attribute *something like* `__type__` which by default will be initialized to *something like* `AnyType`. So in the case `x = 12` will be equivalent to `x: AnyType = 12`. x: int x = 12 x.__type__ # int a, b = 11, 12

Re: Default annotations for variables

2017-12-27 Thread Kirill Balunov
2017-12-27 13:54 GMT+03:00 Chris Angelico : > This won't work. When you say "a.__type__", it means "take the *value* > referenced by a, and look up its __type__ attribute". So it's > equivalent to writing: > > (11).__type__ > (12).__type__ > Thank you for clarification, I understand that names do

Re: Default annotations for variables

2017-12-27 Thread Kirill Balunov
2017-12-27 14:19 GMT+03:00 Kirill Balunov : > Here I was a bit knocked down by the IPython console. Strangely, but the ` > __annotations__` is not initialized to a an empty dict when you start it, > while in Python console it is. > In addition, there are some imbalance without IP

Creation of a metaclass for dataclass.

2017-12-29 Thread Kirill Balunov
I'm studying the meta-programming topic in Python, and as an exercise I'm trying to make a somewhat simplified version of dataclass. My goal in this exercise is to make the difference between annotated variables and usual ones to be as much transparent as possible. So I come with this code to obtai

Re: python to C code generator

2018-01-23 Thread Kirill Balunov
You can look at SymPy code generator http://docs.sympy.org/latest/modules/utilities/codegen.html Perhaps this is exactly what you need. With kind regards, -gdg 2018-01-23 17:00 GMT+03:00 Ned Batchelder : > On 1/23/18 8:48 AM, kushal bhattacharya wrote: > >> On Tuesday, January 23, 2018 at 7:05:0

Re: Python on Android?

2018-02-18 Thread Kirill Balunov
To mention another way to use Python on Android is Termux project . From their site - Termux is an *Android terminal emulator and Linux environment app* that works directly with no rooting or setup required and Python is a side-effect. There are still some restrictions but in

Questions about `locals` builtin

2018-02-26 Thread Kirill Balunov
Hi, I am a little bit confused with `locals` builtin in these moments: 1. The documentation says that _free varaibles_ are returned, which seems incorrect description. In my mind the term free variable refers to variables used in a function that are not local variables nor parameters of that func

Implicit conversion to str in str.join method?

2018-02-26 Thread Kirill Balunov
Currently `str.join` raises `TypeError` if there are any non-string values in iterable, including `bytes` objects. Is it an awful idea to implicitly _cast_ elements in iterable to their `str` or `repr` representation? Was this question adressed before? As for me there are two valid points: On one

Re: Implicit conversion to str in str.join method?

2018-02-26 Thread Kirill Balunov
> > print(*iterable, sep=", ") Thanks, I apologize :-) and why I always manage to find complicated ways... With kind regards, -gdg 2018-02-26 22:43 GMT+03:00 Chris Angelico : > On Tue, Feb 27, 2018 at 6:38 AM, Kirill Balunov > wrote: > > Currently `str.join` rai

Re: Questions about `locals` builtin

2018-02-27 Thread Kirill Balunov
2018-02-27 2:57 GMT+03:00 Terry Reedy : > The point of point 3 is that terminology and details would likely be > different if Python were freshly designed more or less as it is today, and > some things only make more or less sense in historical context. Learn what > you need to know to write code

Re: Questions about `locals` builtin

2018-02-27 Thread Kirill Balunov
2018-02-27 14:59 GMT+03:00 Ned Batchelder : > On 2/27/18 3:52 AM, Kirill Balunov wrote: > >> a. Is this restriction for locals desirable in the implementation of >> CPython in Python 3? >> b. Or is it the result of temporary fixes for Python 2? >> > > My u

Re: Is there are good DRY fix for this painful design pattern?

2018-02-27 Thread Kirill Balunov
This validation can be also done with the use of annotations, while I find it super awful, I put this for one more example: from functools import wraps def validate(func): @wraps(func) def _wrap(self, *args, **kwargs): variables = func.__annotations__.keys() kwargs.update(z

Re: Is there are good DRY fix for this painful design pattern?

2018-02-27 Thread Kirill Balunov
Of course you can do the same without annotations, but with the introduction of private attribute while your API it is under active development: from functools import wraps def validate(func): @wraps(func) def _wrap(self, *args, **kwargs): variables = self._vars # Here kw

Ways to make a free variable local to a function?

2018-03-05 Thread Kirill Balunov
Hi, At the moment, in order to slightly speed up the function in Python, free variables are passed as local variables to the function, thereby getting rid of extra look ups. For example, for the following function, I especially do not use list comprehension) and therefore maybe it's not the best e

Do not promote `None` as the first argument to `filter` in documentation.

2018-03-06 Thread Kirill Balunov
This thought occurred to me several times, but I could not decide to write. And since `filter` is a builtin, I think this change should be discussed here, before opening an issue on bug tracker. I propose to delete all references in the `filter` documentation that the first argument can be `None`,

Re: Ways to make a free variable local to a function?

2018-03-06 Thread Kirill Balunov
2018-03-05 17:34 GMT+03:00 Chris Angelico : > In theory, the CPython bytecode compiler (don't know about other > Python implementations) could just add these as constants. They'd then > be bound at either compile time or function definition time (by > default the former, I think, but the latter wo

Re: Ways to make a free variable local to a function?

2018-03-06 Thread Kirill Balunov
2018-03-05 21:44 GMT+03:00 Terry Reedy : > Yes, what we really want for this sort of thing are unrebindable local > constants. A simple syntax change could do it. > > def func_local_1(numb; int = int, float = float, range = range): > > The binding after ';' belong in the header because they sho

Re: using OpenGL on windows 11

2022-01-01 Thread Kirill Ratkin
Hi! Your machine remembers but you probably use different virtual envs. PyCharm, as I remember, creates its own venv (per project maybe). It's better to remove python interpreter installed from MS application market and download python installer from python.org. Install it as user or system.

Re: How to make a type of a C extension compatible with mypy

2022-01-01 Thread Kirill Ratkin
Hi Marco, It seems issue is about file py.typed and PEP-561. As I understand issue's description you don't need to do it in C but some work in Python files need to done. Maybe this link helps (https://blog.whtsky.me/tech/2021/dont-forget-py.typed-for-your-typed-python-package/) // BR (KR) 0

RE: Gunicorn - HTTP and HTTPS in the same instance?

2022-01-08 Thread Kirill Ratkin
such proxy can do: simple authentication, ddos/fail2ban and so on) Quite often NGINX is better choice for such proxy. But apache is good as well. Best regards. Kirill От: Skip Montanaro Отправлено: 7 января 2022 г. в 21:54 Кому: Python Тема: Gunicorn - HTTP and HTTPS in the same instance

Re: Script profiling details

2022-01-10 Thread Kirill Ratkin
Hi Joseph, ** Did you try scalene profiler? Recently I solved a similar problem and scalene really helped me. ** It creates a well-formed HTML report, and you can optionally enable/disable report about a code outside your project, for example - standard library. ** Her

Re: symlinks with python3 http.server.CGIHTTPRequestHandler

2022-01-11 Thread Kirill Ratkin
orig.py All files are executable and test.py is link to orig.py which is in one directory level up: $ ls -Rla .: total 16 drwxrwxr-x  3 kirill kirill 4096 Jan 11 14:04 . drwxrwxrwt 23 root   root   4096 Jan 11 14:11 .. drwxrwxr-x  2 kirill kirill 4096 Jan 11 14:03 cgi-bin -rwxrwxr-x  1 kirill kirill  

Re: About Python Compressed Archive or Binaries

2022-01-17 Thread Kirill Ratkin
Hi, Yes, this is good question for Windows users. Of course, you can download installer exe-file -> do installation -> pack directory with python interpreter to zip (for example, or 7z) -> copy archive file to another place/computer and unpack. But it will not work out of box because origina

Re: Why There Is No Python Compressed Archive or Binaries ?

2022-01-17 Thread Kirill Ratkin
Hi Grant Hmmm...  definitly you are right in particular solution. But Ok, let me show example. I often use Go in parallel with Python and sometimes I switch between Windows/Linux also. On both systems I just download Go toolset as tarball/zip file and unpack in place where I like. The poin

Re: Unpacking lists in a f string

2022-02-09 Thread Kirill Ratkin
Hi. Try this: f"foo {','.join([f'{a} {b}' for a,b in list(zip(l1,l2))])} bar" 09.02.2022 21:13, Paulo da Silva пишет: Às 02:17 de 09/02/22, Paulo da Silva escreveu: Hi! Let's say I have two lists of equal length but with a variable number of elements. For ex.: l1=['a','b','c'] l2=['j','k'

Re: Long running process - how to speed up?

2022-02-19 Thread Kirill Ratkin
Hi, How I understand your script starts another script and should wait until second one completes its job. Right? If so you have several options depend on how your first script is written. If your script is async then ... there is good asyncio option proc = await asyncio.create_subprocess_sh

Re: virtualenv and make DESTDIR=

2022-03-05 Thread Kirill Ratkin
Hi, As far I know there is tool rpmvenv (https://github.com/kevinconway/rpmvenv). Try it, maybe ot helps. 04.03.2022 16:03, Hartmut Goebel wrote: Hi, How can I make installing a virtual environment honor DESTDIR? How can I install a virtual environment in $(DESTDIR)$(PREFIX), which behaves

Re: Do not promote `None` as the first argument to `filter` in documentation.

2018-03-06 Thread Kirill Balunov
2018-03-06 14:17 GMT+03:00 Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info>: > On Tue, 06 Mar 2018 11:52:22 +0300, Kirill Balunov wrote: > > > I propose to delete all references in the `filter` documentation that > > the first argument can be `None`, with p

Re: Do not promote `None` as the first argument to `filter` in documentation.

2018-03-06 Thread Kirill Balunov
2018-03-06 13:18 GMT+03:00 Chris Angelico : > The identity function is: > > filter(lambda x: x, range(10)) > > How is it consistent with truthiness? Exactly the same way the > underlying object is. There's no requirement for the predicate > function to return True or False - it's perfectly accepta

Re: Do not promote `None` as the first argument to `filter` in documentation.

2018-03-06 Thread Kirill Balunov
2018-03-06 16:51 GMT+03:00 Chris Angelico : > On Wed, Mar 7, 2018 at 12:23 AM, Kirill Balunov > wrote: > > Filter is generally faster than list comprehension or generators. > > > > %timeit [*filter(lambda x: x % 3, range(1000))] > > 100 µs ± 16.4 ns per loop (mea

Re: Do not promote `None` as the first argument to `filter` in documentation.

2018-03-06 Thread Kirill Balunov
2018-03-06 16:35 GMT+03:00 Chris Green : > It's 'deprecation', depreciation is something quite different. People > replying have spelt it correctly so you might possibly have noticed I > thought/hoped. > > ... and it does matter a bit because it's not just a mis-spelling, the > word you are using

Re: Do not promote `None` as the first argument to `filter` in documentation.

2018-03-06 Thread Kirill Balunov
2018-03-06 16:58 GMT+03:00 Jason Friedman : > > as a ordinary Python user I'd be interested in improvements to the > documentation, including suggestions on real-world usage. > I'm just an ordinary user, just like you :) > Kirill, taking deprecation/removal off the

Re: Do not promote `None` as the first argument to `filter` in documentation.

2018-03-06 Thread Kirill Balunov
2018-03-06 17:55 GMT+03:00 Chris Angelico : > On Wed, Mar 7, 2018 at 1:48 AM, Kirill Balunov > wrote: > > Note: For some historical reasons as the first argument you can use None > > instead of function, in this case the identity function is assumed. That > > is, all e

Re: Do not promote `None` as the first argument to `filter` in documentation.

2018-03-06 Thread Kirill Balunov
2018-03-06 17:55 GMT+03:00 Chris Angelico : > If the first argument is None, the identity function is assumed. That > is, all elements of the iterable that are false are removed; it is > equivalent to (item for item in iterable if item). It is approximately > equivalent to (but faster than) filter

Re: check if bytes is all nulls

2018-04-01 Thread Kirill Balunov
2018-04-01 20:55 GMT+03:00 Arkadiusz Bulski : > What would be the most performance efficient way of checking if a bytes is > all zeros? Try `not any(key)` ;) With kind regards, -gdg -- https://mail.python.org/mailman/listinfo/python-list

Re: check if bytes is all nulls

2018-04-01 Thread Kirill Balunov
2018-04-01 22:03 GMT+03:00 Kirill Balunov : > > > 2018-04-01 20:55 GMT+03:00 Arkadiusz Bulski : > >> What would be the most performance efficient way of checking if a bytes is >> all zeros? > > > Try `not any(key)` ;) > > Sorry, I don't timed it bef

Python aliases under Windows?

2018-04-03 Thread Kirill Balunov
Perhaps this is a silly question but still...There is PEP 394 "The "python" Command on Unix-Like Systems" which I find very reasonable, no matter how it is respected. Why was not _somewhat_ the same done for Windows? Sometimes I use, especially in IPython, to run externally: ! python3 -m dis ! py

Re: Python aliases under Windows?

2018-04-03 Thread Kirill Balunov
2018-04-03 12:27 GMT+03:00 Chris Angelico : > > Why doesn't it? That's what its job is. > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list > Because it affects my workflow under Windows and Linux. I have two options: 1. To wriie a shell script for `py` under Linux. 2. To copy-

Re: Python aliases under Windows?

2018-04-03 Thread Kirill Balunov
2018-04-03 16:15 GMT+03:00 Ian Kelly : > Creating python2.bat and python3.bat instead would take up less > additional disk space and would not need to be modified every time you > reinstall a new release of the same minor version. > > Thank you! > > This > > copy-rename works for me, but it will

Re: Python aliases under Windows?

2018-04-03 Thread Kirill Balunov
2018-04-03 16:45 GMT+03:00 Paul Moore : > On 3 April 2018 at 10:24, Kirill Balunov wrote: > > Perhaps this is a silly question but still...There is PEP 394 "The > "python" > > Command on Unix-Like Systems" which I find very reasonable, no matter how >

Re: Python aliases under Windows?

2018-04-03 Thread Kirill Balunov
2018-04-03 22:04 GMT+03:00 eryk sun : > On Tue, Apr 3, 2018 at 3:43 PM, Ian Kelly wrote: > > > > Because py.exe is really meant to solve a slightly different problem. > > On Unix if you have a .py script and you run it directly, without > > specifying which interpreter to use, the convention is t

Re: [OT] master/slave debate in Python

2018-09-24 Thread Kirill Balunov
пн, 24 сент. 2018 г. в 22:46, Chris Angelico : > > The trouble is that making changes like this with a view to > eliminating the words "master" and "slave" from all docs and comments > (rather than making them to improve clarity and accuracy) opens up the > leverage that SJWs need. "Hey, you chang

Re: How to achieve pyc only deployment for module in python3.6

2018-10-02 Thread Kirill Balunov
On Tue, Oct 2, 2018, 08:42 Chris Angelico wrote: > On Tue, Oct 2, 2018 at 12:01 PM Chandana Pattanayak > wrote: > > > > Hi, > > > > I have a requirement to provide basic code protection for a module in our > > product suite. With python 3.6 the .pyc files are created under pycache , > > so if i

Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Kirill Balunov
Hi all! It is expected that: ``` >>> import os >>> from pathlib import Path >>> dummy = " " # or "" or " " >>> os.path.isdir(dummy) False >>> Path(dummy).is_dir() True ``` or was it overlooked? with kind regards, -gdg -- https://mail.python.org/mailman/listinfo/python-list

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Kirill Balunov
чт, 25 июл. 2019 г. в 20:28, eryk sun : > On 7/25/19, Kirill Balunov wrote: > > > >>>> import os > >>>> from pathlib import Path > >>>> dummy = " " # or "" or " " > >>>> os.path.isdir(dum

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Kirill Balunov
чт, 25 июл. 2019 г. в 19:16, Chris Angelico : > On Fri, Jul 26, 2019 at 1:30 AM Kirill Balunov > wrote: > > > > Hi all! It is expected that: > > ``` > > >>> import os > > >>> from pathlib import Path > > >>> dummy = "

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Kirill Balunov
чт, 25 июл. 2019 г. в 22:58, Chris Angelico : > On Fri, Jul 26, 2019 at 5:52 AM Kirill Balunov > wrote: > [...] > > No, it's not just because of curiosity. I will try to tell the > background, and maybe I went the wrong way initially. There is a very cool > project htt

Re: Difference between os.path.isdir and Path.is_dir

2019-07-26 Thread Kirill Balunov
чт, 25 июл. 2019 г. в 20:28, eryk sun : > On 7/25/19, Kirill Balunov wrote: > > > >>>> import os > >>>> from pathlib import Path > >>>> dummy = " " # or "" or " " > >>>> os.path.isdir(dum

Re: Difference between os.path.isdir and Path.is_dir

2019-12-14 Thread Kirill Balunov
Yeah it is True, for the last two weeks or so I can access bugs.python.org in normal way. But I totally agree with the site that the best description of this situation is "Yet". with kind regards, -gdg сб, 14 дек. 2019 г. в 19:46, Terry Reedy : > On 7/26/2019 3:12 AM, Kirill

pyopengl and py2exe

2005-03-21 Thread Kirill Kuvaldin
or 'C:\cg\dist\python23.dll' to 'py2exe samples' copying C:\Python23\lib\site-packages\py2exe\run.exe -> C:\cg\dist\hello.exe The following modules appear to be missing ['OpenGL.GL', 'OpenGL.GLE', 'OpenGL.GLUT'] ? -- Kirill -- http://mail.python.org/mailman/listinfo/python-list

[ANN] LibYAML-0.0.1: The initial release

2006-08-01 Thread Kirill Simonov
, and the examples `tests/example-reformatter.c` and `tests/example-deconstructor.c`. There are preliminary Python bindings for LibYAML in the PyYAML SVN repository. LibYAML is written by Kirill Simonov <[EMAIL PROTECTED]>. It is released under the MIT license. See the file LICENSE for m

[ANN] PyYAML-3.04: YAML parser and emitter for Python

2006-08-20 Thread Kirill Simonov
indirect self references: [*A, *A, *A] ... } ... """) {'direct self reference': {...}, 'indirect self references': [{...}, {...}, {...}]} Copyright = The PyYAML module is written by Kirill Simonov <[EMAIL PROTECTED]>. PyYAML is released under the MIT license. This re

Re: help on pickle tool

2006-10-09 Thread Kirill Simonov
Hi, I'm somewhat late to this discussion, but as the author of PyYAML, I'd like to put my 2c in. On Thu, Oct 05, 2006 at 09:52:56PM -0700, virg wrote: > Is it possible to deserialize the data by java which serialized by > Python or is there any compatibility issue. Is there any equivalent > pic

distutils: optionally build C bindings to an external library

2006-10-09 Thread Kirill Simonov
Hi, I've written a pure Python module, which could optionally use an external C library. The external library is not required to be on the user computer however, so I'd like not to build the bindings by default, but allow a user to turn the build on by specifying some parameter to `setup.py`. Basi

[ANN] PyYAML-3.03: YAML parser and emitter for Python

2006-06-19 Thread Kirill Simonov
l.dump(_) name: PyYAML homepage: http://pyyaml.org/wiki/PyYAML description: YAML parser and emitter for Python keywords: [YAML, serialization, configuration, persistance, pickle] Copyright = The PyYAML module is written by Kirill Simonov <[EMAIL PROTECTED]>. PyYAML is released under the MIT license. -- http://mail.python.org/mailman/listinfo/python-list

A python IDE for teaching that supports cyrillic i/o

2006-11-18 Thread Kirill Simonov
the record, I've checked IDLE, PythonWin, Eric, DrPython, SPE, and WingIDE. The only ones that worked are WingIDE and IDLE (under Linux, but not under Windows). Thanks, Kirill -- http://mail.python.org/mailman/listinfo/python-list

A python IDE for teaching that supports cyrillic i/o

2006-11-18 Thread Kirill Simonov
On Sat, Nov 18, 2006 at 10:08:22PM +0300, Oleg Broytmann wrote: > On Sat, Nov 18, 2006 at 09:01:04PM +0200, Kirill Simonov wrote: > > Could anyone suggest me a simple IDE suitable for teaching Python as a > > first programming language to high school students? > >Does

Re: [Zopyrus] A python IDE for teaching that supports cyrillic i/o

2006-11-18 Thread Kirill Simonov
On Sat, Nov 18, 2006 at 07:20:49PM +, tom wrote: > Oleg Broytmann wrote: > > On Sat, Nov 18, 2006 at 09:01:04PM +0200, Kirill Simonov wrote: > > > >> Could anyone suggest me a simple IDE suitable for teaching Python as a > >> first programming

Re: [Zopyrus] A python IDE for teaching that supports cyrillic i/o

2006-11-18 Thread Kirill Simonov
On Sat, Nov 18, 2006 at 10:52:35PM +0300, Oleg Broytmann wrote: > On Sat, Nov 18, 2006 at 09:22:48PM +0200, Kirill Simonov wrote: > > Preferably. I believe that using a editor + command line will only make > > things worse because console and GUI have different encodings un

Re:A python IDE for teaching that supports cyrillic i/o

2006-11-18 Thread Kirill Simonov
On Sat, Nov 18, 2006 at 01:22:44PM -0600, Larry Bates wrote: > Oleg Broytmann wrote: > > On Sat, Nov 18, 2006 at 09:01:04PM +0200, Kirill Simonov wrote: > >> Could anyone suggest me a simple IDE suitable for teaching Python as a > >> first programming langu

Re: [Zopyrus] A python IDE for teaching that supports cyrillic i/o

2006-11-18 Thread Kirill Simonov
On Sun, Nov 19, 2006 at 02:49:43AM +0600, Gleb Kulikov wrote: > В сообщении от Воскресенье 19 Ноябрь 2006 01:01 Kirill Simonov написал: > > > first programming language to high school students? It is necessary > > > Unfortunately, most IDEs I tried failed miserably

Re: A python IDE for teaching that supports cyrillic i/o

2006-11-19 Thread Kirill Simonov
On Sun, Nov 19, 2006 at 12:33:39PM +0100, Alan Franzoni wrote: > Kirill Simonov si è divertito a scrivere: > > > Unfortunately, most IDEs I tried failed miserably in this respect. My > > test was simple: I've run the code > > name = raw_input("What

Re: A python IDE for teaching that supports cyrillic i/o

2006-11-19 Thread Kirill Simonov
to behave like a real Python console under a UTF-8 terminal (with sys.stdout.encoding == 'utf-8'). Thanks, Kirill -- http://mail.python.org/mailman/listinfo/python-list

Re: A python IDE for teaching that supports cyrillic i/o

2006-11-19 Thread Kirill Simonov
On Sun, Nov 19, 2006 at 03:13:30PM +0100, Alan Franzoni wrote: > Kirill Simonov si è divertito a scrivere: > > > On Sun, Nov 19, 2006 at 12:33:39PM +0100, Alan Franzoni wrote: > > > No, I would prefer the editor to save the .py files with non-ASCII > > characters i

Re: Re:A python IDE for teaching that supports cyrillic i/o

2006-11-19 Thread Kirill Simonov
On Sat, Nov 18, 2006 at 06:11:48PM -0800, PyScripter wrote: > Kirill Simonov wrote: > > PyScripter does, indeed, look nice, but unfortunately it appeared to > > have similar issues with cyrillic support. Thank you anyway for the > > suggestion. > > > What are the i

PyGILState_Release + Python2.3 = Segmentation Fault

2006-01-31 Thread Kirill Simonov
t_gil(void) { (void)Py_InitModule("_test_gil", test_gil_methods); } === I've tested it with Debian Sid and Ubuntu Breezy. Thanks, Kirill -- http://mail.python.org/mailman/listinfo/python-list

[ANN] PyYAML-3.05: YAML parser and emitter for Python

2007-05-12 Thread Kirill Simonov
istance', 'pickle'], 'homepage': 'http://pyyaml.org/wiki/PyYAML', 'description': 'YAML parser and emitter for Python', 'name': 'PyYAML'} >>> print yaml.dump(_) name: PyYAML homepage: http://pyyaml.org/wiki/PyYAML

__reduce__(1) vs __reduce__(2)

2006-04-20 Thread Kirill Simonov
Could someone explain why __reduce__(2) works for files while __reduce__(1) doesn't? >>> f = file('/etc/passwd') >>> f.__reduce__(1) Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.4/copy_reg.py", line 69, in _reduce_ex raise TypeError, "can't pickle %s obje

[ANN] PyYAML-3.01: YAML parser and emitter for Python

2006-05-08 Thread Kirill Simonov
org/ YAML-core mailing list: http://lists.sourceforge.net/lists/listinfo/yaml-core Changes === * Initial release. The version number reflects the codename of the project (PyYAML 3000) and differenciates it from the abandoned PyYaml module. Copyright = The PyYAML module is written by Kirill Simonov <[EMAIL PROTECTED]>. PyYAML is released under the MIT license. -- xi -- http://mail.python.org/mailman/listinfo/python-list

[ANN] PyYAML-3.02: YAML parser and emitter for Python

2006-05-15 Thread Kirill Simonov
gt;>> print yaml.dump(_) name: PyYAML homepage: http://pyyaml.org/wiki/PyYAML description: YAML parser and emitter for Python keywords: [YAML, serialization, configuration, persistance, pickle] Copyright = The PyYAML module is written by Kirill Simonov <[EMAIL PROTECTED]>. PyYAML is released under the MIT license. -- xi -- http://mail.python.org/mailman/listinfo/python-list

[ANN] PyYAML-3.07: YAML parser and emitter for Python

2008-12-28 Thread Kirill Simonov
YAML homepage: http://pyyaml.org/wiki/PyYAML description: YAML parser and emitter for Python keywords: [YAML, serialization, configuration, persistance, pickle] Copyright = The PyYAML module is written by Kirill Simonov . PyYAML is released under the MIT license. -- http://mail.python.org/mailman/listinfo/python-list

[ANN] PyYAML-3.08: Now with Python 3 support

2008-12-30 Thread Kirill Simonov
': 'PyYAML'} >>> print yaml.dump(_) name: PyYAML homepage: http://pyyaml.org/wiki/PyYAML description: YAML parser and emitter for Python keywords: [YAML, serialization, configuration, persistance, pickle] Copyright = The PyYAML module is written by Kirill Simonov . PyYAML is released under the MIT license. -- http://mail.python.org/mailman/listinfo/python-list

Re: creating yaml without tags using pyyaml

2008-06-06 Thread Kirill Simonov
_dump(). >>> import yaml >>> print yaml.dump(()) !!python/tuple [] >>> print yaml.safe_dump(()) [] Thanks, Kirill -- http://mail.python.org/mailman/listinfo/python-list

[ANN] PyYAML-3.06: YAML parser and emitter for Python

2008-10-03 Thread Kirill Simonov
nce', 'pickle'], 'homepage': 'http://pyyaml.org/wiki/PyYAML', 'description': 'YAML parser and emitter for Python', 'name': 'PyYAML'} >>> print yaml.dump(_) name: PyYAML homepage: http://pyyaml.org/wiki/PyYAML des

Re: Draft PEP on RSON configuration file format

2010-03-01 Thread Kirill Simonov
s. This RSON business is not one of them. Agreed. Even YAML's acronym indicates that it is already a bridge too far; we don't need more. Note that YA in the acronym doesn't mean Yet Another, YAML = YAML Ain't Markup Language. Thanks, Kirill -- http://mail.python.org/mailman/listinfo/python-list

Re: Draft PEP on RSON configuration file format

2010-03-01 Thread Kirill Simonov
pularity despite its overcomplicated grammar, chronic lack of manpower and deficient implementations is because it's so cute. Disclaimer: I'm the author of PyYAML and libyaml. Thanks, Kirill -- http://mail.python.org/mailman/listinfo/python-list

Re: Draft PEP on RSON configuration file format

2010-03-01 Thread Kirill Simonov
Patrick Maupin wrote: Kirill: Thank you for your constructive criticism. This is the gem that made it worthwhile to post my document. I think all of your points are spot-on, and I will be fixing the documentation. You are welcome. Despite what others have been saying, I don't think

Re: Draft PEP on RSON configuration file format

2010-03-01 Thread Kirill Simonov
Patrick Maupin wrote: On Mon, Mar 1, 2010 at 8:02 PM, Kirill Simonov wrote: BTW, congratulations on slogging through the YAML grammar to generate such a good working C library! That must have been a tremendous effort. The trick was to completely ignore the grammar described in the

Re: Needed: Real-world examples for Python's Cooperative Multiple Inheritance

2010-11-28 Thread Kirill Simonov
xamples above: connection pooling and most of the wsgi middleware are still to be ported, `weights()` is missing, etc. Hope it helps. Thanks, Kirill On 11/24/2010 03:08 PM, Raymond Hettinger wrote: I'm writing-up more guidance on how to use super() and would like to point at some real-world

Re: Needed: Real-world examples for Python's Cooperative Multiple Inheritance

2010-11-29 Thread Kirill Simonov
extensions often patch those to override the default behavior. For instance, you could check the `color` extension, which patches `ui` to override `write*` methods: http://selenic.com/hg/file/3790452d499b/hgext/color.py#l152 Thanks, Kirill On 11/24/2010 03:08 PM, Raymond Hettinger wrote: I&#

Re: HTSQL 2.0 RC1 -- a Query Language for the Accidental Programmer

2011-01-22 Thread Kirill Simonov
On 01/22/2011 12:25 AM, rusi wrote: On Jan 22, 2:45 am, "Clark C. Evans" wrote: Kirill Simonov and myself would like to introduce HTSQL, a novel approach to relational database access which is neither an ORM nor raw SQL. : We're curious what you think. Thanks -- looks inte

[ANN] PyYAML-3.09: YAML parser and emitter for Python

2009-08-31 Thread Kirill Simonov
aml.org/wiki/PyYAML description: YAML parser and emitter for Python keywords: [YAML, serialization, configuration, persistance, pickle] Copyright = The PyYAML module is written by Kirill Simonov . PyYAML is released under the MIT license. -- http://mail.python.org/mailman/listinfo/python-list

Fail 3.10.8 version installation on Windows 11 21H2

2022-10-12 Thread Kirill Ratkin via Python-list
ttempt to download URL: 'https://www.python.org/ftp/python/3.10.8/amd64/core_pdb.msi' to: 'C:\Users\Kirill\AppData\Local\Temp\{93FCA30B-7B82-4BF0-B911-5223F0E6A053}\core_AllUsers_pdb' [183C:19E4][2022-10-12T12:01:23]w343: Prompt for source of package: core_AllUsers_pdb, pa

Re: is mypy failing here

2022-11-24 Thread Kirill Ratkin via Python-list
Hi Robin, mypy --strict gives you detail info. On Thu, Nov 24, 2022 at 10:05 +, Robin Becker wrote: > I haven't used dataclasses or typing very much, but while playing about I > found this didn't give me an expected error > > (.py312) robin@minikat:~/devel/reportlab > $ cat tmp/examples/tdc

Re: How to detect an undefined method?

2022-03-27 Thread Kirill Ratkin via Python-list
Hi You can get all methods of your object and check the method you want to call is there or not. |methods = [method for method in dir() if callable(getattr(, method))] if 'method_you_need' in methods: . // BR | 27.03.2022 12:24, Manfred Lotz пишет: Let's say I have a Python app and have u

Re: How to detect an undefined method?

2022-03-27 Thread Kirill Ratkin via Python-list
And neither 'mypy --strict' or 'pyre' can find such error. I guess there  is not warranty to detect such sitations in huge codebase. It's python dynamic nature. May be dynamic checkers can help in such situations ... 27.03.2022 20:07, Manfred Lotz пишет: On 3/27/22 18:

Re: calling a function asynchronously

2022-03-30 Thread Kirill Ratkin via Python-list
Hi, You can use asyncio.create_task and gather results. See docs - https://docs.python.org/3/library/asyncio-task.html But think twice what you want to do in async task. Do you use synchronous requests to database? If yes it will blocks eventloop... If you use Django it makes sense to use someth

Re: calling a function asynchronously

2022-03-30 Thread Kirill Ratkin via Python-list
Hi again, I changed a bit your example and it works as you expected I hope. import asyncio async def long():     for i in range(100):     await asyncio.sleep(10)     print("long is done") loop = asyncio.get_event_loop() task = loop.create_task(long()) print('after asyncio.run') loop

Re: calling a function asynchronously

2022-03-30 Thread Kirill Ratkin via Python-list
Hi 30.03.2022 21:44, Larry Martell пишет: On Wed, Mar 30, 2022 at 2:40 PM Kirill Ratkin via Python-list wrote: Hi again, I changed a bit your example and it works as you expected I hope. import asyncio async def long(): for i in range(100): await asyncio.sleep(10

Re: dict.get_deep()

2022-04-03 Thread Kirill Ratkin via Python-list
Hi Marco. Recently I met same issue. A service I intergated with was documented badly and sent ... unpredictable jsons. And pattern matching helped me in first solution. (later I switched to Pydantic models) For your example I'd make match rule for key path you need. For example: data = {

Re: dict.get_deep()

2022-04-03 Thread Kirill Ratkin via Python-list
To my previous post. It seems 'case if' should help with types: case {"users": [{"address": {"street": street}}]} if isinstance(street, str): :) // BR 02.04.2022 23:44, Marco Sulla пишет: A proposal. Very often dict are used as a deeply nested carrier of data, usually decoded from JSON.

  1   2   >