Hi,
I have created one library file "modified_python_automation_tcl.py"..Inside my
library file I have set of codes as follows.
import sys
import time
from datetime import datetime
import re,sys,os,itertools,datetime,commands,logging,math,time,copy,inspect
from robot.api import logger
import unicodedata
sys.path.append('C:\Python27\Lib\lib-tk')
sys.path.append('C:\Python27\DLLs')
sys.path.append('C:\Python27\libs')
from Tkinter import Tcl
tcl = Tcl()
.
.
.
.
.
.
I am able to run the file from python IDLE.and able to source all kind of .py
and .pyd file...But the issue is coming when trying through robo framework.
I am using robo-framework and have defined the
modified_python_automation_tcl.py file as the library file. and tryuing to
excute my testcase..but getting the below error..
Someone please help me how to import .pyd files from robo framework
==
Acceptance.Tests
==
Acceptance.Tests.PCC
==
Acceptance.Tests.PCC.Automation 2.0
==
[ ERROR ] Error in file
'C:\PCCAutomation\src\test\robotframework\acceptance\Tests\PCC\Automation_2.0\Spirent.txt':
Importing test library
'C:\Users\supriysw\Desktop\abcd\modified_python_automation_tcl.py' failed:
ImportError: No module named _tkinter
Traceback (most recent call last):
File "C:\Users\supriysw\Desktop\abcd\modified_python_automation_tcl.py", line
15, in
from Tkinter import Tcl
File "C:\Python27\Lib\lib-tk\Tkinter.py", line 41, in
import _tkinter # If this fails your Python may not be configured for Tk
PYTHONPATH:
C:\PCCAutomation\target\libs\xlrd-0.7.1
C:\PCCAutomation\target\libs\xlrd-0.7.1\xlrd
C:\PCCAutomation\target\libs\xlutils-1.5.2
C:\PCCAutomation\target\libs\xlutils-1.5.2\xlutils
C:\PCCAutomation\target\libs\xlwt-0.7.4
C:\PCCAutomation\target\libs\xlwt-0.7.4\xlwt
C:\PCCAutomation\target\libs\main\com\nokia\epg\automation\ams\lib
C:\Users\supriysw\.m2\repository\org\robotframework\robotframework\2.8.7\robotframework-2.8.7.jar\Lib\robot\libraries
C:\Users\supriysw\.m2\repository\org\robotframework\robotframework\2.8.7\robotframework-2.8.7.jar\Lib
C:\Users\supriysw\.m2\repository\org\robotframework\robotframework\2.8.7\Lib
__classpath__
__pyclasspath__/
.
C:\PCCAutomation
C:\Python27\Lib\lib-tk
C:\Python27\DLLs
C:\Python27\libs
CLASSPATH:
C:/apache-maven-3.3.9/boot/plexus-classworlds-2.5.2.jar
Acceptance.Tests.PCC.Automation 2.0.Spirent
--
https://mail.python.org/mailman/listinfo/python-list