EvilZone

Programming and Scripting => Projects and Discussion => : cat_vs_mouse April 05, 2012, 09:25:36 PM

: Evilzone IRC client
: cat_vs_mouse April 05, 2012, 09:25:36 PM
I am trying to create a chat program in Python specifically for the evilzone IRC.  :D


So far; I've learnt how to create a GUI, how to contact an IRC's servers and post to them and how to receive messages posted. Next I'm going to learn about variables in Python...


This project probably sounds easy but I never actually learnt Python so this is all new to me. I sort of like the syntax so I might learn it once I've finished Ruby.


EDIT:


I've given up on this. If anyone wants the unfinished source they can have it...
: Re: Evilzone IRC client
: Kulverstukas April 05, 2012, 09:52:08 PM
Wait what. You made all that and only NOW you will learn about variables? am I the only one that find it interesting?

Making an IRC client is a nice thing. While it may not be very useful it sure it lots of experience. I remember when I was doing HawtBawt (in delphi) (http://newage.ql.lt/blog/?p=338) which was an IRC bot. I didn't finish it but it works, somewhat. You can check my code for details if you want.
: Re: Evilzone IRC client
: cat_vs_mouse April 05, 2012, 10:15:36 PM
Wait what. You made all that and only NOW you will learn about variables? am I the only one that find it interesting?

Making an IRC client is a nice thing. While it may not be very useful it sure it lots of experience. I remember when I was doing HawtBawt (in delphi) (http://newage.ql.lt/blog/?p=338) which was an IRC bot. I didn't finish it but it works, somewhat. You can check my code for details if you want.


Thanks for your quick reply! I sort of forgot about variables because I was being stupid  ::) .  Do you have any idea how to write text from a text box to a variable in Python? Basically, I'm going to have that variable then sent to the channel (I don't mean that literally. I mean posting it to the channel). Does that sound like a good idea? My project is DEFINETLY not going to have as much functionality as yours but I hope it can at least connect to a server...


By the way:
I plan to let users switch channels with variables as well.
: Re: Evilzone IRC client
: techb April 05, 2012, 10:39:00 PM
I am assuming your using Tkinter. To get text from the Entry widget, use it's "get" method.


:


entry_widget = Entry(some_parent_frame)
entry_widget.pack(side=RIGHT)


....


my_text = entry_widget.get()


In a nutshell. You will need to know the parent frame, which could be root, or another widget. You might have some other formatting thrown in as well, but you should get the point.


: Re: Evilzone IRC client
: cat_vs_mouse April 05, 2012, 11:04:43 PM
I am assuming your using Tkinter. To get text from the Entry widget, use it's "get" method.


:


entry_widget = Entry(some_parent_frame)
entry_widget.pack(side=RIGHT)


....


my_text = entry_widget.get()


In a nutshell. You will need to know the parent frame, which could be root, or another widget. You might have some other formatting thrown in as well, but you should get the point.


Cheers; that helps a lot! (I am using Tkinter. I should've specified that  ::) )
;D