bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnubg] Re: Changes in gnubgmodule.c


From: Christian Anthon
Subject: [Bug-gnubg] Re: Changes in gnubgmodule.c
Date: Thu, 3 Sep 2009 00:22:13 +0200

For reasons unknown it is not easy to start an interactive python
session from within a python script so I cooked something quick that
would at least partly emulate a session. Not too important I should
think, but if it turns out that it works reliably with the official
python we could improve on the session code.

I think vista will be ok since we are only reading from another dir,
not writing. But I'll test it.

Christian.

On Wed, Sep 2, 2009 at 5:25 PM, Massimiliano Maini<address@hidden> wrote:
> It seems to work fine except this minor quirk: in python (and in gnubg
> embedded python
> 2.5) if you've assigned a variable "v" a value (like v = [1,2,3]) and
> then you just evaluate "v",
> the resulting value is printed to stdout.
>
> In python2.6.2 embedded in gnubg this does not happen. However, doing
> "print v" works fine.
>
> Another minor thing: with 2.6.2, if the python command issued generates some
> output that should go to stdout but it does not, then the next prompt
> (>>>) has a
> leading space ( >>>), like this:
>
>> (No game) >
>> Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]
>>>>> sys.path        (this should print something but it doesn't)
>>  >>>                   (see the leading space here ?)
>>  >>>
>>  >>>
>>  >>> print 1          (here we do an explicit print)
>>  1
>>>>>                      (now the leading space is gone)
>
> MaX.
>
> P.S.
> The python path seems OK to me:
>
>>>> print sys.path
>  ['D:\\Documents\\gnubg\\python26.zip', 'D:\\Python262\\Lib', 
> 'D:\\Python262\\DL
> Ls', 'D:\\Python262\\Lib\\lib-tk', 'D:\\Documents\\gnubg', 'D:\\Python262', 
> 'D:\
> \Python262\\lib\\site-packages']
>
> What's the meaning of the 'D:\\Documents\\gnubg\\python26.zip' ?
> Does it means that I canzip all the python lib files into the zip and
> Python will see them ?
> Will this work under Vista with UAC on ?
>
>
> 2009/9/2 Massimiliano Maini <address@hidden>:
>> I can compile, but there's something strange at runtime:
>>
>> Old one (2.5): doing sys.path works
>>
>> GNU Backgammon 0.90-mingw 20090825
>> Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 by Gary Wong.
>> Copyright (C) 2009 by Gary Wong and the AUTHORS; for details type `show 
>> version'
>> .
>> This program comes with ABSOLUTELY NO WARRANTY; for details type `show 
>> warranty'
>> .
>> This is free software, and you are welcome to redistribute it under certain 
>> cond
>> itions; type `show copying' for details.
>> 'import site' failed; use -v for traceback
>> (No game) >
>> Python 2.5a2 (trunk:45884M, May  3 2006, 14:24:51)
>> [GCC 3.4.2 (mingw-special)]
>>>>> sys.path
>> ['D:\\Documents\\gnubg\\python25.zip', 'D:\\Python25\\Lib', 
>> 'D:\\Python25\\DLLs'
>> , 'D:\\Python25\\Lib\\lib-tk', '', 'D:\\Documents\\gnubg']
>>>>>
>>
>>
>>
>> New one (2.6.2): sys.path does not seem to work, like may other
>> commands (e.g. import os).
>>
>> GNU Backgammon 0.90-mingw 20090902py26
>> Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 by Gary Wong.
>> Copyright (C) 2009 by Gary Wong and the AUTHORS; for details type
>> `show version'.
>> This program comes with ABSOLUTELY NO WARRANTY; for details type `show
>> warranty'.
>> This is free software, and you are welcome to redistribute it under
>> certain conditions; type `show copying' for details.
>> (No game) >
>> Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]
>>>>> sys.path
>>  >>>
>>  >>>
>>  >>>
>>
>> MaX.
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]