Re: Help with Python/Eyed3 MusicCDIdFrame method

2022-06-06 Thread Dennis Lee Bieber
On Mon, 6 Jun 2022 12:37:47 +0200, Dave declaimed the following: >Hi, > >I’m trying to get the ID3 tags of an mp3 file. I trying to use the >MusicCDIdFrame > method but I can’t seem to get it right. Here is a code snippet: > > > import eyed3 >import eyed3.id3 >import eyed3.id3.frames >import eye

Re: Help with Python/Eyed3 MusicCDIdFrame method

2022-06-06 Thread Dave
Thanks! That fixed it! > On 6 Jun 2022, at 18:46, MRAB wrote: > > On 2022-06-06 11:37, Dave wrote: >> Hi, >> I’m trying to get the ID3 tags of an mp3 file. I trying to use the >> MusicCDIdFrame >> method but I can’t seem to get it right. Here is a code snippet: >> import eyed3 >> import eyed3

Re: Help with Python/Eyed3 MusicCDIdFrame method

2022-06-06 Thread MRAB
On 2022-06-06 11:37, Dave wrote: Hi, I’m trying to get the ID3 tags of an mp3 file. I trying to use the MusicCDIdFrame method but I can’t seem to get it right. Here is a code snippet: import eyed3 import eyed3.id3 import eyed3.id3.frames import eyed3.id3.apple import eyed3.mp3 myID3 = eye

Re: Help with Python circular error

2021-06-16 Thread Arak Rachael
On Tuesday, 15 June 2021 at 19:30:28 UTC+2, Chris Angelico wrote: > On Wed, Jun 16, 2021 at 3:17 AM MRAB wrote: > > > > On 2021-06-15 17:49, Chris Angelico wrote: > > > On Wed, Jun 16, 2021 at 2:45 AM Arak Rachael > > > wrote: > > >> > > >> Hi to everyone, > > >> > > >> I am having a probl

Re: Help with Python circular error

2021-06-16 Thread Arak Rachael
On Wednesday, 16 June 2021 at 10:32:50 UTC+2, Arak Rachael wrote: > On Tuesday, 15 June 2021 at 19:30:28 UTC+2, Chris Angelico wrote: > > On Wed, Jun 16, 2021 at 3:17 AM MRAB wrote: > > > > > > On 2021-06-15 17:49, Chris Angelico wrote: > > > > On Wed, Jun 16, 2021 at 2:45 AM Arak Rachael >

Re: Help with Python circular error

2021-06-15 Thread Chris Angelico
On Wed, Jun 16, 2021 at 3:17 AM MRAB wrote: > > On 2021-06-15 17:49, Chris Angelico wrote: > > On Wed, Jun 16, 2021 at 2:45 AM Arak Rachael > > wrote: > >> > >> Hi to everyone, > >> > >> I am having a problem with this error, I created a package and uploaded it > >> to Test PyPi, but I can not

Re: Help with Python circular error

2021-06-15 Thread MRAB
On 2021-06-15 17:49, Chris Angelico wrote: On Wed, Jun 16, 2021 at 2:45 AM Arak Rachael wrote: Hi to everyone, I am having a problem with this error, I created a package and uploaded it to Test PyPi, but I can not get it to work, can someone help me please? https://test.pypi.org/manage/proj

Re: Help with Python circular error

2021-06-15 Thread Chris Angelico
On Wed, Jun 16, 2021 at 2:45 AM Arak Rachael wrote: > > Hi to everyone, > > I am having a problem with this error, I created a package and uploaded it to > Test PyPi, but I can not get it to work, can someone help me please? > > https://test.pypi.org/manage/project/videotesting/releases/' > > The

Re: help with python difference between number

2019-01-15 Thread MRAB
On 2019-01-15 14:07, achyuta2...@gmail.com wrote: M <01/14/2019 08:07:01> Count:0 Total:50 Free: 20 A B M <01/14/2019 08:07:04> Count:1 Total:5 Free:10 A B M <01/14/2019 08:07:07> Count:2 Total:5 Free:3 A B I am trying to make a output like where it prints the free and then th

Re: Help with python code

2016-03-29 Thread Wildman via Python-list
On Tue, 29 Mar 2016 21:19:05 +, Rob Gaddi wrote: >> menu = input("Enter the type of pizza that you want to order from 1-5 \n") >> while menu>5 or menu <=0: >> menu = input ("Enter the right number ") >> pizza_cost = pizzatype[menu] As it has already been pointed out, a Python list starts

Re: Help with python code

2016-03-29 Thread Rob Gaddi
Yum Di wrote: > I still don't get it.. Sorry, I'm still quite new to this > I've have made few minor changes, but it still doesn't work Then try entering one line at a time of your program into the interactive interpreter. Copy and paste is fine, but use the interpreter to look at the actual val

Re: Help with python code

2016-03-29 Thread Yum Di
import random import time pizzatype = [3.50,4.20,5.20,5.80,5.60] drinktype = [0.90,0.80,0.90] topping = [0.50,0.50,0.50,0.50] def Total_cost_cal (pt ,dt ,t): total = pt + dt + t return total print ("Welcome to Pizza Shed!") order = raw_input ("\n\nPLEASE PRESS ENTER TO ORDER." ) tablen

Re: Help with python code

2016-03-29 Thread Rob Gaddi
okdk wrote: > This is my code > import random > import time > > pizzatype = [3.50,4.20,5.20,5.80,5.60] > drinktype = [0.90,0.80,0.90] > topping = [0.50,0.50,0.50,0.50] > > def Total_cost_cal (pt ,dt ,t): > total = pt + dt + t > return total > > print ("Welcome to Pizza Shed!") > > order =

Re: Help with python code

2016-03-29 Thread BartC
On 29/03/2016 22:00, okdk wrote: pizzatype = [3.50,4.20,5.20,5.80,5.60] drinktype = [0.90,0.80,0.90] topping = [0.50,0.50,0.50,0.50] total_cost = total_cost_cal(pizzatotal, drinktotal, topping_cost) print ("") print ("Calculating bill") print ("---

Re: Help with python script for NMR

2016-03-27 Thread mohamadmaaz5
On Sunday, March 27, 2016 at 7:40:06 PM UTC+2, Peter Otten wrote: > mohamadma...@gmail.com wrote: > > > On Sunday, March 27, 2016 at 4:50:01 PM UTC+2, Joel Goldstick wrote: > >> On Sun, Mar 27, 2016 at 10:38 AM, wrote: > >> > >> > Hello there, > >> > I found a python script in a scientific artic

Re: Help with python script for NMR

2016-03-27 Thread Peter Otten
mohamadma...@gmail.com wrote: > On Sunday, March 27, 2016 at 4:50:01 PM UTC+2, Joel Goldstick wrote: >> On Sun, Mar 27, 2016 at 10:38 AM, wrote: >> >> > Hello there, >> > I found a python script in a scientific article that enables a simple >> > calculation on an NMR spectrum. >> > I have no exp

Re: Help with python script for NMR

2016-03-27 Thread Wildman via Python-list
On Sun, 27 Mar 2016 09:40:57 -0700, mohamadmaaz5 wrote: > On Sunday, March 27, 2016 at 6:27:59 PM UTC+2, Wildman wrote: >> On Sun, 27 Mar 2016 09:15:39 -0700, mohamadmaaz5 wrote: >> >> > On Sunday, March 27, 2016 at 6:07:43 PM UTC+2, Wildman wrote: >> >> On Sun, 27 Mar 2016 08:13:49 -0700, mohama

Re: Help with python script for NMR

2016-03-27 Thread mohamadmaaz5
On Sunday, March 27, 2016 at 6:27:59 PM UTC+2, Wildman wrote: > On Sun, 27 Mar 2016 09:15:39 -0700, mohamadmaaz5 wrote: > > > On Sunday, March 27, 2016 at 6:07:43 PM UTC+2, Wildman wrote: > >> On Sun, 27 Mar 2016 08:13:49 -0700, mohamadmaaz5 wrote: > >> > >> >> > Hello there, > >> >> > I found a

Re: Help with python script for NMR

2016-03-27 Thread Peter Pearson
On Sun, 27 Mar 2016 08:13:49 -0700 (PDT), mohamadma...@gmail.com wrote: > On Sunday, March 27, 2016 at 4:50:01 PM UTC+2, Joel Goldstick wrote: >> On Sun, Mar 27, 2016 at 10:38 AM, wrote: >> >> > Hello there, >> > I found a python script in a scientific article that enables a simple >> > calculati

Re: Help with python script for NMR

2016-03-27 Thread Wildman via Python-list
On Sun, 27 Mar 2016 09:15:39 -0700, mohamadmaaz5 wrote: > On Sunday, March 27, 2016 at 6:07:43 PM UTC+2, Wildman wrote: >> On Sun, 27 Mar 2016 08:13:49 -0700, mohamadmaaz5 wrote: >> >> >> > Hello there, >> >> > I found a python script >> >> The formatting of the script is all wrong. There are m

Re: Help with python script for NMR

2016-03-27 Thread mohamadmaaz5
On Sunday, March 27, 2016 at 6:07:43 PM UTC+2, Wildman wrote: > On Sun, 27 Mar 2016 08:13:49 -0700, mohamadmaaz5 wrote: > > >> > Hello there, > >> > I found a python script > > The formatting of the script is all wrong. There are many > spaces that should not be there and no indentations. It >

Re: Help with python script for NMR

2016-03-27 Thread Wildman via Python-list
On Sun, 27 Mar 2016 08:13:49 -0700, mohamadmaaz5 wrote: >> > Hello there, >> > I found a python script The formatting of the script is all wrong. There are many spaces that should not be there and no indentations. It could take a long time to figure it out. It could be just a copy/paste proble

Re: Help with python script for NMR

2016-03-27 Thread mohamadmaaz5
On Sunday, March 27, 2016 at 4:50:01 PM UTC+2, Joel Goldstick wrote: > On Sun, Mar 27, 2016 at 10:38 AM, wrote: > > > Hello there, > > I found a python script in a scientific article that enables a simple > > calculation on an NMR spectrum. > > I have no experience in programming and i would appr

Re: Help with python script for NMR

2016-03-27 Thread Joel Goldstick
On Sun, Mar 27, 2016 at 10:38 AM, wrote: > Hello there, > I found a python script in a scientific article that enables a simple > calculation on an NMR spectrum. > I have no experience in programming and i would appreciate it if i can > communicate with someone who can write this script and send

Re: Help with Python Multiprocessing

2014-11-24 Thread sohcahtoa82
On Sunday, November 23, 2014 12:56:51 PM UTC-8, Anurag wrote: > Hey Socha, > Your solution works. But then, all my 3 workers are running in a single > command window. How do I make them run in three different command windows? That, I don't know. You would probably need to open a new command wind

Re: Help with Python Multiprocessing

2014-11-23 Thread Anurag
Hey Socha, Your solution works. But then, all my 3 workers are running in a single command window. How do I make them run in three different command windows? -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Python Multiprocessing

2014-11-14 Thread sohcahtoa82
On Thursday, November 13, 2014 3:22:49 PM UTC-8, Anurag wrote: > On Thursday, November 13, 2014 2:18:50 PM UTC-5, sohca...@gmail.com wrote: > > On Thursday, November 13, 2014 10:07:56 AM UTC-8, Anurag wrote: > > > I am having trouble understanding the Multiprocessing module. > > > I need to run thr

Re: Help with Python Multiprocessing

2014-11-13 Thread Anurag
On Thursday, November 13, 2014 2:22:29 PM UTC-5, Gary Herron wrote: > On 11/13/2014 10:07 AM, Anurag wrote: > > I am having trouble understanding the Multiprocessing module. > > I need to run three different files 'Worker1' , 'Worker2', 'Worker3' all at > > once. Currently I am doing this : > > >

Re: Help with Python Multiprocessing

2014-11-13 Thread Anurag
On Thursday, November 13, 2014 2:18:50 PM UTC-5, sohca...@gmail.com wrote: > On Thursday, November 13, 2014 10:07:56 AM UTC-8, Anurag wrote: > > I am having trouble understanding the Multiprocessing module. > > I need to run three different files 'Worker1' , 'Worker2', 'Worker3' all at > > once. C

Re: Help with Python Multiprocessing

2014-11-13 Thread Gary Herron
On 11/13/2014 10:07 AM, Anurag wrote: I am having trouble understanding the Multiprocessing module. I need to run three different files 'Worker1' , 'Worker2', 'Worker3' all at once. Currently I am doing this : from multiprocessing import Process import Worker1.py import Worker2.py import Worke

Re: Help with Python Multiprocessing

2014-11-13 Thread sohcahtoa82
On Thursday, November 13, 2014 10:07:56 AM UTC-8, Anurag wrote: > I am having trouble understanding the Multiprocessing module. > I need to run three different files 'Worker1' , 'Worker2', 'Worker3' all at > once. Currently I am doing this : > > from multiprocessing import Process > > import Wor

Re: Help with Python Multiprocessing

2014-11-13 Thread MRAB
On 2014-11-13 18:10, Anurag wrote: On Thursday, November 13, 2014 1:07:56 PM UTC-5, Anurag wrote: I am having trouble understanding the Multiprocessing module. I need to run three different files 'Worker1' , 'Worker2', 'Worker3' all at once. Currently I am doing this : from multiprocessing imp

Re: Help with Python Multiprocessing

2014-11-13 Thread Anurag
On Thursday, November 13, 2014 1:07:56 PM UTC-5, Anurag wrote: > I am having trouble understanding the Multiprocessing module. > I need to run three different files 'Worker1' , 'Worker2', 'Worker3' all at > once. Currently I am doing this : > > from multiprocessing import Process > > import Work

Re: Help with python functions?

2014-02-10 Thread tn156
On Monday, September 23, 2013 6:48:20 PM UTC-4, Terry Reedy wrote: > On 9/23/2013 6:32 PM, kjaku...@gmail.com wrote: > > > On Monday, September 23, 2013 9:56:45 AM UTC-4, Steven D'Aprano wrote: > > >> On Mon, 23 Sep 2013 05:57:34 -0700, kjakupak wrote: > > >> > > >> Now you're done! On to the n

Re: Help with python functions?

2014-02-10 Thread tn156
On Monday, September 23, 2013 6:48:20 PM UTC-4, Terry Reedy wrote: > On 9/23/2013 6:32 PM, kjaku...@gmail.com wrote: > > > On Monday, September 23, 2013 9:56:45 AM UTC-4, Steven D'Aprano wrote: > > >> On Mon, 23 Sep 2013 05:57:34 -0700, kjakupak wrote: > > >> > > >> Now you're done! On to the n

Re: Help with python functions?

2013-10-01 Thread Denis McMahon
On Tue, 01 Oct 2013 10:53:26 -0700, kjakupak wrote: > I ended up with these. I know they're only like half right... > I was wondering if any of you had to do this, what would you end up > with? > # Question 1.a > def temp(T, from_unit, to_unit): I suspect that this doesn't work properly for all

Re: Help with python functions?

2013-10-01 Thread random832
On Tue, Oct 1, 2013, at 13:53, kjaku...@gmail.com wrote: > I ended up with these. I know they're only like half right... > I was wondering if any of you had to do this, what would you end up with? > > # Question 1.a > def temp(T, from_unit, to_unit): Assuming this is temperature conversion. You s

Re: Help with python functions?

2013-10-01 Thread kjakupak
I ended up with these. I know they're only like half right... I was wondering if any of you had to do this, what would you end up with? # Question 1.a def temp(T, from_unit, to_unit): if from_unit == 'C' or from_unit == 'c': return 32 + (9/5)*T elif from_unit == 'K' or from_unit ==

Re: Help with python functions?

2013-09-24 Thread Denis McMahon
On Tue, 24 Sep 2013 14:51:31 +, Denis McMahon wrote: > Question, given the original "temp" function as previously described by > yourself, what does the following function "f" which takes the same > params as "comp" do: > > def f( t1, u1, t2, u2 ): > if u1 == u2: > return t2 >

Re: Help with python functions?

2013-09-24 Thread MRAB
On 24/09/2013 17:53, giacomo boffi wrote: kjaku...@gmail.com writes: def temp(T, from_unit, to_unit): conversion_table = {('c', 'k'):lambda x: x + 273.15, ('c', 'f'):lambda x: (x * (9.0/5)) + 32, ('k', 'c'):lambda x: x - 273.15,

Re: Help with python functions?

2013-09-24 Thread giacomo boffi
kjaku...@gmail.com writes: > def temp(T, from_unit, to_unit): > conversion_table = {('c', 'k'):lambda x: x + 273.15, > ('c', 'f'):lambda x: (x * (9.0/5)) + 32, > ('k', 'c'):lambda x: x - 273.15, > ('k', 'f'):lambda x: (x *

Re: Help with python functions?

2013-09-24 Thread Denis McMahon
On Tue, 24 Sep 2013 03:15:23 +, Steven D'Aprano wrote: > You don't have to use Kelvin. You could use any temperature scale, so > long as it is the same for both temperatures. Given that he already has a handy conversion function to call, he should be able to convert t2 into the units of t1 i

Re: Help with python functions?

2013-09-24 Thread Denis McMahon
On Mon, 23 Sep 2013 19:40:47 -0700, kjakupak wrote: > Not sure if we've gotten that far in class, considering I don't know how > to go about doing that. Which bit aren't you sure about? (a) adding a "same unit" conversion to the units conversion program? (Actually, this bit isn't needed after a

Re: Help with python functions?

2013-09-23 Thread Dave Angel
On 23/9/2013 21:23, kjaku...@gmail.com wrote: > On Monday, September 23, 2013 8:07:44 PM UTC-4, Dave Angel wrote: >> >> I didn't see any spec that said Python 3.x. in version 2.x, this would >> >> be incorrect. >> >> >> >> -- >> >> DaveA > > It's for Python 3.2 Then I'd have a comment say

Re: Help with python functions?

2013-09-23 Thread Steven D'Aprano
On Mon, 23 Sep 2013 15:32:37 -0700, kjakupak wrote: > def temp(T, from_unit, to_unit): > conversion_table = {('c', 'k'):lambda x: x + 273.15, > ('c', 'f'):lambda x: (x * (9.0/5)) + 32, ('k', > 'c'):lambda x: x - 273.15, >

Re: Help with python functions?

2013-09-23 Thread Steven D'Aprano
On Mon, 23 Sep 2013 15:55:53 -0700, kjakupak wrote: > As for the next one, so far I've gotten: def comp(T1, u1, T2, u2): > if u1 > u2: > return -1 > elif u2 > u1: > return 1 > else: > return 0 That is only comparing the units, not the temperatures. Since the

Re: Help with python functions?

2013-09-23 Thread Steven D'Aprano
On Mon, 23 Sep 2013 15:32:37 -0700, kjakupak wrote: > On Monday, September 23, 2013 9:56:45 AM UTC-4, Steven D'Aprano wrote: >> On Mon, 23 Sep 2013 05:57:34 -0700, kjakupak wrote: >> >> Now you're done! On to the next function... >> >> >> >> -- >> >> Steven > > def temp(T, from_unit, to_unit

Re: Help with python functions?

2013-09-23 Thread kjakupak
On Monday, September 23, 2013 10:12:05 PM UTC-4, Denis McMahon wrote: > > > If the first function you wrote allows you to convert temps in different > > scales to a common scale, then in the second function, you can call the > > first function to convert both temps to a common scale, and comp

Re: Help with python functions?

2013-09-23 Thread Denis McMahon
On Mon, 23 Sep 2013 15:55:53 -0700, kjakupak wrote: > As for the next one, so far I've gotten: > def comp(T1, u1, T2, u2): > if u1 > u2: > return -1 > elif u2 > u1: > return 1 > else: > return 0 If the first function you wrote allows you to convert temps in dif

Re: Help with python functions?

2013-09-23 Thread kjakupak
On Monday, September 23, 2013 8:07:44 PM UTC-4, Dave Angel wrote: > > I didn't see any spec that said Python 3.x. in version 2.x, this would > > be incorrect. > > > > -- > > DaveA It's for Python 3.2 -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with python functions?

2013-09-23 Thread Dave Angel
On 23/9/2013 18:55, kjaku...@gmail.com wrote: > On Monday, September 23, 2013 9:56:45 AM UTC-4, Steven D'Aprano wrote: >> On Mon, 23 Sep 2013 05:57:34 -0700, kjakupak wrote: >> >> Now you're done! On to the next function... >> >> >> >> -- >> >> Steven > > def temp(T, from_unit, to_unit):

Re: Help with python functions?

2013-09-23 Thread kjakupak
On Monday, September 23, 2013 9:56:45 AM UTC-4, Steven D'Aprano wrote: > On Mon, 23 Sep 2013 05:57:34 -0700, kjakupak wrote: > > Now you're done! On to the next function... > > > > -- > > Steven def temp(T, from_unit, to_unit): conversion_table = {('c', 'k'):lambda x: x + 273.15,

Re: Help with python functions?

2013-09-23 Thread Terry Reedy
On 9/23/2013 6:32 PM, kjaku...@gmail.com wrote: On Monday, September 23, 2013 9:56:45 AM UTC-4, Steven D'Aprano wrote: On Mon, 23 Sep 2013 05:57:34 -0700, kjakupak wrote: Now you're done! On to the next function... -- Steven def temp(T, from_unit, to_unit): conversion_table = {('c',

Re: Help with python functions?

2013-09-23 Thread kjakupak
On Monday, September 23, 2013 9:56:45 AM UTC-4, Steven D'Aprano wrote: > On Mon, 23 Sep 2013 05:57:34 -0700, kjakupak wrote: > > Now you're done! On to the next function... > > > > -- > > Steven def temp(T, from_unit, to_unit): conversion_table = {('c', 'k'):lambda x: x + 273.15,

Re: Help with python functions?

2013-09-23 Thread Steven D'Aprano
On Mon, 23 Sep 2013 05:57:34 -0700, kjakupak wrote: > Can anyone help me with any of these please? Much appreciated. I > honestly don't even know how to start them Start by writing a function that does nothing: def nothing(): pass Now change it so that it takes three arguments: T, a tempe

Re: Help with python functions?

2013-09-23 Thread Roy Smith
In article , kjaku...@gmail.com wrote: > 1.a. Write a function temp(T, from_unit, to_unit) where from_unit and to_unit > are temperature units, either 'F' (or 'f') for fahrenheit, or 'C' (or 'c') > for celsius, or 'K' (or 'k') for kelvin; and T is a temperature number for > the unit from_unit.

Re: Help with python code!

2013-04-02 Thread Jason Friedman
> Thanks for your replies. Just to be clear this is for a interview and they > would like me to figure out what the code does and come back with some test > cases. I don't need to code the tests, just give some high level tests. As > far as I can make out it is some system where you input your name

Re: Help with python code!

2013-04-01 Thread Alister
On Sun, 31 Mar 2013 14:32:21 -0700, gerrymcgovern wrote: > On Sunday, March 31, 2013 5:27:06 PM UTC-4, Roy Smith wrote: >> In article <4455829d-5b4a-44ee-b65f-5f72d429b...@googlegroups.com>, >> >> jojo wrote: >> >> >> >> > Thanks for your replies. Just to be clear this is for a interview and

Re: Help with python code!

2013-03-31 Thread Chris Angelico
On Mon, Apr 1, 2013 at 9:02 AM, Mark Lawrence wrote: > On 31/03/2013 22:21, Chris Angelico wrote: >>> >>>sue = time.mktime( >>> (int(m.group(7)), int(months[m.group(2)]), int(m.group(3)), >>>int(m.group(4)), int(m.group(5)), int(m.group(6)), >>>int(days[m.g

Re: Help with python code!

2013-03-31 Thread Mark Lawrence
On 31/03/2013 22:21, Chris Angelico wrote: sue = time.mktime( (int(m.group(7)), int(months[m.group(2)]), int(m.group(3)), int(m.group(4)), int(m.group(5)), int(m.group(6)), int(days[m.group(1)]), 0, 0) ) expire_time = (sue ­ current_time)/60

Re: Help with python code!

2013-03-31 Thread rurpy
On Sunday, March 31, 2013 3:27:06 PM UTC-6, Roy Smith wrote: > If this is for an interview, you really should be doing this on your > own. I assume the point of the interview is to see how well you know > Python. Please don't expect people here to take your interview for you. Maybe the interv

Re: Help with python code!

2013-03-31 Thread gerrymcgovern
On Sunday, March 31, 2013 5:35:38 PM UTC-4, Chris Angelico wrote: > On Mon, Apr 1, 2013 at 8:21 AM, jojo wrote: > > > Thanks for your replies. Just to be clear this is for a interview and they > > would like me to figure out what the code does and come back with some test > > cases > > > > T

Re: Help with python code!

2013-03-31 Thread gerrymcgovern
On Sunday, March 31, 2013 5:27:06 PM UTC-4, Roy Smith wrote: > In article <4455829d-5b4a-44ee-b65f-5f72d429b...@googlegroups.com>, > > jojo wrote: > > > > > Thanks for your replies. Just to be clear this is for a interview and they > > > would like me to figure out what the code does and co

Re: Help with python code!

2013-03-31 Thread Chris Angelico
On Mon, Apr 1, 2013 at 8:21 AM, jojo wrote: > Thanks for your replies. Just to be clear this is for a interview and they > would like me to figure out what the code does and come back with some test > cases That explains the utter lack of comments, then. In well-maintained code, you would simpl

Re: Help with python code!

2013-03-31 Thread Roy Smith
In article <4455829d-5b4a-44ee-b65f-5f72d429b...@googlegroups.com>, jojo wrote: > Thanks for your replies. Just to be clear this is for a interview and they > would like me to figure out what the code does and come back with some test > cases. I don't need to code the tests, just give some hig

Re: Help with python code!

2013-03-31 Thread jojo
On Sunday, March 31, 2013 5:13:49 PM UTC-4, Roy Smith wrote: > In article <2912c674-e30b-4339-9344-1f460cb96...@googlegroups.com>, > > jojo wrote: > > > > > for fname in dirList: > > > cmd = "keytool �printcert �file " + fname > > > for line in os.popen(cmd).readlines(): > > >line =

Re: Help with python code!

2013-03-31 Thread gerrymcgovern
On Sunday, March 31, 2013 5:21:00 PM UTC-4, Chris Angelico wrote: > On Mon, Apr 1, 2013 at 8:06 AM, jojo wrote: > > > On Sunday, March 31, 2013 4:39:11 PM UTC-4, Chris Angelico wrote: > > >> On Mon, Apr 1, 2013 at 7:10 AM, jojo wrote: > > >> > > >> > Im used to C# so the syntax looks bizarre t

Re: Help with python code!

2013-03-31 Thread Chris Angelico
On Mon, Apr 1, 2013 at 8:06 AM, jojo wrote: > On Sunday, March 31, 2013 4:39:11 PM UTC-4, Chris Angelico wrote: >> On Mon, Apr 1, 2013 at 7:10 AM, jojo wrote: >> >> > Im used to C# so the syntax looks bizarre to me! Any help would be great. >> >> >> >> The first thing you'll need to understand abo

Re: Help with python code!

2013-03-31 Thread Roy Smith
In article <2912c674-e30b-4339-9344-1f460cb96...@googlegroups.com>, jojo wrote: > for fname in dirList: > cmd = "keytool ­printcert ­file " + fname > for line in os.popen(cmd).readlines(): >line = line.rstrip() >m = p.search(line) >if m: > sue = time.mktime( > (int(m.

Re: Help with python code!

2013-03-31 Thread Roy Smith
In article <37f23623-8bf5-421a-ab6a-34ff622c6...@googlegroups.com>, jojo wrote: > Hi - I am a newbie to python and was wondering can someone tell me what the > following code does. I need to figure out how to test it I know this is going to sound unhelpful, but if your task is to test the cod

Re: Help with python code!

2013-03-31 Thread jojo
On Sunday, March 31, 2013 4:39:11 PM UTC-4, Chris Angelico wrote: > On Mon, Apr 1, 2013 at 7:10 AM, jojo wrote: > > > Im used to C# so the syntax looks bizarre to me! Any help would be great. > > > > The first thing you'll need to understand about Python syntax is that > > indentation is impor

Re: Help with python code!

2013-03-31 Thread Chris Angelico
On Mon, Apr 1, 2013 at 7:10 AM, jojo wrote: > Im used to C# so the syntax looks bizarre to me! Any help would be great. The first thing you'll need to understand about Python syntax is that indentation is important. By posting this code flush-left, you've actually destroyed its block structure. C

Re: Help with Python/ArcPy

2012-12-12 Thread George Silva
even better gis.stackexchange.com On Wed, Dec 12, 2012 at 9:42 PM, Xavier Ho wrote: > You can always try http://stackoverflow.com/search?q=ArcPY, or post your > question there. > > Cheers, > Xav > > > > On 13 December 2012 08:07, Michelle Couden wrote: > >> Does anyone know of a website or for

Re: Help with Python/ArcPy

2012-12-12 Thread Xavier Ho
You can always try http://stackoverflow.com/search?q=ArcPY, or post your question there. Cheers, Xav On 13 December 2012 08:07, Michelle Couden wrote: > Does anyone know of a website or forum where there is help for ArcPY > (Python) programmers? ESRI’s (GIS) resource center Forums are very b

Re: Help with python-list archives

2012-01-10 Thread Anssi Saari
Ian Kelly writes: > Probably nobody has noticed it until now. It seems to be a quirk of > the archive files that they are double-gzipped... Interesting, but I don't think the files are actually double-gzipped. If I download http://mail.python.org/pipermail/python-list/2012-January.txt.gz with w

Re: Help with python-list archives

2012-01-06 Thread random joe
On Jan 6, 1:41 am, Ian Kelly wrote: > One could also avoid creating the intermediate file by using a > StringIO to keep it in memory instead: Yes StringIO is perfect for this. Many thanks to all who replied. -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with python-list archives

2012-01-05 Thread Ian Kelly
On Thu, Jan 5, 2012 at 9:08 PM, random joe wrote: > PS: I wonder why no one has added a note to the Python-list archives > to advise people about the bug? Probably nobody has noticed it until now. It seems to be a quirk of the archive files that they are double-gzipped, and most people probably

Re: Help with python-list archives

2012-01-05 Thread Ian Kelly
On Thu, Jan 5, 2012 at 8:00 PM, MRAB wrote: > import gzip > > in_file = gzip.open(r"C:\2012-January.txt.gz") > out_file = open(r"C:\2012-January.txt.tmp", "wb") > out_file.write(in_file.read()) > in_file.close() > out_file.close() > > in_file = gzip.open(r"C:\2012-January.txt.tmp") > out_file = op

Re: Help with python-list archives

2012-01-05 Thread Chris Angelico
On Fri, Jan 6, 2012 at 3:08 PM, random joe wrote: > Nevermind. Notepad was the problem. After using a real editor the text > is displayed correctly! Thanks for help everyone! ... or that could be your problem :) ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with python-list archives

2012-01-05 Thread Chris Angelico
On Fri, Jan 6, 2012 at 3:01 PM, random joe wrote: > THis works however there is one more tiny hiccup. The text has lost > all significant indention and newlines. Was this intended or is this a > result of another bug? I'm seeing it as plain text, with proper newlines. There's no indentation as it

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 10:01 pm, random joe wrote: > On Jan 5, 9:00 pm, MRAB wrote: > > import gzip > > > in_file = gzip.open(r"C:\2012-January.txt.gz") > > out_file = open(r"C:\2012-January.txt.tmp", "wb") > > out_file.write(in_file.read()) > > in_file.close() > > out_file.close() > > > in_file = gzip.open(

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 9:00 pm, MRAB wrote: > On 06/01/2012 02:14, random joe wrote: > > > On Jan 5, 7:27 pm, MRAB  wrote: > > >>  I've found that if I gunzip it twice (gunzip it and then gunzip the > >>  result) using the gzip module I get the text file. > > > On a windows machine? If so, can you post a code

Re: Help with python-list archives

2012-01-05 Thread MRAB
On 06/01/2012 02:14, random joe wrote: On Jan 5, 7:27 pm, MRAB wrote: I've found that if I gunzip it twice (gunzip it and then gunzip the result) using the gzip module I get the text file. On a windows machine? If so, can you post a code snippet please? Thanks import gzip in_file = gzip

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 7:27 pm, MRAB wrote: > I've found that if I gunzip it twice (gunzip it and then gunzip the > result) using the gzip module I get the text file. On a windows machine? If so, can you post a code snippet please? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with python-list archives

2012-01-05 Thread MRAB
On 06/01/2012 00:10, Ian Kelly wrote: On Thu, Jan 5, 2012 at 4:52 PM, random joe wrote: Sure. Take the most recent file as example. "2012 - January.txt.gz". If you use the python doc example this is the result. If i use "r" or "rb" the result is the same. import gzip f1 = gzip.open('C:\\

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 6:10 pm, Ian Kelly wrote: > Interesting.  I tried this on a Linux system using both gunzip and > your code, and both worked fine to extract that file.  I also tried > your code on a Windows system, and I get the same result that you do. > This appears to be a bug in the gzip module under

Re: Help with python-list archives

2012-01-05 Thread Ian Kelly
On Thu, Jan 5, 2012 at 4:52 PM, random joe wrote: > Sure. Take the most recent file as example. "2012 - January.txt.gz". > If you use the python doc example this is the result. If i use "r" or > "rb" the result is the same. > import gzip f1 = gzip.open('C:\\2012-January.txt.gz', 'rb') >>

Re: Help with python-list archives

2012-01-05 Thread Ian Kelly
On Thu, Jan 5, 2012 at 4:39 PM, Miki Tebeka wrote: > Is there Google groups search not good enough? > (groups.google.com/group/comp.lang.python) My experience with the Google groups search (and Google groups in general) in the past has been terrible. If you're looking for a specific thread, it

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 5:39 pm, Miki Tebeka wrote: > Is the Google groups search not good enough? That works but i would like to do some regexes and set up some defaults. > Also, can you give an example of the code and an input file? Sure. Take the most recent file as example. "2012 - January.txt.gz". If yo

Re: Help with python-list archives

2012-01-05 Thread Miki Tebeka
Is there Google groups search not good enough? (groups.google.com/group/comp.lang.python) Also, can you give an example of the code and an input file? -- http://mail.python.org/mailman/listinfo/python-list

Re: help with Python installation

2010-02-28 Thread gujax
On Feb 27, 10:14 pm, Arnaud Delobelle wrote: > On 28 Feb, 01:48, gujax wrote: > > > Hi, > > I have been trying to install python on my Win ME system for over two > > years - gave up for a while and now I am back with a resolve to solve > > the problem. I tried all versions of python but having in

Re: help with Python installation

2010-02-28 Thread John Yeung
On Feb 28, 12:51 am, gujax wrote: > I agree with you. I have a CD of Xubuntu. I tried > booting up with the CD and was impressed. I noticed > few problems with screen resolution, window size etc. Though it may be worth working out any niggling problems to switch to Linux, I don't think you should

Re: help with Python installation

2010-02-27 Thread gujax
On Feb 27, 9:56 pm, staticd wrote: > On Feb 27, 8:48 pm, gujax wrote: > > > I have been trying to install python on my Win ME system for over two > > years - gave up for a while and now I am back with a resolve to solve > > the problem. > > Dude.  Give up.  There are a ton of __free__ distroz of

Re: help with Python installation

2010-02-27 Thread gujax
On Feb 27, 9:36 pm, Rick Dooling wrote: > > Hi, > > I have been trying to install python on my Win ME system > > Try this: > > http://tinyurl.com/w7wgp > > RD I gave it a shot but the site installs the same version of ActivePython which did install on my computer but does not open any command win

Re: help with Python installation

2010-02-27 Thread Arnaud Delobelle
On 28 Feb, 01:48, gujax wrote: > Hi, > I have been trying to install python on my Win ME system for over two > years - gave up for a while and now I am back with a resolve to solve > the problem. I tried all versions of python but having installation > problems for all. Installation does not proce

Re: help with Python installation

2010-02-27 Thread staticd
On Feb 27, 8:48 pm, gujax wrote: > I have been trying to install python on my Win ME system for over two > years - gave up for a while and now I am back with a resolve to solve > the problem. Dude. Give up. There are a ton of __free__ distroz of linux out there. Your troubles are not worth th

Re: help with Python installation

2010-02-27 Thread Steve Holden
Rick Dooling wrote: >> Hi, >> I have been trying to install python on my Win ME system > > Try this: > > http://tinyurl.com/w7wgp > That explains how to install Python on Windows *XP*. Windows ME is no longer a supported platform - the tools used to create it just aren't able to support platform

Re: help with Python installation

2010-02-27 Thread Rick Dooling
> Hi, > I have been trying to install python on my Win ME system Try this: http://tinyurl.com/w7wgp RD -- http://mail.python.org/mailman/listinfo/python-list

Re: help with Python installation

2010-02-27 Thread sstein...@gmail.com
>> I do not even >> know what to do next. I also tried Activepython. It installs but when >> I try to open it from Start->Programs->ActivePython 2.6, I get an >> error window saying - upgrade windows. > > Hmm, have you tried "upgrading windows, just a wild guess! Hey, not everyone can afford to u

Re: help with Python installation

2010-02-27 Thread rantingrick
On Feb 27, 7:48 pm, gujax wrote: > Hi, > I have been trying to install python on my Win ME system for over two > years - Wow 2 years!, you must have the patience of a saint! > Installation does not proceed and I get a message > saying "dll required for installation could not be run". Did it say

  1   2   >