0

I know it sounds wierd, but I want to import the module Selenium-Webdriver by importing each file of him separated meaning - I want to import the module without writing :

from selenium import webdriver

But, by writing something like that :

import C:\selenium\webdriver.py, phantomjs.py....

The reason that I want to do this , is because I want to convert my file.py to exe. Therefore, I used this website http://pytoexe.com

The problem is that I use in my code - phantomjs driver, and when I convert it to exe the exefile open me a cmd console that I want it to be hidden.

I searched on the internet and found that it is probably because they have a problem in a specific file - service.py that adding few lines in the file will avoid the cmd console to appear.

Therefore, if I import all the module by giving them the files as if they were mine I would import my service.py file which work great , and this will solve the problem.

Thanks a lot for any help,

Omer

omersk2
  • 79
  • 1
  • 11

1 Answers1

0

Why don't you use a tool like py2exe. (http://www.py2exe.org/index.cgi/Tutorial) Its more flexible and easy to use (you won't need to import the complete file path)

Hussein Fawzy
  • 366
  • 2
  • 16