[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Is there a way I can make a terminal command in Python? I just
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 6
Thread images: 1
File: index.jpg (2 KB, 299x169) Image search: [Google]
index.jpg
2 KB, 299x169
Is there a way I can make a terminal command in Python? I just want to have a script that grabs a url from a site and echos it, but I can't find a way to do it.
>>
Just write a fucking bash script.
>>
>beautifulsoup
>sys
>requests

That's all you literally need if you really know what you're doing.
>>
>>54922749
>"but I can't find a way to do it"

You didn't search. See : subprocess, os.system()
>>
First you should learn how to use a computer
>>
#!/usr/bin/env/python3
At the top of the file and chmod +x it. Stick it somewhere in your path (I'd suggest ~/bin/ or ~/.bin/) and run it like any other program on the command line.
Also why not >>54922785
Thread replies: 6
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.