On Jan 20, 2012, at 5:05 PM, Nils Bruin wrote: > On Jan 20, 4:30 pm, Jim Clark <jimfortheea...@earthlink.net> wrote: >> Could anyone shed light on what is happening here? >> >> In a sage notebook cell I wish to load a python file; I wrote the command: >> >> load("/Users/jim/Documents/Fluid_Mechanics/AA543_HW2/physical_constants.py") >> >> which produces: >> >> SyntaxError: Non-ASCII character '\xce' in file >> /Users/jim/Documents/Fluid_Mechanics/AA543_HW2/physical_constants.py on > > If you type the following in a notebook cell: > -------------------------------------------------------------- > %sh > xxd -g1 /Users/jim/Documents/Fluid_Mechanics/AA543_HW2/ > physical_constants.py | head > -------------------------------------------------------------- > you'll see all first few bytes in your file. It should be pretty > straightforward to spot the "ce" from that. > Thank you, Nils, that revealed the problem.
The file in the path was an alias, created in Finder, and OS X added the link info at the beginning of the file. I replaced the OS X alias with a Unix symbolic link, and now I can load the file. again, thanks, Jim -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org