Immolation Game
Would you like to react to this message? Create an account in a few clicks or log in to continue.


A MLP-inspired Unity game.
 
HomePortalMeet the Mod TeamLatest imagesSearchRegisterLog in

 

 Thunderseethe Application

Go down 
2 posters
AuthorMessage
thunderseethe




Posts : 9
Points : 4428
Reputation : 0
Join date : 2012-02-23

Thunderseethe Application Empty
PostSubject: Thunderseethe Application   Thunderseethe Application I_icon_minitimeFri Feb 24, 2012 10:48 pm

Hello, I'm thunderseethe(mild brony)

I have a decent amount of coding experience and great ability to pick up new languages or development tools quickly. My language of choice is python but I also know some Java and a few scripting languages

I'd like to be a coder for the project, and am aware that the project is volunteer work not paid santa

Below is some sample python code, just copy and paste into a *.py file and run it:

Code:

import pygtk
pygtk.require('2.0')
import gtk, gobject
import sys, string
from gtk import *

class HelloWorld:
   def callback(self, widget, data):
      print "Hello World - %s was pressed" % data

   def load(self, widget, loadFile, view):
      in_file = open(loadFile.get_filename(), "r")
      view.get_buffer().set_text(in_file.read())
      view.show()
      in_file.close()

   def open_save_file(self, widget, data=None):
      self.saveFile = gtk.FileChooserDialog(title="Save", action=gtk.FILE_CHOOSER_ACTION_SAVE, buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_SAVE, gtk.RESPONSE_OK))
      response = self.saveFile.run()
      if response == gtk.RESPONSE_OK:
         in_file = open(self.saveFile.get_filename(), "w")
         in_file.write(data.get_buffer().get_text(data.get_buffer().get_start_iter(), data.get_buffer().get_end_iter()))
         in_file.close()
      self.saveFile.destroy()

   
   def save(self, widget, data):
      print("Saved")

   def delete_event(self, widget, event, data=None):
      gtk.main_quit()
      return False

   def __init__(self):
      
      self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
      
      self.window.connect("delete_event", self.delete_event)
      
      self.window.set_title("Hello Buttons!")
      self.window.set_border_width(10)
      
      self.hbox = gtk.HBox(False)
      

      self.box2 = gtk.VBox(False)

      self.textarea = gtk.TextView()
      self.scrolled = gtk.ScrolledWindow()
      self.textarea.set_editable(True)

      self.buffer = self.textarea.get_buffer()
      self.buffer.set_text("Hello world show me a text box")
      self.textarea.show()
      
      self.scrolled.add_with_viewport(self.textarea)
      self.box2.pack_start(self.scrolled, True, True, 0)
      self.scrolled.show()

      self.box1 = gtk.VBox(False, 0)

      self.filebutton = gtk.FileChooserButton("Load")
      self.filebutton.set_title("Load")
      self.box1.pack_start(self.filebutton, False, False, 0)
      self.filebutton.show()

      self.button1 = gtk.Button("Load")
      self.button1.connect("clicked", self.load, self.filebutton, self.textarea)
      self.box1.pack_start(self.button1, False, False, 0)
      self.button1.show()

      self.button2 = gtk.Button("Save")
      self.button2.connect("clicked", self.open_save_file, self.textarea)      
      self.box1.pack_start(self.button2, False, False, 0)
      self.button2.show()

      self.button3 = gtk.Button("Exit")
      self.button3.connect("clicked", self.delete_event, self.window)
      self.box1.pack_start(self.button3, False, False, 0)
      self.button3.show()
   
      self.hbox.pack_start(self.box1, False, False, 0)
      self.hbox.pack_start(self.box2, True, True, 0)

      self.window.add(self.hbox)

      self.box1.show()
      self.box2.show()
      self.hbox.show()
      self.window.show()
 
   def main(self):
      gtk.main()
 
if __name__ == "__main__":
   hello = HelloWorld()
   hello.main()
Back to top Go down
piedoom
Admin
piedoom


Posts : 281
Points : 4867
Reputation : 13
Join date : 2012-01-18

Thunderseethe Application Empty
PostSubject: Re: Thunderseethe Application   Thunderseethe Application I_icon_minitimeSat Feb 25, 2012 12:11 am

Sounds cool! Little issue with the file... I'm not sure how to open it. I have python, but I'm not sure which one to run it with... Sorry for being so n00bish at coding, my strongpoint is modeling hehe.
Back to top Go down
https://immolation.forumotion.com
thunderseethe




Posts : 9
Points : 4428
Reputation : 0
Join date : 2012-02-23

Thunderseethe Application Empty
PostSubject: Re: Thunderseethe Application   Thunderseethe Application I_icon_minitimeSat Feb 25, 2012 3:00 am

It's good that's what your hiring us for.

Windows:
1. Open the file with cmd command python *.py
2. Right-click and open with python command line
3. Right-click and open with python idle, then press F5 to run

Linux:
1. Open terminal and use command python *.py

Hope that helps and that your not on mac lol not as clear on instructions for them but i can look them up
Back to top Go down
piedoom
Admin
piedoom


Posts : 281
Points : 4867
Reputation : 13
Join date : 2012-01-18

Thunderseethe Application Empty
PostSubject: Re: Thunderseethe Application   Thunderseethe Application I_icon_minitimeSat Feb 25, 2012 3:11 am

It's telling me line 9 print "hello world - %s was pressed" % data
I think I'm doing it wrong.
But to cut to the chase, I was already going to let you join. Looking through the code I was able to recognize some different commands from some languages I slightly know bits and pieces of, and I'm sure you are competent.
Back to top Go down
https://immolation.forumotion.com
thunderseethe




Posts : 9
Points : 4428
Reputation : 0
Join date : 2012-02-23

Thunderseethe Application Empty
PostSubject: Re: Thunderseethe Application   Thunderseethe Application I_icon_minitimeSat Feb 25, 2012 3:44 am

Awesome I'll install the UDK and start messing around with, learn the ropes and such
Back to top Go down
Sponsored content





Thunderseethe Application Empty
PostSubject: Re: Thunderseethe Application   Thunderseethe Application I_icon_minitime

Back to top Go down
 
Thunderseethe Application
Back to top 
Page 1 of 1
 Similar topics
-
» Application for coding position
» What this board is used for; Application Rules

Permissions in this forum:You cannot reply to topics in this forum
Immolation Game :: Immolation :: Applications-
Jump to: