I've had a lot of success interacting with the command-line by using the 'sh'
module: http://amoffat.github.io/sh/ It's extremely simple but allows a lot of
advanced features when you need them.
I'm not on a system where fs_cli is avaliable, but you should be able to just
do:
from sh import fs_cli
result = fs_cli('-x')
And put that somewhere useful in your Django code, e.g. in a view or a
management command.
Erik
> Den 8. aug. 2016 kl. 11.33 skrev Asad ur Rehman <[email protected]>:
>
> I want to run fs_cli -x command in django . Can anybody help me ?
> How can i create function in django to execute this command ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/0f9ea28d-37c9-40f2-b67a-b566c3691998%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/114B7906-583D-4E5A-9348-05A34A961DF6%40cederstrand.dk.
For more options, visit https://groups.google.com/d/optout.