First of all, DTV stands for "Destination Thailand Visa".
You can apply from France, or any country where you hold a long-term resident permit.
You can NOT apply to any Thai Embassy/Consulate worldwide. For example the Thai consulate in Los Angeles, Hong Kong, Japan, UAE, etc will definitely reject your application, even if you were in those countries.
There is a Thai embassy in Tehran. Best try at home, since Iran is a "restricted" country like many African countries. I'm African and got mine at home. By restricted I mean we can't get it from neighboring countries like Vietnam or Laos.