On Fri, 31 Oct 2014 09:48:10 +1100, Steven D'Aprano wrote:
> MRAB wrote:
>> How about:
>>
>> int(str(obj).strip('"'))
>
> Absolutely not.
>
> obj = '""1\n\n\n\n' # not valid JSON load_int(obj)
> => raises ValueError int(str(obj).strip('"'))
> => wrongly returns 1
How about
#!/us
Roy Smith wrote:
> In article <54521c8f$0$12982$c3e8da3$54964...@news.astraweb.com>,
> Steven D'Aprano wrote:
>
>> Anton wrote:
>>
>> > Let's say I have an incoming list of values *l*. Every element of *l*
>> > can be one of the following options:
>> > 1) an integer value
>> > 2) a string in f
On Thu, Oct 30, 2014 at 9:40 PM, Artur Bercik wrote:
> could you please elaborate 'setx <...>'?
>From a Command Prompt, do 'help setx' for details on how to use setx.
Rustom's suggestion of using regedit is going to be far easier than
using _winreg (which probably shouldn't even be considered as
On Friday, October 31, 2014 7:33:43 AM UTC+5:30, Artur Bercik wrote:
> Dear Dave Angel
>
>
> Thanks for your answer.
>
>
> I am using Python 2.7
>
>
> I want to set it permanently.
> I have to set several variables so it would be easier if I could set them
> from Python.
regedit is scriptab
I have to set several variables so it would be easier if I could set them
from Python.
On Fri, Oct 31, 2014 at 11:36 AM, Rustom Mody wrote:
> On Friday, October 31, 2014 8:01:08 AM UTC+5:30, Zachary Ware wrote:
> > On Thursday, October 30, 2014, Artur Bercik wrote:
> >
> > Dear Dave Angel
> >
>
could you please elaborate 'setx <...>'?
On Fri, Oct 31, 2014 at 11:30 AM, Zachary Ware <
zachary.ware+pyl...@gmail.com> wrote:
> On Thursday, October 30, 2014, Artur Bercik wrote:
>
>> Dear Dave Angel
>>
>> Thanks for your answer.
>>
>> I am using Python 2.7
>>
>> I want to set it permanently.
On Friday, October 31, 2014 8:01:08 AM UTC+5:30, Zachary Ware wrote:
> On Thursday, October 30, 2014, Artur Bercik wrote:
>
> Dear Dave Angel
>
>
> Thanks for your answer.
>
>
> I am using Python 2.7
>
>
> I want to set it permanently.
> I have to set several variables so it would be easier
On Thursday, October 30, 2014, Artur Bercik wrote:
> Dear Dave Angel
>
> Thanks for your answer.
>
> I am using Python 2.7
>
> I want to set it permanently.
> I have to set several variables so it would be easier if I could set them
> from Python.
>
Depending on how "permanently" you mean, about
Dear Dave Angel
Thanks for your answer.
I am using Python 2.7
I want to set it permanently.
I have to set several variables so it would be easier if I could set them
from Python.
Hearing the solution.
On Fri, Oct 31, 2014 at 10:50 AM, Dave Angel wrote:
> On 10/30/2014 09:22 PM, Artur Bercik
On 10/30/2014 6:21 PM, Joel Goldstick wrote:
On Thu, Oct 30, 2014 at 5:30 PM, Virgil Stokes wrote:
While running a python program I need to save some of the data that is being
created. I would like to save the data to a file on a disk according to a
periodical schedule (e.g. every 10 minutes).
On 10/30/2014 09:22 PM, Artur Bercik wrote:
I have to set environmental variable in my windows PC as follows:
variable name: GISBASE
value: C:\GRASS-64
Is it possible to set it from python?
Which Python? I'll have to assume 3.x
import sys
sys.path.append("C:\\GRASS-64")
But how to give
Why not just call the save function as a separate thread?
threading.Thread(target=save, args=(data)).start()
--
https://mail.python.org/mailman/listinfo/python-list
has just been made compatible with Python 3! It runs on everything from 2.4 forward, haven't testing anything prior to
that.
It is available for download at https://pypi.python.org//pypi/antipathy
---
Antipathy -- for
On Thursday, October 30, 2014 2:37:54 PM UTC-7, Seymore4Head wrote:
> On Thu, 30 Oct 2014 14:28:19 -0700, Larry Hudson
> wrote:
>
> >On 10/30/2014 01:16 PM, Seymore4Head wrote:
> >> class pet:
> >> def set_age(self,age):
> >> self.age=age
> >> def get_age(self):
> >> r
I have to set environmental variable in my windows PC as follows:
variable name: GISBASE
value: C:\GRASS-64
Is it possible to set it from python?
import sys
sys.path.append("C:\\GRASS-64")
But how to give variable name? I have to set both the variable name and
value.
Thanks in the advance.
On 30Oct2014 17:58, Kiuhnm wrote:
On Friday, October 31, 2014 1:33:07 AM UTC+1, Cameron Simpson wrote:
On 29Oct2014 08:34, gandalf23 wrote:
>OT: how can I hide my email in these posts?
>Every time I try to send a post, google warns me that my email is visible and
so I edit it out.
Why would y
On Friday, October 31, 2014 1:33:07 AM UTC+1, Cameron Simpson wrote:
> On 29Oct2014 08:34, gandalf23 wrote:
> >OT: how can I hide my email in these posts?
> >Every time I try to send a post, google warns me that my email is visible
> >and so I edit it out.
>
> Why would you want to hide your emai
In article <54521c8f$0$12982$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> Anton wrote:
>
> > Let's say I have an incoming list of values *l*. Every element of *l* can
> > be one of the following options:
> > 1) an integer value
> > 2) a string in form of '', e.g. '7'
> > 3) a
On 29Oct2014 08:34, gandal...@mail.com wrote:
OT: how can I hide my email in these posts?
Every time I try to send a post, google warns me that my email is visible and
so I edit it out.
Why would you want to hide your email?
Cameron Simpson
--
https://mail.python.org/mailman/listinfo/python
MRAB wrote:
> On 2014-10-30 11:10, Steven D'Aprano wrote:
>> Anton wrote:
>>
>>> Let's say I have an incoming list of values *l*. Every element of *l*
>>> can be one of the following options:
>>> 1) an integer value
>>> 2) a string in form of '', e.g. '7'
>>> 3) a string with a json serialization
On Thu, Oct 30, 2014 at 5:30 PM, Virgil Stokes wrote:
> While running a python program I need to save some of the data that is being
> created. I would like to save the data to a file on a disk according to a
> periodical schedule (e.g. every 10 minutes). Initially, the amount of data
> is small
Thanks Terry
Yes both lines where in the traceback using tb_next I got what I needed.
Regards,
Néstor
On Thu, Oct 30, 2014 at 1:36 PM, Terry Reedy wrote:
> On 10/30/2014 8:33 AM, Néstor Boscán wrote:
>
> I'm using Python 2.7 and I'm creating a class decorator that extract
>> information from
While running a python program I need to save some of the data that is
being created. I would like to save the data to a file on a disk
according to a periodical schedule (e.g. every 10 minutes). Initially,
the amount of data is small (< 1 MB) but after sometime the amount of
data can be >10MB
On Thu, 30 Oct 2014 14:28:19 -0700, Larry Hudson
wrote:
>On 10/30/2014 01:16 PM, Seymore4Head wrote:
>> class pet:
>> def set_age(self,age):
>> self.age=age
>> def get_age(self):
>> return self.age
>> pax=pet
>> pax.set_age(4)
>>
>> Traceback (most recent call last):
>
On 10/30/2014 01:16 PM, Seymore4Head wrote:
class pet:
def set_age(self,age):
self.age=age
def get_age(self):
return self.age
pax=pet
pax.set_age(4)
Traceback (most recent call last):
File "C:\Functions\test.py", line 18, in
pax.set_age(4)
TypeError: set_age(
On Thu, 30 Oct 2014 13:34:04 -0700, Rob Gaddi
wrote:
>On Thu, 30 Oct 2014 16:16:51 -0400
>Seymore4Head wrote:
>
>> class pet:
>> def set_age(self,age):
>> self.age=age
>> def get_age(self):
>> return self.age
>> pax=pet
>> pax.set_age(4)
>>
>> Traceback (most recent cal
On Thu, 30 Oct 2014 13:33:01 -0700 (PDT), sohcahto...@gmail.com wrote:
>On Thursday, October 30, 2014 1:19:57 PM UTC-7, Seymore4Head wrote:
>> class pet:
>> def set_age(self,age):
>> self.age=age
>> def get_age(self):
>> return self.age
>> pax=pet
>> pax.set_age(4)
>>
>>
On Thursday, October 30, 2014 1:19:57 PM UTC-7, Seymore4Head wrote:
> class pet:
> def set_age(self,age):
> self.age=age
> def get_age(self):
> return self.age
> pax=pet
> pax.set_age(4)
>
> Traceback (most recent call last):
> File "C:\Functions\test.py", line 18, in
>
On Thu, 30 Oct 2014 16:16:51 -0400
Seymore4Head wrote:
> class pet:
> def set_age(self,age):
> self.age=age
> def get_age(self):
> return self.age
> pax=pet
> pax.set_age(4)
>
> Traceback (most recent call last):
> File "C:\Functions\test.py", line 18, in
> pax.se
class pet:
def set_age(self,age):
self.age=age
def get_age(self):
return self.age
pax=pet
pax.set_age(4)
Traceback (most recent call last):
File "C:\Functions\test.py", line 18, in
pax.set_age(4)
TypeError: set_age() missing 1 required positional argument: 'age'
I
Python 2.7.6 on Mint, pySerial 2.6
I'm trying to write a console app to control a certain device via a usb com
port.
In miniterm (-p /dev/ttyUSB0 -e -b 19200), I can communicate correctly with
this configuration:
--- Settings: /dev/ttyUSB0 19200,8,N,1
--- RTS: inactive DTR: inactive BREAK:
On 10/30/2014 8:33 AM, Néstor Boscán wrote:
I'm using Python 2.7 and I'm creating a class decorator that extract
information from exceptions for logging purposes.
Everytime an exception is raised from the original function and I
extract the origin of the exception with sys.exc_info() I get a
re
On 10/30/2014 8:30 AM, C@rlos wrote:
thanks U, but the real problem is:
i have a path C:\Users\yanet\Desktop\áaaéeeíiiióooúuuñnn
this path is correct, áaaéeeíiiióooúuuñnn is the name of a directory
but when i try to use os.walk() usin this path, dont work, for os this
> path dont exist, i try e
On 10/30/2014 8:20 AM, Peter Otten wrote:
ast wrote:
I just updated this morning my Python from a 3.3rc to 3.4
(Windows) and I noticed that the 'Green' color in tkinter
GUI is not the same at all.
'Green' in 3.4 is very dark. I had to replace it with 'Lime' to
get back a nice 'Green'.
More l
On Thursday, October 30, 2014 10:53:13 PM UTC+5:30, Joshua Landau wrote:
> On 29 October 2014 03:22, Rustom Mody wrote:
> > Yesterday I was trying to introduce python to some senior computer
> > scientists.
> >
> > Tried showing a comprehension-based dir-walker vs a for-loop based one:
> >
> > de
On 29 October 2014 03:22, Rustom Mody wrote:
> Yesterday I was trying to introduce python to some senior computer scientists.
>
> Tried showing a comprehension-based dir-walker vs a for-loop based one:
>
> def dw(p):
>if isfile(p):
> return [p]
>else:
> return [p] + [c for f in
On Thursday, October 30, 2014 10:40:42 PM UTC+5:30, Ian wrote:
> On Thu, Oct 30, 2014 at 11:01 AM, Rustom Mody wrote:
> > On Wednesday, October 29, 2014 11:49:27 AM UTC+5:30, Zachary Ware wrote:
> >> On Wed, Oct 29, 2014 at 1:11 AM, Rustom Mody wrote:
> >> > On Wednesday, October 29, 2014 11:10:06
On Thu, Oct 30, 2014 at 11:09 AM, Ian Kelly wrote:
> On Thu, Oct 30, 2014 at 11:01 AM, Rustom Mody wrote:
>> On Wednesday, October 29, 2014 11:49:27 AM UTC+5:30, Zachary Ware wrote:
>>> On Wed, Oct 29, 2014 at 1:11 AM, Rustom Mody wrote:
>>> > On Wednesday, October 29, 2014 11:10:06 AM UTC+5:30,
On Thu, Oct 30, 2014 at 11:01 AM, Rustom Mody wrote:
> On Wednesday, October 29, 2014 11:49:27 AM UTC+5:30, Zachary Ware wrote:
>> On Wed, Oct 29, 2014 at 1:11 AM, Rustom Mody wrote:
>> > On Wednesday, October 29, 2014 11:10:06 AM UTC+5:30, Zachary Ware wrote:
>> >> Of course, that's 3 (progressiv
On Wednesday, October 29, 2014 11:49:27 AM UTC+5:30, Zachary Ware wrote:
> On Wed, Oct 29, 2014 at 1:11 AM, Rustom Mody wrote:
> > On Wednesday, October 29, 2014 11:10:06 AM UTC+5:30, Zachary Ware wrote:
> >> Of course, that's 3 (progressively shorter) loops to get the names of
> >> the ABCs of a c
- Original Message -
> From: "Peter Otten" <__pete...@web.de>
> To: python-list@python.org
> Sent: Thursday, 30 October, 2014 1:45:42 PM
> Subject: Re: When using a decorator exceptions raised reference the decorator
> not the function
>
> Néstor Boscán wrote:
>
> > I'm using Python 2.7
Néstor Boscán wrote:
> I'm using Python 2.7 and I'm creating a class decorator that extract
> information from exceptions for logging purposes.
>
> Everytime an exception is raised from the original function and I extract
> the origin of the exception with sys.exc_info() I get a reference to the
C@rlos wrote:
> thanks U, but the real problem is:
>
> i have a path C:\Users\yanet\Desktop\áaaéeeíiiióooúuuñnn
> this path is correct, áaaéeeíiiióooúuuñnn is the name of a directory
> but when i try to use os.walk() usin this path, dont work, for os this
> path dont exist, i try every things but
Hi
I'm using Python 2.7 and I'm creating a class decorator that extract
information from exceptions for logging purposes.
Everytime an exception is raised from the original function and I extract
the origin of the exception with sys.exc_info() I get a reference to the
line in the decorator where
thanks U, but the real problem is:
i have a path C:\Users\yanet\Desktop\áaaéeeíiiióooúuuñnn
this path is correct, áaaéeeíiiióooúuuñnn is the name of a directory
but when i try to use os.walk() usin this path, dont work, for os this path
dont exist, i try every things but nothing works.
some hel
On 2014-10-30 11:10, Steven D'Aprano wrote:
Anton wrote:
Let's say I have an incoming list of values *l*. Every element of *l* can
be one of the following options:
1) an integer value
2) a string in form of '', e.g. '7'
3) a string with a json serialization of an integer value, e.g. '"7"'
4) so
ast wrote:
> I just updated this morning my Python from a 3.3rc to 3.4
> (Windows) and I noticed that the 'Green' color in tkinter
> GUI is not the same at all.
>
> 'Green' in 3.4 is very dark. I had to replace it with 'Lime' to
> get back a nice 'Green'.
More likely the color is defined by tcl/
Hi
I just updated this morning my Python from a 3.3rc to 3.4
(Windows) and I noticed that the 'Green' color in tkinter
GUI is not the same at all.
'Green' in 3.4 is very dark. I had to replace it with 'Lime' to
get back a nice 'Green'.
--
https://mail.python.org/mailman/listinfo/python-list
Anton wrote:
> Let's say I have an incoming list of values *l*. Every element of *l* can
> be one of the following options:
> 1) an integer value
> 2) a string in form of '', e.g. '7'
> 3) a string with a json serialization of an integer value, e.g. '"7"'
> 4) something else that should be ignor
On Thu, Oct 30, 2014 at 11:03 AM, C@rlos wrote:
> i cant print any accent(á é í ó ú) or ñ in console when i use windows OS
> with python, the console showme an error or extrangers characters in some
> cases, i need help
What version of Python? What is your code page set to?
Windows and Unicode
Hi All,
I'm pleased to announce the release of testfixtures 4.1.1. This is a
bugfix release that fixes the following:
- Fix bug that prevented logger propagation to be controlled by the
log_capture decorator.
Thanks to John Kristensen for the fix.
It looks like I also forgot to send out th
i cant print any accent(á é í ó ú) or ñ in console when i use windows OS with
python, the console showme an error or extrangers characters in some cases, i
need help
III Escuela Internacional de Invierno en la UCI del 17 al 28 de febrero del
2014. Ver www.uci.cu
--
https://mail.python.org/ma
52 matches
Mail list logo