Posts: 2,953
Threads: 48
Joined: Sep 2016
I was thinking you would write a server so that I can see my own IP. 
Anyway, why Flask? I wrote my script to just prints out the response. I've put it in Generic Monitor ( a XFCE4 panel plugin ) so my public IP is always on the panel. The same here with Ubuntu MATE box with Command panel plugin
Posts: 4,653
Threads: 1,496
Joined: Sep 2016
perhaps. if all you need to run is FOO then why run more than FOO? running the bare minimum avoids exposure to more administrative and maintenance complexity. but the level of doing this matters. does it make sense for a major app to be written as an OS? it's been done before (in a case that made sense at the time). i once looked into making a DNS server that ran directly on hardware. i did that once, making a console digital clock that ran on a mainframe without an OS. this can be done more easily these days with all the emulators out there.
now back to writing my python script to get my ip.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 2,953
Threads: 48
Joined: Sep 2016
Hm... Perhaps I see coding a bit different. I have no a motivation to write a code just to see how it happens or as a challenge or practice.
Posts: 4,653
Threads: 1,496
Joined: Sep 2016
Jan-03-2017, 07:11 AM
(This post was last modified: Jan-03-2017, 07:28 AM by Skaperen.)
so what motivates you to write code? do you have any real life examples?
i did write a command/module get my ip address. it gets it from 13 sources (coded in the program as a list of lambda function). it runs 13 child processes, one for each coded source and then pipes the result back to the parent process, which determines the most common answer (using the Counter class in the collections module) and gives that as the result. or you can edit the list of address sources to add, delete, or change any of them.
it's over in the Scripts & Snippets forum.
i have an ip address server already in C. i'm not motivated (yet) to re-do it in another language.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 2,953
Threads: 48
Joined: Sep 2016
Well done
I get motivated from what I need. For instance tracking Amazon prices for specific goods, compressing and encrypting data/files/messages and communication, distributed networks and a few more things. Also, playing with code, trying funny ideas. For the last ones I felt a desire two weeks ago and it doesn't disappear. Which is good
All that is in my head and it is ahead. I don't code right now which is not good because I have to learn. There was lost in my family and I need a bit more time to perk
Posts: 4,653
Threads: 1,496
Joined: Sep 2016
maybe you can automate some things.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 12,046
Threads: 487
Joined: Sep 2016
I will assume you are already aware of this site, but will post it anyway:
Network Sorcery - for The RFC Sourcebook, Internet source list, protocols,
and network security
Posts: 2,953
Threads: 48
Joined: Sep 2016
(Jan-03-2017, 10:50 AM)Larz60+ Wrote: I will assume you are already aware of this site, but will post it anyway:
Network Sorcery - for The RFC Sourcebook, Internet source list, protocols,
and network security
10x! I didn't know it
(Jan-03-2017, 10:38 AM)Skaperen Wrote: maybe you can automate some things. I definitely can. This is one reason why I want to learn Python.
Posts: 7,324
Threads: 123
Joined: Sep 2016
Jan-03-2017, 03:16 PM
(This post was last modified: Jan-03-2017, 03:16 PM by snippsat.)
Quote:Anyway, why Flask?
I mean that we as Python programmer should be better to run your code in browser.
Flask is very good tool for that.
Why is this important?
Look GitHut 2.0,JavaScript is bye far the most popular language.
Not that JavaScript is better than Python,but is unique position to run code in browser.
To have code work on web is not gone be less popular in year to come
Posts: 4,653
Threads: 1,496
Joined: Sep 2016
Jan-05-2017, 02:30 AM
(This post was last modified: Jan-05-2017, 02:37 AM by Skaperen.)
(Jan-03-2017, 10:50 AM)Larz60+ Wrote: I will assume you are already aware of this site, but will post it anyway:
Network Sorcery - for The RFC Sourcebook, Internet source list, protocols,
and network security
i was not aware of it at all. thanks for the link. it looks interesting.
we (i and the other programmers in my company) are looking at brython for browser side programming. i don't see much need for it as our web site will just be doing some basic customer signup/payment so very little of that is needed, if any.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
|