Python question

2010-04-09 Thread Binary
How much space approximately is required to install the following packs on 
Windows XP?


pycairo-1.4.12-2.win32-py2.6.exe
python-2.6.1.msi
pygobject-2.14.2-2.win32-py2.6.exe
pygtk-2.12.1-3.win32-py2.6.exe
pywin32-213.win32-py2.6.exe
gtk-2.12.9-win32-2.exe

Does all this packs requires installation,  or it's possible just extract 
and place them in to C: drive, then to set environment variables properly?
Does this packs installs dynamic libraries and writes to registry? 


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


Re: School Management System in Python

2017-07-05 Thread Binary Boy
On Wed, 5 Jul 2017 15:28:51 +0200, Thomas Nyberg wrote:
> On 07/05/2017 03:18 PM, YOUR_NAME_HERE wrote:
> > On Wed, 5 Jul 2017 13:02:36 + (UTC) YOUR_NAME_HERE wrote:
> >> I can use either tsv or csv. Which one would be better?
> > 
> > 
> > Some people complain that tsv has problems, so maybe csv would be the way 
> > to go.
> > 
> I almost always use csv personally, but it's a preference. I'm not sure
> what the problems are you're refering to, but I guess that points to
> using commas as well. Either way, it's not hard to switch between the two:
> 
> import csv
> 
> # Using regular commas
> with open('outfile.csv', 'w') as outfile:
> writer = csv.writer(outfile)
> writer.writerow(range(5))
> 
> # Using tabs
> with open('outfile.tsv', 'w') as outfile:
> writer = csv.writer(outfile, delimiter='\t')
> writer.writerow(range(5))
> 
> Cheers,
> Thomas

This will prove useful to me. Thanks!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to write raw strings to Python

2017-07-05 Thread Binary Boy
On Wed, 05 Jul 2017 20:37:38 +0300, Jussi Piitulainen wrote:
> Sam Chats writes:
> 
> > On Wednesday, July 5, 2017 at 9:09:18 PM UTC+5:30, Grant Edwards wrote:
> >> On 2017-07-05, Sam Chats  wrote:
> >> 
> >> > I want to write, say, 'hello\tworld' as-is to a file, but doing
> >> > f.write('hello\tworld') makes the file look like:
> >> [...]
> >> > How can I fix this?
> >> 
> >> That depends on what you mean by "as-is".
> >> 
> >> Seriously.
> >> 
> >> Do you want the single quotes in the file?  Do you want the backslash
> >> and 't' character in the file?
> >> 
> >> When you post a question like this it helps immensely to provide an
> >> example of the output you desire.
> >
> > I would add to add the following couple lines to a file:
> >
> > for i in range(5):
> > print('Hello\tWorld')
> >
> > Consider the leading whitespace to be a tab.
> 
> import sys
> 
> lines = r'''
> for line in range(5):
> print('hello\tworld')
> '''
> 
> print(lines.strip())
> 
> sys.stdout.write(lines.strip())
> sys.stdout.write('\n')

Thanks! But will this work if I already have a string through a string 
variable, rather than using it directly linke you did (by declaring the lines 
variable)?
And, will this work while writing to files?

Sam
-- 
https://mail.python.org/mailman/listinfo/python-list