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



  • 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



  • @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)



  • 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.



  • @dev_lak Thank you very much for letting me know.