Iran is turning to its own advantage at home its unparalleled isolation in world councils caused by the four-week-old seizure of hostages at the American Embassy.

Privately, Iranian officials are upset by their diplomatic loneliness.Newspapers, radio and television make no mention of the fact, for example, that even Libya, trumpeted here as a fast ally, has denounced the holding of hostages.

But now that a compromise seems far off, the crisis with the United States is being used to justify some favorite Iranian revolutionary themes.

Those themes vary from the innate wickedness of superpowers, especially the United States, to the need for self-sufficiency in all fields and a latterday Gaullist pleasure in thumbing noses at the world's high and mighty.

American economic pressure, actually only threatened, is seen as a blessing in disguise by Moslem fundamentalists steeped in the traditions of martyrdom and convinced that materialism, and especially urban society, are major evils.

In reply to U.S. economic retaliation for the embassy seizure -- a boycott of Iranian oil, a freeze of Iranian funds in U.S. banks and the refusal of American unions to load ships bound for Iran -- Ayatollah Ruhollah Khomeini called for a five-day fast. It apparently was followed seriously by the more religious segments of Iranian society.

Rarely has a ruling group been better disposed to "small-is-beautiful philosophies than the men around Khomeini.

Iran's revolution believes itself unique in the contemporary world in rejecting materialism. Indeed, the new constitiution actually includes an article stating that profit is not the be-all and end-all of the Islamic Republic.

The David vs. Goliath aspects of the crisis also have helped the regime in its determination to make a clean break with Iranian dependence on foreign powers. Such dependence far predates the U.S. role in Iran of the past quarter century.

In denouncing the United States the revolutionaries, whether they realize it or not, are attacking Britian and the Soviet Union, which for more than a century were the paramount powers in a country they never bothered to colonize officially, but did occupy when they felt like it.

Like many other revolutionaries before them, Iran's rulers want to produce a new man innocent of foreign political, social, economic and especially cultural influences.

Nothing could suit their case more than the perceived threats of American military intervention, which tend to justify their mythic projection of the United States as the "Great Satan" or quintessence of all the ills they seek to cure in Iran.

The oil weapon, moreoever, is brandished as proof that Iran is not alone even if Khomeini has yet to persuade any other member of the Organization of Petroleum Exporting Countries to go along with either refusing sales to the United States or use of the dollar to settle accounts.

Behind the Iranians' threats to put the remaining 50 hostages on trials for espionage lies a similar desire to make the foreign role in Iran an object lesson not only for Iranians, but also for the rest of the Third World.

Iran's revolutionaries clearly want to stage their equivalent of the Nuremberg war crimes or Israel's Eichmann trial.

The revolutionaries lost a golden chance to do just that when they summarily tried and shot two men who could have served that purpose perfectly: Amir Abbas Hoveyda, for 13 years the shah's prime minister, and Nematollah Nassiri, the longtime chief of SAVAK, the shah's dreaded secret police.

No such mistake is likely to occur with the American hostages or with the shah himself, even if his trial eventually takes place in absentia despite the revolutionaries' best efforts to extradite him.

Already, Finance Minister Abol Hassan Bani-Sadr and Central Bank Governor Ali Reze Nobari are heading a team assembling documents to be used in any such trial of the deposed monarch.

Even the lack of sympathy abroad for their seizure of the hostages has been used in an attempt to limit damage at home to the leadership's credibility.

Taking a leaf from the Marxist book, Iran's Islamic revolutionaries now argue that the American people are being hoodwinked by the evil American government.

Such reasoning belies President Carter very real backing on the crisis and the fact that he was freely elected.

If the American people have not seen through Carter's game, the revolutionaries are saying, it's because the Western, and especially American, press has been censored and in the grips of the administration.

Somewhat similarly, Khomeini has warned that if the leaders of Iran's oil-rich Arab neighbors do not help him in his showdown with the United States, then he will appeal directly to their peoples and they risk their own downfall.

The present American economic measures, if continued can be expected to accelerate the breakdown of the economy visible since the February revolution. Blaming it all on the Americans may work, at least for a while.

But sooner or later the Iranian revolutionary ideal of Islamic autarchy may dim. Former prime minister Mehdi Bazargan, whose ineffective government fell when his radical critics in the Revolutionary Council backed the radical Islamic students' takeover of the U.S. Embassy, recently sounded a warning.

"Whether we like it or not, we are in the 20th century," he said. "We cannot build a Wall of China around us. We have to equip our agriculture and industry using Western civilization in order to become self-sufficient."