Lanka Developers Community

    Lanka Developers

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Shop

    Is it possible to merge languages such as python and CSS together?

    General Discussion
    python css web development scripting
    3
    4
    843
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • firewalker
      firewalker last edited by

      I'm thinking of designing a CSS web interface to run a python script I made. But I'm left wondering whether it'd be possible to add a user interface to a python script using CSS. Cos its another problem to learn python native web development programmes like flask and Django

      dev_lak 1 Reply Last reply Reply Quote 0
      • dev_lak
        dev_lak @firewalker last edited by

        @firewalker you can run a python script in PHP like below -

        <?php 
        
        $command = escapeshellcmd('/usr/python/myscript.py');
        $output = shell_exec($command);
        echo $output;
        
        ?>
        

        Remember to add below line to top of myscript.py

        #!/usr/bin/env python
        

        Also python script needs correct priviliges and execution permission, and all the commands in python script needs correct priviliges. (For ubuntu server)

        firewalker 1 Reply Last reply Reply Quote 2
        • the_inspired_dev
          the_inspired_dev last edited by

          Well, this question is too board 😐
          But suggest you to check some frameworks line electronJs. You can run python script using a child process. Also check https://github.com/cztomczak/cefpython don't know anything about it.
          At the end of the day you must know most of HTML, CSS and Javascript including xml or json.

          1 Reply Last reply Reply Quote 1
          • firewalker
            firewalker @dev_lak last edited by

            @dev_lak Thank you very much for letting me know.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post

            0
            Online

            3.6k
            Users

            1.3k
            Topics

            5.3k
            Posts

            • Privacy
            • Terms & Conditions
            • Donate

            © Copyrights and All right reserved Lanka Developers Community

            Powered by Axis Technologies (PVT) Ltd

            Made with in Sri Lanka

            | |