Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
urls to get ip
#11
I was thinking you would write a server so that I can see my own IP.  Big Grin
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
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#12
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.
Reply
#13
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.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#14
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.
Reply
#15
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  Smile

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
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#16
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.
Reply
#17
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
Reply
#18
(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.  Shy
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#19
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 Think
Reply
#20
(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.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020