Every now and again, even I'm amazed by how cool Python is.
Hey, how about combining this with Hans' Windows Explorer integration? Right click on a folder, "Serve from here"? I'll give this a bash at lunchtime...
Posted to Python by Simon Brunning at March 15, 2004 10:59 AMI've seen this posted a few places with links to Kevin's weblog, and nowhere to mine! *sob* I'll have to go elsewhere for my ego stroking!
Posted by: Aaron Brady on March 15, 2004 01:37 PMSorry!
Via Aaron[1]. ;-)
Anyway, surely the fact that Kevin reads your blog is enough of an ego stroke?
[1] http://insom.me.uk/blog/Tech/Python/webhere.writeback
Posted by: Simon Brunning on March 15, 2004 01:39 PMhttp://insom.me.uk/blog/Tech/Python/webhere2.writeback
As requested :p
Posted by: Aaron Brady on March 15, 2004 02:04 PMAwesome, Aaron!
Posted by: Simon Brunning on March 15, 2004 02:21 PMFor some reason, the syntax
python -c '__import__("SimpleHTTPServer").test()'
didn't work on my system at work running XP.
What did work was this:
python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"
I wondered about the syntax of Aaron's original post, but I tested on my Mac and then posted to my blog before trying it out on Windows. The syntax Christian uses is certainly what I would have expected and is much simpler. I'm going to update my blog post to use that since it is Unix-friendly too and simplifies the stupid csh alias quoting too.
ka
Posted by: Kevin Altis on March 15, 2004 07:41 PMhi
i'm new to Python & downloaded python 2.3 for win2k.i have seen a documentation on http://altis.pycs.net/2004/03/14.html#a96 stating that PCs can become a web server,but i could'nt configure the following command- python -c "import SimpleHTTPServer;SimpleHTTPServer.test()" .i got the following error.
SyntaxError: invalid syntax. can u guide me
Also how can one move to Directory,'Myserver' using python command?
thanxs
vinod
python -c "import SimpleHTTPServer;SimpleHTTPServer.test()" works fine for me, Vinod. What's the *exact* message that you get?
Oh, just a thought - you need to run this from a *Window* command line, not from withing the Python interpretor.
You can change the current working directory using os.chdir() - not that I'd recommend it.
Posted by: Simon Brunning on May 4, 2004 10:30 AMPython is cool, mailman works gut but I dont want to learn another language.
Posted by: Dzwonki Gry Java on June 30, 2004 10:02 PMNice work chaps.
turning this in to a nautilus-script as I type...
Posted by: airtonix on December 9, 2007 02:01 PMOh, so gald to see your views about acai berry,I'm also looking for acai supplements. I found a lots of websites online.
and i have read some other idea about :acai berry,extreme acai berry,acai berry product,acai berry supplement,
acai pills,extreme acai berry,acai berry diet.
There are also some review sites about acai berry diet, are they true or not?
Anyway, I'll try acai soon.
very good post, I'm also looking for acai supplements. I found a lots of websites online.
There are also some review sites about acai berry tablet, are they true or not?
Anyway, I'll try acai soon.
Posted by: Eric on September 21, 2009 08:27 AM