Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fcntl error on windows #509

Copy link
Copy link

Description

@stranac
Issue body actions

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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.