On 07/02/2013 06:06 AM, Chris “Kwpolska” Warrick wrote:
On Tue, Jul 2, 2013 at 11:40 AM, Νίκος <ni...@superhost.gr> wrote:
Στις 2/7/2013 10:21 πμ, ο/η Cameron Simpson έγραψε:

On 02Jul2013 08:57, Νίκος <ni...@superhost.gr> wrote:
| Thank you, the error have been caused due to the fact that the
| uploading procedure of my edited 'pelatologio.py' hadn't been
| completed yet, while i was requesting the execution of the script
| via browser.
|
| I didn't had to do anything it solved by itself, after upload was
| successful and file got  unlocked for access.

If you're uploading using sftp (or, worse, ftp), might I suggest
using rsync instead? Amongst other features, it uploads to a temporary
file and then renames the temporary file to the real file. There is
no window where the "live" file is being written to. The live file
is the old one, and then later it is the new one.



Actually i'm uploading via Notepad++'s NPPFtp plugin, which i'm afraid is
pure ftp and not even sftp.

The only thing SFTP and FTP have in common is that they are Internet
protocols.  Inside, they are much, much different.  And you should
NEVER use FTP.  (also, why Notepad++?  I’d suggest getting a better
editor first.)

If i try to upload via FileZilla instead(which i can use as sftp on port
22), then it messes the cgi scripts encoding by uploading it as iso-8859-7
which then i need to ssh to the remote host and change it back to utf-8.

You need to reconfigure FileZilla then.  Site Manager (first icon on
the toolbar) → your site → Charset → Force UTF-8.

Much better: upload all files as binary, so they are byte for byte identical on both systems. Sometimes that might require some local preparing, but that beats strange problems with encodings, line endings, etc.

Perhaps it's obvious, but that also means a local staging area whose directory tree is identical to the target system.


Also sometimes it takes a lot of time even with Notepad++ to even upload a
50 KB script.

Please tell me how to use the rsync method especially it would be best if i
cna use it via text editor, Notepad++ or even better with Sublime Text.

Once you have done my suggestions above, a single rsynch command will upload any files that have changed, without you specifying which ones they are. So you don't need the "integrated file transfer feature" of various editors & guis. You just run one batch file which you set up, and when it finishes, the systems will match.


Under Windows?  I suggest installing Cygwin or switching over to
Linux, for your sanity.  If you don’t want either, look for a Windows
port of rsync.  The next step is to read the included man page.


rsynch has lots of option switches, but once set up, it's trivial to use.



--
DaveA
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to