Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import wx
- class MyFrame(wx.Frame):
- def __init__(self):
- wx.Frame.__init__(self, None,
- pos=wx.DefaultPosition, size=wx.Size(450,100),
- style=wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION |
- wx.CLOSE_BOX | wx.CLIP_CHILDREN, title="Python Assistan")
- panel = wx.Panel(self)
- my_sizer = wx.BoxSizer(wx.VERTICAL)
- lbl = wx.StaticText(panel)
- label="Hi I am Jarvis. How can I help you?"
- my_sizer.Add(lbl,0,wx.ALL, 5)
- self.txt = wx.TextCtrl(panel, style=wx.TE_PROCESS_ENTER, size=(400, 30))
- self.txt.SetFocus()
- self.txt.Bind(wx.EVT_TEXT_ENTER, self.OnEnter)
- my_sizer.Add(self.txt, 0, wx.ALL, 5)
- panel.SetSizer(my_sizer)
- self.Show()
- def OnEnter(self, event):
- line = self.txt.GetValue()
- line = line.lower()
- if __name__ == "__main__":
- app = wx.App(True)
- fraem = MyFrame()
- app.MainLoop()
- $ pip install wxPython
- Collecting wxPython
- Using cached wxPython-4.0.1-cp27-cp27m-macosx_10_6_intel.whl
- Requirement already satisfied: six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from wxPython)
- Installing collected packages: wxPython
- Exception:
- Traceback (most recent call last):
- File "/Library/Python/2.7/site-packages/pip-9.0.2-py2.7.egg/pip/basecommand.py", line 215, in main
- status = self.run(options, args)
- File "/Library/Python/2.7/site-packages/pip-9.0.2-py2.7.egg/pip/commands/install.py", line 342, in run
- prefix=options.prefix_path,
- File "/Library/Python/2.7/site-packages/pip-9.0.2-py2.7.egg/pip/req/req_set.py", line 784, in install
- **kwargs
- File "/Library/Python/2.7/site-packages/pip-9.0.2-py2.7.egg/pip/req/req_install.py", line 851, in install
- self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
- File "/Library/Python/2.7/site-packages/pip-9.0.2-py2.7.egg/pip/req/req_install.py", line 1064, in move_wheel_files
- isolated=self.isolated,
- File "/Library/Python/2.7/site-packages/pip-9.0.2-py2.7.egg/pip/wheel.py", line 345, in move_wheel_files
- clobber(source, lib_dir, True)
- File "/Library/Python/2.7/site-packages/pip-9.0.2-py2.7.egg/pip/wheel.py", line 316, in clobber
- ensure_dir(destdir)
- File "/Library/Python/2.7/site-packages/pip-9.0.2-py2.7.egg/pip/utils/__init__.py", line 83, in ensure_dir
- os.makedirs(path)
- File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
- mkdir(name, mode)
- OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/wx'
Add Comment
Please, Sign In to add comment