Importing timestamp information with Python
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Importing timestamp information with Python
Hi,
I want to see a timestamp with Audacity and found a workaround on the Audacity Wiki (http://wiki.audacityteam.org/wiki/Impor ... nformation).
I installed Python 3.3 and ran "findcues.py". Then the program says as follows;
==================================
>>> import findcues.py
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import findcues.py
File "C:Python33libfindcues.py", line 13
print s
^
SyntaxError: invalid syntax
===================================
I am a fool about the Phython and languages.
Would you help me?
Thank you in Advance.
I want to see a timestamp with Audacity and found a workaround on the Audacity Wiki (http://wiki.audacityteam.org/wiki/Impor ... nformation).
I installed Python 3.3 and ran "findcues.py". Then the program says as follows;
==================================
>>> import findcues.py
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import findcues.py
File "C:Python33libfindcues.py", line 13
print s
^
SyntaxError: invalid syntax
===================================
I am a fool about the Phython and languages.
Would you help me?
Thank you in Advance.
Last edited by Hawsun on Fri Apr 24, 2015 4:16 pm, edited 2 times in total.
Reason: Topic moved to "General Audio Programming"
Reason: Topic moved to "General Audio Programming"
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: Importing timestamp information with Python
Perhaps you are not in a python window or you want:
instead. Are you doing exactly as is it says on the Wiki?
Gale
Code: Select all
import findcues
instead. Are you doing exactly as is it says on the Wiki?
Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Re: Importing timestamp information with Python
hello,
In my opinion it's a problem of version. "print" is a keyword in python 2.xx, but it is a function in python 3.xx. It should be used like this: print (param0, param1... , ...)
regards,
Pfeuh
In my opinion it's a problem of version. "print" is a keyword in python 2.xx, but it is a function in python 3.xx. It should be used like this: print (param0, param1... , ...)
regards,
Pfeuh
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: Importing timestamp information with Python
That's believable, but I don't think many people on this Forum have extensive knowledge of python.pfeuh wrote:In my opinion it's a problem of version. "print" is a keyword in python 2.xx, but it is a function in python 3.xx. It should be used like this: print (param0, param1... , ...)
I suggest you test this theory by downloading v2.4.6 which was current when the Wiki article was written. You can get it from http://www.python.org/getit/releases/ . If you cannot compile python and need binaries you may have to go a few releases back from there.
When you have some information on whether the version is the problem or not, I can try to contact "Guenterrote" through the Wiki, but there is no guarantee of reaching him or her.
Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Re: Importing timestamp information with Python
Thank you, pfeuh.
I am going to change the syntax or the version of Python.
Regards,
Hawsun
I am going to change the syntax or the version of Python.
Regards,
Hawsun
Re: Importing timestamp information with Python
Hi,
Thank you, Gale.
I am going to try with Python v2.4.6 or modify the syntax.
Regards,
Hawsun.
Thank you, Gale.
I am going to try with Python v2.4.6 or modify the syntax.
Regards,
Hawsun.
Re: Importing timestamp information with Python
Python is a script language, there is nothing to compile. I haven't unfortunatly the knowledge to do what you want me to. I can just say that the "print" problem is a classic one in using script from one version in another one. Python 3.xx comes with a tool to convert scripts from 2.xx to 3.xxGale Andrews wrote:compile python
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: Importing timestamp information with Python
I understood you had to compile python, if you don't have the version of python you want and they have not made a binary of that version.pfeuh wrote:Python is a script language, there is nothing to compile.Gale Andrews wrote:compile python
From http://www.python.org/getit/releases/2.4.6/
Download the release [...] Unpack the archive with tar -zxvf Python-2.4.6.tgz (or bzcat Python-2.4.6.tar.bz2 | tar -xf -). Change to the Python-2.4.6 directory and run the "./configure", "make", "make install" commands to compile and install Python.
Thanks for that input. I guess this is what you mean http://docs.python.org/2/library/2to3.html ?pfeuh wrote:I haven't unfortunatly the knowledge to do what you want me to. I can just say that the "print" problem is a classic one in using script from one version in another one. Python 3.xx comes with a tool to convert scripts from 2.xx to 3.xx
Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Re: Importing timestamp information with Python
Hi,
Thank you Gale and pfeuh.
I installed Cygwin and compiled Python 2.4.6.
Then I ran the "findcues.py" and received the message below.

I am disappointed with the results.
Would give me another advice?
Best Wishes,
Hawsun.
Thank you Gale and pfeuh.
I installed Cygwin and compiled Python 2.4.6.
Then I ran the "findcues.py" and received the message below.
I am disappointed with the results.
Would give me another advice?
Best Wishes,
Hawsun.
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: Importing timestamp information with Python
I get the same errors in Python 2.7.3, but I don't claim to know anything about python scripts.
Can you post a short WAV file on the web somewhere such as sendspace.com or adrive.com or dropbox that has the timestamp information you want to be labelled. I may have a tool that can export the information as a CSV file, which would be a step in the right direction, but I'm not sure.
Meantime I e-mailed "Guenterrote".
Gale
Can you post a short WAV file on the web somewhere such as sendspace.com or adrive.com or dropbox that has the timestamp information you want to be labelled. I may have a tool that can export the information as a CSV file, which would be a step in the right direction, but I'm not sure.
Meantime I e-mailed "Guenterrote".
Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual