example code for doing it in pure python:
http://code.activestate.com/recipes/576810-copy-files-over-ssh-using-paramiko/
--
https://mail.python.org/mailman/listinfo/python-list
On Aug 13, 7:59 am, Julio Cesar Rodriguez Cruz
wrote:
> Hi all,
> If I open an .exe file in any text editor I get lot of odd chars,
> what I want is to know how to output those chars if I have the hexadecimal
> code. I found out how to do the reverse process with the quopri module,
>
> i.e.:>>> im
On Nov 24, 11:08 pm, Raymond Hettinger wrote:
> I'm writing-up more guidance on how to use super() and would like to
> point at some real-world Python examples of cooperative multiple
> inheritance.
>
> Google searches take me to old papers for C++ and Eiffel, but that
> don't seem to be relevant
Cool! Thanks to both Iliya and Peter!
On May 6, 7:34 pm, Peter Otten <__pete...@web.de> wrote:
> coldpizza wrote:
> > Hello,
>
> > I need to convert accented unicode chars in some audio files to
> > similarly-looking ascii chars. Looks like the following cod
Hello,
I need to convert accented unicode chars in some audio files to
similarly-looking ascii chars. Looks like the following code seems to
work on windows:
import os
import sys
import glob
EXT = '*.*'
lst_uni = glob.glob(unicode(EXT))
os.system('chcp 437')
lst_asci = glob.glob(EXT)
print sys
instsrv.exe does not come with Windows by default, but I guess it
should be possible to add a service using the win32 built-in `sc`
command line tool.
Try `sc create` from a console.
The app you want to install as a service will still have to be
compliant with the win32 service interface, otherwi
Why don't you just use Curl? It does a dozen of protocols including
SFTP. And if the command line version is not enough for you then there
are Python bindings for Curl.
On Feb 20, 4:22 pm, Thomas Allen wrote:
> I'm interested in writing a script to ease deployment of minor changes
> on some websi
This is not a Pamie issue. Pamie can only see the HTML part of the
page. Any object embedded in the page using the or
tags is not accessible to the browser, and the browser has no idea
what is inside those objects - it simply passes control to the
corresponding plugin, such as Java, Flash, Active
I am writing a Tk GUI for a console script. I start a background
thread and pass it a callback function which writes debug info to a
Text widget in the main Tk loop.
I tried to find what is the established way to cleanly abort a child
thread when the user clicks the Stop button, but apparently Pyt
And btw, Selenium scripts can be exported to Python and run under
Selenium Remote Control server.
I'd say this is the most flexible and advanced way to do webtesting,
since you can have a single script that runs with many browsers
(opera, firefox, ie, etc), and on many platforms.
And combined wit
You should have a look at twill:
http://twill.idyll.org
It seems to be no longer maintained, but will probably do most of what
you expect. And it is built on top of mechanize.
On Feb 13, 4:04 pm, News123 wrote:
> Hi,
>
> I'd like to do some web automation with python 2.5
> - https:
> - a coo
If you are using and IDE, such as Eclipse, PyScripter, etc, then CTR
+click on 'this' should do the trick.
In ipython you can do 'import this' and then type 'this??' Or if you
are *not* lazy, you could try locating the file in the Python tree.
> import this
> # btw look at this module's source :)
Having read through the link below I finally managed to grasp some
concepts that I only read about in the docs but never got to really
understand. Maybe it will be helpful for people like myself who are
not yet fully comfortable with some of Python's `hidden' features.
http://stackoverflow.com/que
the subject has exhausted itself and I am not going to
follow it up. If anyone is interested in taking it on, then please do.
Best,
coldpizza
On Jan 29, 6:01 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> "André" <[EMAIL PROTECTED]> wrote in message
>
> ne
There is a pattern that occurs fairly often in constructors in Python
and other OOP languages.
Let's take an example:
class Server(object):
def __init__(self, host, port, protocol, bufsize, timeout):
self.host = host
self.port = port
self.protocol = protocol
se
I suppose that if the file is really big and you don't need to read
all of it
then instead of f.readlines() you could use f.read(256) to read just
the first 256 bytes.
On Jan 18, 7:28 am, Astan Chee <[EMAIL PROTECTED]> wrote:
> How about:
>
> import socket, urllib2
>
> timeout = 10
> socket.setdef
with mod_python and it works
transparently with no explicit charset translation required.
On Jan 16, 4:31 pm, Sion Arrowsmith <[EMAIL PROTECTED]>
wrote:
> coldpizza <[EMAIL PROTECTED]> wrote:
> >I am using this 'word' variable like this:
>
> >print u'&
Hi,
I have a basic Python CGI web form that shows data from a SQLite3
database. It runs under the built-in CGIWebserver which looks
something like
this:
[code]
from BaseHTTPServer import HTTPServer
from CGIHTTPServer import CGIHTTPRequestHandler
HTTPServer("8000", CGIHTTPRequestHandler).serve_fo
Hi,
I have a basic Python CGI web form that shows data from a SQLite3
database. It runs under the built-in CGIWebserver which looks like
this:
[code]
import SimpleHTTPServer
import SocketServer
SocketServer.TCPServer(("",
80),SimpleHTTPServer.SimpleHTTPRequestHandler).serve_forever()
[/code]
The
> Unicode != UTF-8.
...
>`encode()` method is your friend.
Thanks a lot for help!
I am always confused as to which one to use: encode() or decode(); I
have initially tried decode() and it did not work.
It is funny that encode() and decode() omit the name of the other
encoding (Unicode ucs2?), wh
Hi!
I am using the built-in Python web server (CGIHTTPServer) to serve
pages via CGI.
The problem I am having is that I get an error while trying to display
Unicode UTF-8 characters via a Python CGI script.
The error goes like this: "UnicodeEncodeError: 'ascii' codec can't
encode character u'\u02
On Sep 24, 7:23 am, Lawrence D'Oliveiro <[EMAIL PROTECTED]
central.gen.new_zealand> wrote:
> In message <[EMAIL PROTECTED]>, coldpizza
> wrote:
>
> > So far, with mysql I use 'SELECT * FROM TABLE LIMIT L1, L2' where L1
> > and L2 define the range fo
Hi,
I want to run a database query and then display the first 10 records
on a web page. Then I want to be able to click the 'Next' link on the
page to show the next 10 records, and so on.
My question is how to implement paging, i.e. the 'Next/Prev' NN
records without reestablishing a database con
added
records?
And how do set the encoding for the retrieved records? Is it always
utf-8 by default?
On Jul 16, 11:21 pm, Roel Schroeven <[EMAIL PROTECTED]>
wrote:
> coldpizza schreef:
>
> > I am trying to fill a sqlite3 database with records, and to this end I
> > h
I am trying to fill a sqlite3 database with records, and to this end I
have written a class that creates the db, the table and adds rows to
the table.
The problem is that the updating process is *extremely* slow, and
occasionally I get the message "database locked".
I tried removing "self.con.com
25 matches
Mail list logo