Skip to content

fcntl error on windows #509

@stranac

Description

@stranac

Getting the following error when running bpython-curses:

Traceback (most recent call last):
  File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\bpython-curses.exe\__main__.py", line 5, in <module>
  File "C:\Python27\lib\site-packages\bpython\cli.py", line 84, in <module>
    from bpython import repl
  File "C:\Python27\lib\site-packages\bpython\repl.py", line 56, in <module>
    from bpython.history import History
  File "C:\Python27\lib\site-packages\bpython\history.py", line 34, in <module>
    from bpython.filelock import FileLock
  File "C:\Python27\lib\site-packages\bpython\filelock.py", line 33, in <module>
    class FileLock(object):
  File "C:\Python27\lib\site-packages\bpython\filelock.py", line 39, in FileLock
    def __init__(self, fd, mode=fcntl.LOCK_EX):
NameError: name 'fcntl' is not defined

This is due to fcntl not being defined on windows, and default arguments being evaluated on definition time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy