Re: [Tutor] updating a dictionary

2015-02-19 Thread Mark Lawrence
On 20/02/2015 00:55, Chris Stinemetz wrote: Other than the minor tweaks I've suggested I'm not sure what your problem is? I think we need to see the data to understand the issue. ​Here is a sample of the input data, it is tab delimited and I chopped it down for example purposes: ​ KSL03

Re: [Tutor] updating a dictionary

2015-02-19 Thread Chris Stinemetz
> > > > > Other than the minor tweaks I've suggested I'm not sure what your problem > is? I think we need to see the data to understand the issue. ​Here is a sample of the input data, it is tab delimited and I chopped it down for example purposes: ​ KSL03502_7A_1 11.5921 KSL03502_7B_1 46.4997 K

Re: [Tutor] updating a dictionary

2015-02-19 Thread Emile van Sebille
On 2/19/2015 3:10 PM, Alan Gauld wrote: On 19/02/15 22:50, Emile van Sebille wrote: if cell.endswith(suffix, 14, 16) is False: ... so they'll never end with numeric values. Further, "".endswith() accepts only one argument so you ought to get an error on this line. Sorry Emile, The OP

Re: [Tutor] updating a dictionary

2015-02-19 Thread Alan Gauld
On 19/02/15 22:50, Emile van Sebille wrote: if cell.endswith(suffix, 14, 16) is False: ... so they'll never end with numeric values. Further, "".endswith() accepts only one argument so you ought to get an error on this line. Sorry Emile, The OP is correct. ## >>> h

Re: [Tutor] updating a dictionary

2015-02-19 Thread Alan Gauld
On 19/02/15 21:19, Chris Stinemetz wrote: The dictionary format looks like: format = {'Cell': '','7':'','8':'','9':'','2':''} For each line read in I would simply like to check to see if a Cell key;value exists and if it does update the correct key==band(7,8,9,2) within the dictionary. If the

Re: [Tutor] updating a dictionary

2015-02-19 Thread Emile van Sebille
On 2/19/2015 1:19 PM, Chris Stinemetz wrote: Hello List, I have a dictionary that I would like to update/add rows to it as I read a file line by line. The dictionary format looks like: format = {'Cell': '','7':'','8':'','9':'','2':''} For each line read in I would simply like to check to see

[Tutor] updating a dictionary

2015-02-19 Thread Chris Stinemetz
Hello List, I have a dictionary that I would like to update/add rows to it as I read a file line by line. The dictionary format looks like: format = {'Cell': '','7':'','8':'','9':'','2':''} For each line read in I would simply like to check to see if a Cell key;value exists and if it does updat

Re: [Tutor] Fwd: Re: Fwd: Need help with find error

2015-02-19 Thread Danny Yoo
> 2015-02-18 8:25 GMT+02:00 Danny Yoo : >> >> I do not have time to help you right now. Please continue correspondence >> with the main tutor list. On Wed, Feb 18, 2015 at 11:34 AM, Андрей Пугачев wrote: > ok, thanks, I will Following up: have you been helped? I was watching the mailing lis

Re: [Tutor] (no subject)

2015-02-19 Thread Danny Yoo
On Thu, Feb 19, 2015 at 9:23 AM, rakesh sharma wrote: > Greetings !! > Hi all, > what the meaning of the line at the start of the python file > __author__ = "user" Hi Rakesh, It's assigning a variable '__author__' with the value "user". Python libraries typically have some kind of "metadata"

Re: [Tutor] (no subject)

2015-02-19 Thread Emile van Sebille
On 2/19/2015 9:23 AM, rakesh sharma wrote: Greetings !! Hi all, what the meaning of the line at the start of the python file __author__ = "user" Googling __author__ provides lots of relevant info. Emile ___ Tutor maillist - Tutor@python.org To

[Tutor] (no subject)

2015-02-19 Thread rakesh sharma
Greetings !! Hi all, what the meaning of the line at the start of the python file __author__ = "user" thanks in advancerakesh ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options

Re: [Tutor] How to do a PyQt VTK application in Python26

2015-02-19 Thread John R
Thanks Alan for suggesting Python 3.4, that seems to be correct but I am searching for any possibilities with python 2.6 Thank you guys for responding, I should try some other forum. On 19 Feb 2015 16:37, "Alan Gauld" wrote: > On 19/02/15 09:54, John R wrote: > >> Is it possible to make a PyQt V

Re: [Tutor] Topic focus of ‘python-tutor’

2015-02-19 Thread Emile van Sebille
On 2/19/2015 1:51 AM, James Chapman wrote: No one should *_EVER_ *be discouraged to ask a question they do not know have not found the answer to. Learning where to look and how to ask are likely more important skills for a programmer than learning any one specific language. Emile

Re: [Tutor] Topic focus of ‘python-tutor’ (was: mySQL and Python)

2015-02-19 Thread Alex Kleider
On Feb 19, 2015 1:51 AM, James Chapman wrote: > > .. this one is _BY_FAR_ the most willing to help. That question > Here, here! ak ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mail

Re: [Tutor] Topic focus of ‘python-tutor’

2015-02-19 Thread Alex Kleider
On Feb 19, 2015 2:35 AM, Mark Lawrence wrote: > IMHO you're talking crap, now can we please move on Agree with second part, Disagree with first ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.pytho

Re: [Tutor] text file help

2015-02-19 Thread Alan Gauld
Forwarding to tutor, please use Reply All when responding to tutor emails. On 19/02/15 11:17, Tihomir Zjajic wrote: formular doznake.txt red_broj = 1 vrs_drv = 21 prs_prec = 20 teh_kl = 2 red_broj = 2 vrs_drv = 21 prs_prec = 40 teh_kl = 3 I assume red_broj indicates the start of a new record?

Re: [Tutor] How to do a PyQt VTK application in Python26

2015-02-19 Thread Alan Gauld
On 19/02/15 09:54, John R wrote: Is it possible to make a PyQt VTK application using Python26? No idea. What is a PyQt VTK application? I know what PyQt is but never heard of VTK Is there a web site? Does it have a support area? Perhaps they can help? The error is Traceback (most recent cal

Re: [Tutor] unittest for: Raises an exception

2015-02-19 Thread Sydney Shall
On 18/02/2015 20:40, Ben Finney wrote: Sydney Shall writes: My test code is the following: def test_func_getSurplusLabourTime_Exc(self): self.assertRaises(ValueError,self.cwp.getSurplusLabourTime(self.cwp.ww,self.cwp.uvc)) [This last line should indented, but it refuses to do so!] What is

Re: [Tutor] Topic focus of ‘python-tutor’

2015-02-19 Thread Alan Gauld
On 19/02/15 09:51, James Chapman wrote: While MySQL modules are not part of the standard library, consider the following scenario. skill set, maybe he has a job where building an interface to a database would save him and his company a lot of effort, but as MySQL is not part of the standard l

Re: [Tutor] Topic focus of ‘python-tutor’

2015-02-19 Thread Mark Lawrence
On 19/02/2015 09:51, James Chapman wrote: Long-ish reply, but please bear with me. To quote the list description "This list is for folks who want to ask questions regarding how to learn computer programming with the Python language and its standard library." While MySQL modules are not part of

[Tutor] How to do a PyQt VTK application in Python26

2015-02-19 Thread John R
Is it possible to make a PyQt VTK application using Python26? My first sample Qt VTK application is not running!! And my VTK compiled Bin folder is python 26 compiled dll files and Win32 bit The error is Traceback (most recent call last): File "EmbedInPyQt.py", line 5, in from PyQt4 impo

Re: [Tutor] Topic focus of ‘python-tutor’ (was: mySQL and Python)

2015-02-19 Thread James Chapman
Long-ish reply, but please bear with me. To quote the list description "This list is for folks who want to ask questions regarding how to learn computer programming with the Python language and its standard library." While MySQL modules are not part of the standard library, consider the following