Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Importing -
#1
Im not sure that I will be able to get this question answered. I am trying to pick apart a home group module they are using at work and I have run into a block. I understand I might not know enough yet...

but here goes ..

So in their program they include this import statement. In my eyes the smart thing to do is to hit the sshConnector module and take a look at the box method of the sshConnector module. .. I did ..

but when I search through the module, I dont see a box method defined anywhere.
Quote:import box.sshConnector as z
Reply
#2
It's not importing box from sshConnector, it's importing sshConnector from box.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#3
(Jun-27-2019, 05:52 PM)sumncguy Wrote: I dont see a box method defined anywhere.
Homemade Wink
λ ptpython
>>> import box.sshConnector as z

>>> z.connect()
'........... connected'
So looking for a box method i will not find it as it's a folder.
box\
  |-- __init__.py
  |-- sshConnector.py
# sshConnector.py
def connect():
    return '........... connected'
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020