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

Help with Python/Eyed3 MusicCDIdFrame method

2022-06-06 Thread Dave
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 = eyed3.load("/Users/Test/Life in the fast

Fast help with Python program

2021-07-29 Thread Arak Rachael
Hi guys, I need fast help with this, can you please look at it? I don't get how to visualize on the 3 axis in the for cycle with the list of colors and count of colors that I get from my array. And I also don't get how to cluster the colors based on how many colors there are in the second arra

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

Help with Python circular error

2021-06-15 Thread Arak Rachael
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 error: /home/user/anaconda3/envs/testing/bin/python /home/user/de

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

help with python difference between number

2019-01-15 Thread achyuta2017
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 the difference between the current free and previous

reStrcuturedText WYSIWYG online editor (was: Need some help with Python Job Board)

2017-11-13 Thread Ben Finney
Skip Montanaro writes: > Thanks, Justin. I imagine editors probably exist which can switch between > WYSIWYG and markup. The ‘rsted’ app https://github.com/anru/rsted> is a reStructuredText WYSIWYG editor written in the Flask framework. -- \ “Remember: every member of your ‘target audie

Re: [Jobs] Need some help with Python Job Board

2017-11-13 Thread justin walters
On Mon, Nov 13, 2017 at 1:16 AM, M.-A. Lemburg wrote: > Hi Justin, > > the default markup is currently set to restructuredtext: > > https://github.com/python/pythondotorg/blob/master/jobs/models.py > > but this can be changed to any of these supported ones: > > https://github.com/jamesturk/django

Re: [Jobs] Need some help with Python Job Board

2017-11-13 Thread M.-A. Lemburg
Hi Justin, the default markup is currently set to restructuredtext: https://github.com/python/pythondotorg/blob/master/jobs/models.py but this can be changed to any of these supported ones: https://github.com/jamesturk/django-markupfield as long as we make sure that all existing records contin

Re: Need some help with Python Job Board

2017-11-12 Thread Skip Montanaro
Thanks, Justin. I imagine editors probably exist which can switch between WYSIWYG and markup. Whether that markup can be Markdown or not, I don't know. Marc-André Lemburg listed a few possible editors in the ticket he opened, but I've not dug into their properties. Skip On Sun, Nov 12, 2017 at 11

Re: Need some help with Python Job Board

2017-11-12 Thread justin walters
On Sat, Nov 11, 2017 at 3:27 PM, Skip Montanaro wrote: > The Python Job Board could use a little help in a couple areas. One, we can > always use help reviewing and approving (or rejecting) submissions. The > backlog keeps growing, and the existing volunteers who help can't always > keep up. (Thi

Need some help with Python Job Board

2017-11-11 Thread Skip Montanaro
The Python Job Board could use a little help in a couple areas. One, we can always use help reviewing and approving (or rejecting) submissions. The backlog keeps growing, and the existing volunteers who help can't always keep up. (This is a good problem to have, reflecting on Python's broad popular

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 ("---

Help with python code

2016-03-29 Thread okdk
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 = raw_input ("\n\nPLEASE PRESS ENTER TO O

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

Help with python script for NMR

2016-03-27 Thread mohamadmaaz5
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 it to me by mail in py format. It's a short script

Re: required help with python code.

2015-08-25 Thread Peter Otten
Srinivas, Jostna wrote: > I am trying to write a python code to create tableau data extract using > tableau API. > > In the process I am facing following error. > > Please help me to fix. I tried a lot but couldn't get over net. Its > critical requirement and we need your help. Posting a pictur

Re: required help with python code.

2015-08-25 Thread Chris Angelico
On Tue, Aug 25, 2015 at 6:20 PM, Srinivas, Jostna wrote: > > In the process I am facing following error. > > Please help me to fix. I tried a lot but couldn’t get over net. Its critical > requirement and we need your help. > Please do two things to help us to help you: 1) Make a simple file tha

Re: required help with python code.

2015-08-25 Thread Ben Finney
"Srinivas, Jostna" writes: > I am trying to write a python code to create tableau data extract > using tableau API. What is that? Does it have a website? Does it have its own community of users and developers? Your questions about Python are welcome here, and we'll help if we can. That said, if

required help with python code.

2015-08-25 Thread Srinivas, Jostna
Hi, I am trying to write a python code to create tableau data extract using tableau API. In the process I am facing following error. Please help me to fix. I tried a lot but couldn't get over net. Its critical requirement and we need your help. [cid:image001.png@01D0DC37.285DEAE0] r Regards

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

Help with Python Multiprocessing

2014-11-13 Thread Anurag
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 Worker3.py p1 = Process(target=Worker1.py)

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.

Help with python functions?

2013-09-23 Thread kjakupak
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. The function should return the temperature numbe

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

Help with python code!

2013-03-31 Thread jojo
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 import time import glob import re import os current_time = time.time() + 60*60+24*30 dirList = glob.glob('\content\paytek\ejbProperties\cybersource\*.crt') q = r

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

Help with Python/ArcPy

2012-12-12 Thread Michelle Couden
Does anyone know of a website or forum where there is help for ArcPY (Python) programmers? ESRI's (GIS) resource center Forums are very busy and my questions go days without an answer. Any suggestions would be great. Thanks!! Michelle Couden TPP-T GIS Cartographer Certified GIS Analyst (512)

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

  1   2   3   4   >