I am using Ubuntu 13.04 version and raspberry device is connect with my laptop through Ethernet cable. I want to transfer some python(.py) file to raspberry pi.
How I transfer data or files between them?
$ mkdir ~/rpi_mount
$ sshfs email@example.com:/dir/to/mount ~/rpi_mount/
fusermount -u rpi_mount
Using the GUI
If the above doesn't work, make sure you are in the fuse group on your laptop:
$ groups. If you don't see your username in the list, add it to the fuse group:
$ sudo usermod -g fuse $USER
More info here
scp mypythonfile.py firstname.lastname@example.org:/home/username/
You'll be prompted to enter the username's password. This also assumes you are running Raspbian (or some other Linux distro) and have SSH setup (it is setup by default in Raspbian).
Using direct Ethernet? Why?
To even make direct talk possible you would need a crosstalk cable, which is an ethernet cable where the wires are crossed so that what is output by one computer is received on the input pins of the other.
This will take some specific knowledge of socket protocols, but could be done. My suggestion would be to use a router as an intermediate or transfer with a flashdrive.