Python/IDLE - text in different colours

2005-06-28 Thread Bill Davy
To make life easier for my users, I'd like to colour my prompt string (as handed to raw_input()) a different colour to that produced by print. I'm using Python 2.4.1 and IDLE 1.1.1 on Windows XP. Is it possible, and if so, how? tia, Bill -- http://mail.python.org/mailman/listinfo/pytho

Re: Python/IDLE - text in different colours

2005-06-29 Thread Bill Davy
he result is in Green so the user can see it" "Nathan Pinno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > Bill. > > The way is the click on view, then click script checker, or something > like > that. It will color code the text for you

Re: Python/IDLE - text in different colours

2005-06-29 Thread Bill Davy
the last two lines. Does the window Idle sets up emulate VT100? Hey ho, but many thanks. My user will just have to strain his eyes. Bill PS Thanks for the URL. Interesting. "TouTaTis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Bill Davy" <

(Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-18 Thread Bill Davy
I downlaoded and installed http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi I'm trying to build an extension using SWIG 1.3.24 and the linker needs python24_d.lib (I do not have the DLL either). I've not found it in any of the downloads. So I tried to download the source to build it mys

Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-18 Thread Bill Davy
"A.B., Khalid" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Bill Davy wrote: >> I downlaoded and installed >> http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi >> >> I'm trying to build an extension using SWIG 1.3.24 and the

Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-19 Thread Bill Davy
sion, but I don't remember having to do anything out of the way for the python source. -Jim On 4/18/05, Bill Davy <[EMAIL PROTECTED]> wrote: > > "A.B., Khalid" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Bill Davy wrote: > >>

RE: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-19 Thread Bill Davy
tomer compatibility firts (I have tried to edge them on but without success). Many thanks Bill -Original Message- From: James Carroll [mailto:[EMAIL PROTECTED] Sent: 18 April 2005 18:10 To: Bill Davy; python-list@python.org Subject: Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_

Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-20 Thread Bill Davy
Thank you Khalid, OK. (4) (compile using MSVC6) worked. Now working through various issues to do with paths and naming (_d suffix to root for DEBUG, _ prefix to root for SWIG, and I had not spotted that SWIG makes Module.py that imports _Module.pyd but not _Module_d.pyd for DEBUG builds).

Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-20 Thread Bill Davy
iler which library to link the object files against. Because you're building a _DEBUG build, you magically get the python24_d.lib library. hth, jw On 4/18/05, Bill Davy <[EMAIL PROTECTED]> wrote: > I downlaoded and installed > http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi

Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-21 Thread Bill Davy
Traceback (most recent call last): File "", line 1, in ? NameError: name '_SHIP_d' is not defined >>> "Scott David Daniels" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Bill Davy wrote: >> Thanks Jaime, >> >> I'

Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

2005-04-22 Thread Bill Davy
> Traceback (most recent call last): >> File "", line 1, in ? >> ImportError: No module named SHIP >> > Two common problems here: > 1) There is no file *\SHIP.pyd where * is one entry of sys.path > 2) The capitalization is not correct. The file lookup will succeed, >but then, when "initSHIP(

IDLE: How to point it to the Python executables I want it to see on Windows

2005-04-22 Thread Bill Davy
Assuming they run as a separate thread, I want to point IDLE to .../Debug/Python_d.exe one day and .../Release/Python.exe for the next. Also, is there any easy way to run the .../Debug/Python_d.exe so started under the MSVC debugger? tia, Bill -- http://mail.python.org/mailman/listinfo/py

SWIG/Python2.4.1: "ImportError: dynamic module does not define init function (initSHIP)"

2005-05-04 Thread Bill Davy
Hello, I am using SWIG-1.3.24 to make an extension (called SHIP) to Python2.4.1 and then running under IDLE (if that makes any difference) but when I "import SHIP" I get: >>> import SHIP Traceback (most recent call last): File "", line 1, in -toplevel- import SHIP ImportError: dynamic mo

SWIG/IDLE/Python: F5 SHIP.py works but "import SHIP" gives "ImportError: dynamic module does not define init function (initSHIP)"

2005-05-12 Thread Bill Davy
I am working with MSVC6 on Windows XP. I have created an MSVC project called SHIP I have a file SHIP.i with "%module SHIP" as the first line (file is below). I run SHIP.i through SWIG 1.3.24 to obtain SHIP_wrap.cpp and SHIP.py; the latter contains the line "import _SHIP". I compile SHIP_wrap.c

DLL load failed: The specified procedure could not be found

2005-05-31 Thread Bill Davy
sys.path: H:\Husky\HostPC\V1\SHIP\Debug H:\Husky\HostPC\V1\SHIP E:\Bill\Python-2.4.1\PCbuild\python24_d.zip C:\Python24\Lib C:\Python24\DLLs C:\Python24\Lib\lib-tk H:\Husky\HostPC\V1\RunSHIP H:\Husky\HostPC\V1\Debug C:\Python24 C:\Python24\lib\site-packages Traceback (most recent call la

Re: DLL load failed: The specified procedure could not be found

2005-06-01 Thread Bill Davy
"John Machin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> a) What "specified procedure " >> b) SHIP was made by SWIG > > and so presumably was _SHIP ... therefore it appears that you might be > better off asking for help on the SWIG mailing list. I will too. > >> c) Is there

Python equivt of __FILE__ and __LINE__

2008-02-11 Thread Bill Davy
Writing a quick and dirty assembler and want to give the user the location of an error. The "assembly language" is Python. If the user wants to generat some object code they write something like: Label(LoopLable) Load(R4) Dec() JNZ(LoopLabel) I can use Python to do all the expres

Re: Python equivt of __FILE__ and __LINE__

2008-02-12 Thread Bill Davy
"thebjorn" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Feb 11, 4:55 pm, Gary Herron <[EMAIL PROTECTED]> wrote: >> Bill Davy wrote: >> > Writing a quick and dirty assembler and want to give the user the >> > location >>

Cannot understand error message

2008-02-13 Thread Bill Davy
The following code produces an error message (using Idle with Py 2.4 and 2.5). "There's an error in your program: EOL while scanning single-quoted string". It comes just after "s = ''" (put there to try and isolate the broken string). It would be good if the error message pointed me to the st

Re: Cannot understand error message

2008-02-14 Thread Bill Davy
"Chris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > It doesn't like all that text in the previous one... > > Just before s = '' you have 4 double quotes to close to doc-string > instead of 3. Doh. I had put in the s = '' to see if I could force IDLE to say something more, and

Re: Cannot understand error message

2008-02-14 Thread Bill Davy
"Bruno Desthuilliers" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Bill Davy a écrit : > (snip) >> Doh. > > (snip) > >> Interesting that some colourers work better than others. It must be >> quite a challenge. >> >&g

win32com.client (Howto edit Contacts in Outlook)

2008-07-04 Thread Bill Davy
I am trying to edit Contacts in Outlook. This is so I can transfer numbers from my address book which is an Excel spreadsheet to my mobile phone. I came across the following snippet of code which enabled me to the contacts at least list. I had to root around to discover CdoDefaultFolderContac

Re: win32com.client (Howto edit Contacts in Outlook)

2008-07-04 Thread Bill Davy
"Tim Golden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Bill Davy wrote: >> I am trying to edit Contacts in Outlook. This is so I can transfer >> numbers from my address book which is an Excel spreadsheet to my mobile >> phone. I came

Re: win32com.client (Howto edit Contacts in Outlook)

2008-07-04 Thread Bill Davy
"Bill Davy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Tim Golden" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Bill Davy wrote: >>> I am trying to edit Contacts in Outlook. This is so I can transfe

Re: win32com.client (Howto edit Contacts in Outlook)

2008-07-10 Thread Bill Davy
"Tim Roberts" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Bill Davy" <[EMAIL PROTECTED]> wrote: >> >>I am trying to edit Contacts in Outlook. This is so I can transfer >>numbers >>from my address book which is an

Re: win32com.client (Howto edit Contacts in Outlook)

2008-07-11 Thread Bill Davy
"Tim Golden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Bill Davy wrote: >> I'm not sure OL2003 can read news. I think perhaps some later OL can >> (added tot he View menu, perhaps?). So I use OL Express to read news. >>

Re: win32com.client (Howto edit Contacts in Outlook)

2008-07-11 Thread Bill Davy
"Tim Golden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Bill Davy wrote: >> and since then have been busy with work, and my other job, and the >> garden. > > Aha! So you're English, are you? Looks like you're in the West Country.

Re: win32com.client (Howto edit Contacts in Outlook)

2008-07-12 Thread Bill Davy
"Tim Golden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Bill Davy wrote: >> Traceback (most recent call last): >> File "H:/Personal/OutlookIF1/t2.py", line 18, in >> outlook = win32com.client.gencache.EnsureDispatch >&g

..\..\Python-2.5.2\Include\pyport.h(117) : fatal error C1189: #error : "Python needs a typedef for Py_ssize_t in pyport.h."

2008-07-12 Thread Bill Davy
When I try and compile using VS2003 for Release. Compiles fine for Debug. In a hurry (should be gardening). Any solution? TIA Bill -- http://mail.python.org/mailman/listinfo/python-list

SWIG/C++

2008-04-10 Thread Bill Davy
Is there a better place to post such questions? Anyway, in the hope it is something simple, I would appreciate some help. I am adding some C++ code to Python. From Python I want to be able to read data from a target device, over USB. My software does all the hard work and I have a class: cla

"Python failed to load the default activation context" - should I worry?

2010-06-08 Thread Bill Davy
Loading Python 2.6.5 (built using VC6) in a VC6 application. This appears in my debug log. Am I worried? Should I be? And I am stuck with VC6 (customers, don't ya know). -- http://mail.python.org/mailman/listinfo/python-list

Re: python source code -> win/dos executable (on linux)

2010-07-01 Thread Bill Davy
"Stephen Hansen" wrote in message news:mailman.2344.1277821469.32709.python-l...@python.org... > On 6/29/10 12:27 AM, Lawrence D'Oliveiro wrote: >> In message<4c286d71$0$18654$4fafb...@reader3.news.tin.it>, superpollo >> wrote: >> >>> Lawrence D'Oliveiro ha scritto: Is it really such a

ImportError: DLL load failed: The specified module could not be found, SWIG, life, etc

2010-07-05 Thread Bill Davy
I am struggling :-( I have used SWIG to build a module called SHIP. So I have a directory containing SHIP.py and _SHIP.pyd, as follows: H:\Viper\HostPC\V1\SHIP\Release>dir Volume in drive H has no label. Volume Serial Number is B83B-76F2 Directory of H:\Viper\HostPC\V1\SHIP\Release

Re: ImportError: DLL load failed: The specified module could notbe found, SWIG, life, etc

2010-07-05 Thread Bill Davy
"Thomas Jollans" wrote in message news:mailman.265.1278342154.1673.python-l...@python.org... > On 07/05/2010 04:35 PM, Bill Davy wrote: >> I am struggling :-( > > smile! > >> >> I have used SWIG to build a module called SHIP. So I have a directory >>

Re: missing 'xor' Boolean operator

2009-07-15 Thread Bill Davy
"MRAB" wrote in message news:mailman.3158.1247667680.8015.python-l...@python.org... > Steven D'Aprano wrote: >> On Tue, 14 Jul 2009 11:25:08 -0700, Dr. Phillip M. Feldman wrote: >> >>> Current Boolean operators are 'and', 'or', and 'not'. It would be nice >>> to have an 'xor' operator as well. >

Re: regex: multiple matching for one string

2009-07-23 Thread Bill Davy
"Mark Lawrence" wrote in message news:mailman.3588.1248355389.8015.python-l...@python.org... > scriptlear...@gmail.com wrote: >> For example, I have a string "#a=valuea;b=valueb;c=valuec;", and I >> will like to take out the values (valuea, valueb, and valuec). How do >> I do that in Python? Th

Re: Read C++ enum in python

2009-08-19 Thread Bill Davy
"Mark Tolonen" wrote in message news:mailman.89.1250666942.2854.python-l...@python.org... > > "MRAB" wrote in message > news:4a8b3e2d.7040...@mrabarnett.plus.com... >> Ludo wrote: >>> Hello, >>> >>> I work in a very large project where we have C++ packages and pieces of >>> python code. >>> >>