Re: Converting py files to .exe and .dmg

2015-12-31 Thread Brian Simms
On Tuesday, 29 December 2015 01:09:30 UTC+9, Adam M wrote: > On Monday, December 28, 2015 at 10:35:41 AM UTC-5, Brian Simms wrote: > > Hi there, > > > > I have done a lot of looking around online to find out how to convert > > Python files to .exe and .dmg files, but I am confused. Could someone

Re: Newbie: Check first two non-whitespace characters

2015-12-31 Thread Cameron Simpson
On 31Dec2015 18:38, MRAB wrote: On 2015-12-31 18:18, otaksoftspamt...@gmail.com wrote: I need to check a string over which I have no control for the first 2 non-white space characters (which should be '[{'). The string would ideally be: '[{...' but could also be something like ' [ { '.

Re:

2015-12-31 Thread paul . hermeneutic
Please provide a few more clues about the problem. What is the problem? On Thu, Dec 31, 2015 at 1:05 PM, ebuka ogbonnaya wrote: > I use window 7 (32-bit). so i dont know what else to do. please i need a > solution to that > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://

Re: Happy New Year

2015-12-31 Thread Steven D'Aprano
On Fri, 1 Jan 2016 12:06 pm, Igor Korot wrote: > Happy New Year to everybody on those lists. Let this year brings us a > lot of happiness and joy. > Lets keep the train rolling and make the upcoming year better. Thanks Igor! To lurkers and contributors, newbies and experts, and even the more e

Re: Newbie: Check first two non-whitespace characters

2015-12-31 Thread Random832
otaksoftspamt...@gmail.com writes: > I need to check a string over which I have no control for the first 2 > non-white space characters (which should be '[{'). > > The string would ideally be: '[{...' but could also be something like > ' [ { '. > > Best to use re and how? Something else? I

Re: Where are we in the Python 3 transition?

2015-12-31 Thread mm0fmf via Python-list
On 31/12/2015 16:12, Mark Lawrence wrote: "Or, how the Kübler-Ross model aptly applies to Python 3". http://www.snarky.ca/the-stages-of-the-python-3-transition I thought I had a need for asyncio and that means Python3. So I started converting some web facing apps to Python3 for practice and

Re: Newbie: Check first two non-whitespace characters

2015-12-31 Thread Steven D'Aprano
On Fri, 1 Jan 2016 05:18 am, otaksoftspamt...@gmail.com wrote: > I need to check a string over which I have no control for the first 2 > non-white space characters (which should be '[{'). > > The string would ideally be: '[{...' but could also be something like > ' [ { '. > > Best to use

Re: Newbie: Check first two non-whitespace characters

2015-12-31 Thread Steven D'Aprano
On Fri, 1 Jan 2016 10:25 am, Mark Lawrence wrote: > Congratulations for writing up one of the most overengineered pile of > cobblers I've ever seen. You should get out more. -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Happy New Year

2015-12-31 Thread Igor Korot
Happy New Year to everybody on those lists. Let this year brings us a lot of happiness and joy. Lets keep the train rolling and make the upcoming year better. -- https://mail.python.org/mailman/listinfo/python-list

Re: raise None

2015-12-31 Thread Marko Rauhamaa
Ben Finney : > Chris Angelico writes: >> What Steven's actually advocating is removing a difference between >> Python code and native code. > > Sure, but his proposal is to move in the direction of *less* debugging > information. > > If I could have the traceback continue into the C code and tell

Re: raise None

2015-12-31 Thread Chris Angelico
On Fri, Jan 1, 2016 at 10:36 AM, Mark Lawrence wrote: > On 31/12/2015 23:27, Ben Finney wrote: >> >> Chris Angelico writes: >> >>> On Fri, Jan 1, 2016 at 7:18 AM, Ben Finney >>> wrote: Given how very often such decisions make my debugging tasks needlessly difficult, I'm not seeing

Re: raise None

2015-12-31 Thread Chris Angelico
On Fri, Jan 1, 2016 at 10:27 AM, Ben Finney wrote: > Chris Angelico writes: > >> On Fri, Jan 1, 2016 at 7:18 AM, Ben Finney >> wrote: >> > Given how very often such decisions make my debugging tasks >> > needlessly difficult, I'm not seeing how that's a desirable feature. >> >> What Steven's ac

Re: raise None

2015-12-31 Thread Mark Lawrence
On 31/12/2015 23:27, Ben Finney wrote: Chris Angelico writes: On Fri, Jan 1, 2016 at 7:18 AM, Ben Finney wrote: Given how very often such decisions make my debugging tasks needlessly difficult, I'm not seeing how that's a desirable feature. What Steven's actually advocating is removing a d

Re: raise None

2015-12-31 Thread Ben Finney
Chris Angelico writes: > On Fri, Jan 1, 2016 at 7:18 AM, Ben Finney wrote: > > Given how very often such decisions make my debugging tasks > > needlessly difficult, I'm not seeing how that's a desirable feature. > > What Steven's actually advocating is removing a difference between > Python code

Re: Newbie: Check first two non-whitespace characters

2015-12-31 Thread Mark Lawrence
On 31/12/2015 18:54, Karim wrote: On 31/12/2015 19:18, otaksoftspamt...@gmail.com wrote: I need to check a string over which I have no control for the first 2 non-white space characters (which should be '[{'). The string would ideally be: '[{...' but could also be something like ' [ {

Re: raise None

2015-12-31 Thread Chris Angelico
On Fri, Jan 1, 2016 at 7:18 AM, Ben Finney wrote: > Oscar Benjamin writes: > >> Exactly. The critical technique is looking at the traceback and >> splitting it between what's your code and what's someone else's. >> Hopefully you don't need to look at steves_library.py to figure out >> what you di

Re: Newbie: Check first two non-whitespace characters

2015-12-31 Thread Denis McMahon
On Thu, 31 Dec 2015 10:18:52 -0800, otaksoftspamtrap wrote: > Best to use re and how? Something else? Split the string on the space character and check the first two non blank elements of the resulting list? Maybe something similar to the following: if [x for x in s.split(' ') if x != ''][0:3]

Re: Where are we in the Python 3 transition?

2015-12-31 Thread Ben Finney
Steven D'Aprano writes: > On Fri, 1 Jan 2016 03:12 am, Mark Lawrence wrote: > > > http://www.snarky.ca/the-stages-of-the-python-3-transition > > Nice link Mark, thanks. People sometimes ask me how much Python 2 code I'll be maintaining by the time official Python 2 support ends. I tell them I c

[no subject]

2015-12-31 Thread ebuka ogbonnaya
I use window 7 (32-bit). so i dont know what else to do. please i need a solution to that -- https://mail.python.org/mailman/listinfo/python-list

Re: raise None

2015-12-31 Thread Ben Finney
Oscar Benjamin writes: > Exactly. The critical technique is looking at the traceback and > splitting it between what's your code and what's someone else's. > Hopefully you don't need to look at steves_library.py to figure out > what you did wrong. However if you do need to look at Steve's code >

Re: Complain

2015-12-31 Thread tjohnson
On 12/31/2015 11:24 AM, ebuka ogbonnaya wrote: my name is Ebuka Egbunine, from Nigeria.I studied Geology and mining.Actually i downloaded python3.5(32-bit) successfully on my laptop which operates on 32-bit memory, but the application is not opening, it displays the message " the program can't st

Re: Newbie: Check first two non-whitespace characters

2015-12-31 Thread Cory Madden
I would personally use re here. test_string = ' [{blah blah blah' matches = re.findall(r'[^\s]', t) result = ''.join(matches)[:2] >> '[{' On Thu, Dec 31, 2015 at 10:18 AM, wrote: > I need to check a string over which I have no control for the first 2 > non-white space characters (which should

Re: Complain

2015-12-31 Thread Peter Pearson
On Thu, 31 Dec 2015 08:24:15 -0800, ebuka ogbonnaya wrote: > my name is Ebuka Egbunine, from Nigeria.I studied Geology and > mining.Actually i downloaded python3.5(32-bit) successfully on my laptop > which operates on 32-bit memory, but the application is not opening, it > displays the message " t

Re: Newbie: Check first two non-whitespace characters

2015-12-31 Thread cassius . fechter
Thanks much to both of you! On Thursday, December 31, 2015 at 11:05:26 AM UTC-8, Karim wrote: > On 31/12/2015 19:54, Karim wrote: > > > > > > On 31/12/2015 19:18, snailp...@gmail.com wrote: > >> I need to check a string over which I have no control for the first 2 > >> non-white space characters

Re: Newbie: Check first two non-whitespace characters

2015-12-31 Thread Karim
On 31/12/2015 19:54, Karim wrote: On 31/12/2015 19:18, otaksoftspamt...@gmail.com wrote: I need to check a string over which I have no control for the first 2 non-white space characters (which should be '[{'). The string would ideally be: '[{...' but could also be something like ' [ { .

Re: Complain

2015-12-31 Thread Mark Lawrence
On 31/12/2015 16:24, ebuka ogbonnaya wrote: my name is Ebuka Egbunine, from Nigeria.I studied Geology and mining.Actually i downloaded python3.5(32-bit) successfully on my laptop which operates on 32-bit memory, but the application is not opening, it displays the message " the program can't start

Re: Complain

2015-12-31 Thread tjohnson
On 12/31/2015 11:24 AM, ebuka ogbonnaya wrote: my name is Ebuka Egbunine, from Nigeria.I studied Geology and mining.Actually i downloaded python3.5(32-bit) successfully on my laptop which operates on 32-bit memory, but the application is not opening, it displays the message " the program can't st

Re: Newbie: Check first two non-whitespace characters

2015-12-31 Thread Karim
On 31/12/2015 19:18, otaksoftspamt...@gmail.com wrote: I need to check a string over which I have no control for the first 2 non-white space characters (which should be '[{'). The string would ideally be: '[{...' but could also be something like ' [ { '. Best to use re and how? Someth

Re: Newbie: Check first two non-whitespace characters

2015-12-31 Thread MRAB
On 2015-12-31 18:18, otaksoftspamt...@gmail.com wrote: I need to check a string over which I have no control for the first 2 non-white space characters (which should be '[{'). The string would ideally be: '[{...' but could also be something like ' [ { '. Best to use re and how? Somethin

Newbie: Check first two non-whitespace characters

2015-12-31 Thread otaksoftspamtrap
I need to check a string over which I have no control for the first 2 non-white space characters (which should be '[{'). The string would ideally be: '[{...' but could also be something like ' [ { '. Best to use re and how? Something else? -- https://mail.python.org/mailman/listinfo/pyt

Complain

2015-12-31 Thread ebuka ogbonnaya
my name is Ebuka Egbunine, from Nigeria.I studied Geology and mining.Actually i downloaded python3.5(32-bit) successfully on my laptop which operates on 32-bit memory, but the application is not opening, it displays the message " the program can't start because api-ms-crt runtime-l1-1-0.dll is miss

Re: raise None

2015-12-31 Thread Steven D'Aprano
On Fri, 1 Jan 2016 03:46 am, Oscar Benjamin wrote: [...] > Exactly. The critical technique is looking at the traceback and splitting > it between what's your code and what's someone else's. Hopefully you don't > need to look at steves_library.py to figure out what you did wrong. > However if you d

Re: raise None

2015-12-31 Thread Martin A. Brown
Hi there, >>> At worst it actively misleads the user into thinking that there >>> is a bug in _validate. Is this "user" a software user or another programmer? If a software user, then some hint about why the _validate found unacceptable data might benefit the user's ability to adjust inputs

Python Data Analysis Recommendations

2015-12-31 Thread Rob Gaddi
I'm looking for some advice on handling data collection/analysis in Python. I do a lot of big, time consuming experiments in which I run a long data collection (a day or a weekend) in which I sweep a bunch of variables, then come back offline and try to cut the data into something that makes sense

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2015-12-31 Thread Grant Edwards
On 2015-12-25, Gregory Ewing wrote: > Grant Edwards wrote: >> And don't get me started on those people who use those "integrated >> circuits" instead of transistors, relays, and tubes... > > Transistors? You don't know how good you had it. > In my day we had to poke the dopant atoms into > the sil

Re: raise None

2015-12-31 Thread Oscar Benjamin
On 31 Dec 2015 15:54, "Chris Angelico" wrote: > > On Fri, Jan 1, 2016 at 2:35 AM, Steven D'Aprano wrote: > >> If the user > >> can see the stack trace and work back to the point where they passed > >> something in to your function then how does the extra level hurt? > > > > It hurts precisely bec

Re: Where are we in the Python 3 transition?

2015-12-31 Thread Steven D'Aprano
On Fri, 1 Jan 2016 03:12 am, Mark Lawrence wrote: > "Or, how the Kübler-Ross model aptly applies to Python 3". > > http://www.snarky.ca/the-stages-of-the-python-3-transition Nice link Mark, thanks. -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: raise None

2015-12-31 Thread Johannes Bauer
On 31.12.2015 01:09, Steven D'Aprano wrote: > Obviously this doesn't work now, since raise None is an error, but if it did > work, what do you think? I really like the idea. I've approached a similar problem with a similar solution (also experimented with decorators), but the tracebacks really ar

Where are we in the Python 3 transition?

2015-12-31 Thread Mark Lawrence
"Or, how the Kübler-Ross model aptly applies to Python 3". http://www.snarky.ca/the-stages-of-the-python-3-transition -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: raise None

2015-12-31 Thread Mark Lawrence
On 31/12/2015 00:09, Steven D'Aprano wrote: I have a lot of functions that perform the same argument checking each time: def spam(a, b): if condition(a) or condition(b): raise TypeError if other_condition(a) or something_else(b): raise ValueError if whatever(a): raise SomethingErr

Re: raise None

2015-12-31 Thread Chris Angelico
On Fri, Jan 1, 2016 at 2:35 AM, Steven D'Aprano wrote: >> If the user >> can see the stack trace and work back to the point where they passed >> something in to your function then how does the extra level hurt? > > It hurts precisely because it is one extra level. I acknowledge that it is > *only*

Re: raise None

2015-12-31 Thread Steven D'Aprano
On Thu, 31 Dec 2015 11:19 pm, Oscar Benjamin wrote: > On 31 December 2015 at 04:07, Steven D'Aprano wrote: [...] >> As an implementation detail, exposing it to the user (in the form of a >> line in the stacktrace) doesn't help debugging. At best it is neutral >> (the user reads the error message

Re: using __getitem()__ correctly

2015-12-31 Thread Steven D'Aprano
On Thu, 31 Dec 2015 10:30 pm, Charles T. Smith wrote: > On Thu, 31 Dec 2015 11:21:59 +1100, Ben Finney wrote: > >> Steven D'Aprano writes: >> >>> On Thu, 31 Dec 2015 10:13 am, Ben Finney wrote: >>> >>> > You may be familiar with other languages where the distinction >>> > between “attribute of

Re: using __getitem()__ correctly

2015-12-31 Thread Steven D'Aprano
Hmmm, you seem to be pasting in text from multiple messages, and jumping around in time ("Ian had said, to which I answered") which may get a bit confusing. Hopefully I can answer without getting lost :-) On Thu, 31 Dec 2015 10:17 pm, Charles T. Smith wrote: > On Thu, 31 Dec 2015 10:50:53 +1100,

Re: using __getitem()__ correctly

2015-12-31 Thread Charles T. Smith
On Thu, 31 Dec 2015 12:12:43 +, Oscar Benjamin wrote: > When you write x.attr the name 'attr' is looked up on the object x. This > calls x.__getattribute__('attr'). In turn this checks the dict > associated with the object x i.e. x.__dict__['attr']. This in turn calls > x.__dict__.__getitem__

Re: using __getitem()__ correctly

2015-12-31 Thread Charles T. Smith
On Wed, 30 Dec 2015 17:31:11 -0700, Ian Kelly wrote: >> In any case, I thought that class attributes were, in fact, items of >> __dict__? > > That's correct, but as I said in my previous message, self.attrs and > self.attrs.__dict__ are two different dicts, and you're confusing one > for the othe

Re: raise None

2015-12-31 Thread Oscar Benjamin
On 31 December 2015 at 04:07, Steven D'Aprano wrote: > On Thu, 31 Dec 2015 12:44 pm, Ben Finney wrote: > >> Steven D'Aprano writes: >> >>> Traceback (most recent call last): >>> File "spam", line 19, in this >>> File "spam", line 29, in that >>> File "spam", line 39, in other >>> File "sp

Re: using __getitem()__ correctly

2015-12-31 Thread Oscar Benjamin
On 31 December 2015 at 11:30, Charles T. Smith wrote: >>> Obviously there is a syntax difference between x.attr and x['key'] >> >> Not merely syntax; the attributes of an object are not generally >> available as items of the container. > > > What are the set of ways that an attribute is accessible

Re: using __getitem()__ correctly

2015-12-31 Thread Ben Finney
"Charles T. Smith" writes: > On Thu, 31 Dec 2015 11:21:59 +1100, Ben Finney wrote: > > > Tersely: the relationship between an object and its attributes, is > > not the same as the relationship between a dictionary and its items. > > I understand this to mean that the relationship between a dictio

Re: using __getitem()__ correctly

2015-12-31 Thread Charles T. Smith
On Thu, 31 Dec 2015 11:21:59 +1100, Ben Finney wrote: > Steven D'Aprano writes: > >> On Thu, 31 Dec 2015 10:13 am, Ben Finney wrote: >> >> > You may be familiar with other languages where the distinction >> > between “attribute of an object” is not distinct from “item in a >> > dictionary”. Pyth

Re: using __getitem()__ correctly

2015-12-31 Thread Charles T. Smith
On Thu, 31 Dec 2015 10:50:53 +1100, Steven D'Aprano wrote: > I'm not sure what distinction you're referring to, can you explain? Ian Kelly had said: >> How precisely are you trying to store these: as an attribute, or as a >> dict item? If it's supposed to be in the dict, then why is your >> __ge

Re: how to get names of attributes

2015-12-31 Thread Charles T. Smith
On Thu, 31 Dec 2015 10:58:17 +1100, Steven D'Aprano wrote: (some very good information) Thank you. -- https://mail.python.org/mailman/listinfo/python-list

fabric.network.disconnect_all()

2015-12-31 Thread Ankur Agrawal
hi team, I am not sure that disconnect_all() works correctly for task marked as @parallel Following is code snippet - @parallel def diagnoseTransaction(): with hide('stdout', 'stderr'): output = run(command) main.py: execute(diagnoseTransaction,hosts=hosts_transaction) disconnect_a

Re: PEAK-Rules package.

2015-12-31 Thread Radhika Grover
Hi, Thanks for the reply! I do see different revisions of PEAK-Rules listed on - http://peak.telecommunity.com/snapshots/. However, earlier as part our product installation PEAK-Rules>=0.5a1.dev-r2600 dependency was being fulfilled using easy_install default behavior. So, I think https://pypi.pyt