Reuse Py Modules twixt Linux & Windoze?

Kirby Urner urner at alumni.princeton.edu
Tue Aug 29 00:30:54 EDT 2000


Kirby Urner <urner at alumni.princeton.edu> wrote:

>So naturally it occurs to me to do something
>like this in Linux:
>
> >>> import /mnt/win_f/python16/ocn/coords

Now, did that ever work?  I seem to remember it
did, maybe in shell Python vs. IDLE?

Anyway, now what I'm doing is:

  import sys
  sys.path.append("//mnt//win_f//python16//ocn")
  import coords

but getting a syntax error on the above (which I'd 
expect).  I'll be changing my PYTHONPATH variable 
later (new to Linux, first things first).

>But here's the problem:  coords.py is tokenized
>with all these /r thingys at the end of every
>line.  I think I understand the reason:  DOS-based

But is this really a problem?  I could have sworn I 
got an "invalid token" error the first time I tried 
to import a module written in Windows, but this time
into the Linux version of IDLE.  

But ever since, even _without_ and fancy 'auto' stuff 
in the fstab (see other posts to this thread), Linux 
simply ignores all the /r thingys (carriage returns).

I can strip out the '/r's using IDLE's search and replace 
(replacing with empty string), but when I boot into 
Windows and edit the module, of course they're all put
back.

But IDLE in Linux just doesn't seem to care.  So I'm 
dropping this whole question.  The '/r's are still 
cosmetically bothersome, but they apparently have no 
impact on compilation to byte codes.

Kirby




More information about the Python-list mailing list