Code Monkey home page Code Monkey logo

fortune's Introduction

bmc

Just some quick details:

Other links are in my GitHub profile.

fortune's People

Contributors

bmc avatar sitiom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fortune's Issues

EOFError

I'm getting the following error:

$ fortune
Traceback (most recent call last):
  File "c:\Python27\Scripts\fortune-script.py", line 9, in <module>
    load_entry_point('fortune==1.0', 'console_scripts', 'fortune')()
  File "c:\Python27\lib\site-packages\fortune-1.0-py2.7.egg\fortune\__init__.py", line    282, in main
    sys.stdout.write(get_random_fortune(fortune_file))
  File "c:\Python27\lib\site-packages\fortune-1.0-py2.7.egg\fortune\__init__.py", line 186, in get_random_fortune
    data = pickle.load(fortuneIndex)
EOFError

I'm on Windows (Msysgit). I'm using your fortune's database files.

hugo.delacruz@DELLE6430HUGO ~
$

install error with me.

error: Couldn't find a setup script in /tmp/easy_install-6K1u0m/grizzled-python-1.0.3.linux-x86_64.tar.gz

error

Traceback (most recent call last):
File "/bin/fortune", line 6, in
from fortune import main
File "/usr/lib/python2.7/site-packages/fortune/init.py", line 178
print('Missing fortune file.', file=sys.stderr)
^
SyntaxError: invalid syntax
[root@lisiliang-test-vm13-237 data]# fortune /usr/share/games/fortunes/chinese.dat
Traceback (most recent call last):
File "/bin/fortune", line 6, in
from fortune import main
File "/usr/lib/python2.7/site-packages/fortune/init.py", line 178
print('Missing fortune file.', file=sys.stderr)
^


modify this row to " print('Missing fortune file.')
resolved

Windows: env var `$FORTUNE_FILE` not found by default

I installed the program via pip and downloaded your fortune cookies.
Now I can easily run fortune path/to/file and even fortune $FORTUNE_FILE as displayed on the screenshot. However, a good simple fortune fails to find the variable.

This is how I set the variable on my $PROFILE, if it helps:

$FORTUNE_FILE = Get-ChildItem -Path "$env:HOMEPATH\dotfiles\docs\fortunes" | Get-Random | Select-Object -ExpandProperty FullName

It's great as it is, but maybe could you describe how to properly set up the environment variable on Windows? Thanks!!


image

Installation fails.

With both easy_install and running setup.py manually, I receive the following traceback:

Traceback (most recent call last):
File "setup.py", line 41, in
info = load_info()
File "setup.py", line 38, in load_info
result['long_description'] = DESCRIPTION
NameError: global name 'DESCRIPTION' is not defined

Adding a default DESCRIPTION value to setup.py fixes it, but I'm pretty sure we shouldn't be hitting the 'except' clause on line 37, so there may also be a better fix possible.

Aha, come again

I am a newer, I just clone this repo to my local disk. I want to learn about the source code of this program.

I just find the init.py under the fortune dir, is this all the source code?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.