How can I login to a website with Python?

Maybe you want to use twill. It’s quite easy to use and should be able to do what you want. It will look like the following: from twill.commands import * go(‘http://example.org’) fv(“1”, “email-email”, “blabla.com”) fv(“1”, “password-clear”, “testpass”) submit(‘0’) You can use showforms() to list all forms once you used go… to browse to the site … Read more

Choosing a Windows automation scripting language. AutoIt vs Autohotkey [closed]

I think AutoHotkey’s GUI implementation is easier to use like many of its commands. AutoHotkey (no longer maintained) has 3 forks : AutoHotkey v1.1.* (previously known as AutoHotkey_L) has COM, Unicode support, object-oriented -like syntax, arrays, and more. AutoHotkeyCE works on Windows mobile PDA’s and smartphones (unfinished, no longer maintained). IronAHK, a .NET version of … Read more

How can I automate the “generate scripts” task in SQL Server Management Studio 2008?

SqlPubwiz has very limited options compared to the script generation in SSMS. By contrast the options available with SMO almost exactly match those in SSMS, suggesting it is probably even the same code. (I would hope MS didn’t write it twice!) There are several examples on MSDN like this one that show scripting tables as … Read more

How do you automate Javascript minification for your Java web applications?

Round-up post If you post something new in this thread, edit this post to link to yours. Ant apply task (using YUI Compressor) Custom YUI Compressor Ant task Maven YUI Compressor plugin Granule (for JSP, JSF, Grails, Ant) Ant macros for Google Closure compiler wro4j (Maven, servlet filters, plain Java, etc) ant-yui-compressor (ant task for … Read more

How to copy a file to a remote server in Python using SCP or SSH?

To do this in Python (i.e. not wrapping scp through subprocess.Popen or similar) with the Paramiko library, you would do something like this: import os import paramiko ssh = paramiko.SSHClient() ssh.load_host_keys(os.path.expanduser(os.path.join(“~”, “.ssh”, “known_hosts”))) ssh.connect(server, username=username, password=password) sftp = ssh.open_sftp() sftp.put(localpath, remotepath) sftp.close() ssh.close() (You would probably want to deal with unknown hosts, errors, creating any … Read more

Auto-reload browser when I save changes to html file, in Chrome?

Pure JavaScript solution! Live.js Just add the following to your <head>: <script type=”text/javascript” src=”https://livejs.com/live.js”></script> How? Just include Live.js and it will monitor the current page including local CSS and Javascript by sending consecutive HEAD requests to the server. Changes to CSS will be applied dynamically and HTML or Javascript changes will reload the page. Try … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)