One lovely blog award – who are my favourite bloggers?

This challenge has spread across the internet like fire (I didn’t create this challenge) so I have decided to do one. Basically, I have to tell you 7 things about my character. And up to 15 bloggers I enjoy. I have over 40 followers, but as there are limits (a few don’t have blogs) and you can only do up to 15. I am sorry if I do not include you!

So, here are the 7 things about me!

1. I think about my web browser project, ECG SeaSurf , for a lot of my time. I love it because the world wide web is a big place, and making software that allows people to browse such a great thing makes me feel special.

2. I do not try to block the spotlight from other developers as I love seeing what others have produced too, and I love getting inspired.

3. I love playing video games because they are extremely fun, and it feels like I am in the game (no VR here!). They also take stress away.

4. I love writing stories, to entertain people. I am writing a story called Sir Wolf’s Castle, about Minecraft wolves and a villan called Sir Bum-Smacker.

5. I love looking at over blogs and leaving feedback and liking posts because I don’t want to look selfish.

6. I love ketchup. It is an awesome sauce.

7. There are lots of other things I love but don’t blog about: Star Wars and Legends of Chima, for example.

Now, here are my favourite bloggers: I DO NOT ACCEPT RESPONSIBILITY FOR LINK CONTENT CHANGING

1. Codeinfig:

An author of a coding language called Fig, a coding enthusiast, and much more. Check out his blog at codeinfig.wordpress.com!

2. Jacque:

If you want to go beyond my app-making service (I would recommend trying it first and requesting a removal if you don’t like it), then Jacque is the person for you. He can even get your app published to the Play Store (I didn’t ask for an app because I can make one myself).

Check out his blog at themarvelousmind.com

3.  ARJ

If you want a guide to coding and you want to be a pro, then ARJ’s blog “A bit of everything – copy” is the place for you. He has another blog, pythongr.wordpress.com, which is worth checking out too.

Find his main blog at abdurrahmaanjanhangeer.wordpress.com

4. Daniel He hetianding

A Minecraft enthusiast, this blogger creates maps and then publishes them.

Find his blog at worldofmanyworlds.wordpress.com.

5. LZH

A real tech enthusiast, admin of a website called TechCentral which contains everything tech.

Leave a comment or like at limzhenghong.wordpress.com

6. AntonioWestley

A master blogger, who loves posting about sites he recommends.

Check out his active site at alltheeabove.wordpress.com.

Check out his inactive site at antoniowestley.wordpress.com

7. antepher

A real ESP8266 and Arduino enthusiast, as well as Python Expert, antepher maintains a blog called techtutorialsx.

Like and comment on his blog at techtutorialsx.wordpress.com!

8. Paul Sinha

One of my first followers, Paul Sinha appears on the Chase and is really funny.

Check out his blog at sinhaha.com

9. Old and New Reviews

Reviewing and playing video games, I enjoy reading this blog.

Follow the blog at oldandnewreviews.com!

10. Is there any blog you recommend?

I can’t think of a tenth, but I want to reach 10, so if you recommend a blog, plz leave  a comment.

PS: The rules (I have forgotten the URL to the original creator’s blog) also mention that you should post about being chosen. So, thank you codeinfig for choosing me! SO, remember that!

Epic Chas Gamer 😀

 

 

 

Advertisements

Where Python 3.6 is stored on Windows

If you are wondering where Python 3.6 is stored, then here is the path:

C:\Users\YOURUSERNAME\AppData\Local\Programs\Python

Python, GTK and WebKit – creating a web browser – Part 2

IF YOU HAVE NOT YET, PLEASE READ PART 1 BEFORE CONTINUING!

In Part 1, I showed you how to create a very basic web browser in Python with WebKit and GTK. It is a great example of Python’s power, but there was no refresh button. Part 2 focuses on adding this feature so you can refresh unresponsive pages.

First, load up the Python script you created in Part 1 and find the lines:

self.address_bar = gtk.Entry()
self.gobutton = gtk.Button(“GO!”)

And put the following above self.address_bar = gtk.Entry()

self.refresh = gtk.ToolButton(gtk.STOCK_REFRESH)

Then find the

self.address_bar.connect(‘activate’, self.load_page)
self.gobutton.connect(‘clicked’, self.load_page)

…and put the following above self.address_bar.connect(‘activate’, self.load_page):

self.refresh.connect(‘clicked’, self.refresh_page)

Eh, what is going on here! The variable self.refresh_page doesn’t even exist. Well, it doesn’t yet. We will later add that variable so you can run this program without errors.

Now, find the lines:

self.navigation.pack_start(self.address_bar)
self.navigation.pack_start(self.gobutton, False)

And add the following above self.navigation.pack_start(self.address_bar):

self.navigation.pack_start(self.refresh, False)

Now find:  def change_url(self, widget, frame):
uri = frame.get_uri()
self.address_bar.set_text(uri) and press enter beneath it. If you are using a Python IDE, then press enter twice then backspace once.

Now add the following lines:

def refresh_page(self, widget):
self.webview.reload()

Now we have finished Part 2 of your basic browser. I am thinking of what to show you in Part 3 currently, but I am sure it will be awesome!

The finished code:

finished2

#!/usr/bin/env python
import gtk, webkit, os, pickle

class Basic():

def __init__(self):
self.window = gtk.Window()
self.window.connect(‘destroy’, lambda w: gtk.main_quit())
self.window.set_default_size(640, 480)

self.navigation = gtk.HBox()
self.refresh = gtk.ToolButton(gtk.STOCK_REFRESH)
self.address_bar = gtk.Entry()
self.gobutton = gtk.Button(“GO!”)

self.view = gtk.ScrolledWindow()
self.webview = webkit.WebView()
self.webview.open(‘http://google.com/’)
self.webview.connect(‘title-changed’, self.change_title)
self.webview.connect(‘load-committed’, self.change_url)
self.view.add(self.webview)

self.refresh.connect(‘clicked’, self.refresh_page)
self.address_bar.connect(‘activate’, self.load_page)
self.gobutton.connect(‘clicked’, self.load_page)
self.navigation.pack_start(self.refresh, False)
self.navigation.pack_start(self.address_bar)
self.navigation.pack_start(self.gobutton, False)

self.container = gtk.VBox()
self.container.pack_start(self.navigation, False)
self.container.pack_start(self.view)

self.window.add(self.container)
self.window.show_all()
gtk.main()

def load_page(self, widget):
add = self.address_bar.get_text()
if add.startswith(‘http://’) or add.startswith(‘https://’) or add.startswith(‘file:///’):
self.webview.open(add)
else:
add = ‘http://’ + add
self.address_bar.set_text(add)
self.webview.open(add)

def change_title(self, widget, frame, title):
self.window.set_title(title + ” – Basic Web Browser”)

def change_url(self, widget, frame):
uri = frame.get_uri()
self.address_bar.set_text(uri)

def refresh_page(self, widget):
self.webview.reload()
browser = Basic()

 

Here is what our browser looks like now 🙂

basicbrowser2

Hope you like it!

Cheers!

Epic Chas Gamer 😀

 

 

 

 

 

 

Python: Input

Use raw_input for this. Here is an example:

print(“Raw_Input example, by Epic Chas Gamer”)

name = raw_input(“What is your name? “)

print(“Hello, “,name)

If you get errors plz comment 🙂

A new web browser

Python lets you do lots of things, from Calculator programs to Video Games. But there is one capability that you probably don’t know you can do with Python: make a simple web browser.

ECG

SeaSurf

 

So, no set release date yet, as I am still working on it. But when I have finished developing it, I may provide a download for you guys to download it!

Cheers!

Epic Chas Gamer 😀

Unofficial Raspberry Pi Clock Application

Hi guys. Today I have been experimenting with Python and Pygame. I managed to make a clock application for the Raspberry Pi.

Here is the code:

import pygame, sys, time

pygame.init()

screen = pygame.display.set_mode((1184, 624),
pygame.FULLSCREEN)
pygame.display.set_caption(“Raspberry Pi Clock”)

clockFont = pygame.font.Font(None, 72)
clock = pygame.time.Clock()

##COLOURS

WHITE = (255, 255, 255)
RED = (255, 0, 0)

##IMAGES
logo = pygame.image.load(“/usr/share/raspberrypi-artwork/launch.png”)
piclock = pygame.image.load(“raspitimebackground.png”)

##CODE
screen.blit(piclock, (0, 0))
pygame.display.flip()

time.sleep(2)

screen.blit(logo, (0, 0))
pygame.display.flip()

theFont = pygame.font.Font(None, 32)
theSurf = theFont.render(“Raspberry Pi”, True, WHITE)
theRect = theSurf.get_rect()
theRect.midtop = (115, 5)
screen.blit(theSurf, theRect)
pygame.display.flip()

loadFont = pygame.font.Font(None, 32)
loadSurf = theFont.render(“Press Enter to load the desktop”, True, WHITE)
loadRect = theSurf.get_rect()
loadRect.midtop = (500, 300)
screen.blit(loadSurf, loadRect)
pygame.display.flip()
while True:
clock.tick(1)
clockTime = time.strftime(“%H:%M:%S”, time.localtime())
clockText = clockFont.render(str(clockTime), True, WHITE, RED)
screen.blit(clockText, (1000, 550))
pygame.display.update()
for event in pygame.event.get():
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_RETURN:
pygame.quit()
sys.exit()

The following image is required for this project file

raspitimebackground

If for some reason you ever need this image, feel free to use it. Learn more.

In the future, I will make a blog post about auto starting apps on the Pi.

Enjoy!

Epic Chas Gamer 😀

 

MCPE Multiplayer with Minecraft Pi Edition

The Pi Edition is based on an old version of MCPE, isn’t it. Can you play multiplayer between the two?

If you download a 0.6.1 APK you can play multiplayer by opening a world on the Pi Edition and pressing Join Game on the Pocket Edition. Amazing!

 

 

 

Programming on the Raspberry Pi – Program in python

How to create a window in Python 2.7:

  1. Open Python 2.7 (Idle) from the programming menu and type in the following:

import pygame

pygame.init()

screen = pygame.display.set_mode([640, 480])

pygame.display.set_caption(“Hello Python World!”)

NOTE: You can change the title to whatever you want the window to be called.

Save and press F5 on the keyboard.

Our Window:

hellopythonworld!

Enjoy!

Epic Chas Gamer 🙂

 

PS: SMASH THAT LIKE BUTTON!

PS: for a full screen windows then do the line pygame.display.set_mode([640, 480], a comma and then enter, then pygame.FULLSCREEN).