Page 1 of 1

LXF 152 Tip of the Month.

PostPosted: Sun Nov 06, 2011 8:14 pm
by ajgreeny
I believe there is a misprint in the Tip of the Month on page 75 of the LXF 152 magazine, as I have just spent a while trying to get the tip to work, ie, the "Instant web server" using python.

To start I could not find the character you printed in the command which I show here in red.
python -m SimpleHTTPServer 1111
I presume this must be a non-printing character which should not have shown in the magazine, as it does not even appear in the character map on my gnome 2.32 ubuntu 10.04, and I could not reproduce it in any way.

Being a subscriber, I copied the command from the pdf of the magazine and tried that, but that showed an "unknown option -" I then tried the command without the odd character and, BINGO! it worked without a problem.

What a useful facility/utility for quick file viewing (and transfers) around the LAN; just like giver.

PostPosted: Sun Nov 06, 2011 8:30 pm
by nelz
You're right, that character shouldn't be there. The correct command is
Code: Select all
python -­m SimpleHTTPServer 1111

PostPosted: Sun Nov 06, 2011 10:28 pm
by Spangwiches
Just as a note, on newer Pythons (I'm on 3.2.2, I don't know when it changed though) it's:

python -m http.server

PostPosted: Sun Nov 06, 2011 10:36 pm
by ajgreeny
nelz wrote:You're right, that character shouldn't be there. The correct command is
Code: Select all
python -­m SimpleHTTPServer 1111

For some strange reason, nelz, when copying your command into terminal by using select/middle click, an extra space is added between the "-" and "m".

Very odd! It doesn't show in your forum entry.

PostPosted: Sun Nov 06, 2011 11:37 pm
by nelz
I pasted that from the text file I sent in (I wrote that tip) and watching the character counter in Kate, there is an invisible character between the - and m.

PostPosted: Mon Nov 07, 2011 10:34 am
by ajgreeny
Fair enough.

I won't ask why, I will just nod my head and slowly back away.

PostPosted: Mon Nov 07, 2011 10:46 am
by nelz
It's a non-typing character, 0xAD, so I didn't put it there. It probably got picked up in a cut and paste.

a software like Giver

PostPosted: Mon Nov 07, 2011 9:40 pm
by Arno
If you want a software like Giver, you can try Transfer on LAN ( http://code.google.com/p/transfer-on-lan/ ). It's cross-platform, open source an requires no configuration.

PostPosted: Mon Nov 07, 2011 10:07 pm
by nelz
The point about the tip is that it not only needs no configuration, it needs no installation either because distros come with Python as standard.

That's not to say that Transfer-on-LAN couldn't be useful, it looks like it could, but this is a tip for a quick to set up file transfer without needing to install or set up anything - just one command. However, it does work better with the command correctly typed :(

PostPosted: Mon Nov 07, 2011 10:43 pm
by Arno
OK. But, I just tried to answer the ajgreeny's question about Giver :
What a useful facility/utility for quick file viewing (and transfers) around the LAN; just like giver.

PostPosted: Tue Nov 08, 2011 1:05 am
by nelz
Of course, and it does look useful.

Re: a software like Giver

PostPosted: Tue Nov 15, 2011 12:01 pm
by ajgreeny
Arno wrote:If you want a software like Giver, you can try Transfer on LAN ( http://code.google.com/p/transfer-on-lan/ ). It's cross-platform, open source an requires no configuration.

Thanks very much for that link Arno. I have just installed TOL on my machine, made a launcher for it in the Internet menu section (Ubuntu 10.04), and I have to say, it looks really great at the moment. I will play with it a for a while and see if it lives up to its first viewing promise.