[python-uk] QTableWidget - add from my files to table
Jonathan Hartley
tartley at tartley.com
Fri Jan 20 09:42:44 CET 2012
On 20/01/2012 01:19, Dodi Ara wrote:
> i wondering, how can i add from my files to table widget?
>
>
>
> for example, i have one file
>
> $ cat a
> tes
> $
>
> so, the "test" fill in the one or more row or columns
>
> any help will be appreciate
> _______________________________________________
> python-uk mailing list
> python-uk at python.org
> http://mail.python.org/mailman/listinfo/python-uk
>
This mailing list is intended more for discussion of Python events and
stuff of interest to people in the UK, rather than for questions about
use. You probably want python-tutor mailing list, which you can read
about here:
http://mail.python.org/mailman/listinfo/tutor
To give a quick answer though, you read the lines from a file using
something like:
with open('filename') as fp:
for line in fp:
print line
Then you'll have to read the QTableWidget documentation to find out how
to add those lines to it, instead of printing them.
Best regards,
Jonathan
--
Jonathan Hartley tartley at tartley.com http://tartley.com
Made of meat. +44 7737 062 225 twitter/skype: tartley
More information about the python-uk
mailing list