On Sun, Apr 21, 2013 at 10:56 PM, BlueShadow <kevin.bet...@gmail.com> wrote: > Hi, > I was developping my app for the last couple weeks directly on my server. > now for my new functions I wanted some easy tests like using the print > command and see it directly^^ > So I package the app and put it on my windows PC (web2py 2.4.6-stable same > as on Server (not the compiled version: source version)) and I got errors > for the most trivial things which should work. > > from datetime import datetime > print datetime.datetime.now() > > I tested the code on my python idle gui which works. but in web2py it does > not. > > <type 'exceptions.AttributeError'> type object 'datetime.datetime' has no > attribute 'datetime'
You should choose one of the two's: import datetime datetime.datetime.now() or from datetime import datetime datetime.now() Ricardo -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.