--- Simone Weil, quoted by Toril Moi in "I came with a sword," an LRB review of The Subversive Simone Weil: A Life in Five Ideas, by Robert Zaretsky
From Moi's piece:
Zaretsky rightly devotes a chapter to Weil’s ideas on attention. For her, attention is not focused, tense concentration. It has nothing to do with willpower. Attention is attente – a waiting, a letting go, an unselfish opening. To struggle with a problem in geometry is valuable whether or not we manage to solve it, because it teaches us to be open to God and therefore to others. The ‘love of God’, she writes
has attention for its substance; the love of our neighbour ... is made of this same substance. Those who are unhappy have no need for anything in this world but people capable of giving them their attention. The capacity to give one’s attention to a sufferer is a very rare and difficult thing; it is almost a miracle; it is a miracle.
The point of studying is not to learn this or that, but to acquire this discipline of the soul. Weil argues that we can train our attention by doing geometry, Greek and Latin translation and by writing, if we are willing to wait for the right word to come. ‘The intelligence,’ Weil writes in a passage I particularly love, ‘can only be led by desire. For there to be desire, there must be pleasure and joy in the work. The intelligence only grows and bears fruit in joy. The joy of learning is as indispensable in study as breathing is in running.’ Weil’s method is hardly a way to get straight As, for if there is no joy, there should be no work. As always, she practised what she preached. She failed the entrance exams to the École Normale the first time she tried, because she disliked her history teacher and so never turned up for his classes.
I believe the quote is from "Reflections on the Right Use of School Studies with a View to the Love of God." Here is a reprint (pdf); see there for source and translator.