Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[open] Changing the logfile generic name

edited December 2014 in OpenSesame

Dear OpenSesame developers,

We are running (with success!) experiments on Android tablets and, for the sake of simplicity, I am looking for a way to create in the code the generic name of the logfile (for example: 'exp1' instead of 'subject-' or 'defaultlog'), so that the researchers who are running the experiment just need to input the subject number.
I am aware of the experiment.init function but I am lacking examples...

What should I write, and where?

Is there also a way to suppress the location prompt?

Thank you very much in advance!
Best,

C.

Comments

  • edited 7:31PM

    Hi C,

    I don't know much about the Android version, but the generic name for the logfile is defined in this, (line 99) file. If you find it on your system, I guess you can try replacing subject with whatever you prefer.

    Good luck,

    Eduard

    Buy Me A Coffee

  • edited 7:31PM

    Hello Eduard,

    Thank you for your fast answer and for your solution.
    I was thinking of a way to do so in the OpenSesame experiment (through an inline object, for instance), not in the Python code, as I don't seem to have access to it in Android...
    Sorry for the misunderstanding!
    Please, let me know if you have a solution!

    Best,

    Coralie

  • edited 7:31PM

    aah, too bad, I was afraid so. I don't really know how to solve this elegantly, sorry. Another work around might be to close the log file in the very end of the experiment, open it again and save it as another file. To do so, standard python function should be enough.

    Well, maybe @Sebastiaan knows a better solution?

    Eduard

    Buy Me A Coffee

  • edited 7:31PM

    Thank you for your solution, Eduard.
    Sebastiaan, let us know if you have another solution!

    Coralie

  • edited 7:31PM

    Another work around might be to close the log file in the very end of the experiment, open it again and save it as another file. To do so, standard python function should be enough. Well, maybe @Sebastiaan knows a better solution?

    It might be slightly easier to close and re-open the logfile as the first thing in the experiment. Something like this should do the trick:

    import codecs
    exp._log.close()
    exp._log = codecs.open('my_new_logfile.csv', 'w', encoding='utf-8')
    

    Note that codecs.open() allows for transparent writing of unicode data, but is otherwise the same as plain open().

    Is there also a way to suppress the location prompt?

    Not easily. The only way to bypass (or change) the menu is by creating your own .apk package, using the setup-android.py included with the OpenSesame source code. But that would take a bit of hacking.

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games