[vmchecker-dev] script update note

Claudiu Gheorghe claudiugh at gmail.com
Tue Sep 9 08:16:48 EEST 2008


2008/9/9 Alexandru Moşoi <brtzsnr at gmail.com>:
> claudiu,
>
> poti sa-mi spui cum creezi baza de date? poti sa modifici scriptul
> anei sa creeze baza initiala [1]?
Nu uitasem de el, dar nu am avut cand... O sa il modific cat mai curand
> am incercat sa ma joc putin cu
> scriptul tau si am avut nitel probleme.
Nu am tratat cazul cand nu exista baza de date. O sa adaug verificarea
asta in toate scripturile si cu crearea automata in cazul in care nu
exista
>
> [1] http://dev.rosedu.org/trac/vmchecker/browser/trunk/bin/initialise_course.py
>
> 2008/9/7 Claudiu Gheorghe <claudiugh at gmail.com>:
>> Am comis acum modificarile.
>> De asemenea, am eliminat print-urile pentru fiecare dentry parcurs,
>> outputul fiind prea verbose. Acum afiseaza doar path-ul notelor
>> updatate.
>>
>> 2008/9/7 Alexandru Moşoi <brtzsnr at gmail.com>:
>>> m-am uitat si eu peste script. lgtm. niste chestii (maj de sintaxa) mai jos
>>>
>>> from xxx import * e descurajat (inclusiv de catre guido). import xxx
>>> si apoi folosesti xxx.yyy
>> Done
>>
>>>
>>> muta chestiile executate in script intr-o functie main() si fa
>>>  if __name__ == '__main__':
>>>   main()
>>>
>> Done
>>
>>> linia 20: transforma alea in cai absolute (cu os.path.abspath()) mai
>>> intai si apoi verifica directorul curent :)
>> Done
>>
>>> docstrigurile incep cu """ nu cu """" (3 ghilimele in loc de 4)
>>>
>> Sorry, a fost un typo si l-am propagat prin copiere
>>
>>> get_grade_modifdata -> grade_modification_time, si fa-l sa returneze
>> Done
>>> un timestamp si nu un string (poti sa stochezi timestampuri intr-o
>>> tabela sql din cate stiu eu)
>> Aici am stat destul de mult pe ganduri si eu.
>> In baza de date campul e setat ca TIMESTAMP intr-adevar, insa la o
>> inregistare autocompletata data arata exact in formatul in care l-am
>> transformat eu, si nu ca numar de secunde de la epoch time. In fine, e
>> posibil ca la afisare clientul ala de Sqlite sa faca si el o
>> conversie.
>> Si in orice caz, adaptorul de python converteste timestampul din
>> sqlite in string unicode, asa ca aleg sa il las asa cum este acum, in
>> stringuri.
>>
>>>
>>> 142: functia poti sa o transformi in (e mai lizibil)
>>> with open(grade_filename) as f:
>>>  value = int(f.read())
>> True. Am citit acum cate ceva despre instructiunea `with`. Nu e chiar
>> banal ce se intampla in spatele ei, sau poate ca sunt prea obosit acum
>> ca sa inteleg
>>
>>>
>>>
>>> 195,196: fara ; la sfarsit de linie
>> da, sorry
>>
>>>
>>> 84: un singur return id_student e suficient :)
>> penibil, intr-adevar :)
>>
>>> 104: nu e nevoie de paranteze pentru tuple-ul ala
>>>
>> Aici n-am inteles de ce sunt parantezele de prisos
>>
>>>
>>> 2008/9/7 Ana Savu <ana.savu86 at gmail.com>:
>>>>
>>>>
>>>> 2008/9/7 Claudiu Gheorghe <claudiugh at gmail.com>
>>>>>
>>>>> Am comis scriptul de update al notelor.
>>>>> Astept un cod review.
>>>>>
>>>>> --
>>>>> Gheorghe Claudiu-Dan
>>>>> Student la Facultatea de Automatica si Calculatoare, UPB
>>>>> tel: +40 726 758 198
>>>>
>>>> De ce nu faci scriptul executabil?
>> Eu le fac pe windows si nu vreau sa va bag C:\pytgon25\python.exe.
>> In fine, am pus #! /usr/bin/pyhon
>>>>
>>>> Incearca sa folosesti modulul 'misc' pentru a afla VMCHECKER_ROOT pentru
>>>> uniformitate
>>>>      17: vmchck_root  = misc.vmchecker_root()
>> Done
>>
>>>>
>>>> In rest e fi bine. Good work!
>>>>
>>>> --
>>>> Ana
>>>>
>>>> _______________________________________________
>>>> vmchecker-dev mailing list
>>>> vmchecker-dev at lists.rosedu.org
>>>> http://lists.rosedu.org/cgi-bin/mailman/listinfo/vmchecker-dev
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Alexandru Moşoi
>>> http://alexandru.mosoi.googlepages.com
>>>
>>> Please avoid sending me Word or PowerPoint attachments.
>>> See http://www.gnu.org/philosophy/no-word-attachments.html
>>> _______________________________________________
>>> vmchecker-dev mailing list
>>> vmchecker-dev at lists.rosedu.org
>>> http://lists.rosedu.org/cgi-bin/mailman/listinfo/vmchecker-dev
>>>
>>
>>
>>
>> --
>> Gheorghe Claudiu-Dan
>> Student la Facultatea de Automatica si Calculatoare, UPB
>> tel: +40 726 758 198
>> _______________________________________________
>> vmchecker-dev mailing list
>> vmchecker-dev at lists.rosedu.org
>> http://lists.rosedu.org/cgi-bin/mailman/listinfo/vmchecker-dev
>>
>
>
>
> --
> Alexandru Moşoi
> http://alexandru.mosoi.googlepages.com
>
> Please avoid sending me Word or PowerPoint attachments.
> See http://www.gnu.org/philosophy/no-word-attachments.html
> _______________________________________________
> vmchecker-dev mailing list
> vmchecker-dev at lists.rosedu.org
> http://lists.rosedu.org/cgi-bin/mailman/listinfo/vmchecker-dev
>



-- 
Gheorghe Claudiu-Dan
Student la Facultatea de Automatica si Calculatoare, UPB
tel: +40 726 758 198


More information about the vmchecker-dev mailing list