Comments (4)
Is it showing up with the line breaks in the string?
Something like:
"List of functions (and alternate names):\n1 ()\n1A ()\n1B (address)\n1E ()\n1N (street_name_to_street_code, get_street_code)\n2 (intersection)\n2W (intersections, intersection_wide)\n3 (street_segment)\n3C (blockface)\n3S (street_stretc
h)\nAP (address_point)\nBB (browse_back)\nBF (browse_forward)\nBL (bbl, tax_lot, lot)\nBN (bin, building)\nD (get_street_name)\nDG ()\nDN ()\nN* (normalize_street_name)\n\nCall a function using the function code or alternate name using G
eosupport.<function>() or Geosupport['<function>']().\n\nExample usage:\n from geosupport import Geosupport\n g = Geosupport()\n # Call address using the alternate name.\n g.address(house_number=125, street_name='Worth St', b
orough_code='Mn')\n # Call function 3 using the function code.\n g['3']({'borough_code': 'MN', 'on': '1 Av', 'from': '1 st', 'to': '9 st'})\n\nUse Geosupport.help(<function>) or Geosupport.<function>.help() to read about specific f
unction."
If so, it's because the function just returns the string instead of printing it.
Calling print(geosupport.help()) displays it correctly for me.
from python-geosupport.
Yeah thats exactly what Im seeing. I guess I was a little unclear of the how the help
should behave at the command line, also looks the same in Jupyter notebooks. Otherwise my IDE displays the line breaks correctly without calling print.
Im not sure if this is something worth pursuing, but the feature as a whole is great for an un-initiated user. At the very least it may be worth a simple readme update.
from python-geosupport.
I wonder if it's possible to detect when whether a user is on the command-line/in a jupyter notebook and change it to print automatically?
I agree, I find it annoying that when I'm using it, it will not display correctly unless I use print
. But I didn't want to make it impossible to use the help programatically.
Maybe printing by default but having a parameter to return instead?
def help(return_as_string=False):
if return_as_string:
return ...
else:
print(...)
from python-geosupport.
looks good, I think that should do it
from python-geosupport.
Related Issues (20)
- Python 2.7 TypeError: unicode argument expected, got 'str' HOT 1
- Tests failing on Geosupport 18d HOT 1
- g.address() method for house_number and street_name together (i.e. freeform)? HOT 1
- Data-Agnostic Test Cases HOT 6
- Using regular+tpad for function 1B resulted more miss than just regular HOT 6
- how to use the browse flag HOT 6
- Census tract formatting issue (missing spaces)
- Zip Code inconsistancies between input and output HOT 1
- adding fips into the BOROUGH look up dictionary HOT 1
- Unicode error when running on linux OS HOT 5
- Move docs to readthedocs
- Add "truck route type" field in WA2
- New Mode Switch of E (Enhanced) for Function 3 and 3C
- Add Police Sector and Police Service Area fields
- Trying to get the Linux version of Geosupport running w/ this library on CentOS8 HOT 1
- Initializing Geosupport HOT 1
- Multi-platform testing
- Error Accessing Geosupport File: Grid1 HOT 8
- Hello from geoclient HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-geosupport.