How to call another import on this module - Raspberry Pi Forums


using pc python 3.5.01
how called import module? :?
on module created connection_server.py.

code: select all

import socket, sys, threading, time tkinter import *   # defining class run server. 1 per connection. class of our work. class irc_server:       # default constructor - declaring our global variables     # channel should rewritten list, loops connect, per channel.     # needs support alternate nick.     def __init__(self, host, port, nick, channel, password =""):         self.irc_host = host         self.irc_port = port         self.irc_nick = nick         self.irc_channel = channel         self.irc_sock = socket.socket (socket.af_inet, socket.sock_stream)         self.is_connected = false         self.should_reconnect = false         self.command = ""     def connect(self):                  self.listen()         def listen(self):         while self.is_connected:                      if self.should_reconnect:             self.connect()                   #test = irc_server("punch.wa.us.dal.net", 6667, "supra", "#india") run_test = threading.thread(none, test.connect) run_test.start()
, module created join_channel.py

code: select all

from tkinter import ttk  tkinter import *  class join_channel(frame):       def main():       root = tk()     root.geometry("800x300")     app = join_channel(root)     root.mainloop()    if __name__ == '__main__':     main()   
on connection_server module. how import join_channel module?
attempt this:

code: select all

from join_channel import join_channel
.
knows how work around?
appreciate helping

essentially, should work.
you're importing empty class. not sure if that's valid.

error messages when try construction?


raspberrypi



Comments