Python Forum

Full Version: import antigravity not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
isn't this supposed to open a web browser to xckd 353?  i tried it on both python 2 an python 3 but nothing happens.  it does define an object named antigravity with an attribute named webbrowser.
Could you be a bit more specific about "not working"? "nothing happens" but what do you expect instead? Are you using a regular terminal, or an IDE? What platform are you using? What is your default browser?
i expect a browser window to open up and it does not.  my default browser is firefox.  opera is installed but i have only ever started it by command line or its own icon.  firefox help says it is firefox 51.0.1dpkg -l firefox says it is firefox 51.0.1+build2-0ubuntu0. system is Ubuntu 16.04.1 updated this past weekend.  i am using Unity, but looking for another to use.  the machine is from System 76 and had Ubuntu 13.10 on it from the factory, upgraded (a few times) to 14.04.3 LTS, wiped, installed 16.04 LTS, upgraded to 16.04.1 LTS.
Works fine for me on Windows 10 using Chrome.
(Feb-17-2017, 07:43 AM)Skaperen Wrote: [ -> ]i expect a browser window to open up and it does not.  my default browser is [snipped]

So what does happen when you do the import?  Any errors?
The source for the module isn't really very complicated, so this should be fairly easy to diagnose: http://svn.python.org/view/python/trunk/...iew=markup
(Feb-17-2017, 09:55 PM)nilamo Wrote: [ -> ]So what does happen when you do the import?  Any errors?

nothing happens.  so far i have only tested it interactively.  it just goes to the next prompt with no messages.

it looks like module webbrowser is not working right.  i tried using it directly but nothing happens.
i solved it.

it opened a new tab on a firefox instance in another virtual desktop.  i tried it on a user that had no firefox already running and a new one opened up in the same virtual desktop.
Thanks for letting us know :)
what i didn't explain was that i run multiple concurrent users (12, 4 with firefox open) each with multiple concurrent desktops (9).  i just happen to be doing this in a user with a firefox open Sad