Skip to content

Commit

Permalink
Create network.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kerem3338 authored Aug 14, 2021
1 parent efd3244 commit 3d316a2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions bambu/network.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#Bambu Engine - Network

import urllib.request as urllib2
import socket
class Network:
def __init__(self):
self.host = socket.gethostname()
self.localhost = socket.gethostbyname(self.host)


def internet_required(self, error="İnternet bağlantısı gerekli, lütfen internet bağlantınızı kontrol edin"):

IPaddress=socket.gethostbyname(socket.gethostname())
if IPaddress=="127.0.0.1":
print(error)
else:
return True



0 comments on commit 3d316a2

Please sign in to comment.