[Tutor] CSV row and column width automation

2018-01-03 Thread renukesh nk
Hi,

Is there any way to automatically set the column and row width in a CSV
file through python script
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] CSV row and column width automation

2018-01-03 Thread Alan Gauld via Tutor
On 03/01/18 05:31, renukesh nk wrote:

> Is there any way to automatically set the column and row width in a CSV
> file through python script

I'm not sure what you mean. CSV files don't have widths,
they are just sequences of data strings separated by commas.
Each piece of data takes as much space as it needs.

You could write code to force the strings to all
be the same width as the longest string but that would
just be making life harder for yourself when it comes
to extracting it again. CSV is a data transport mechanism
not a display format.

Are you thinking about some kind of display mechanism
like a web page table or a spreadsheet perhaps? They
have widths. But how you set them is very different
so you'd need to tell us what kind of table you have
in mind.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] How to handle passwords in programs that perform FTP processes?

2018-01-03 Thread boB Stepp
Python 2.4, Solaris 10.

I have several programs that must transfer files from our Solaris
10-based intranet to our Windows-based intranet.  They each have their
own shell script to perform these file transfers, each customized for
each program.  Today I wrote a Python 2 program using the ftplib
module that will replace all of these shell script programs and
provide a standard interface for doing these transfers.  It also will
serve as a method for me to backup my programs on the Solaris 10-based
intranet to a location on the Windows side.  Even though these
networks are supposed to be secure intranets where those who need to
know know the generic user name and password for the FTP server, I
would like to be as secure as possible with this information.  How do
I go about doing this?  I am limited to whatever is available on the
Solaris 10 operating system and it must work with Python 2.4 and its
available standard libraries.  I cannot use any outside software.
However, I am free to write all the software I might like, assuming I
can find time to do so.  What would you sage Pythonistas recommend for
my situation?
-- 
boB
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor