i want to execute youtube-dl command in python. So that i can save my favorite videos.  Something like that:    import os   youtube-dl any_link
2579
How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script?
25876
If you have copied a zombie herobrine command what do you press on your computer to put the command in the command block?
55068
Basically I want to at least check that a download-able file exists / download link works and preferably get stuff like the file size too. Here's an example: link = self.browser.find_element_by_link_text('link text') href = link.get_attribute('href') download = self.browser.get(href) print download  That fourth line prints &quot;None&quot;, presumably because I haven't manually clicked the Save button, and even if I had, I doubt WebDriver would be able to &quot;see&quot; the file. Any ideas? I'm using Firefox as my browser-under-test, and I understand that the file handling for downloads is somewhat browser and/or OS-specific.
5726
I'm trying to read the target file/directory of a shortcut (.lnk) file from Python. Is there a headache-free way to do it? The  is way over my head. I don't mind using Windows-only APIs.  My ultimate goal is to find the "(My) Videos" folder on Windows XP and Vista. On XP, by default, it's at %HOMEPATH%\My Documents\My Videos, and on Vista it's %HOMEPATH%\Videos. However, the user can relocate this folder. In the case, the %HOMEPATH%\Videos folder ceases to exists and is replaced by %HOMEPATH%\Videos.lnk which points to the new "My Videos" folder. And I want its absolute location.
65507
I am trying to download a playlist using youtube -dl but getting an error.  Command:  youtube-dl --playlist-start 1 https://www.youtube.com/playlist?list=PL8B24C31197EC371C   Output:      [youtube:playlist] PL8B24C31197EC371C: Downloading page #1 ERROR: Unable to download webpage: &lt;urlopen error [Errno 8] _ssl.c:510: EOF occurred in violation of protocol&gt;   What should i do?
5312
I thought I heard that  was able to do this, but I never figured it out.  Has anyone successfully done this?  Can I see your setup.py file, and what command line options you used?  Basically I'm thinking of it giving me a single executable file that does something like unzips itself to maybe /temp and runs.
50636
How do I execute a string containing Python code in Python?
109257
I realise this might be quite a simple question, but I'm still quite new to the command line and only have a grasp of basic commands.  I've downloaded some lecture presentations (~25 or so) from my University however on doing so they've been named things like...  L2%20Development%20of%20immune%20system.pptx L4%20Molecular%20Recognition.pdf   As you can see they've downloaded with the URL encoding %20 instead of a space.  My question is how to batch rename all of these files so that the %20 is removed and replaced with a space instead?
27009
I wish to execute a video in my PC and stream it in the LAN so anybody can connect to it and watch it. What steps do I need to do to accomplish this in an easy manner.
4303
I want to repeatedly execute a function in Python every 60 seconds forever (just like an  in Objective C). This code will run as a daemon and is effectively like calling the python script every minute using a cron, but without requiring that to be set up by the user.  In , the solution appears to effectively just  for x seconds. I don't need such advanced functionality so perhaps something like this would work  while True:     # Code executed here     time.sleep(60)   Are there any foreseeable problems with this code?
94915
A Youtube video can be watched standalone or it could be a part of a playlist. Example:   and     Notice the part vbsNiOkm0BU.    The question is to get this part for all the videos of the channel/playlist.    The motive is to download all the videos of this channel (approximately 3600). But I haven't got success with youtube-dl downloading all at once. So I wish to download it in bunch of 100s, as an example.    If I could take this question further, can I write a bash script to download only particular indexes of a playlist?    If you see the above link:  Notice the part &amp;index=141.    Now if do something like this:  for i in {100..200} do youtube-dl https://www.youtube.com/watch?v=vbsNiOkm0BU&amp;index=${i}&amp;list=UUmM7KPLEthAXiPVAgBF6rhA done   Notice the part &amp;index=${i}.  This is downloading the same video again and again, due to vbsNiOkm0BU.  Any help on this would be greatly appreciated. Thank you.
18192
I have been developing a few python addins and I'm just wondering what is the best way to re-compile the addin anytime I edit the script.  Currently, if I make an edit to the script, it seems like I have to   Close ArcMap Go to My addin folder and double click the 'makeaddin' python file Double click the 'Python Addin File Restart ArcMap for the changes to come into effect   If I don't do these steps, then the edits aren't recognized. This gets pretty annoying and time consuming when I want to place maybe a simple print line somewhere or I do a small edit just to test a result.  Is there a better way of doing this?
31624
Possible Duplicate:          How to download a Youtube video from command line?  Mac OS X and/or Ubuntu Linux. Optionally, i'd like to save it in .avi or .mkv format.
88360
Is it possible for now to watch live youtube video streams using vlc? I just don't want to use flash player. I know that vlc can play youtube videos using link for the page where that video is located, but how about live youtube videos?
61452
Is it possible to run a Python script when a file has been added to a folder?  In my scenario I have a folder that contains movies and the Python script gets the details (name, year, plot, rating, etc) from OMDb and puts them into a file, which MySQL uses.   Every time I add a movie I have to run the Python script.  I want to know if it is possible to automatically run the Python script when a file has been added to the folder?  Thanks in advance.
45426
If you have a series of subfolders (like from a to z) and want to run a command on each one of them (like rm *.pdf or ls *.pdf), how do you do that? The "manual" approach would be cd a, rm *.pdf, or ls *.pdf, cd .., cd b, ... That seems too complicated, so I believe there must be an easier approach.
75931
I'm currently trying to modify the default URL handling behavior in OS X. I would like, when clicking on any link outside of a web browser, to copy this URL to the pasteboard instead of opening it in the default web browser – for instance, clicking a link in a Skype conversation should copy this URL to the OS X pasteboard instead of opening it in Firefox (which is currently my default web browser).  I have thought about solutions, but I’m currently unable to implement one. If I can create an application that puts URLs into the pasteboard that are sent to it, and can set this application as the default web browser, I would be able to achieve my goal.  I created an application with Automator that executes the shell command pbcopy and have set this application as my default web browser, but I didn’t get the expected result. I did some testing and I can confirm that the application runs on clicking on a link, however, I cannot get the URL passed to the application / shell script. I tried both stdin or a passed argument, but without success.  Is there a way for an application created with Automator to retrieve a clicked URL and send it to pbcopy, when that application is set as a (default) handler for URLs?  Alternatively, is there a better way to create a fake web browser that takes the input and puts it in the pasteboard than Automator? Or is there any other way that I can achieve my goal without a custom application / script?