[Tutor] How to unpack python-dateutil-2.0.tar.gz

Steven D'Aprano steve at pearwood.info
Fri Oct 19 04:17:58 CEST 2012


On 19/10/12 12:16, Richard D. Moores wrote:
> Running the example at
> <http://labix.org/python-dateutil#head-8d03c6c25ead6f9cab0cde83e6f672b52480ab90>,
> with Python 2.3.2 64-bit,

Python TWO POINT THREE??? :-)

That's like, a million years old. I think you mean three point two.


> The importing goes OK, it seems, but:
>
> Python 3.2.3 (default, Apr 11 2012, 07:12:16) [MSC v.1500 64 bit (AMD64)]
> Type "help", "copyright", "credits" or "license" for more information.
> [evaluate untitled-1.py]

What does that mean?

What's "evaluate" in this context? What's inside "untitled.py"?

You're hiding the code you actually run, and expecting us to debug it unseen.
Not cool. You've been on this list long enough that you should know better.

Check your code for typos. If the error persists, check it again. If it still
persists, show us the actual relevant code. More below.


> Traceback (most recent call last):
>    File "C:\Program Files (x86)\Wing IDE
> 4.1\src\debug\tserver\_sandbox.py", line 9, in<module>
>    File "c:\Python32\Lib\site-packages\dateutil\parser.py", line 720, in parse
>      return DEFAULTPARSER.parse(timestr, **kwargs)
>    File "c:\Python32\Lib\site-packages\dateutil\parser.py", line 310, in parse
>      raise ValueError("unknown string format")
> builtins.ValueError: unknown string format

What is the value of timestr?

I note that text just before the demo code states:

[quote]
you want to get today's date out of the "date" unix system command.
[end quote]


Are you running Unix or a Unix-compatible system like Linux? Here's what `date`
outputs under Unix/Linux:

[steve at ando ~]$ date
Fri Oct 19 13:16:40 EST 2012


What does it output on your computer?



-- 
Steven


More information about the Tutor mailing list