5

my program have a code:


info = subprocess.STARTUPINFO()
info.dwFlags |= subprocess.STARTF_USESHOWWINDOW
info.wShowWindow = subprocess.SW_HIDE

and my OS is kali linux. when I run program in python 2 or 3 has error:


AttributeError:'module' object has no attribute 'STARTUPINFO'

please help me. thanks.

1
  • How to fix this when developing on linux? Commented Aug 29, 2018 at 21:33

1 Answer 1

4

The STARTINFO class is only available on Windows. Clearly stated in the docs:

The STARTUPINFO class and following constants are only available on Windows.

Sign up to request clarification or add additional context in comments.

3 Comments

which class is for kali linux?? I want to use the ping command contained in kali linux
@siamakafra There isn't a corresponding class.
output = subprocess.Popen(['ping', '-n', '1', '-w', '500', str(all_hosts[i])], stdout=subprocess.PIPE, startupinfo=info).communicate()[0]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.