How can I download python .egg files, when behind a firewall

I'm going to try out turbogears however I'm on windows vista. however due to firewall proxy problems, it seems i can't download .egg files which is required for setup turbogears to get installed in my windows environment. I do have a bootable, or I can make a bootable Linux USB, I can try cygwin but I am not sure where to start with cygwin, so I was wondering what would solve my firewall / proxy problem of installing something like turbogears.

if it's possible, is there some non-online version of turbogears that i could just download from visiting a site and then somehow importing that non-online version into my python environment?

thanks so much!:)


Asked by: Lenny277 | Posted: 01-10-2021






Answer 1

Perhaps the problem is not with the firewall per se, but with the fact that you need to use an HTTP proxy. If you do need to use a proxy, try setting the http_proxy environment variable. It might be that your firewall uses NTLM proxy authentication (which Python doesn't support); in this case, try setting up an APS proxy server on your local machine, and point http_proxy to localhost.

Answered by: Paul319 | Posted: 02-11-2021



Answer 2

You can run TG locally from windows. The tgsetup.py method of installation uses setuptools which depends on being able to bring in .egg files from the internet. The best approach would be to open the firewall to eggs, as others suggested. TG has a list of egg files that you can try to bring manually (maybe from an open internet connection). Installing an egg manually is possible, but not recommended.

If changing the firewall rules is not possible, you can use a Linux (bootable or virtual) installation that has a pre-configured TG package. For example, Fedora has one. This way, the TG package crosses (hopefully) the firewall as an .rpm file.

Answered by: Emma434 | Posted: 02-11-2021



Answer 3

You could use the old firewall hack... try throwing "?file.jpg" or "#file.jpg" on the end (sans quotes). The firewall may see this as you're trying to download an image file which it'll allow, the responding server probably won't care that you've attached a query string, and (I think) python will just see an egg.

Answered by: Sarah664 | Posted: 02-11-2021



Answer 4

Add python to the firewall exceptions list. Just make sure you don't run any questionable code made in python, of course.

Answered by: Freddie474 | Posted: 02-11-2021



Answer 5

This might not be what you are looking for, but you can bypass the proxy tunneling SSH. Another possibility is using Tor.

Answered by: First Name120 | Posted: 02-11-2021



Similar questions

python - Which Eclipse package should I download for PyDev?

Which Eclipse package should I choose for Python development with PyDev? Nothing on the Eclipse homepage tells me what to choose, and the PyDev documentation assumes I already have Eclipse installed. Does it matter which Eclipse package I choose?


python - Create zip archive for instant download

In a web app I am working on, the user can create a zip archive of a folder full of files. Here here's the code: files = torrent[0].files zipfile = z.ZipFile(zipname, 'w') output = "" for f in files: zipfile.write(settings.PYRAT_TRANSMISSION_DOWNLOAD_DIR + "/" + f.name, f.name) downloadurl = settings.PYRAT_DOWNLOAD_BASE_URL + "/" + settings.PYRAT_ARCHIVE_DIR + "/" + filename output = "...


python - How to download a webpage in every five minutes?

I want to download a list of web pages. I know wget can do this. However downloading every URL in every five minutes and save them to a folder seems beyond the capability of wget. Does anyone knows some tools either in java or python or Perl which accomplishes the task? Thanks in advance.


php - Serving file download with python

Hey gang, I'm trying to convert a legacy php script over to python and not having much luck. The intent of the script is to serve up a file while concealing it's origin. Here's what's working in php: <?php $filepath = "foo.mp3"; $filesize = filesize($filepath); header("Pragma: no-cache"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); // force downl...


python - How to make a private download area with django?

I would like to implement a private download area on a website powered by django. The user would have to be logged in with the appropriate rights in order to be able to get some static files. What would you recommend for writing this feature. Any tips or tricks? Thanks in advance Update: Maybe because of my bad english or my lack of knowledge about this architecture (that's why I am asking) but my q...


http - Will this urllib2 python code download the page of the file?

urllib2.urlopen(theurl).read() ...this downloads the file. urllib2.urlopen(theurl).geturl()...does this download the file? (how long does it take)


python - "download link " fails in IE

I was trying to implement a "download link" and put it beside one of my report table so that users can download a csv file and open it with applications like Excel. The records are generated dynamically based on the query made by users. So somewhere in my controller there's something like: response.headers['Content-Type'] = 'text/csv' response.headers['Content-Disposition'] = 'attachment; fi...


http - Download file using urllib in Python with the wget -c feature

I am programming a software in Python to download HTTP PDF from a database. Sometimes the download stop with this message : retrieval incomplete: got only 3617232 out of 10689634 bytes How can I ask the download to restart where it stops using the 206 Partial Content HTTP feature ? I can do it using wget -c and it works pretty well, but I would like to im...


google chrome - Download Videos from Youtube with Python

I am hoping to write a script that will allow for the detection of video on a url and provide a download link to a *flv for google chrome. Anyone have any suggestions were to start and get a footing?


python - How to design a twisted solution to download a file by reading on certain portion?

How do I download a remote file into several chunks using twisted? Lets say if the file is 100 bytes, I want to spawn 10 connection which will read 10 bytes each but in no particular order and then later on merge them all. I was able to do this using threads in Python but I don't have any idea how to use twisted's reactor + manager + protocol to achieve the same. Any advice as to how should I design this?






Still can't find your answer? Check out these communities...



PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python



top