Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

fputs

30 views
Skip to first unread message

hassan

unread,
Jun 5, 2012, 9:54:54 AM6/5/12
to hasan alnator
Dear ALL ,

what is the equivalent to the php fputs in python


regards,

Ulrich Eckhardt

unread,
Jun 5, 2012, 11:38:51 AM6/5/12
to
Am 05.06.2012 15:54, schrieb hassan:
> what is the equivalent to the php fputs in python

If that fputs() is the same as C's fputs(), then write() is pretty
similar. Check the documentation for files, you will surely find the
equivalent.


Uli

Rhodri James

unread,
Jun 5, 2012, 12:20:24 PM6/5/12
to
On Tue, 05 Jun 2012 14:54:54 +0100, hassan <haln...@gardeniatelco.com>
wrote:

> what is the equivalent to the php fputs in python

The write() method of the file object. Though if you're
asking the question like that, you need to read this:

http://docs.python.org/tutorial/inputoutput.html#reading-and-writing-files

...and stop trying to think in terms of PHP. While you
can write PHP in any language (I know people who still
write FORTRAN, whatever language they might be using),
you'll find that getting into the right mindset for
whatever language you are using works a lot better.

--
Rhodri James *-* Wildebeest Herder to the Masses
0 new messages