You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by crina <ar...@gmail.com> on 2013/01/23 14:11:32 UTC

Python in camel classpath

Hello,

I managed to do a  <to uri="language:python:classpath:file.py" /> in a
spring xml route
But can I execute a python script which is not on the classpath? (imagine
users will configure files and that i will dynamically create my camel
routes using their python files)
Thank you
Crina



--
View this message in context: http://camel.465427.n5.nabble.com/Python-in-camel-classpath-tp5726058.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Python in camel classpath

Posted by crina <ar...@gmail.com>.
thank you
i missed it...not much doc on phyton/jython integration

2013/1/23 Claus Ibsen-2 [via Camel] <ml...@n5.nabble.com>:
> On Wed, Jan 23, 2013 at 2:11 PM, crina <[hidden email]> wrote:
>
>> Hello,
>>
>> I managed to do a  <to uri="language:python:classpath:file.py" /> in a
>> spring xml route
>> But can I execute a python script which is not on the classpath? (imagine
>> users will configure files and that i will dynamically create my camel
>> routes using their python files)
>> Thank you
>> Crina
>>
>
> Yeah
>
> See the section loading scripts from resources
> http://camel.apache.org/language
>
> There is a file: prefix for file based.
>
>
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/Python-in-camel-classpath-tp5726058.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: [hidden email]
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Python-in-camel-classpath-tp5726058p5726074.html
> To unsubscribe from Python in camel classpath, click here.
> NAML



-- 
Crina-Cristiana ARSENIE
Service Quality Apprentice at HP
Master II student in ComputerScience
Univ.of Nice Sophia-Antipolis Polytech
arsenie.crina@gmail.com
+33 648 574 321




--
View this message in context: http://camel.465427.n5.nabble.com/Python-in-camel-classpath-tp5726058p5726080.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Python in camel classpath

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Jan 23, 2013 at 2:11 PM, crina <ar...@gmail.com> wrote:
> Hello,
>
> I managed to do a  <to uri="language:python:classpath:file.py" /> in a
> spring xml route
> But can I execute a python script which is not on the classpath? (imagine
> users will configure files and that i will dynamically create my camel
> routes using their python files)
> Thank you
> Crina
>

Yeah

See the section loading scripts from resources
http://camel.apache.org/language

There is a file: prefix for file based.


>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Python-in-camel-classpath-tp5726058.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Python in camel classpath

Posted by fliot <fr...@liot.org>.
Hi,

The pure route part is clear,

Can you propose pom.xml important sections, Spring namespace declarations,
and jython variables usage (response, etc...) ?

Great thanks,

Francois




--
View this message in context: http://camel.465427.n5.nabble.com/Python-in-camel-classpath-tp5726058p5727146.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Python in camel classpath

Posted by crina <ar...@gmail.com>.
Hello,

My spring route is as the following :

<route id="preprocessing" routePolicyRef="startPolicy">
            <from uri="file://initialFolderPath"/>
            <to uri="language:python:file:preprocessing\JythonPreproc.py"/>
        </route>

this is embedded in a camel context
in the python script I do some manipulations which are after used in other
routes.



--
View this message in context: http://camel.465427.n5.nabble.com/Python-in-camel-classpath-tp5726058p5727144.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Python in camel classpath

Posted by fliot <fr...@liot.org>.
Hi,

Can you post your full example of component, to successfully reach <to
uri="language:python:classpath:file.py" /> in a spring xml route ?

You were mentioning lack of documentation,
It would help all.

Thank you,
Francois



--
View this message in context: http://camel.465427.n5.nabble.com/Python-in-camel-classpath-tp5726058p5727094.html
Sent from the Camel - Users mailing list archive at Nabble.com.