Re: internet searching program
No, I mean to search the internet really fast and display only REALLY SPECIFIC information about certain web pages. Like, stuff Google wouldn't have. For instance, in the youtube example, it would name the names of the videos, the url's of them, and the EMBED information without you having to view the site. And BTW, I am extremely new to Python. I am going to buy a few books soon, and I can really start my learning then. And I'll look up some tut's on the 'net in the meantime. -- http://mail.python.org/mailman/listinfo/python-list
Re: internet searching program
Thanks a lot for all of everyones help, I am really looking forward to learning the ins and ous of python or my first programming language. -- http://mail.python.org/mailman/listinfo/python-list
C++: Py_CompileString crash
I run this code in VC++:
#include
#include
#include
using namespace std;
int main(int argc, char *argv[])
{
Py_Initialize();
const char* filename = "asdf.py";
const char* str = "print('lol')";
Py_CompileString(str, filename, 0);
Py_Finalize();
system("PAUSE");
return 0;
}
On running, it immediately crashes.
I use PyRun_SimpleString and other high level stuff from the API with
no problem, but Py_CompileString is not working. I'm probably using it
wrong.
Any help is appreciated.
--
http://mail.python.org/mailman/listinfo/python-list
Re: C++: Py_CompileString crash
On Oct 26, 10:06 am, Christian Heimes wrote:
> KillSwitch wrote:
> > int main(int argc, char *argv[])
> > {
> > Py_Initialize();
>
> > const char* filename = "asdf.py";
>
> > const char* str = "print('lol')";
>
> > Py_CompileString(str, filename, 0);
>
> > Py_Finalize();
> > system("PAUSE");
> > return 0;
> > }
>
> > On running, it immediately crashes.
>
> 0 is wrong here,
> seehttp://docs.python.org/c-api/veryhigh.html?highlight=py_compilestring...
>
> Christian
Yeah that's what I needed, thank you very much.
--
http://mail.python.org/mailman/listinfo/python-list
Embedded python on systems without python installed
I have python successfully embedded in a program I wrote. What files do I need and where do I need to put them so that it can run on systems that don't have python installed? -- http://mail.python.org/mailman/listinfo/python-list
stdin in embedded python
I have a C++ program, with a GUI, into which I have embedded python. I have made several python functions in C++, one of which I use to override the normal stdout and stderr so that they print to a text box of my GUI. One thing I cannot think of how to do is to redefine stdin so that it pauses the program, waits for a user to type input into the box, hit enter, and takes input from another text element and sends it to python like it was the console. I wonder if anyone could help me in trying to do such a thing. To simplify, the new stdin should wait for the C++ function to give it a value, like it waits for the console. -- http://mail.python.org/mailman/listinfo/python-list
Re: stdin in embedded python
On Nov 1, 5:34 am, Dave Angel wrote: > KillSwitch wrote: > > I have a C++ program, with a GUI, into which I have embedded python. I > > have made several python functions in C++, one of which I use to > > override the normal stdout and stderr so that they print to a text box > > of my GUI. One thing I cannot think of how to do is to redefine stdin > > so that it pauses the program, waits for a user to type input into the > > box, hit enter, and takes input from another text element and sends it > > to python like it was the console. > > > I wonder if anyone could help me in trying to do such a thing. To > > simplify, the new stdin should wait for the C++ function to give it a > > value, like it waits for the console. > > I suspect you don't really want to redirect stdin, but instead implement > raw_input(). If you have control over the script, just change it from > raw_input() to cpp_raw_input(). But if you need to be able to run > arbitrary scripts, ... > > (untried) - Try changing __builtins__.raw_input to reference your new > function. > > DaveA But what would the function do? How would it pause python and wait for it to have text to send? -- http://mail.python.org/mailman/listinfo/python-list
Editing a wiki
Hey guys, Is it possible to edit a wiki page with python, including logging in to edit the page, and inserting text into the edit box, etc. I was thinking maybe python would be the language to do this in, because I have to iterate through every line in a text file and gather info about what to enter in the wiki that way, then put that text in a wiki page. It's sort of a program-documenting program. If it's possible to do this, I would make a special way of entering comments in the source files, like maybe --[[##title code here]] and then --[[@@code example here]] with the two symbols at the beginning of the comment dictating what to enter where. Thanks for any input. -- http://mail.python.org/mailman/listinfo/python-list
