[issue44151] Improve parameter names and return value ordering for linear_regression

2021-05-16 Thread Miki Tebeka
Miki Tebeka added the comment: I'm +1 on the changes proposed by Raymond. In my teaching experience most developers who will use the built-in statistics package will have highschool level math experience. On the other hand, they'll probably to Wikipedia and the entry there uses dependent

[issue43737] Documentation of modulo operator should document behaviour clearly when second operator is negative

2021-04-09 Thread Miki Tebeka
Miki Tebeka added the comment: I agree with Raymond, this is not "beginner friendly". I've been using Python for 25 year and teaching it for about 10 and this topic never came up. -- nosy: +tebeka ___ Python tracker <https://bu

[issue41254] Add to/from string methods to datetime.timedelta

2020-07-09 Thread Miki Tebeka
Miki Tebeka added the comment: I think the lack sub second parts in these formats is a disadvantage. There's a merit in using a standard but IMO it's more natural to write someting like "2s" in a configuration value than "P2S" w

[issue41254] Add to/from string methods to datetime.timedelta

2020-07-09 Thread Miki Tebeka
New submission from Miki Tebeka : I suggest adding datetime.timedelta methods that convert to/from str. The reason is that I have several places where configuration contains various timeouts. I'd like to write '50ms' and not 0.05 which is more human readable. See https://golang.org/pkg/time

Re: ctypes & allocated memory

2020-06-07 Thread Miki Tebeka
Hi, > But the problem is that by specifying the type as ctypes.c_char_p, > ctypes will hide that pointer from you and return a Python object > instead. I'm not sure how ctypes is doing it under the hood, but I > suspect ctypes is doing it's own strdup of the string on conversion, and > managing

Re: ctypes & allocated memory

2020-06-07 Thread Miki Tebeka
> Does ctypes, when using restype, frees allocated memory? > > For example, will the memory allocated by "strdup" be freed after the "del" > statement? If not, how can I free it? I've tried the following program and I'm more confused now :) Can anyone explain the output? --- import ctypes

ctypes & allocated memory

2020-06-07 Thread Miki Tebeka
s = [ctypes.c_char_p] strdup.restype = ctypes.c_char_p out = strdup(b'hello').decode('utf-8') print(out) # hello del out --- Thanks, Miki -- https://mail.python.org/mailman/listinfo/python-list

Re: Shared library missing from wheel (custom build)

2020-06-06 Thread Miki Tebeka
Changed to self.get_ext_full_path(ext.name) and it works now. -- https://mail.python.org/mailman/listinfo/python-list

Shared library missing from wheel (custom build)

2020-06-06 Thread Miki Tebeka
nt of dist/checksig-0.1.0-cp38-cp38-linux_x86_64.whl it's not there. What am I missing? You can view the whole (WIP) project at https://github.com/ardanlabs/python-go/tree/master/pyext Thanks, Miki -- https://mail.python.org/mailman/listinfo/python-list

Re: Division issue with 3.8.2 on AIX 7.1

2020-06-03 Thread Miki Tebeka
> Anyone know where can I look in the Python source code to investigate > this? Probably around https://github.com/python/cpython/blob/master/Objects/floatobject.c -- https://mail.python.org/mailman/listinfo/python-list

Re: [ANN] Python Brain Teasers Book is Out

2020-05-05 Thread Miki Tebeka
Hi, > Would be grateful if you could post it to python-authors also: > https://mail.python.org/mailman/listinfo/python-authors Done. Though list seems very dormant. Thanks, Miki -- https://mail.python.org/mailman/listinfo/python-list

[ANN] Python Brain Teasers Book is Out

2020-05-04 Thread Miki Tebeka
ook, including the forward by Raymond Hettinger is at https://www.353solutions.com/python-brain-teasers Stay curious, keep hacking, Miki -- https://mail.python.org/mailman/listinfo/python-list

Re: What is the correct interpreter

2020-03-04 Thread Miki Tebeka
om/help/pycharm/configuring-local-python-interpreters.html on how to configure the interpreter. > But when I run a simple code it objects to the interpreter??? I order to help we'll need more information. What is the code you're trying to run and what is the error? Happy hacking, Miki -- https://mail.

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Miki Tebeka
Miki Tebeka added the comment: I don't think it violates " Explicit is better than implicit." There's a lot of work done to make pathlib.Path objects work in places where str or bytes is expected (e.g PEP 519), IMO this is an

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Miki Tebeka
New submission from Miki Tebeka : Currently pathlib.Path cannot be used with string formatting directives. IMO it should. >>> from pathlib import Path >>> path = Path('/path/to/enlightenment') >>> print(f'path is: {path:>50}') Traceback (most recent

Re: Connection refused when tryign to run bottle/flask web framweworks

2018-08-20 Thread Miki Tebeka
If you're trying to access the machine from another machine, you need to change the host to '0.0.0.0'. 'localhost' is the internal interface. On Sunday, August 19, 2018 at 10:36:25 PM UTC+3, Νίκος wrote: > Hello, > > i just installed bottle and flask web frameworks in my CentOS environment but

PyCon Israel 2018 CFP is Open

2018-03-11 Thread Miki Tebeka
Hi, PyCon Israel 2018 call for papers is open, submit a talk today, another three tomorrow :) See more at http://il.pycon.org/2018/ All the best, -- Miki -- https://mail.python.org/mailman/listinfo/python-list

Re: I have anaconda, but Pycharm can't find it

2017-11-27 Thread nospam . Miki Tebeka
You need to set the Python interpreter for the project to be the Anaconda one. See https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html On Monday, November 27, 2017 at 1:56:58 AM UTC+2, C W wrote: > Hello all, > > I am a first time PyCharm user. I have Python 3 and Anaconda

Re: I have anaconda, but Pycharm can't find it

2017-11-26 Thread Miki Tebeka
You need to set the Python interpreter for the project to be the Anaconda one. See https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html On Monday, November 27, 2017 at 1:56:58 AM UTC+2, C W wrote: > Hello all, > > I am a first time PyCharm user. I have Python 3 and

[ANN] Nuclio: A scalable, open source, real-time processing platform

2017-10-24 Thread Miki Tebeka
Hi, Just wanted to share a project I'm working on. It a super fast serverless that support Python handlers as well. Check out more at https://www.iguazio.com/nuclio-new-serverless-superhero/ Code at https://github.com/nuclio/nuclio/ Happy hacking, -- Miki -- https://mail.python.org/mailman

Re: Unable to apply stop words in Pandas dataframe

2017-06-26 Thread Miki Tebeka
Can you show us some of the code you tried? On Monday, June 26, 2017 at 10:19:46 AM UTC+3, Bhaskar Dhariyal wrote: > Hi everyone! > > I have a dataset which I want to make model trainable. I ahve been trying to > do some thing for past 2-3 days. > > Actually I wanted to clean 'desc' and

[ANN] Second PyCon Israel June 11-14, 2017

2017-04-30 Thread Miki Tebeka
Hi All, The second PyCon Israel will take place June 11-14, 2017. * 11 June Django girls workshop at Red Hat Israel offices in Raanana * 12-13 June PyCon Israel main event at Wohl center * 14 June PyCon Israel workshops and sprints We still have some sponsorship spots available, great recruiting

[issue28972] Document all "python -m" utilities

2016-12-17 Thread Miki Tebeka
Miki Tebeka added the comment: Thanks Guido, however I think my blog is not the right place - it's dog ugly and read by about 7 people on a good day :) I think that adding this to the official docs will add to the "batteries included" motto. I'll try to find a time and come up wi

[issue28972] Document all "python -m" utilities

2016-12-16 Thread Miki Tebeka
Miki Tebeka added the comment: Eric - sorry I wasn't clear. I'm not talking about the -m behavior in general but on the modules in the standard library that can be used with it. A lot of windows are happy to know about "python -m tarfile" to they can extract tar files without

Re: Python3, column names from array - numpy or pandas

2016-12-14 Thread Miki Tebeka
You can do this with pandas: import pandas as pd from io import StringIO io = StringIO('''\ idABCDE 10010000 10101100 10210

[issue28972] Document all "python -m" utilities

2016-12-14 Thread Miki Tebeka
New submission from Miki Tebeka: Several modules can be invoked with -m and are pretty handy (json.tool, zipfile, tarfile ...). There should be a section in the documentation that groups all of these "python -m" tools together. Something like http://pythonwise.blogspot.nl/2015

Re: pymssql

2016-09-09 Thread Miki Tebeka
> for row in cus: >print(row.budget_code) > > > NameError: name 'budget_code' is not defined You'll need to use a DictCursor to be able to access rows by name and not position (which IMO is the preferred way). cus = conn.cursor(pymysql.cursors.DictCursor) cus.execute("SELECT * FROM

Re: Guys, can you please share me some sites where we can practice python programs for beginners and Intermediate.

2016-06-22 Thread Miki Tebeka
On Tuesday, June 21, 2016 at 2:03:28 PM UTC+3, Pushpanth Gundepalli wrote: > Guys, can you please share me some sites where we can practice python > programs for beginners and Intermediate. IMO you can do that at https://www.codecademy.com/learn/python --

Re: hourly weather forecast data

2016-04-12 Thread Miki Tebeka
> Is there a way to get hourly weather forecast data (temperature, > chance of precipitation) from the command line in Debian Linux? If you Google for "weather API" you'll find several sites who give programmatic access to weather data. -- https://mail.python.org/mailman/listinfo/python-list

[ANN] First PyCon Israel (May 2,3)

2016-03-09 Thread Miki Tebeka
/ to see more details. See you there, -- Miki -- https://mail.python.org/mailman/listinfo/python-list

Re: I can not install matplotlib, numpy, scipy, and pandas.

2016-01-06 Thread Miki Tebeka
> When I enter into the command window "pip install matplotlib", it reads this > below (this is not the full version of it): > ... Installing scientific packages can be a pain. I recommend you take a look at https://www.continuum.io/downloads --

Re: Newbie XML problem

2015-12-21 Thread Miki Tebeka
g = root.find('config[@id="B"]') for panel in cfg.findall('panel'): panels.append([{elem.tag: elem.text} for elem in panel]) You'll need to do some parsing for the coordinates and handle canvas and comments separately. HTH, Miki -- https://mail.python.org/mailman/listinfo/python-list

Re: compiling matplotlib in virtual env

2015-10-02 Thread Miki Tebeka
> I been trying to compile matplotlib in a python3.4 virtual env using > pip version 1.7 on Fedora 22. I am in about 3 weeks learning python > and Django so I am not clear on the error response to: > ... > File "/usr/lib64/python3.4/distutils/version.py", line 343, in _cmp > if

Re: numpy

2015-09-11 Thread Miki Tebeka
On Thursday, September 10, 2015 at 1:11:59 PM UTC+3, chen...@inhand.com.cn wrote: > hi: > I have to use numpy package. My python runs on my embedded arm > device. So, how do i cross compile numpy? conda has support for ARM - http://continuum.io/blog/new-arch BTW: I suggest you write a

Re: Who uses IDLE -- please answer if you ever do, know, or teach

2015-08-05 Thread Miki Tebeka
Greetings, 0. Classes where Idle is used: Where? At client site. Mostly big companies. Level? From beginner to advanced. Idle users: 1. Are you grade school (1=12)? undergraduate (Freshman-Senior)? post-graduate (from whatever)? post-graduate 2. Are you beginner (1st class, maybe 2nd

Re: Time saving tips for Pythonists

2015-06-20 Thread Miki Tebeka
What are your best time saving tips when programming Python? * Use the REPL. Write small chunks of code and test them as you go * Know what's available in the standard library (sets, Counter, deque ...) * Learn how to pick good packages from PyPI (community, last commit ...) * import this --

Problem with PyPI login

2015-06-17 Thread Miki Tebeka
PyPI Support) seems pretty deserted. What is the right location for these kind of issues? Thanks, -- Miki -- https://mail.python.org/mailman/listinfo/python-list

Re: Problem with PyPI login

2015-06-17 Thread Miki Tebeka
The forums at https://sourceforge.net/p/pypi/support-requests/ (which is linked from PyPI Support) seems pretty deserted. What is the right location for these kind of issues? That is one place. https://bitbucket.org/pypa/pypi/issues Thanks! --

Re: Flask Post returning error

2015-05-18 Thread Miki Tebeka
If anyone may kindly suggest what is the error I am doing. It's close to impossible to know without seeing the server side code. -- https://mail.python.org/mailman/listinfo/python-list

Did https://pypi.python.org/pypi/ became huge and slow?

2015-03-10 Thread Miki Tebeka
python.org takes 0.209 total) and the size (Content-Length). Anything gone wrong or am I missing something? Thanks, -- Miki -- https://mail.python.org/mailman/listinfo/python-list

Re: Did https://pypi.python.org/pypi/ became huge and slow?

2015-03-10 Thread Miki Tebeka
Thanks Chris, I was hitting the wrong URL by mistake. Didn't think an extra / will make all that difference :) On Tuesday, March 10, 2015 at 2:12:13 PM UTC+2, Chris Angelico wrote: On Tue, Mar 10, 2015 at 10:55 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Miki Tebeka wrote

Re: List of python -m tools

2015-01-16 Thread Miki Tebeka
Thanks for all the answers! -- https://mail.python.org/mailman/listinfo/python-list

List of python -m tools

2015-01-11 Thread Miki Tebeka
Greetings, I've compiled a list of python -m tools at pythonwise.blogspot.com/2015/01/python-m.html. Did I miss something? What are your favorite python -m tools? Thanks, -- Miki -- https://mail.python.org/mailman/listinfo/python-list

Re: Need Help

2014-12-02 Thread Miki Tebeka
information. What is the test suite you're using? How are you running the tests? Example output ... All the best, -- Miki -- https://mail.python.org/mailman/listinfo/python-list

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2014-11-25 Thread Miki Tebeka
Miki Tebeka added the comment: Can we also update iglob [1] as well? [1] https://docs.python.org/2/library/glob.html#glob.iglob -- nosy: +tebeka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22524

Re: Recommended hosting

2014-10-03 Thread Miki Tebeka
. All the best, -- Miki -- https://mail.python.org/mailman/listinfo/python-list

Re: Error from pandas.io.data import DataReader

2014-10-02 Thread Miki Tebeka
named pandas.io.data * Do you have pandas installed? (Does import pandas work?) * If it is installed, what version do you have? ( print(pandas.__version__) HTH, -- Miki -- https://mail.python.org/mailman/listinfo/python-list

Re: Fuzzy Counter?

2014-09-26 Thread Miki Tebeka
Greetings, On Wednesday, September 24, 2014 5:57:15 PM UTC+3, Ian wrote: Then your result depends on the order of your input, which is usually not a good thing. As stated in previous reply - I'm OK with that. Why would you need to determine the *number* of bins in advance? You just need to

Fuzzy Counter?

2014-09-23 Thread Miki Tebeka
Greetings, Before I start writing my own. Is there something like collections.Counter (fore frequencies) that does fuzzy matching? Meaning x is considered equal to y if abs(x - y) epsilon. (x, y and my case will be numpy.array). Thanks, -- Miki -- https://mail.python.org/mailman/listinfo

Re: Fuzzy Counter?

2014-09-23 Thread Miki Tebeka
On Tuesday, September 23, 2014 4:37:10 PM UTC+3, Peter Otten wrote: x eq y y eq z not (x eq z) where eq is the test given above -- should x, y, and z land in the same bin? Yeah, I know the counting depends on the order of items. But I'm OK with that. --

Re: Fuzzy Counter?

2014-09-23 Thread Miki Tebeka
On Tuesday, September 23, 2014 7:33:06 PM UTC+3, Rob Gaddi wrote: While you're at it, think long and hard about that definition of fuzziness. If you can make it closer to the concept of histogram bins you'll get much better performance. The problem for me here is that I can't determine the

[issue22240] argparse support for python -m module in help

2014-09-10 Thread Miki Tebeka
Miki Tebeka added the comment: Thanks Paul, will work on that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22240 ___ ___ Python-bugs-list

[issue22240] argparse support for python -m module in help

2014-09-10 Thread Miki Tebeka
Miki Tebeka added the comment: I don't like changing code just to accommodate testing. Will try to think of a way to solve this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22240

[issue22240] argparse support for python -m module in help

2014-09-08 Thread Miki Tebeka
Miki Tebeka added the comment: Anything else I need to solve to get this patch accepted? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22240

[issue22240] argparse support for python -m module in help

2014-08-26 Thread Miki Tebeka
Miki Tebeka added the comment: Support for directory invocation as well. -- Added file: http://bugs.python.org/file36476/prog3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22240

[issue22240] argparse support for python -m module in help

2014-08-24 Thread Miki Tebeka
Miki Tebeka added the comment: New patch with handling of zip files. -- Added file: http://bugs.python.org/file36453/prog2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22240

[issue22240] argparse support for python -m module in help

2014-08-24 Thread Miki Tebeka
Miki Tebeka added the comment: How can you run a package without -m? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22240 ___ ___ Python-bugs

[issue22240] argparse support for python -m module in help

2014-08-24 Thread Miki Tebeka
Miki Tebeka added the comment: Made the test more robust by using sys.executable in the comparison. -- Added file: http://bugs.python.org/file36461/prog3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22240

[issue22240] argparse support for python -m module in help

2014-08-22 Thread Miki Tebeka
Miki Tebeka added the comment: For zip file the help should probably be: usage: python file.zip -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22240

[issue22240] argparse support for python -m module in help

2014-08-20 Thread Miki Tebeka
New submission from Miki Tebeka: python -m module -h starts with usage: __main__.py It should be usage: python -m module -- components: Library (Lib) files: prog.diff keywords: patch messages: 225586 nosy: tebeka priority: normal severity: normal status: open title: argparse

Re: Load a CSV with different row lengths

2014-07-29 Thread Miki Tebeka
] * (max_length - len(line)) max_length = 10 with open('data.csv') as fo: df = pd.DataFrame.from_records(gen_rows(fo, max_length)) HTH, Miki -- https://mail.python.org/mailman/listinfo/python-list

Re: NameError: name 'requests' is not defined ?

2014-07-27 Thread Miki Tebeka
the point of modules and imports. I suggest you go over https://docs.python.org/3.4/tutorial/ HTH, -- Miki -- https://mail.python.org/mailman/listinfo/python-list

Re: How to install data analysis pandas toolkit?

2014-07-23 Thread Miki Tebeka
Greetings, import pandas as pd No module named numpy I find the most painless way of installing the Python scientific stack is using Anaconda http://continuum.io/downloads HTH, -- Miki -- https://mail.python.org/mailman/listinfo/python-list

Re: Installing Python 2.6.2 on Ubuntu 12.1

2014-07-21 Thread Miki Tebeka
libraries for that (including the C header files). IIRC sudo apt-get build-dep python should install all the required packages. HTH, -- Miki -- https://mail.python.org/mailman/listinfo/python-list

Re: Create flowcharts from Python

2014-06-17 Thread Miki Tebeka
Is there a library for Python that can easily create flowcharts using a simple API? Maybe https://code.google.com/p/pydot/ ? -- https://mail.python.org/mailman/listinfo/python-list

Re: pyflakes best practices?

2014-06-04 Thread Miki Tebeka
supports ignoring certain lines by appending a comment starting with # NOQA HTH, -- Miki -- https://mail.python.org/mailman/listinfo/python-list

Re: daemon thread cleanup approach

2014-05-28 Thread Miki Tebeka
? ... It it possible that this will cause the program to hang in any case? If due to a bug in the cleanup thread it hangs - the program will hang as well. All the best, -- Miki -- https://mail.python.org/mailman/listinfo/python-list

Re: [RELEASED] Python 2.7.7 release candidate 1

2014-05-19 Thread Miki Tebeka
(If you don't know what the strop module is, go ahead and forget it now.) +1 QOTW :) -- https://mail.python.org/mailman/listinfo/python-list

Re: Running programs on mobile phones

2014-04-22 Thread Miki Tebeka
I have seen by chance a number of years ago a book on Python programming for running on mobile phones (of a certain producer only). What is the current state of the art in that? Could someone kindly give a few good literature references? Thanks in advance. I'm not an expert, but take a look at

Re: [OT] Testing and credentials best practices?

2014-04-21 Thread Miki Tebeka
How do you deal with tests (both on dev machine and Jenkins) that need credentials (such as AWS keys)?. I've done several of these. Another option that may work in some contexts is to mock the test altogether; Thanks, but mocking is last resort for me, it reduces the value of testing greatly

[OT] Testing and credentials best practices?

2014-04-20 Thread Miki Tebeka
control 3. Credentials service (such as ZooKeeper) accessed only from VPN 4. Credentials pre user encrypted (gpg) and stored in source control What method are you using? Are there any best practices in the subject? Thanks, -- Miki -- https://mail.python.org/mailman/listinfo/python-list

[ann] pypi2u - Get notified on new version of packages

2014-04-17 Thread Miki Tebeka
Greetings, http://pypi2u.appspot.com/ is a simple service that notifies you on new versions of packages you're interested in. You can view the code, fill bugs and suggest ideas at https://bitbucket.org/tebeka/pypi2u Hope you find it useful, -- Miki -- https://mail.python.org/mailman/listinfo

Re: Python IM server

2014-03-31 Thread Miki Tebeka
I want to develop a instant message server, simply has user and group entity. Is there any better existing open-source one? Thus I can download and have a look. You can take a look at Twisted Words (https://twistedmatrix.com/trac/wiki/TwistedWords). --

[issue17557] test_getgroups of test_posix can fail on OS X 10.8 if more than 16 groups

2014-02-11 Thread Miki Tebeka
Miki Tebeka added the comment: I still see this in 3.4rc1 == FAIL: test_getgroups (test.test_posix.PosixTester) -- Traceback (most recent call last): File

Re: system wide mutex

2014-02-10 Thread Miki Tebeka
IIRC creating a directory is atomic in most environments. On Sunday, February 9, 2014 2:39:51 AM UTC-8, Asaf Las wrote: Hi Which one is most recommended to use for mutex alike locking to achieve atomic access to single resource: - fcntl.lockf - os.open() with O_SHLOCK and

Re: generator slides review

2014-02-02 Thread Miki Tebeka
Thank you that's nicer, but ifiilterfalse is not in Python 3 (could use filter of course). It was renamed to filterfalse - http://docs.python.org/3.3/library/itertools.html#itertools.filterfalse -- https://mail.python.org/mailman/listinfo/python-list

Re: generator slides review

2014-02-01 Thread Miki Tebeka
On Saturday, February 1, 2014 6:12:28 AM UTC-8, andrea crotti wrote: I'm giving a talk tomorrow @Fosdem about generators/iterators/iterables.. The slides are here (forgive the strange Chinese characters): https://dl.dropboxusercontent.com/u/3183120/talks/generators/index.html#3

Re: Help me to print to screen as well as log

2013-11-23 Thread Miki Tebeka
I want that print hello should appear on screen as well as get saved in a log file. How can I accomplish this? There are many ways to do this, here's one: class MultiWriter(object): def __init__(self, *writers): self.writers = writers self.isatty = False def

Re: Suggest an open-source issue tracker, with github integration and kanban boards?

2013-11-20 Thread Miki Tebeka
On Wednesday, November 20, 2013 6:36:56 AM UTC-8, Alec Taylor wrote: Anyway, here is the link: https://github.com/rauhryan/huboard I thought you wanted a Python bases solution. -- https://mail.python.org/mailman/listinfo/python-list

Re: Suggest an open-source issue tracker, with github integration and kanban boards?

2013-11-16 Thread Miki Tebeka
Can you recommend an open source project (or two) written in Python; which covers multi project + sub project issue tracking linked across github repositories? Don't know if it covers all what you need, but http://trac.edgewall.org/ is written in Python, and has many, many plugins. --

Re: RELEASED: Python 2.6.9 final

2013-10-29 Thread Miki Tebeka
On Tuesday, October 29, 2013 10:48:58 AM UTC-7, Barry Warsaw wrote: So too has my latest stint as Python Release Manager. Over the 19 years I have been involved with Python, Thanks Barry for all the hard work. -- https://mail.python.org/mailman/listinfo/python-list

[issue19240] iglob should try to use `readdir`

2013-10-12 Thread Miki Tebeka
New submission from Miki Tebeka: Currently glob.iglob calls os.listdir internally. Which means that if there are many files in the directory - a big list of them is created in memory. iglob should try to use readdir and be a true iterator, not consuming a lot of memory. See one possible

Re: Which DLL did fail to load

2013-08-26 Thread Miki Tebeka
Wouldn't it better to add a feature to Python to write the name of DLL which load has been failed? If you start Python with the -v (verbose) flag, you can see all the calls to dlopen. -- http://mail.python.org/mailman/listinfo/python-list

Re: [argparse] mutually exclusive group with 2 sets of options

2013-08-05 Thread Miki Tebeka
Is it possible with argparse to have this syntax for a script? my-script (-a -b VALUE-B | -c -d VALUE-D) I would like to do this with the argparse module. You can probably do something similar using sub commands (http://docs.python.org/2/library/argparse.html#sub-commands). --

Re: Imports (in Py3), please help a novice

2013-06-16 Thread Miki Tebeka
Is there an import / distutils tutorial out there? I'm looking for it, but perhaps one of you already knows where to find it. Thanks! Did you have a look at http://docs.python.org/3.3/distutils/examples.html? Another thing to do is to look at what other packages on PyPi are doing. --

Re: Any speech to text conversation python library for Linux and mac box

2013-06-13 Thread Miki Tebeka
On Wednesday, June 12, 2013 8:59:44 PM UTC-7, Ranjith Kumar wrote: I'm looking for speech to text conversation python library for linux and mac Not a Python library, but maybe you can work with http://cmusphinx.sourceforge.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: python call golang

2013-05-10 Thread Miki Tebeka
Now! I have written a python script . I want to call a golang script in python script. Who can give me some advices? See http://gopy.qur.me/extensions/examples.html and http://www.artima.com/weblogs/viewpost.jsp?thread=333589 -- http://mail.python.org/mailman/listinfo/python-list

Re: distributing a binary package

2013-05-07 Thread Miki Tebeka
I already have the .so files compiled. http://docs.python.org/2/distutils/setupscript.html#installing-package-data ? -- http://mail.python.org/mailman/listinfo/python-list

Re: distributing a binary package

2013-05-06 Thread Miki Tebeka
Basically, I'd like to know how to create a proper setup.py script http://docs.python.org/2/distutils/setupscript.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Using SciPy in application

2013-04-24 Thread Miki Tebeka
I want to use spline interpolation function from SciPy in an application and at the same time, I don't want the end user to have to install SciPy separately. You can pack you application with py2exe, pyinstaller ... and then they won't even need to install Python. Another option (which is

Re: Encoding NaN in JSON

2013-04-19 Thread Miki Tebeka
You understand that this will result in a chunk of text that is not JSON? I think he means something like this: json.dumps([float('nan')]) '[N/A]' That's exactly what I mean :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Encoding NaN in JSON

2013-04-17 Thread Miki Tebeka
I'm trying to find a way to have json emit float('NaN') as 'N/A'. No. There is no way to represent NaN in JSON. It's simply not part of the specification. I know that. I'm trying to emit the *string* 'N/A' for every NaN. -- http://mail.python.org/mailman/listinfo/python-list

Re: Encoding NaN in JSON

2013-04-17 Thread Miki Tebeka
I'm trying to find a way to have json emit float('NaN') as 'N/A'. Easiest way is probably to transform your object before you try to write Yeah, that's what I ended up doing. Wondered if there's a better way ... Thanks, -- Miki -- http://mail.python.org/mailman/listinfo/python-list

Re: Encoding NaN in JSON

2013-04-17 Thread Miki Tebeka
[Roland] yes, there is: subclass+extend the JSON-encoder, see pydoc json. Please read the original post before answering. What you suggested does not work since NaN is of float type. -- http://mail.python.org/mailman/listinfo/python-list

Encoding NaN in JSON

2013-04-16 Thread Miki Tebeka
Greetings, I'm trying to find a way to have json emit float('NaN') as 'N/A'. I can't seem to find a way since NaN is a float, which means overriding default won't help. Any simple way to do this? Thanks, -- Miki -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANNC] pynguin-0.14 python turtle graphics application

2013-04-13 Thread Miki Tebeka
Pynguin is a python-based turtle graphics application. I wonder why Pynguin does not get more traction in the teaching sector. Looks ideal for teaching kids. -- http://mail.python.org/mailman/listinfo/python-list

Re: CSV to matrix array

2013-04-12 Thread Miki Tebeka
I have a CSV file with 20 rows and 12 columns and I need to store it as a matrix. If you can use pandas, the pandas.read_csv is what you want. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie to python. Very newbie question

2013-04-07 Thread Miki Tebeka
. In general, we're moving to list/generator comperhension over map/filter. Something like: print(sum(x*x for x in xrange(10**6) if (x*x)%2)) HTH, Miki -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie to python. Very newbie question

2013-04-07 Thread Miki Tebeka
I can't even read that mess... three nested lambda? I have to say this and other answers in this thread seem not that friendly to me. The OP said it's a newbie question, we should be more welcoming to newcomers. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to find bad row with db api executemany()?

2013-03-30 Thread Miki Tebeka
I can catch the exception, but don't see any way to tell which row caused the problem. Is this information obtainable, short of retrying each row one by one? One way to debug this is to wrap the iterable passed to executemany with one that remembers the last line. Something like: class

  1   2   3   4   5   6   7   >