1 |
Not so simply :) |
2 |
|
3 |
This is a clear way, i think. I havent c++ installed right now as it |
4 |
gives some errors and i havent too much urge yet. |
5 |
|
6 |
Anyway, with piping.. |
7 |
python > /root/test.out < /root/test.in |
8 |
|
9 |
You can write things like "import module" to test.in, then use result |
10 |
from test.out. |
11 |
|
12 |
I did write words "print 'hello!'" to test.in, which left 1 word |
13 |
"hello" into test.out -- of course it's slower than getting it work as |
14 |
realtime interaction :) |
15 |
|
16 |
http://www.math.mcgill.ca/services/linux_basics.php -- there is also |
17 |
command1 | command2 for piping between apps. |
18 |
|
19 |
Tcl script: http://www.cs.mun.ca/~donald/msc/node72.html |
20 |
|
21 |
When i get kdevelop to work here, i will look this thing more and |
22 |
produce some code -- i like it more than Kate :) Anyway, i think that |
23 |
it shouldnt be hard at all :) And using io files, it's achievable now, |
24 |
too. |
25 |
|
26 |
2006/3/15, solar <solar@g.o>: |
27 |
> On Wed, 2006-03-15 at 17:12 +0200, tvali wrote: |
28 |
> > Could :P |
29 |
> > |
30 |
> > Python has this interactive interpreter, what every scripting language has. |
31 |
> |
32 |
> ... |
33 |
> |
34 |
> > If you are able to run command-line app, send keyboard input and catch |
35 |
> > it's output, you're done with it. |
36 |
> > |
37 |
> > You can also write some small python function, which will parse python |
38 |
> > variables into some form, which you can simply parse into something, |
39 |
> > what is easily readable in C. |
40 |
> |
41 |
> An example please. 5 lines of code have more meaning than ~30 emails on |
42 |
> the topic that simply state 'it can be done' |
43 |
> |
44 |
> |
45 |
> > 2006/3/15, solar <solar@g.o>: |
46 |
> > > On Wed, 2006-03-15 at 10:51 +0100, Paul de Vrieze wrote: |
47 |
> > > |
48 |
> > > [snip] |
49 |
> > > |
50 |
> > > > Actually, C++ being strongly related to C, can just use the C python |
51 |
> > > > api's. As such it could directly interface with python, and use the |
52 |
> > > > python portage api. |
53 |
> > > |
54 |
> > > If you could demonstrate an 'import portage' and a simple |
55 |
> > > printf("PORTDIR=%s\n", PORTDIR); in C I'd be highly interested. |
56 |
> > > |
57 |
> > > -- |
58 |
> > > solar <solar@g.o> |
59 |
> > > Gentoo Linux |
60 |
> > > |
61 |
> > > -- |
62 |
> > > gentoo-portage-dev@g.o mailing list |
63 |
> > > |
64 |
> > > |
65 |
> > |
66 |
> > |
67 |
> > -- |
68 |
> > tvali |
69 |
> > (e-mail: "qtvali@×××××.com"; msn: "qtvali@×××××.com"; |
70 |
> > icq: "317-492-912") |
71 |
> > |
72 |
> > Ühe eesti internetifirma lehel kohtasin tsitaati: |
73 |
> > If you don't do it excellently, dont do it at all. Because if it's not |
74 |
> > excellent, it won't be profitable or fun, and if you're not in |
75 |
> > business for fun or profit, what the hell are you doing here? |
76 |
> > Robert Townsend |
77 |
> > |
78 |
> -- |
79 |
> solar <solar@g.o> |
80 |
> Gentoo Linux |
81 |
> |
82 |
> -- |
83 |
> gentoo-portage-dev@g.o mailing list |
84 |
> |
85 |
> |
86 |
|
87 |
|
88 |
-- |
89 |
tvali |
90 |
(e-mail: "qtvali@×××××.com"; msn: "qtvali@×××××.com"; |
91 |
icq: "317-492-912") |
92 |
|
93 |
Ühe eesti internetifirma lehel kohtasin tsitaati: |
94 |
If you don't do it excellently, dont do it at all. Because if it's not |
95 |
excellent, it won't be profitable or fun, and if you're not in |
96 |
business for fun or profit, what the hell are you doing here? |
97 |
Robert Townsend |
98 |
|
99 |
-- |
100 |
gentoo-portage-dev@g.o mailing list |