0

I created a simple python server: localhost:8000 in order to serve a python script. If I open http://localhost:8000/script.py my script starts to run fine.

I would like to call this url directly in command line without open any browser, but still script running. I'm using Windows 10.

So, If I call my server in command line python.exe -u server.py it returns:

Server is ready at 8000 port

After is ready, is there an alternative to run my script in http://localhost:8000/script.py using command line?

4
  • What OS are you using?
    – LPChip
    Mar 11, 2017 at 21:58
  • I'm using windows 10. I edited the question already. Thanks. Mar 11, 2017 at 22:03
  • What if you call the script directly? either using python.exe script.py or start script.py?
    – LPChip
    Mar 11, 2017 at 22:14
  • @LPChip I'm building a node.js app with some micro services. Since this one is in python, I want to create a specific port where script runs. Mar 11, 2017 at 22:18

1 Answer 1

1

Try curl: https://curl.haxx.se/

Supports...

DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMTP, SMTPS, Telnet and TFTP. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, HTTP/2, cookies, user+password authentication (Basic, Plain, Digest, CRAM-MD5, NTLM, Negotiate and Kerberos), file transfer resume, proxy tunneling and more.

What's curl used for?

curl is used in command lines or scripts to transfer data. It is also used in cars, television sets, routers, printers, audio equipment, mobile phones, tablets, settop boxes, media players and is the internet transfer backbone for thousands of software applications affecting billions of humans daily.

Who makes curl?

curl is free and open source software and exists thanks to thousands of contributors. The curl project follows well established open source best practises.

1
  • Exactly! Thanks. It works great with curl. Mar 11, 2017 at 22:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .