A few more newbie questions 
Author Message
 A few more newbie questions

I'm trying to embedd python in an application and I can't seem to find
any documentation on the Python API. It is mentioned at the beginning of
the Extending and Embedding documentation. It basically says to include
"Python.h". But "Python.h" just includes "allobjects.h" which in turn
includes about 20 other .h files, none of which are documented. The
Extending and Embedding documentation doesn't make any other references
to to the API as far as I can tell except for giving a few pieces of
example code. Am I missing something here?

One more thing. When Python is running in interactive mode, is there any
way to print a message without interfering with what a user may be
typing? For instance, I have a thread that prints out the message "hi
there" ever 5 seconds. How does one get the message "hi there" from
appearing on the line that the user is typing? I'd prefer not to wait
for the user to have to type return or anything special before the
message appears.

Thanks again for any help.

Tony Brusseau



Sat, 28 Feb 1998 03:00:00 GMT  
 A few more newbie questions

Quote:
> I'm trying to embedd Python in an application and I can't seem to find
> any documentation on the Python API. It is mentioned at the beginning of
> the Extending and Embedding documentation. It basically says to include
> "Python.h". But "Python.h" just includes "allobjects.h" which in turn
> includes about 20 other .h files, none of which are documented. The
> Extending and Embedding documentation doesn't make any other references
> to to the API as far as I can tell except for giving a few pieces of
> example code. Am I missing something here?

Not really -- the C API for Python extensions is notoriously
undocumented.  You have two options:

(1) figure it out from the source (reading existing extensions gets
you a long way)

(2) get Python 1.3-BETA-1 and use the new "abstract" object interface;
which is documented extensively through comments in the abstract.h
header file

-- NEWSFLASH! --

(3) since last Friday, there are some on-line docs collected by
Anthony Baxter: http://www.rdt.monash.edu.au/~anthony/python/docs.html

Quote:
> One more thing. When Python is running in interactive mode, is there any
> way to print a message without interfering with what a user may be
> typing? For instance, I have a thread that prints out the message "hi
> there" ever 5 seconds. How does one get the message "hi there" from
> appearing on the line that the user is typing? I'd prefer not to wait
> for the user to have to type return or anything special before the
> message appears.

I'm afraid the Unix I/O handling makes this pretty much impossible.


URL: <http://www.python.org/~guido/>



Sun, 01 Mar 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. A few more newbie questions..

2. Few newbie syntax questions

3. A few newbie questions...

4. a few newbie questions...

5. newbie....a few questions

6. Please asm newbie with few questions

7. Newbie here, a few questions

8. A few newbie questions

9. A few newbie questions

10. Newbie has a few questions

11. Some questions on elided text in the text widget (and a few other text widget questions)

12. Newbie Question (Was: Newbie Question...)

 

 
Powered by phpBB® Forum Software