James Mills is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

prologic / circuits http://pypi.python.org/pypi/circuits

circuits is a Lightweight Event driven and Asynchronous Application Framework for the Python Programming Language with a strong Component Architecture.

Clone this repository (size: 8.8 MB): HTTPS / SSH
hg clone https://bitbucket.org/prologic/circuits
hg clone ssh://hg@bitbucket.org/prologic/circuits

Issues

#19 from circuits.app.config import Config throws Import error on Windows

Reported by Jan Vlčinský (last edited )

Trying to::

>>> from circuits.app.config import Config

results in::

...ImportError: cannot import name SIGHUP

I wonder, if there are more troubles like this on Windows, the package seems so promising.

Status: resolved Responsible: James Mills Type: bug Priority: major
Milestone: none Component: app Version: dev

Attachments

No attachments added for this issue yet.

Comments and changes

  1. #1 James Mills

    written

    (Reply via prol...@shortcircuit.net.au):

    Thanks for the report@ I shall resolve this ASAP!

    cheers James

    James Mills / prologic

    Developer | circuits, sahriswiki E: prologic@shortcircuit.net.au S: therealprologic W: softcircuit.com.au

    On Mon, Aug 22, 2011 at 10:29, Bitbucket <issues-noreply@bitbucket.org>wrot= e:

  2. #2 James Mills

    written

    This should be resolved in the latest versions of circuits.

    Can you confirm what version you saw this in?

    --James

  3. #3 Jan Vlčinský

    written , last edited

    I saw the problem in version 1.6

    >>> from circuits.app.config import Config
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "d:\dev\circ\circuits\circuits\app\__init__.py", line 17, in <module>
        from .env import Environment
      File "d:\dev\circ\circuits\circuits\app\env.py", line 14, in <module>
        from signal import SIGHUP
    ImportError: cannot import name SIGHUP
    >>> import circuits
    >>> circuits.__version__
    '1.6'
    >>>
    

    Then I tried to upgrade, but latest version on pypi is the same and shows exactly the same behaviour.

    Finally I downloaded latest version from bitbucket, and the result is again the same.

    I am running on Windows XP Pro, using Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32

    Looking forward to real solution.

  4. #4 James Mills

    written

    (Reply via prol...@shortcircuit.net.au):

    Ahhh thanks! I think I can fix that now you've shown a trace back ;)

    cheers James

    Sent from my iPad

  5. #5 Jan Vlčinský

    written

    James, this sounds great. And I know, I should provide all details immediately, this would easy our lives. Good luck with training circuits to circulate on proper path and do not bother SIGHUP when not needed.

  6. #6 Edwin Marshall

    written

    The issue is that portions of the app package are written in a non-platform-independent manner. Ideally, the code should be refactored so that these restrictions do not apply. Until then, simply wrapping the offending calls in try/except should suffice.

    My branch does so, and I've sent a pull request. You could (though you aren't obligated to obviously) apply the patch[1], close this issue, and open a new one stating that refactoring should be done as a superior solution.

    [1] https://bitbucket.org/prologic/circuits/pull-request/1/issue-19-temp-fix

  7. #7 James Mills

    written

    • Changed status from new to resolved.

    Thanks for the patch.

    I pulled changes in from your branch and merge them.

    Thanks again!

    --James

  8. #8 Jan Vlčinský

    written

    Thanks guys. I tested 9c27ee47262a and can confirm, that the issue is resolved and runs well on MS Windows box.

Add comment / attachment

Verification: Please write the text from the image in the box (letters only)

captcha

Is that you, Humanoid? Is this me?