kath wrote:
> Hi,
>
> Can any one please tell me how is the following code is working?
> ['a','b'] is a list of string
Yes.
> and [True] is list of boolean value.
No. It's the subscription operator applied to the list of strings.
a = ['a', 'b']
a[True]
may be clearer.
> How is it making effe
ed wrote:
> I should also mention that I know C/C++, Perl, Javascript, the basics
> of mySQL, and HTML/CSS. If anyone has tried to enter python from these
> angles, I'd be grateful to hear from you.
What's C/C++?
Well, I knew C, C++, Perl, Java, SQL, and HTML before learning Python. And
some mo
Jerry Hill wrote:
> On 6/15/07, HMS Surprise <[EMAIL PROTECTED]> wrote:
>> I want to print a count down timer on the same line. I tried
>>
>> print '\r', timeLeft,
>>
>> which just appends to the same line.
>
> Sounds to me like whatever you're printing to doesn't do what you
> expect when it
Allen wrote:
> I use try catch, but cannot catch the execeptions of execution python
> method.
>
> PYCALL_API void PyCall(const char * pszModule, const char * pszFunc,
> void * pArg)
> {
> if (pszModule == NULL || pszFunc == NULL)
> {
> return;
> }
>
> Py_Initialize();
>
> PyObject * pModule =
hg wrote:
> Robert Bauck Hamar wrote:
>
>> hg wrote:
>>
>>> Hi,
>>>
>>> I have the following
>>>
>>> * C extention - redir.c
>>>
>>>
>>> #include "Python.h"
>
ntion!\n" goes
> to the console.
>
> Any clue ?
There is no portable way to change the location of stdout during execution
of a program. If you want to print with whatever is sys.stdout from an
extension module, you should call sys.stdout's write method dynamically
from C.
--
Robert Bauck Hamar
--
http://mail.python.org/mailman/listinfo/python-list
.
(rest of message deleted, because I don't comment on it.)
--
Robert Bauck Hamar
Der er to regler for suksess:
1. Fortell aldri alt du vet.
- Roger H. Lincoln
--
http://mail.python.org/mailman/listinfo/python-list