Hi All,
If I get multiline standard output from a command. How can I
retrieve this part of the string "(1006)"
Example:
#Committing...
#Workspace: (1003) "My OS_8.12.0 Work" <-> (1004) "OS_8.12.0"
# Component: (1005) "he-Group" <-> (1004) "OS_8.12.0"
#Outgoing:
# Change sets:
#
Hi All,
I'm executing a command which I want to capture the
standard/stderr output into a file (which I have with the code below),
but I also want the standard output to go into a variable so I can
process the information for the next command. Any ideas? Thanks.
CMD_OUTPUT = subprocess.Pop
On Tue, Aug 16, 2011 at 12:03 AM, Danny Wong (dannwong)
wrote:
> Hi All,
> I'm executing a command which I want to capture the
> standard/stderr output into a file (which I have with the code below),
> but I also want the standard output to go into a variable so I can
> process the informat
Laszlo Nagy wrote:
> Fastest, error-free and simplest solution is to use sets:
>
> >>> l1 = [1,2]
> >>> l2 = [1,2,3,4,5]
> >>> set(l1)-set(l2)
> set([])
> >>> set(l2)-set(l1)
> set([3, 4, 5])
> >>>
Error-free? Not given the stated requirements:
> l1 = [1,2,2,], l2 = [1,2,3,4,5] -> l1 is not
On Aug 16, 4:51 pm, Laszlo Nagy wrote:
> >> hi list,
> >> what is the best way to check if a given list (lets call it l1) is
> >> totally contained in a second list (l2)?
>
> >> for example:
> >> l1 = [1,2], l2 = [1,2,3,4,5] -> l1 is contained in l2
> >> l1 = [1,2,2,], l2 = [1,2,3,4,5] -> l1 is
rantingrick wrote:
> These specific phrases i have pointed out ("used to" and "supposed
> to") are a result of a mind choosing the easy way out instead of
> putting in the wee bit more effort required to express one's self in
> an articulate manner. Also these two phrases are quite prolifically
>
On Tue, Aug 16, 2011 at 12:00 AM, Danny Wong (dannwong)
wrote:
> Hi All,
> If I get multiline standard output from a command. How can I
> retrieve this part of the string "(1006)"
> Example:
>
> #Committing...
> #Workspace: (1003) "My OS_8.12.0 Work" <-> (1004) "OS_8.12.0"
> # Component: (
On Aug 15, 11:51 pm, Laszlo Nagy wrote:
> >> hi list,
> >> what is the best way to check if a given list (lets call it l1) is
> >> totally contained in a second list (l2)?
>
> >> for example:
> >> l1 = [1,2], l2 = [1,2,3,4,5] -> l1 is contained in l2
> >> l1 = [1,2,2,], l2 = [1,2,3,4,5] -> l1 is
Johannes wrote:
> what is the best way to check if a given list (lets call it l1) is
> totally contained in a second list (l2)?
>
> for example:
> l1 = [1,2], l2 = [1,2,3,4,5] -> l1 is contained in l2
> l1 = [1,2,2,], l2 = [1,2,3,4,5] -> l1 is not contained in l2
> l1 = [1,2,3], l2 = [1,3,5,7] ->
Hi all,
I'm learning the python language and i'm trying to create a user if it is
not found in the system.
I figured it out by doing the following thing :
>>> def finduser(user):
... for line in open('/etc/passwd'):
... if line.startswith(user):
... print user,
On 16/08/2011 05:32, snorble wrote:
Anyone know of a Python application running as a Windows service in
production? I'm planning a network monitoring application that runs as
a service and reports back to the central server. Sort of a heartbeat
type agent to assist with "this server is down, go c
Error free? Consider this stated requirement:
l1 = [1,2,2,], l2 = [1,2,3,4,5] -> l1 is not contained in l2
If you look it the strict way, "containment" relation for lists is meant
this way:
l1 = []
l2 = [1,l1,2] # l2 CONTAINS l1
But you are right, I was wrong. So let's clarify what the
On Tue, Aug 16, 2011 at 12:45 AM, smain kahlouch wrote:
> Hi all,
>
> I'm learning the python language and i'm trying to create a user if it is
> not found in the system.
> I figured it out by doing the following thing :
>
def finduser(user):
> ... for line in open('/etc/passwd'):
> ...
snorble wrote:
> If using Visual Studio and C# is the more reliable way, then I'll go
> that route. I love Python, but everything I read about Python services
> seems to have workarounds ahoy for various situations (or maybe that's
> just Windows services in general?).
What workarounds do you mea
On Tue, Aug 16, 2011 at 2:32 AM, Steven D'Aprano
wrote:
> On Tue, 16 Aug 2011 08:15 am Chris Angelico wrote:
>
>> It's actually masking, not reassigning. That may make it easier or
>> harder to resolve the issue.
>
> The usual term is "shadowing builtins", and it's a feature, not a bug :)
Sorry,
On Tue, 16 Aug 2011 12:12 pm Steven D'Aprano wrote:
> On Tue, 16 Aug 2011 09:26 am Johannes wrote:
>
>> hi list,
>> what is the best way to check if a given list (lets call it l1) is
>> totally contained in a second list (l2)?
>
> This is not the most efficient algorithm, but for short lists it
Am 16.08.2011 09:44, schrieb Peter Otten:
> Johannes wrote:
>
>> what is the best way to check if a given list (lets call it l1) is
>> totally contained in a second list (l2)?
>>
>> for example:
>> l1 = [1,2], l2 = [1,2,3,4,5] -> l1 is contained in l2
>> l1 = [1,2,2,], l2 = [1,2,3,4,5] -> l1 is no
On Tue, 16 Aug 2011 04:14 pm ChasBrown wrote:
> On Aug 15, 4:26 pm, Johannes wrote:
>> hi list,
>> what is the best way to check if a given list (lets call it l1) is
>> totally contained in a second list (l2)?
>>
>> for example:
>> l1 = [1,2], l2 = [1,2,3,4,5] -> l1 is contained in l2
>> l1 = [1,
what is the advantage of Django over RoR:)
--
http://mail.python.org/mailman/listinfo/python-list
Am 16.08.2011 09:03 schrieb Danny Wong (dannwong):
Hi All,
I'm executing a command which I want to capture the
standard/stderr output into a file (which I have with the code below),
but I also want the standard output to go into a variable so I can
process the information for the next com
Johannes wrote:
> Am 16.08.2011 09:44, schrieb Peter Otten:
>> Johannes wrote:
>>
>>> what is the best way to check if a given list (lets call it l1) is
>>> totally contained in a second list (l2)?
>>>
>>> for example:
>>> l1 = [1,2], l2 = [1,2,3,4,5] -> l1 is contained in l2
>>> l1 = [1,2,2,], l
On Fri, Aug 12, 2011 at 11:25:06AM +0200, Stefan Behnel wrote:
> przemol...@poczta.fm, 11.08.2011 16:39:
>> On Thu, Aug 11, 2011 at 02:48:43PM +0100, Chris Angelico wrote:
>>> On Thu, Aug 11, 2011 at 2:46 PM, wrote:
This is the way I am going to use.
But what is the best data type to hol
Are there instructions somewhere online as to how to sort out a messed
up installation of Python on a Mac?
I have a 2 month old Macbook running Snow Leopard, I installed Python
2.7.1 some time ago. Now when I run 'python' this is what it shows.
But easy_install and pip are installing modules to the
On Aug 16, 12:03 pm, Christopher Brewster wrote:
> Are there instructions somewhere online as to how to sort out a messed
> up installation of Python on a Mac?
> I have a 2 month old Macbook running Snow Leopard, I installed Python
> 2.7.1 some time ago. Now when I run 'python' this is what it sho
Many things already done in RoR if comparing it with Django.
--
http://mail.python.org/mailman/listinfo/python-list
On 08/16/2011 04:15 AM, smith jack wrote:
what is the advantage of Django over RoR:)
*THE* advantage is that you get to program in Python instead of
Ruby. :)
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
I need to monitor applications like apache, mysql etc there live
status, errors etc on my LAN is there any tool or lib for this any
help will be appreciated thanks in advance
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 16 Aug 2011 01:26:54 +0200, Johannes wrote:
> what is the best way to check if a given list (lets call it l1) is
> totally contained in a second list (l2)?
"Best" is subjective. AFAIK, the theoretically-optimal algorithm is
Boyer-Moore. But that would require a fair amount of code, and Py
We use nagios for such monitoring
On Tue, Aug 16, 2011 at 4:47 PM, Abhishek Bajpai wrote:
> I need to monitor applications like apache, mysql etc there live
> status, errors etc on my LAN is there any tool or lib for this any
> help will be appreciated thanks in advance
> --
> http://mail.python
On Tue, 16 Aug 2011 02:03:50 -0500, Danny Wong (dannwong) wrote:
> I'm executing a command which I want to capture the
> standard/stderr output into a file (which I have with the code below),
> but I also want the standard output to go into a variable so I can
> process the information for t
or shinken ( written in python :) );
Regards,
Sam
2011/8/16 Nitin Pawar
> We use nagios for such monitoring
>
>
> On Tue, Aug 16, 2011 at 4:47 PM, Abhishek Bajpai wrote:
>
>> I need to monitor applications like apache, mysql etc there live
>> status, errors etc on my LAN is there any tool or li
Hello all
Ive had what I think is a great idea for pure-python templates (I can almost
hear the groans, bear with me...)
For the impatient, proof of concept is at http://pastie.org/2379978
demonstrating simple substitution, balanced tags using context manager,
subtemplates, and template inh
In article ,
Chris Rebert wrote:
> pat = re.compile("^ *(\\([^)]+\\))", re.MULTILINE)
First rule of regexes in Python is to always use raw strings, to
eliminate the doubled backslashes:
> pat = re.compile(r"^ *(\([^)]+\))", re.MULTILINE)
Is easier to read.
--
http://mail.python.org/mailman/
it needs read registry, but the python i used is extracted from .zip,
so there is no record in the registry,
what should i do in order to install easy_install for my python environment?
--
http://mail.python.org/mailman/listinfo/python-list
Roy Smith writes:
>> what is the best way to check if a given list (lets call it l1) is
>> totally contained in a second list (l2)?
[...]
> import re
>
> def sublist(l1, l2):
> s1 = ''.join(map(str, l1))
> s2 = ''.join(map(str, l2))
> return re.search(s1, s2)
This is complete nonsen
On Aug 16, 1:33 pm, "Paul Wray" wrote:
> Hello all
>
> Ive had what I think is a great idea for pure-python templates (I can almost
> hear the groans, bear with me...)
>
> For the impatient, proof of concept is athttp://pastie.org/2379978
> demonstrating simple substitution, balanced tags using co
Hi Tim,
Thanks for your reply. It seems this issue is related to python bug -
http://bugs.python.org/issue2528
But the patch code looks complex to me. I want to make changes only in
my python script which will read an user given directory path & check
it's write access. What is the use of posixmo
On Aug 16, 2:17 pm, smith jack wrote:
> it needs read registry, but the python i used is extracted from .zip,
> so there is no record in the registry,
Noone need it, Python dont use any registry key
> what should i do in order to install easy_install for my python environment?
get ez_setup.py f
In article <8739h18rzj@dpt-info.u-strasbg.fr>,
Alain Ketterlin wrote:
> Roy Smith writes:
>
> >> what is the best way to check if a given list (lets call it l1) is
> >> totally contained in a second list (l2)?
>
> [...]
> > import re
> >
> > def sublist(l1, l2):
> > s1 = ''.join(map(s
On Aug 16, 6:32 am, snorble wrote:
> Anyone know of a Python application running as a Windows service in
> production? I'm planning a network monitoring application that runs as
> a service and reports back to the central server. Sort of a heartbeat
> type agent to assist with "this server is down
http://www.nagios.org/
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Aug 16, 2011 at 2:15 AM, smith jack wrote:
> I have created a python environment using virtualenv, but when i want
> to import such environment to PyDev, error just appears,
> it tells there should be a Libs dir, but there is no Libs DIr in the
> virtual envronment created using virtualenv
On Aug 16, 2011, at 1:15 AM, Steven D'Aprano wrote:
> On Tue, 16 Aug 2011 01:23 pm Philip Semanchuk wrote:
>
>>
>> On Aug 15, 2011, at 9:32 PM, Steven D'Aprano wrote:
>>
>>> On Tue, 16 Aug 2011 08:15 am Chris Angelico wrote:
>>>
If you want a future directive that deals with it, I'd do i
Am 16.08.2011 10:04, schrieb Chris Rebert:
> You can replace the /etc/passwd parsing with a call to pwd.getpwnam():
> http://docs.python.org/library/pwd.html#pwd.getpwnam
You should replace it. /etc/passwd is not the only source for users.
/etc/nsswitch.conf may list more user and group sources li
all things works well without --relocatable option, the error info
when using --relocatable option is as follows :
F:\PythonEnv\djangoEnv>virtualenv f:\PythonEnv\djangoEnv2 --relocatable
PYTHONHOME is set. You *must* activate the virtualenv before using it
The environment doesn't have a file f:\P
On 2:59 PM, Nobody wrote:
> On Tue, 16 Aug 2011 01:26:54 +0200, Johannes wrote:
>
>> what is the best way to check if a given list (lets call it l1) is
>> totally contained in a second list (l2)?
> "Best" is subjective. AFAIK, the theoretically-optimal algorithm is
> Boyer-Moore. But that would req
On 2:59 PM, Nobody wrote:
> On Tue, 16 Aug 2011 01:26:54 +0200, Johannes wrote:
>
>> what is the best way to check if a given list (lets call it l1) is
>> totally contained in a second list (l2)?
> "Best" is subjective. AFAIK, the theoretically-optimal algorithm is
> Boyer-Moore. But that would req
On Aug 16, 2:52 am, Tim Golden wrote:
> On 16/08/2011 05:32, snorble wrote:
>
> > Anyone know of a Python application running as a Windows service in
> > production? I'm planning a network monitoring application that runs as
> > a service and reports back to the central server. Sort of a heartbeat
this package is already in the site-packages directory, but i cannot
import it , it's really confusing ...
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 16, 8:23 am, Alain Ketterlin
wrote:
> Roy Smith writes:
> >> what is the best way to check if a given list (lets call it l1) is
> >> totally contained in a second list (l2)?
>
> [...]
>
> > import re
>
> > def sublist(l1, l2):
> > s1 = ''.join(map(str, l1))
> > s2 = ''.join(map(str
Ok than you. You're right but it doesn't help me :
I replaced it :
>>> def finduser(user):
... if pwd.getpwnam(user):
... print user, "user exists"
... return True
... return False
...
>>> finduser('realuser')
realuser user exists
True
>>> finduser('blabla')
Traceba
On Aug 16, 2:07 am, alex23 wrote:
> All the way down indeed. Can you pick who said these?
Obviously your grep skills are superb however you need to brush up on
those reading and comprehension skills a bit.
> "There are noobs watching and we to provide code that can be used to
> teach!"
Yes i s
On Tue, Aug 16, 2011 at 3:13 PM, Philip Semanchuk wrote:
> I am an example. I know enough to turn the theoretical warning on, and I
> would if I could. I have never shadowed a builtin deliberately. I've done it
> accidentally plenty of times. There are 84 builtins in my version of Python
> and
That can be easily fixed:
def sublist(lst1, lst2):
s1 = ','.join(map(str, lst1))
s2 = ','.join(map(str, lst2))
return False if s2.find(s1)==-1 else True
I don't know about best, but it works for the examples given.
For numbers, it will always work. But what about
l
Philip Semanchuk wrote:
On Aug 16, 2011, at 1:15 AM, Steven D'Aprano wrote:
Protecting n00bs from their own errors is an admirable aim, but have you
considered that warnings for something which may be harmless could do more
harm than good?
Isn't the whole point of a warning to highlight behavi
Am 16.08.2011 10:00, schrieb Laszlo Nagy:
>
>> Error free? Consider this stated requirement:
>>> l1 = [1,2,2,], l2 = [1,2,3,4,5] -> l1 is not contained in l2
> If you look it the strict way, "containment" relation for lists is meant
> this way:
>
>
> l1 = []
> l2 = [1,l1,2] # l2 CONTAINS l1
>
On Aug 16, 2011, at 11:12 AM, Chris Angelico wrote:
> On Tue, Aug 16, 2011 at 3:13 PM, Philip Semanchuk
> wrote:
>
>> One need look no further than the standard library to see a strong
>> counterexample. grep through the Python source for " file =". I see dozens
>> of examples of this builti
On Aug 16, 2011, at 11:41 AM, Ethan Furman wrote:
> Philip Semanchuk wrote:
>> On Aug 16, 2011, at 1:15 AM, Steven D'Aprano wrote:
>>> Protecting n00bs from their own errors is an admirable aim, but have you
>>> considered that warnings for something which may be harmless could do more
>>> harm t
Laszlo Nagy writes:
> def sublist(lst1, lst2):
>> s1 = ','.join(map(str, lst1))
>> s2 = ','.join(map(str, lst2))
>> return False if s2.find(s1)==-1 else True
>>
>> I don't know about best, but it works for the examples given.
>>
> For numbers, it will always work.
I'm not even
On 8/16/2011 7:33 AM, Paul Wray wrote:
Hello all
Ive had what I think is a great idea for pure-python templates (I can
almost hear the groans, bear with me...)
For the impatient, proof of concept is at http://pastie.org/2379978
demonstrating simple substitution, balanced tags using context mana
On 8/16/2011 10:57 AM, smain kahlouch wrote:
Ok than you. You're right but it doesn't help me :
I replaced it :
>>> def finduser(user):
... if pwd.getpwnam(user):
... print user, "user exists"
... return True
... return False
...
>>> finduser('realuser')
realuse
On 16.08.2011 16:57, smain kahlouch wrote:
Ok than you. You're right but it doesn't help me :
I replaced it :
>>> def finduser(user):
... if pwd.getpwnam(user):
... print user, "user exists"
... return True
... return False
...
>>> finduser('realuser')
realuser
Philip Semanchuk wrote:
On Aug 16, 2011, at 11:41 AM, Ethan Furman wrote:
Philip Semanchuk wrote:
If we are to eschew warnings in
cases where they might be highlighting something harmless, then we would
have no warnings at all.
>>
Sounds good to me. ;) Keep such things in the IDE's, and the
On 08/16/2011 10:31 AM, Philip Semanchuk wrote:
On Aug 16, 2011, at 11:12 AM, Chris Angelico wrote:
There are several types of shadowing:
1) Deliberate shadowing because you want to change the behavior of the
name. Extremely rare.
2) Shadowing simply by using the name of an unusual builtin (lik
Hi all,
I did it. Finally managed to port mysqltuner.pl to python. Was a
real pain in the butt doing it from bottom up manually, without ever
really learing perl syntax. But i finally got it done. Now i need help
testing it. find it here.
g...@github.com:anandjeyahar/mysqlDbAdmin-python.git.
A
On Tue, Aug 16, 2011 at 12:33 PM, Paul Wray wrote:
> The idea is simply to use python ASTs to transform this code so that it
> accumulates the values of the bare expressions.
That'd be similar to what the interactive loop does. Are you aware,
though, that docstrings are bare expressions? You may
In smith jack
writes:
> this package is already in the site-packages directory, but i cannot
> import it , it's really confusing ...
Is it in the site-packages directory for the particular version of
python you're using?
For example, my system has both python2.3 and python2.5 installed, and
t
On Aug 16, 2011, at 12:19 PM, Ethan Furman wrote:
> Philip Semanchuk wrote:
>> On Aug 16, 2011, at 11:41 AM, Ethan Furman wrote:
>>> Philip Semanchuk wrote:
If we are to eschew warnings in
cases where they might be highlighting something harmless, then we would
have no warnings at
import sys
print sys.path # All directories where Python looks for packages
- Gennadiy
On Tue, Aug 16, 2011 at 11:12 PM, John Gordon wrote:
> In smith jack <
> thinke...@gmail.com> writes:
>
> > this package is already in the site-packages directory, but i cannot
> > import it , it's really
On Aug 16, 9:13 am, Philip Semanchuk wrote:
> "Sometimes X is safe and sometimes it isn't" can be said
> of many, many things, from taking a walk down the street
> to juggling with knives. But it has little to do with
> whether or not Python should issue a warning in the
> specific case we're tal
On 16/08/2011 00:26, Johannes wrote:
hi list,
what is the best way to check if a given list (lets call it l1) is
totally contained in a second list (l2)?
for example:
l1 = [1,2], l2 = [1,2,3,4,5] -> l1 is contained in l2
l1 = [1,2,2,], l2 = [1,2,3,4,5] -> l1 is not contained in l2
l1 = [1,2,3]
Hi all,
Sorry for the repeat post. Had posted earlier in between an
irrelevant thread by accident.
> Hi all,
> I did it. Finally managed to port mysqltuner.pl to python. Was a
> real pain in the butt doing it from bottom up manually, without ever
> really learing perl syntax. But i finally got
Philip Semanchuk wrote:
I think Python does lots of beneficial hand-holding. Garbage collection
> is a good example. $DIETY knows, people have been struggling with manual
> memory management in C and its ilk for a long time. Even though there
> are good tools to help, memory leaks still happen.
On 2011-08-16, smith jack wrote:
> what is the advantage of Django over RoR:)
This question is pretty much... I mean, you're not gonna get useful
answers. They're based on such different languages that I think any
comparison past that is likely going to be uninteresting to a programmer,
and I'm
On 2011-08-16, Steven D'Aprano wrote:
> On Tue, 16 Aug 2011 01:23 pm Philip Semanchuk wrote:
>>> Why should built-ins be treated as more sacred than your own objects?
>> Because built-ins are described in the official documentation as having a
>> specific behavior, while my objects are not.
> *
On 2011-08-16, Ethan Furman wrote:
> I think warnings should be reserved for language changes and such (like
> DeprecationWarning, RuntimeWarning, and FutureWarning), not for possible
> programmer mistakes.
I disagree, on the basis of the following:
The quality of C code I have to deal with ha
On 2011-08-16, Ethan Furman wrote:
> What makes you think it's unintentional?
Programming experience.
People *often* do things unintentionally.
> Seems to me the real issue is somebody using a builtin, such as str or
> int, and that they somehow manage to do this without realizing, "wait a
>
> On Aug 16, 2011, at 1:15 AM, Steven D'Aprano wrote:
...
> A warning that is off by default won't help the people who need it,
> because
> they don't know enough to turn the warning on. A warning that is on by
> default will be helpful to the newbie programmer for the first week or
> so,
> and the
On 2011.08.16 10:44 AM, rantingrick wrote:
> One word: SYNTAX HILIGHT
And I had thought your troll skills had disappeared. Good one.
--
CPython 3.2.1 | Windows NT 6.1.7601.17592 | Thunderbird 5.0
PGP/GPG Public Key ID: 0xF88E034060A78FCB
--
http://mail.python.org/mailman/listinfo/python-list
Seebs wrote:
On 2011-08-16, Ethan Furman wrote:
I think warnings should be reserved for language changes and such (like
DeprecationWarning, RuntimeWarning, and FutureWarning), not for possible
programmer mistakes.
I disagree, on the basis of the following:
The quality of C code I have to de
Seebs wrote:
On 2011-08-16, Ethan Furman wrote:
What makes you think it's unintentional?
Programming experience.
People *often* do things unintentionally.
Seems to me the real issue is somebody using a builtin, such as str or
int, and that they somehow manage to do this without realizing,
Le 16/08/2011 17:56, Alexander Kapps a écrit :
On 16.08.2011 16:57, smain kahlouch wrote:
Ok than you. You're right but it doesn't help me :
I replaced it :
>>> def finduser(user):
... if pwd.getpwnam(user):
... print user, "user exists"
... return True
... retur
On 2011-08-16, nn wrote:
> That can be easily fixed:
>
def sublist(lst1, lst2):
> s1 = ','.join(map(str, lst1))
> s2 = ','.join(map(str, lst2))
> return False if s2.find(s1)==-1 else True
>
sublist([1,2,3],[1,2,3,4,5])
> True
sublist([1,2,2],[1,2,3,4,5])
> False
>>
>Incorrect past tense usage of "used to":
> """ I "used to" wear wooden shoes """
>Incorrect description using "used to":
> """ I have become "used to" wearing wooden shoes """
>Correct usage of "used to":
> """ Wooden shoes can be "used to" torture someone """
Double you tee eff? Maybe this is
On Tue, Aug 16, 2011 at 6:43 PM, Ethan Furman wrote:
> Seebs wrote:
>>
>> On 2011-08-16, Ethan Furman wrote:
>>>
>>> I think warnings should be reserved for language changes and such (like
>>> DeprecationWarning, RuntimeWarning, and FutureWarning), not for possible
>>> programmer mistakes.
>>
>>
Hello,
I'm trying to figure out the recipe to compile Python 2.7.2 on AIX 6.1
with the ctypes module. I'm using the xlc_r compiler V9.0.
I am currently able to generate an interpreter that works, but lacks
the ctypes module because of compilation errors. From looking at the
newgroup posts and bug
On 16/08/2011 18:51, Prasad, Ramit wrote:
Incorrect past tense usage of "used to":
""" I "used to" wear wooden shoes """
Incorrect description using "used to":
""" I have become "used to" wearing wooden shoes """
Correct usage of "used to":
""" Wooden shoes can be "used to" torture someone
On 08/16/2011 12:11 PM, Seebs wrote:
Under which circumstance will you have more problems?
1. There is not a single shadowed built-in in the entire project.
2. There are dozens of shadowed built-ins based on when the original
programmer felt there wasn't going to be a need for a given built-in
On Tue, Aug 16, 2011 at 7:37 PM, Martin P. Hellwig
wrote:
> With the second sentence meaning: in the past I was not used to (i.e.
> uncomfortable, hey bonus points!) wearing wooden shoes, but presently I am
> used to it (although not necessarily comfortable, but at least not
> uncomfortable).
>
T
def wait_for_keystroke():
char=0
while not char==0x1B:
char=msvcrt.getch()
That freezes the process. Am I using the right code for the escape
key, or doing anything else wrong?
Again, I know it could be my system. But I must find a way to do this
from within Windows. I use a keyboard ho
> def wait_for_keystroke():
> char=0
> while not char==0x1B:
> char=msvcrt.getch()
I tried using
while not char==chr(27):
--
http://mail.python.org/mailman/listinfo/python-list
On 2011-08-16, Ethan Furman wrote:
> Seebs wrote:
>> The quality of C code I have to deal with has increased dramatically as
>> gcc's aggressive use of warnings has spread.
> With gcc you pay the cost once, with Python you would pay it with every
> run. A linter would be more along the lines of
On Aug 16, 1:49 am, alex23 wrote:
> On Aug 16, 2:37 pm, rantingrick wrote:
>
> > The reading proceeds naturally from right to left.
>
> Well, "naturally" if you're coding in Hebrew or Japanese perhaps :)
Yes :). I typo-ed that one. It was getting late when i sent that
reply. I did consider posti
On 16/08/2011 19:37, Martin P. Hellwig wrote:
On 16/08/2011 18:51, Prasad, Ramit wrote:
Incorrect past tense usage of "used to":
""" I "used to" wear wooden shoes """
Incorrect description using "used to":
""" I have become "used to" wearing wooden shoes """
Correct usage of "used to":
"""
Thanks chris. I had similar code to what you provided. I included the "#" (it
was a comment in my code) as part of the string when it shouldn't be as part of
my test. As soon as you pointed it out that the #'s aren't supposed to be part
of the output, I removed them and it worked. How dumb of me
On 16-08-11 13:33, Paul Wray wrote:
The idea:
Python syntax allows a statement to be a bare literal or identifier.
These have no effect on the program.
So the function below is legal python:
def myFunc():
'a'
x = 45
'b'; 'c'; x
So is this (within the appropriate class context of course):
def
>1. Indentation as flow control was a bad idea.
>2. People are subconsciously aware of this.
>3. There is a HUGE degree of emotional investment in defending it.
>
>The responses I have seen on this issue are highly emotional, full of insults,
>full of blame-throwing, and utterly contrary to the
>> PS: I will admit that a few of our community members can be rather
>> acerbic at times.
>Yeah. And the thing is... This can't possibly lead to convincing people of
>your position, so presumably the purpose is that you don't want anyone who
>didn't start out agreeing with you to ever come to ag
Thanks for all the discussion on this. Very illuminating. Sorry for
the long delay in responding--deadlines intervened.
I will use the list comprehension syntax for the foreseeable future.
Tim, I agree with you about the slurping in final position--it's
actually quite surprising. As I'm sure you
On Tue, Aug 16, 2011 at 8:26 PM, Prasad, Ramit
wrote:
> I am not sure why people are so stuck on braces. I figured other people would
> be like me and tired of having to do things like figuring out where I missed
> an end brace.
>
I'm one of the fans of braces, but search the list archives and
1 - 100 of 150 matches
Mail list logo