Re: Python Bluetooth

2011-06-26 Thread Daniel Kluev
On Mon, Jun 27, 2011 at 2:32 AM, Valentin de Pablo Fouce wrote: > Hi all, > > I'm looking for developing a bluetooth application in python, and I'm > looking for the most suitable python library for it. Googling some > time I found pyBluez (http://code.google.com/p/pybluez/), however, the > librar

Re: windows 7 create directory with read write execute permission for everybody

2011-06-26 Thread Thorsten Kampe
* Gelonida (Sun, 26 Jun 2011 23:53:15 +0200) > On this machine I used os.mkdir() / os.makedirs() and I had permission > problems , but only on Windows7. Windows file permissions haven't changed since 1995. The only addition was dynamic inheritance support back in 2000. > I expect, that the win3

PyCon AU gender diversity grants for women in Python!

2011-06-26 Thread Timothy Robert Ansell
PyCon AU gender diversity grants for women in Python PyCon AU is pleased to announce that it will be offering two gender diversity delegate grants to women who wish to attend PyCon AU in 2011. These grants will *both* cover full registration cos

Re: windows 7 create directory with read write execute permission for everybody

2011-06-26 Thread Michel Claveau - MVP
Hi! +1 Gelonida confuses "Windows permissions" and "NTFS's rights". (too) Many Windows users are unfamiliar with Windows. @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: windows 7 create directory with read write execute permission for everybody

2011-06-26 Thread Thorsten Kampe
* Gelonida (Sun, 26 Jun 2011 22:57:57 +0200) > What do I have to do under python windows to create a directory with > all permissions, such, that new files / directories created below will > inherit the permissions. Exactly nothing (except creating the directory, of course). > The reason I am ask

Re: Significant figures calculation

2011-06-26 Thread Lalitha Prasad K
In numerical analysis there is this concept of machine zero, which is computed like this: e=1.0 while 1.0+e > 1.0: e=e/2.0 print e The number e will give you the precision of floating point numbers. Lalitha Prasad On Sun, Jun 26, 2011 at 9:05 PM, Harold wrote: > > >I'm curious. Is there

Re: windows 7 create directory with read write execute permission for everybody

2011-06-26 Thread Irmen de Jong
On 26-6-2011 23:53, Gelonida wrote: > > Yep I'm afraid that's the way to go and where I hoped somebody would have a > few tiny > example lines or pointers to the functions in question to be used. Maybe this is a bit of a help: http://timgolden.me.uk/python/win32_how_do_i/add-security-to-a-file.h

Re: windows 7 create directory with read write execute permission for everybody

2011-06-26 Thread Gelonida
On 6/26/2011 11:24 PM, Irmen de Jong wrote: On 26-6-2011 22:57, Gelonida wrote: Hi, What do I have to do under python windows to create a directory with all permissions, such, that new files / directories created below will inherit the permissions. The reason I am asking is, that I'd like to

Re: windows 7 create directory with read write execute permission for everybody

2011-06-26 Thread Irmen de Jong
On 26-6-2011 22:57, Gelonida wrote: > Hi, > > What do I have to do under python windows to create a directory with all > permissions, > such, that new files / directories created below will inherit the permissions. > > > The reason I am asking is, that I'd like to create a directory structure

windows 7 create directory with read write execute permission for everybody

2011-06-26 Thread Gelonida
Hi, What do I have to do under python windows to create a directory with all permissions, such, that new files / directories created below will inherit the permissions. The reason I am asking is, that I'd like to create a directory structure where multiple users should be allowed to read /

Re: Default value for optional parameters unexpected behaviour?

2011-06-26 Thread Corey Richardson
Excerpts from Thomas L. Shinnick's message of Sun Jun 26 14:53:21 -0400 2011: > See reference manual section 7.6 "Function definitions" under the > discussion subtitle "Default parameter values are evaluated when the > function definition is executed. " > > http://docs.python.org/refer

Re: Default value for optional parameters unexpected behaviour?

2011-06-26 Thread Benjamin Kaplan
On Sun, Jun 26, 2011 at 11:28 AM, Marc Aymerich wrote: > Hi, > I'm trying to define a function that has an optional parameter which > should be an empty list whenever it isn't given. However, it takes as > value the same value as the last time the function was executed. What > is the reason of thi

Re: Default value for optional parameters unexpected behaviour?

2011-06-26 Thread Thomas L. Shinnick
At 01:39 PM 6/26/2011, Shashank Singh wrote: On Sun, Jun 26, 2011 at 11:58 PM, Marc Aymerich wrote: > Hi, > I'm trying to define a function that has an optional parameter which > should be an empty list whenever it isn't given. However, it takes as > value the same value as the last time the fun

Re: Default value for optional parameters unexpected behaviour?

2011-06-26 Thread Terry Reedy
On 6/26/2011 2:28 PM, Marc Aymerich wrote: Hi, I'm trying to define a function that has an optional parameter which should be an empty list whenever it isn't given. However, it takes as value the same value as the last time the function was executed. What is the reason of this behaviour? How does

Re: Default value for optional parameters unexpected behaviour?

2011-06-26 Thread Noah Hall
On Sun, Jun 26, 2011 at 7:28 PM, Marc Aymerich wrote: > Hi, > I'm trying to define a function that has an optional parameter which > should be an empty list whenever it isn't given. However, it takes as > value the same value as the last time the function was executed. What > is the reason of this

Re: Default value for optional parameters unexpected behaviour?

2011-06-26 Thread Corey Richardson
Excerpts from Marc Aymerich's message of Sun Jun 26 14:28:30 -0400 2011: > Hi, > I'm trying to define a function that has an optional parameter which > should be an empty list whenever it isn't given. However, it takes as > value the same value as the last time the function was executed. What > is

Re: Python Bluetooth

2011-06-26 Thread Bastian Ballmann
Hi, Am Sun, 26 Jun 2011 13:37:50 -0400 schrieb Terry Reedy : > Were these libraries abandoned incomplete or just finished? Has the > bluetooth spec changed since then? > They're definetly incomplete, but i would say the most important / commonly used apis are implemented. The Bluetooth spec a

Re: Default value for optional parameters unexpected behaviour?

2011-06-26 Thread Shashank Singh
On Sun, Jun 26, 2011 at 11:58 PM, Marc Aymerich wrote: > Hi, > I'm trying to define a function that has an optional parameter which > should be an empty list whenever it isn't given. However, it takes as > value the same value as the last time the function was executed. What > is the reason of thi

Default value for optional parameters unexpected behaviour?

2011-06-26 Thread Marc Aymerich
Hi, I'm trying to define a function that has an optional parameter which should be an empty list whenever it isn't given. However, it takes as value the same value as the last time the function was executed. What is the reason of this behaviour? How does python deal with default values (i.e. when a

can I package a distutil based python app in deb?

2011-06-26 Thread hackingKK
Hello all, I guess the subject line says it all. I want to package a python app to deb. I have 3 interesting issues with it. 1, I would want it to run on Ubuntu 10.04, Ubuntu 10.10, Ubuntu 11.04 and Debian 5. 2, the package depends on another python package which is also distutil based. 3, The

Re: Python Bluetooth

2011-06-26 Thread Terry Reedy
On 6/26/2011 1:07 PM, Bastian Ballmann wrote: you can have a look at http://lightblue.sourceforge.net/ but it also seems to be unactive since end of 2009. schrieb Valentin de Pablo Fouce: I'm looking for developing a bluetooth application in python, and I'm looking for the most suitable py

Re: Python 3 syntax error question

2011-06-26 Thread Terry Reedy
On 6/26/2011 11:28 AM, rzed wrote: steve+comp.lang.pyt...@pearwood.info wrote in Are you aware that you're trying to install a Python2 library under Python3? Thank you all for your responses. Yes, I am aware of the version difference, but not of all the implications of that. I will run this

Re: Python Bluetooth

2011-06-26 Thread Bastian Ballmann
Hi, you can have a look at http://lightblue.sourceforge.net/ but it also seems to be unactive since end of 2009. If you really need a lib thats still under active development and you dont want to switch to C maybe http://sourceforge.net/projects/javabluetooth/ together with Jython is an option?

Re: Python 3 syntax error question

2011-06-26 Thread Jerry Hill
On Sun, Jun 26, 2011 at 11:31 AM, Chris Angelico wrote: > Sure, but you don't _have_ to look at the diff. Just run it through > 2to3 and see how it runs. Never know, it might work direct out of the > box! This has been my experience, by the way. I've used a few small pure python libraries writte

Re: NEED HELP-process words in a text file

2011-06-26 Thread Cousin Stanley
Steven D'Aprano wrote: > If ONE word in uppercase is read in a SLIGHTLY louder voice, > then naturally it doesn't take much imagination TO READ > EVEN QUITE SHORT PASSAGES OF UNINTERRUPTED UPPERCASE WORDS > AS SHOUTING LOUDLY -- And it doesn't take much of a reality check through my own

Re: Significant figures calculation

2011-06-26 Thread Harold
> >I'm curious.  Is there a way to get the number of significant digits > >for a particular Decimal instance? > > Yes: > > def sigdig(x): >     "return the number of significant digits in x" >     return len(x.as_tuple()[1]) Great! that's exactly what I needed. thanks Chris! -- http://mail.python

Python Bluetooth

2011-06-26 Thread Valentin de Pablo Fouce
Hi all, I'm looking for developing a bluetooth application in python, and I'm looking for the most suitable python library for it. Googling some time I found pyBluez (http://code.google.com/p/pybluez/), however, the library seems to be stopped since end 2009 (latest update Nov 2009) and not to man

Re: Python 3 syntax error question

2011-06-26 Thread Noah Hall
On Sun, Jun 26, 2011 at 4:28 PM, rzed wrote: > steve+comp.lang.pyt...@pearwood.info wrote in > news:4e074768$0$29982$c3e8da3$54964...@news.astraweb.com: > >> rzed wrote: >> >>> I've tried to install PySVG in a Python 3 setting, and I get a >>> few errors on the build. Most are easy to fix, but thi

Re: Python 3 syntax error question

2011-06-26 Thread Chris Angelico
On Mon, Jun 27, 2011 at 1:28 AM, rzed wrote: > As to 2to3, I have to say that: > > -def a(b, (c,d)): > +def a(b, xxx_todo_changeme): > +    (c,d) = xxx_todo_changeme > > ... is not terribly revealing if one is unaware of what about it > needs changing. I know, I know: RTFM Sure, but you don't

Re: Python 3 syntax error question

2011-06-26 Thread rzed
steve+comp.lang.pyt...@pearwood.info wrote in news:4e074768$0$29982$c3e8da3$54964...@news.astraweb.com: > rzed wrote: > >> I've tried to install PySVG in a Python 3 setting, and I get a >> few errors on the build. Most are easy to fix, but this one I >> can't explain or fix: >> >> >> Traceback

Re: Python 3 syntax error question

2011-06-26 Thread Noah Hall
On Sun, Jun 26, 2011 at 2:04 PM, rzed wrote: > I've tried to install PySVG in a Python 3 setting, and I get a few > errors on the build. Most are easy to fix, but this one I can't > explain or fix: > > > Traceback (most recent call last): >  File "", line 1, in >  File "builders.py", line 12, in

Re: Python 3 syntax error question

2011-06-26 Thread Peter Otten
rzed wrote: > I've tried to install PySVG in a Python 3 setting, and I get a few > errors on the build. Most are easy to fix, but this one I can't > explain or fix: > > > Traceback (most recent call last): > File "", line 1, in > File "builders.py", line 12, in > from pysvg.shape impor

Re: Python 3 syntax error question

2011-06-26 Thread steve+comp . lang . python
rzed wrote: > I've tried to install PySVG in a Python 3 setting, and I get a few > errors on the build. Most are easy to fix, but this one I can't > explain or fix: > > > Traceback (most recent call last): > File "", line 1, in > File "builders.py", line 12, in > from pysvg.shape impor

Python 3 syntax error question

2011-06-26 Thread rzed
I've tried to install PySVG in a Python 3 setting, and I get a few errors on the build. Most are easy to fix, but this one I can't explain or fix: Traceback (most recent call last): File "", line 1, in File "builders.py", line 12, in from pysvg.shape import * File "C:\Python32\lib\s

Re: What does "shell introspection" mean?

2011-06-26 Thread Thomas 'PointedEars' Lahn
Juan Kinunt wrote: > In the PyDev installation documentation you see this sentence: > > "The Forced builtin libs are the libraries that are built-in the > interpreter, such as __builtin__, sha, etc or libraries that should > forcefully analyzed through shell introspection (the other option to > a