CVE-2019-9636 - Can this be exploit over the wire?

2019-09-04 Thread Barry Scott
ppend(ToUnicode(label)) File "/usr/lib64/python2.7/encodings/idna.py", line 139, in ToUnicode raise UnicodeError("IDNA does not round-trip", label, label2) UnicodeError: ('IDNA does not round-trip', 'xn--combing-xr93b', &

Announcing Scm Workbench 0.9.3 for Git, Mercurial and Subversion

2019-09-02 Thread Barry Scott
downloads, git source, user guide and further information on SCM Workbench. New in 0.9.3 • Lots of improvement since the last release • Update to use python3.7, PyQt5 5.12 and pysvn with svn 1.12 Barry -- https://mail.python.org/mailman/listinfo/python-list

Re: open, close

2019-09-01 Thread Barry
> On 1 Sep 2019, at 17:57, MRAB wrote: > > On 2019-09-01 16:46, Barry wrote: >>> On 31 Aug 2019, at 15:41, Manfred Lotz wrote: >>> When you say COULD this sounds like it is a matter of luck. My thinking >>> was that USUALLY the file will be closed afte

Re: open, close

2019-09-01 Thread Barry
implementation does its garbage collection. The file is closed as a side effect of deleting the file object to reclaiming the memory of the file object. At the start of python 3 people where suprised when files and other resources where not released at the same time that python 2 released them.

Re: Newbie question about Python syntax

2019-08-24 Thread Barry
Have you tried asking on a blender user mailing list for help with this problem? It seems that someone familiar with blender and its python interface should be able to help get you going. Barry > On 24 Aug 2019, at 20:52, Paul St George wrote: > >> On 24/08/2019 01:23, Cameron S

Re: Application Preferences

2019-08-20 Thread Barry Scott
er to store app files into. The app then needs to store that folder somewhere. I would ask the user for the their preferred location and store that folder in a OS standard location. I do exactly that with Scm-Workbench. The user picks the folder to check out repos into and I store that choice in t

Re: Application Preferences

2019-08-19 Thread Barry Scott
% that is named after your app. You should find the folder by doing a win32 API call to get the value. See getPreferencesDir() in https://github.com/barry-scott/scm-workbench/blob/master/Source/Common/wb_platform_win32_specific.py <https://github.com/barry-scott/scm-workbench/blob/master/Source

Re: Meanwhile Norwegian trolls created ...

2019-08-18 Thread Barry
In practice PyQt works very well and you do not encounter problems with memory management or crashes. Barry > On 17 Aug 2019, at 10:39, Abdur-Rahmaan Janhangeer > wrote: > > Was browsing when i came across this hilarious piece of text: > > *Once upon a time there was a pr

Re: Using pycurl to obtain the download speed in real-time for a huge file.

2019-08-02 Thread Barry Scott
> On 2 Aug 2019, at 08:37, Hongyi Zhao wrote: > > Hi, > > I want to use pycurl to obtain the download speed in real-time for a huge > file. Is this possible or not? Yes > Any hints on this issue? Google for python pycurl progress Barry > > Reg

Re: [python-committers] [RELEASE] Python 3.8.0b3 is now available for testing

2019-07-29 Thread Barry Warsaw
I have updated the official docker images with 3.8b3: https://gitlab.com/python-devs/ci-images/tree/master -Barry > On Jul 29, 2019, at 14:48, Łukasz Langa wrote: > > Signed PGP part > This time without delays, I present you Python 3.8.0b3: > > https://www.python.org/downlo

Re: Proper shebang for python3

2019-07-24 Thread Barry Scott
org/wiki/Features/UsrMove <https://fedoraproject.org/wiki/Features/UsrMove> Barry -- https://mail.python.org/mailman/listinfo/python-list

Re: PyPi twine check does not like my README.rst files anymore

2019-07-23 Thread Barry Scott
I tried the twine check on Fedora and the test pass. This looks looks like a bug in twine on Windows which I have reported in https://github.com/pypa/twine/issues/476 <https://github.com/pypa/twine/issues/476> Barry -- https://mail.python.org/mailman/listinfo/python-list

Re: Proper shebang for python3

2019-07-21 Thread Barry Scott
t all. Often I'm testing on many python versions. And end up with something like this to test on all interesting python versions. for PTYHON in python3.6 python3.7 python3.8 do $PYTHON my_script.py done Barry -- https://mail.python.org/mailman/listinfo/python-list

Re: Embedding Python in C

2019-07-18 Thread Barry Scott
> On 17 Jul 2019, at 19:39, Jesse Ibarra wrote: > > On Wednesday, July 17, 2019 at 11:55:28 AM UTC-6, Barry Scott wrote: >>> On 17 Jul 2019, at 16:57, wrote: >>> >>> I am using Python3.6: >>> >>> [jibarra@redsky ~]$ python3.6 >&

Re: Embedding Python in C

2019-07-17 Thread Barry Scott
Python3/simple.cxx <https://sourceforge.net/p/cxx/code/HEAD/tree/trunk/CXX/Demo/Python3/simple.cxx> Barry PyCXX maintainer > > Please advise. > > Thank you. > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list

Re: Counting Python threads vs C/C++ threads

2019-07-17 Thread Barry Scott
> On 16 Jul 2019, at 20:48, Dan Stromberg wrote: > > > > On Tue, Jul 16, 2019 at 11:13 AM Barry Scott <mailto:ba...@barrys-emacs.org>> wrote: > I'm going to assume you are on linux. > Yes, I am. Ubuntu 16.04.6 LTS sometimes, Mint 19.1 other times.

Re: Counting Python threads vs C/C++ threads

2019-07-16 Thread Barry Scott
the number of Thread objects currently alive. The returned count is equal to the length of the list returned by enumerate() . Try running strace on the process to see what system calls its making. You could also connect gdb to the process and find out what code the threads are running.

Re: Class initialization with multiple inheritance

2019-07-16 Thread Barry Scott
ce that I explicitly derived from object that is the default. But here you see that class object is always there even if I omit it. >>> class Foo: ... pass ... >>> Foo.__mro__ (, ) Barry > > Thanks, > jlc > > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list

Re: PyPi twine check does not like my README.rst files anymore

2019-07-16 Thread Barry Scott
> On 16 Jul 2019, at 05:43, dieter wrote: > > Barry Scott writes: >> I am update some PyPI projects and found that twine was refusing the upload. >> ... >> Failed >> The project's long_description has invalid markup which will not be rendered >&g

PyPi twine check does not like my README.rst files anymore

2019-07-15 Thread Barry Scott
on https://github.com/barry-scott/namedstruct where you can see the README.rst rendered in full. Where as at https://pypi.org/project/namedstruct/ only the first line is rendered. Checking distribution dist\namedstruct-1.2.1-py3-none-any.whl: warning: `long_description_content_type` missing

Re: super or not super?

2019-07-15 Thread Barry Scott
e its critical and you did not use it. super() is always right (I think by design) but calling C1.__init__(self) can go wrong and is often hard to debug. Barry > > Thanks for any comments. > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list

Re: Difficulties configuring LTO on macOS with clang

2019-07-10 Thread Barry Scott
bin from your PATH does that help configure find the tools it needs? Barry > > Thanks, > Scott > > On Tue, Jul 9, 2019, at 15:39, Barry Scott wrote: >> >> >> > On 9 Jul 2019, at 19:28, Scott Colby wrote: >> > >> > Hello all, >

Re: Difficulties configuring LTO on macOS with clang

2019-07-09 Thread Barry Scott
or -llvm-ar... no > checking for llvm-ar... '' > configure: error: llvm-ar is required for a --with-lto build with clang but > could not be found. I see /opt/local/bin/llvm-ar-mp-4.0 which ends up running the llvm-ar from /opt/local/libexec/llvm-4.0/bin Just a guess but maybe you

Re: unable to import pip installed packages and modules in python 3.7.3

2019-07-09 Thread Barry Scott
If you included an image of the screen it was striped from your email. Use the mouse to select the text in the cmd window and paste that into the email. Show the command you issued and all the messages it prints. There i no need for upper case text. Barry > On 9 Jul 2019, at 17:13, pro_

Re: [RELEASE] Python 3.8.0b2 is now available for testing

2019-07-08 Thread Barry Warsaw
I’ve updated the official images to include 3.8.0b2: https://gitlab.com/python-devs/ci-images/tree/master Cheers, -Barry > On Jul 4, 2019, at 15:05, Łukasz Langa wrote: > > Signed PGP part > After a few days of delay, but somewhat cutely timed with the US Independence > Day

Re: User failed to install PIP

2019-06-24 Thread Barry Scott
python? Once python is installed you can run PIP like this: C:\Users\barry> py -m pip Usage: C:\Python37.win64\python.exe -m pip [options] Barry > On 23 Jun 2019, at 14:27, Sagar Jape wrote: > > I'm not able to install pip in my pc it gives foll

Re: Socket.py SSM support

2019-06-03 Thread Barry
y other workaround to > make SSM work in python natively? You could use ctype to call setsockopt with the necessary struct for the multicast calls. Barry > > Best regards > Max > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list

Re: subprocess svn checkout password issue

2019-03-18 Thread Barry
its not on PyPi but ther are kits for >windows, mac. Debian and Fedora provide pysvn as well. It allows you to provide the username and password via the api. See https://pysvn.sourceforge.io/Docs/pysvn_prog_ref.html#pysvn_client_checkout And https://pysvn.sourceforge.io/Docs/pysvn_prog_ref.h

Re: What's up with Activestate Python?

2019-02-18 Thread Barry Scott
> On 18 Feb 2019, at 08:49, Thomas Jollans wrote: > > Anaconda also has its moments, and has some packages that PyPI doesn't > (for my use case, this is primarily PyQt5). Odd I use PyQt5 from PyPI all the time and have for a few years now. Barry -- https://mail.python.org

Re: more pythonic way

2019-02-16 Thread Barry
hree 2019-02-16 08:30:56.821453 Notice that the time for 'one' and 'two' is the same. Only the overridden default chanse. Barry -- https://mail.python.org/mailman/listinfo/python-list

Re: where is math_sin defined?

2019-02-11 Thread Barry Scott
> On 10 Feb 2019, at 16:43, Chris Angelico wrote: > > On Mon, Feb 11, 2019 at 3:37 AM Barry Scott wrote: >> >> On Sunday, 10 February 2019 15:15:32 GMT Jon Ribbens wrote: >>> As an aside, how is 'math.sin' actually implemented? mathmodule.c >&g

Re: where is math_sin defined?

2019-02-10 Thread Barry Scott
used. The result is always exact.") 1176FUNC1(sin, sin, 0, 1177 "sin($module, x, /)\n--\n\n" 1178 "Return the sine of x (measured in radians).") 1179FUNC1(sinh, sinh, 1, 1180 "sinh($module, x, /)\n--\n\n" (gdb) Barry -- https://mail.python.org/mailman/listinfo/python-list

Re: C API PyObject_GetAttrString returns not the object I expected

2019-02-10 Thread Barry Scott
On Sunday, 10 February 2019 13:58:57 GMT Stefan Behnel wrote: > Barry Scott schrieb am 10.02.19 um 13:08: > > After calling PyObject_GetAttrString() I expected to get a PyObject string > > back but I found that I had been given a instead. > > > > (gdb) p *args_o >

Re: [solved] C API version of str(exception) is not the same as pure python version

2019-02-10 Thread Barry Scott
On Sunday, 10 February 2019 11:59:16 GMT Barry Scott wrote: > When I use the C API to get the str() of an execption I see this text: > > > > But python reports the following for the same exception: > > TypeError: unsupported operand type(s) for +: 'int

C API PyObject_GetAttrString returns not the object I expected

2019-02-10 Thread Barry Scott
After calling PyObject_GetAttrString() I expected to get a PyObject string back but I found that I had been given a instead. (gdb) p *args_o $4 = What is going on and how do I get from the to the object I want? Barry -- https://mail.python.org/mailman/listinfo/python-list

C API version of str(exception) is not the same as pure python version

2019-02-10 Thread Barry Scott
ot;Simple Module", -1, myMethods }; // Initializes our module using our above struct PyMODINIT_FUNC PyInit_simple(void) { return PyModule_Create(&simple); } --- simple_test.py --- import sys import simple def simple_eval( arg ): return eval( arg ) simple.test_error() --- end -- Barry -- https://mail.python.org/mailman/listinfo/python-list

Re: Why exception from os.path.exists()?

2018-06-11 Thread Barry Scott
ee what actually > happened. :) As interesting as it is to see the way applications transform user input into filenames its does not affect the API that python presents. Barry -- https://mail.python.org/mailman/listinfo/python-list

Re: Why exception from os.path.exists()?

2018-06-11 Thread Barry Scott
> On 11 Jun 2018, at 01:28, Steven D'Aprano > wrote: > > On Sun, 10 Jun 2018 22:09:39 +0100, Barry Scott wrote: > >> Singling out os.path.exists as a special case I do think is reasonable. >> All functions that take paths need to have a consistent response

Re: Why exception from os.path.exists()?

2018-06-10 Thread Barry Scott
> open('a\0b', 'w') Traceback (most recent call last): File "", line 1, in ValueError: embedded null character >>> Singling out os.path.exists as a special case I do think is reasonable. All functions that take paths need to have a consistent response to data that is impossible to pass to the OS. When it is impossible to get the OS to see all of the users data I'm not sure what else is reasonable for python to do then what it already does not NUL. With the exception that I do not think this is documented and the docs should be fixed. Barry -- https://mail.python.org/mailman/listinfo/python-list

Re: Distributing a Python module as .rpm and .deb packages across major distributions

2018-06-10 Thread Barry
ld go get the source RPM for a python2 package from each distro you want to supoort and read its .spec file. I see on fedora that the way they install packages that are from pypi makes it possible to use pip list to see them. Barry -- https://mail.python.org/mailman/listinfo/python-list

Re: Why exception from os.path.exists()?

2018-06-04 Thread Barry Scott
> On 1 Jun 2018, at 14:23, Paul Moore wrote: > > On 1 June 2018 at 13:15, Barry Scott wrote: >> I think the reason for the \0 check is that if the string is passed to the >> operating system with the \0 you can get surprising results. >> >> If \0 was not che

Re: Why exception from os.path.exists()?

2018-06-01 Thread Barry Scott
;) This is because a posix system only sees '/home'. Surely ValueError is reasonable? Once you know that all of the string you provided is given to the operating system it can then do whatever checks it sees fit to and return a suitable result. As an aside Windows has lots of special filenames that you have to know about if you are writting robust file handling. AUX, COM1, \this\is\also\COM1 etc. Barry > > > Marko -- https://mail.python.org/mailman/listinfo/python-list

Welcome the 3.8 and 3.9 Release Manager - Łukasz Langa!

2018-01-27 Thread Barry Warsaw
that Python’s best days are ahead of us. Enjoy, -Barry [1] https://groups.google.com/forum/?hl=en#!original/comp.lang.misc/_QUzdEGFwCo/KIFdu0-Dv7sJ signature.asc Description: Message signed with OpenPGP -- https://mail.python.org/mailman/listinfo/python-list

PEP Post-History

2017-10-27 Thread Barry Warsaw
and/or python-dev. In the effort to keep the forums of record to a manageable number, python-list is dropped. If you have been watching for new PEPs to be posted to python-list, you are invited to follow either python-dev or python-ideas. Cheers, -Barry (on behalf of the Python development

New security-annou...@python.org mailing list

2017-09-21 Thread Barry Warsaw
will use this low traffic, high value forum as the primary way the PSRT will communicate security issues of high importance back to the wider Python community. All follow-ups to postings to this list are redirected to the security-sig mailing list. Cheers, -Barry (on behalf of the PSRT

Re: Regular expression

2017-07-26 Thread Paul Barry
an anyone suggest me how should i proceed.? > > What have you tried? > > Why do you need regular expression? > > >>> s = 'first-324-True-rms-kjhg-Meterc639.html' > > >>> s[-4:] > 'html' > > Regards > Johann > -- > Because

Re: Combining 2 data series into one

2017-06-28 Thread Paul Barry
Maybe look at using .concat instead of + See: http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.06-Concat-And-Append.ipynb On 28 June 2017 at 13:02, Paul Barry wrote: > > Maybe try your code on a sub-set of your data - perhaps 1000 lines of

Re: Combining 2 data series into one

2017-06-28 Thread Paul Barry
On Wed, Jun 28, 2017 at 5:17 PM, Paul Barry > wrote: > >> On the line that's failing, your code is this: >> >> combinedX=combinedX+dframe['tf'] >> >> which uses combinedX on both sides of the assignment statement - note >> that Python is r

Re: Combining 2 data series into one

2017-06-28 Thread Paul Barry
ooks/03.07-Merge-and-Join.ipynb - this should take about 20 minutes to read, and may be of use to you. Paul. On 28 June 2017 at 12:19, Bhaskar Dhariyal wrote: > On Wednesday, 28 June 2017 14:43:48 UTC+5:30, Paul Barry wrote: > > This should do it: > > > > >>> impo

Re: Combining 2 data series into one

2017-06-28 Thread Paul Barry
2017 at 07:11, Bhaskar Dhariyal wrote: > Hi! > > I have 2 dataframe i.e. df1['first_name'] and df2['last_name']. I want to > make it as df['name']. How to do it using pandas dataframe. > > first_name > -- > bhaskar >

Re: A Good Tutorial on Python Decorators

2017-06-27 Thread Paul Barry
projects/py-decorators-tutorial > > > > "No Results found." > > > > -- > > To email me, substitute nowhere->runbox, invalid->com. > > -- > > https://mail.python.org/mailman/listinfo/python-list > > > -- > https://mail

Fwd: Unable to convert pandas object to string

2017-06-25 Thread Paul Barry
Forgot to include this reply to the list (as others may want to comment). -- Forwarded message -- From: Paul Barry Date: 24 June 2017 at 12:21 Subject: Re: Unable to convert pandas object to string To: Bhaskar Dhariyal Note that .info(), according to its docs, gives you a

Re: Unable to convert pandas object to string

2017-06-24 Thread Paul Barry
google.com/file/d/0B1D4AyluMGU0enoxbElGTV94Q0E/view?usp=drive_web> > ​here it is thanks for quick reply > > On Sat, Jun 24, 2017 at 3:14 PM, Paul Barry > wrote: > >> Any chance you could post one line of data so we can see what we have to >> work with? >> >>

Re: Unable to convert pandas object to string

2017-06-24 Thread Paul Barry
help > -- > https://mail.python.org/mailman/listinfo/python-list > -- Paul Barry, t: @barrypj <https://twitter.com/barrypj> - w: http://paulbarry.itcarlow.ie - e: paul.ba...@itcarlow.ie Lecturer, Computer Networking: Institute of Technology, Carlow, Ireland. -- https://mail.python.org/mailman/listinfo/python-list

Re: Instagram: 40% Py3 to 99% Py3 in 10 months

2017-06-16 Thread Paul Barry
rry Reedy > escreveu: > > > https://thenewstack.io/instagram-makes-smooth-move-python-3/ > > -- > > Terry Jan Reedy > > > > -- > > https://mail.python.org/mailman/listinfo/python-list > > > -- > https://mail.python.org/mailman/listinfo/python-list >

Re: Does Python need Javascript?

2017-06-15 Thread Paul Barry
Life is too short... 😉 On 15 Jun 2017 08:17, "Steven D'Aprano" wrote: Now that Java 8 includes a Javascript interpreter (Nashorn) as part of the JDK, and since Javascript is The Future™, does Python need a Javascript interpreter in the standard library? If Python came with a Javascript interpre

Re: data structure

2017-06-15 Thread Paul Barry
ct): > a = '' > b = '' > def __init__(self): > a= 'aa' > b= 'ab' > > class ClassB(object): > def __init__(self): > self.c = 'ba' > self.d = 'bb' > > def main(): > obja = ClassA > objb = ClassB > > sets = set(obja, objb) > contracts[1] = sets > > print('Sets ', contracts) > > # with the logic like ( not working too) > if obja.a = 'aa': > contracts[1].obja.a = 'ABC' > > > if __name__ == '__main__': > main() > > > ### code end > > appreciate your guidance > -- > https://mail.python.org/mailman/listinfo/python-list > -- Paul Barry, t: @barrypj <https://twitter.com/barrypj> - w: http://paulbarry.itcarlow.ie - e: paul.ba...@itcarlow.ie Lecturer, Computer Networking: Institute of Technology, Carlow, Ireland. -- https://mail.python.org/mailman/listinfo/python-list

Re: Time Calculation to Tag a Sentence/File (Posting On Python-List Prohibited)

2017-06-09 Thread Paul Barry
th Java, so we try to work around Python2.x. > -- > https://mail.python.org/mailman/listinfo/python-list > -- Paul Barry, t: @barrypj <https://twitter.com/barrypj> - w: http://paulbarry.itcarlow.ie - e: paul.ba...@itcarlow.ie Lecturer, Computer Networking: Institute of Technology, Carlow, Ireland. -- https://mail.python.org/mailman/listinfo/python-list

Re: plot time on X axis

2017-06-07 Thread Paul Barry
al > daily time seriee for several years. Please can someone help me. I would > like to plot on X axis only the values o the year. > > Thanks, > > Conrado > -- > https://mail.python.org/mailman/listinfo/python-list > -- Paul Barry, t: @barrypj <https://twitter.com/bar

Re: How to change variable from list to float

2017-06-05 Thread Paul Barry
1.2, -40.0, 0.4, -5.5, -1.5, -20.0, 0.9, > -3.5, -1.9, -15.0, -13.0, 1.3, -1.3, -3.6, -1.0, -1.1] > azlist = [float(i) for i in azlist] > closestaz = min(azlist, key=lambda x: abs(x - azdegpattrev)) > existattn = azattndic[closestaz] > siglevfromexist = 34.8 + existattn

Re: Is An Element of a Sequence an Object?

2017-06-05 Thread Paul Barry
t; ... > ... def __len__(self): > ... return 10 > >>> s = Squares() > >>> s[9] > 81 > > All 10 squares are generated on-the-fly (though all int objects already > exist due to the small int caching on CPython). > > -- > https://mail.

Announcing SCM Workbench 0.8.6 for Git, Mercurial and Subversion

2017-04-17 Thread Barry Scott
. Barry -- https://mail.python.org/mailman/listinfo/python-list

Python3 C extension how to support dir()

2017-04-14 Thread Barry Scott
rsion all_attr = super( mytype, obj ).__dir__(); all_attr.extend( mytype_variable_names ); I'm not getting inspiration from the python 3.6 sources for this problem. I did find the object_dir function in typeobject.c, but that has not helped get me forward. What am I missing? Barry

Announcing SCM Workbench 0.8.5 GUI for Git, Mercurial (hg) and Subversion (svn)

2017-03-22 Thread Barry Scott
information on SCM Workbench. SCM Workbench is implemented in Python3 using PyQt5, pysvn, GitPython and hglib-python. Barry -- https://mail.python.org/mailman/listinfo/python-list

Re: Moderation and slight change of (de facto) policy

2016-04-18 Thread Barry Warsaw
r some lists, posts start out moderated until the person builds some positive reputation. Then the admin can turn off their moderation bit and their posts will go straight through. Cheers, -Barry -- https://mail.python.org/mailman/listinfo/python-list

RE: subscripting Python 3 dicts/getting the only value in a Python 3 dict

2016-01-12 Thread Emanuel Barry
> Hi all, > > Seemingly simple problem: > > There is a case in my code where I know a dictionary has only one item in it. > I want to get the value of that item, whatever the key is. > > In Python2 I'd write: > > >>> d = {"Wilf's Cafe": 1} > >>> d.values()[0] > 1 The equivalent in Python 3 is

RE: Python 3.4.4 Install

2016-01-11 Thread Emanuel Barry
> Date: Sat, 9 Jan 2016 14:25:40 -0800 > Subject: Python 3.4.4 Install > From: cjwilliam...@gmail.com > To: python-list@python.org > > The reponse is not understood. Which response? Obviously Python's, but response to what? More context would be useful. > *** Python 3.4.4rc1 (v3.4.4rc1:04f3f72589

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-12 Thread Barry Warsaw
code that would still benefit a significant population if it got ported to Python 3. By far Python 3 is a better language, with a better stdlib, so the work is worth it. Cheers, -Barry -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-11 Thread Barry Warsaw
eclare victory yet, and there will always be legacy code for which there just aren't the resources to port, I think it's perfectly reasonable for Python 3 to be the default target version for any new code (and a lot of existing code). Cheers, -Barry [1] SQLAlchemy replaced Storm, and Fa

Re: How to create an instance of a python class from C++

2014-03-11 Thread Barry Scott
python3. Has docs and examples. Barry PyCXX maintainer. > ( I am relatively new to Python so excuse some of > the following. ) > > In a .py file I create an ABC and then specialize it: > >from MyMod import * >from abc import ABCMeta, abstractmethod > >#

RELEASED: Python 2.6.9 final

2013-10-29 Thread Barry Warsaw
9/NEWS.txt Users on OS X 10.9 (Mavericks) please note that issue 18458, which can crash the interactive interpreter, is *not* fixed in 2.6.9. If this issue affects you, please review the tracker for possible options: http://bugs.python.org/issue18458 Enjoy, -Barry (on behalf of the Pyt

Released: Python 2.6.9 release candidate 1

2013-09-30 Thread Barry Warsaw
g/download/releases/2.6.9/NEWS.txt Many thanks go out to the entire Python community for their contributions and help in making Python 2.6.9 available, especially Jyrki Pulliainen for his patch contributions. Enjoy, -Barry (on behalf of the Python development community) signature.asc Descri

New on python

2013-09-16 Thread Ibrahima Barry
hello everyone, I am a beginner in python programming language, so I need help with the basics, the synthaxes, functions, please help me -- https://mail.python.org/mailman/listinfo/python-list

Re: python: HTTP connections through a proxy server requiring authentication

2013-01-28 Thread Barry Scott
The shipped python library code does not work. See http://bugs.python.org/issue7291 for patches. Barry -- http://mail.python.org/mailman/listinfo/python-list

Re: Forcing Python to detect DocumentRoot

2013-01-19 Thread Barry Scott
by forcing Python to detect > DocumentRoot by itself? In the general case it is not possible. There is no single convention you can use to detect the top of a web site. If you always use apache httpd then read the value of DocumentRoot from httpd.conf Barry -- http://mail.python.org/mailman/listinfo/python-list

Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-03 Thread Barry Scott
vn Client Example? Its a rather over the top date and time parser I wrote a long long time ago. (Which is missing some imports, hmm I cannot have tested this for a long time). It can parse things like "yesterday 10:34". Barry -- http://mail.python.org/mailman/listinfo/python-list

Re: Missing something obvious with python-requests

2013-01-03 Thread Barry Scott
The shipped python library code does not work. See http://bugs.python.org/issue7291 for patches. Barry On 3 Jan 2013, at 18:53, Ray Cote wrote: > Hello List: > > I seem to be missing something obvious in terms of using proxies with the > requests module. > I'm using req

Re: Python parsing Bluetooth RFCOMM for 9 bytes

2012-12-13 Thread Barry Dick
> Is the following more like how you want it? > > > > data = "" > > try: > > while True: > > try: > > more = client_socket.recv(9) > > except bluetooth.BluetoothError, b: > > print "Bluetooth Error: ", b > > else: > >

Python parsing Bluetooth RFCOMM for 9 bytes

2012-12-13 Thread Barry Dick
My data looks like this when it comes from the device (biofeedback device). There are 9 bytes in total, and I need to buffer so much, and then poll it for new/recent packets. The start packet unfortunately starts with 0x00 So far the only thing I've found that looks like what I want to do is thi

python\bluetooth / wsgi / apache 2.2

2012-12-13 Thread Barry Dick
I'm wanting to read from my bluetooth device (it just sends data/header with a checksum at the end, in a continuous mode "a biofeedback device") and I'm getting a weird error in my logs not allowing me to use multiple sockets. I guess with wsgi, I'm creating a link/module between the two apis (a

Re: Python does not take up available physical memory

2012-10-22 Thread Barry Scott
memory for other languages like for > instance Ruby? > Python 3.3 has changes to make string storage more efficient. See the whats new page. http://docs.python.org/py3k/whatsnew/3.3.html "more compact unicode strings". Barry -- http://mail.python.org/mailman/listinfo/python-list

Re: Linux shell to python

2012-07-31 Thread Barry Scott
On 30 Jul 2012, at 23:56, Dan Stromberg wrote: > > On Mon, Jul 30, 2012 at 9:26 PM, Barry Scott wrote: > lspci gets all its information from the files in /sys/bus/pci/devices. > > You can use os.listdir() to list all the files in the folder and then open > the files y

Re: Linux shell to python

2012-07-30 Thread Barry Scott
. Barry On 30 Jul 2012, at 17:55, Paul van der Linden wrote: > You can do this with one subprocess.Popen and some python commands. > The alternative is to pipe some subprocess.Popen commands together. > Or for the quick way out (but I think you better stick with bash scripting >

Re: How to import Webkit and object in Official Python (not MacPorts python) without X11.

2012-05-26 Thread Barry Scott
an/listinfo/python-list The PyWebKit binding are not maintained and have problems. You will find yourself getting very frustrated trying to get anything but the trivia working. We ended up writing C++ code to use WebKit on Linux rather then our preferred Python. Barry -- http://mail.python.or

Re: How to call and execute C code in Python?

2012-05-16 Thread Barry Scott
There are many choices rather then raw python C API calls. Boost, PyCXX and ctypes are worth investigating. PyCXX requires you code in C++ but hides lots of the issues of using the Python API from you. It also supports python 2 and 3. Barry - PyCXX maintainer -- http://mail.python.org

Python 3 porting

2012-04-25 Thread Barry Warsaw
ing, and can help you find packages that need resources in getting to Python 3. At the Ubuntu Developer Summit in Oakland, California, May 7-11, 2012, we'll also be holding some sessions on Python 3, so if you're in the area, please come by. http://uds.ubuntu.com/ Cheers, -Barry sign

Re: Python Gotcha's?

2012-04-06 Thread Barry W Brown
On Thursday, April 5, 2012 11:28:01 PM UTC-5, rusi wrote: > On Apr 5, 4:06 pm, Duncan Booth wrote: > > Steven D'Aprano wrote: > > > JSON expects double-quote marks, not single: > > >     v = json.loads("{'test':'test'}")  fails > > >     v = json.loads('{"test":"test"}')  succeeds > > > > You mea

Re: else in try/except

2011-11-14 Thread Barry W Brown
I thought that the point of the else clause is that it is reached only if there is no exception in the try clause. -- http://mail.python.org/mailman/listinfo/python-list

Released: Python 2.6.7

2011-06-03 Thread Barry Warsaw
2.6.7/NEWS.txt Many thanks go out to the entire Python community for their contributions and help in making Python 2.6.7 available. Enjoy, -Barry (on behalf of the Python development community) signature.asc Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Python 2.6.7 release candidate 2 now available

2011-05-20 Thread Barry Warsaw
n.org/download/releases/2.6.7/NEWS.txt Many thanks go out to the entire Python community for their contributions great and small. Enjoy, -Barry (on behalf of the Python development community) signature.asc Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Init a dictionary with a empty lists

2011-02-05 Thread Lisa Fritz Barry Griffin
Hi there, How can I do this in a one liner: maxCountPerPhraseWordLength = {} for i in range(1,MAX_PHRASES_LENGTH+1): maxCountPerPhraseWordLength[i] = 0 Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Released: Python 2.6.6

2010-08-24 Thread Barry Warsaw
y releases of Python 2.6 will be made available. After that date, Python 2.6 will no longer be supported, even for security bugs. My deepest appreciation go out to everyone who has helped contribute fixes great and small, and much testing and bug tracker gardening for Python 2.6.6. Enjoy, -Barry

Python 2.6.6 release candidate 2 now available.

2010-08-17 Thread Barry Warsaw
. We plan on continuing to support source-only security fixes in Python 2.6 for the next five years. My thanks go out to everyone who has contributed with code, testing and bug tracker gardening for Python 2.6.6. The excellent folks on #python-dev are true Pythonic heros. Enjoy, -Barry (on behalf o

Python 2.6.6 release candidate 1 now available

2010-08-04 Thread Barry Warsaw
support security fixes in Python 2.6 for quite some time. My thanks go out to everyone who has helped contribute fixes great and small, and much testing and bug tracker gardening for Python 2.6.6. The excellent folks on #python-dev are true Pythonic heros too. Enjoy, -Barry (on behalf of the

Fetching a gzipped webpage

2010-05-26 Thread Barry
gzipper.read() print(data) However it gives the error: Traceback (most recent call last): File "test.py", line 9, in TypeError: initial_value must be str or None, not bytes How should I be doing this for Python 3? Thanks Barry -- http://mail.python.org/mailman/listinfo/python-list

Re: UnicodeDecodeError having fetch web page

2010-05-25 Thread Barry
On 25 Maj, 21:39, Philip Semanchuk wrote: > On May 25, 2010, at 3:13 PM, Barry wrote: > > > > > Hi, > > > The code below is giving me the error: > > > Traceback (most recent call last): > >  File "C:\Users\Administratör\Desktop\test.py", li

UnicodeDecodeError having fetch web page

2010-05-25 Thread Barry
Hi, The code below is giving me the error: Traceback (most recent call last): File "C:\Users\Administratör\Desktop\test.py", line 4, in UnicodeDecodeError: 'utf8' codec can't decode byte 0x8b in position 1: unexpected code byte What am i doing wrong?

RELEASED Python 2.6.5

2010-03-19 Thread Barry Warsaw
disk image will be uploaded soon. http://www.python.org/download/releases/2.6.5/ For more information on Python 2.6 in general, please see http://docs.python.org/whatsnew/2.6.html Please report bugs for any Python version in the Python tracker. http://bugs.python.org Enjoy, -Barry

Python 2.6.5 release candidate 2 now available

2010-03-10 Thread Barry Warsaw
problems on OS X have been fixed since rc1, and I'm really hoping we will not have to do an rc3. I'm currently planning on releasing 2.6.5 final on March 19, 2010. Enjoy, -Barry P.S. The Mac installer will hopefully be available soon. signature.asc Description: PGP signatur

Python 2.6.5 release candidate 1 now available

2010-03-02 Thread Barry Warsaw
will do the final release on Monday March 15, 2010. Please test the release candidate as much as possible in the meantime, and help make 2.6.5 a rock solid release! Thanks, -Barry P.S. The Mac installer will hopefully be available soon. signature.asc Description: PGP signature -- http

<    1   2   3   4   5   6   7   >