On 08/03/2015 02:38 AM, matej taferner wrote:
Or maybe should I go with the tkinter?
As a final product of this decision tree "app" I need a clickable buttons
ready to be embedded into the website which will guide customer(s) to
desired answer(s).
The two aren't exactly compatible. Tkinter
Or maybe should I go with the tkinter?
2015-08-03 10:36 GMT+01:00 matej taferner :
> thanks for the reply. I'll definitely check the book.
>
> The back end solution of the problem is more or less clear to me. What I
> find difficult is the grasp the idea of o called front end dev. or better
> to
thanks for the reply. I'll definitely check the book.
The back end solution of the problem is more or less clear to me. What I
find difficult is the grasp the idea of o called front end dev. or better
to say what should I use to make buttons should I dig into django framework
or something else?
In a message of Mon, 03 Aug 2015 08:58:43 +0100, matej taferner writes:
>hi guys,
>
>I am wondering if there is a python solution for the problem I am currently
>dealing with.
>I need to build a decision tree based questionnaire which helps users to
>find the right answer.
>
>As a final product of
hi guys,
I am wondering if there is a python solution for the problem I am currently
dealing with.
I need to build a decision tree based questionnaire which helps users to
find the right answer.
As a final product of this decision tree "app" I need a clickable buttons
ready to be embedded into th
Serge Christian Ibala wrote:
> Or what is the recommendation of Python for image processing?
Basic setup everyone should have:
Python
NumPy
SciPy (e.g. scipy.ndimage)
Cython
C and C++ compiler
matplotlib
scikit-image
scikit-learn
pillow
Also consider:
mahotas
tifffile (by Christoph Gohlke)
Ope
On Thu, May 28, 2015 at 1:05 PM, Terry Reedy wrote:
> On 5/28/2015 6:34 AM, Serge Christian Ibala wrote:
>
>
> I want to use the following package
>>
>> “numpy, matplotib, mahotas, ipython OpenCV and SciPy"
>>
>
> opencv seems to be the only one not available for 3.x.
>
>
OpenCV 3 (which is in
Hello All,
I want to know which version of Python is compatible (or can be associated
with which version of which "tools or package" for image processing)
I am working under Window and it is so complicated to find out which
version of which tool goes with which other version?
I want to use
On 28 May 2015 at 11:34, Serge Christian Ibala
wrote:
> Hello All,
>
> I want to know which version of Python is compatible (or can be associated
> with which version of which "tools or package" for image processing)
>
> I am working under Window and it is so complicated to find out which version
Good Evening :
Here is what I want me program to do:
• *Monitor* a folder for files that are dropped throughout the day
• When a file is dropped in the folder the program should scan the file
o IF all the contents in the file have the same length (let's assume line
length)
o THEN the file shou
On 27/11/14 16:07, boB Stepp wrote:
Alan's reference to indentation level had me trying to prove the
opposite--unsuccessfully.
Yeah, I probably over-simplified there in response to your assumption
that it was the order that mattered. It's really whether they are
inside a function or class -
On 11/27/2014 11:07 AM, boB Stepp wrote:
x = "outer"
def tricky_func2():
y = x
print(x)
tricky_func2()
outer
So why does not print(x) see the global x and instead looks for the
local x?
The function is compiled during the import (or initial load if it's a
On Thu, Nov 27, 2014 at 9:33 AM, Steven D'Aprano wrote:
> On Thu, Nov 27, 2014 at 09:00:48AM -0600, boB Stepp wrote:
[...]
> But there is a subtlety that you may not expect:
>
> py> class Tricky:
> ... print(x)
> ... x = "inner"
> ... print(x)
> ...
> outer
> inner
Actually, this is
On Thu, Nov 27, 2014 at 09:13:35AM -0600, boB Stepp wrote:
> On Thu, Nov 27, 2014 at 4:56 AM, Steven D'Aprano wrote:
> > On Wed, Nov 26, 2014 at 10:18:55PM -0600, boB Stepp wrote:
> >
> >> So any variables lower in the program are accessible to those above it?
> >
> > No, that can't be the explana
On Thu, Nov 27, 2014 at 09:00:48AM -0600, boB Stepp wrote:
> Level of indentation is the key? Can you give me an example, not
> involving functions, where a variable is defined at an "inner" level
> of indentation, but is not accessible at the outermost level of
> indentation?
Classes and functi
On Thu, Nov 27, 2014 at 4:56 AM, Steven D'Aprano wrote:
> On Wed, Nov 26, 2014 at 10:18:55PM -0600, boB Stepp wrote:
>
>> So any variables lower in the program are accessible to those above it?
>
> No, that can't be the explanation. Think of this:
>
> b = a + 1
> a = 2
>
> That will fail because w
On Thu, Nov 27, 2014 at 4:51 AM, Alan Gauld wrote:
> On 27/11/14 04:18, boB Stepp wrote:
[...]
>> So any variables lower in the program are accessible to those above it?
>
>
> No.
> Its not whether they are defined above or below each other its the level of
> indentation. Both f and g are define
On Wed, Nov 26, 2014 at 10:18:55PM -0600, boB Stepp wrote:
> So any variables lower in the program are accessible to those above it?
No, that can't be the explanation. Think of this:
b = a + 1
a = 2
That will fail because when the "b = a + 1" line is executed, a doesn't
exist yet so there is n
On 27/11/14 04:18, boB Stepp wrote:
Note that this principle is critical to Python, otherwise functions
couldn't call each other, or even built-ins! If you have two functions:
def f(): return g()
def g(): return "Hello!"
"g" is a global "variable" and f() can see it, otherwise it couldn't
cal
On Wed, Nov 26, 2014 at 6:20 PM, Steven D'Aprano wrote:
> On Wed, Nov 26, 2014 at 05:23:40PM -0600, boB Stepp wrote:
[...]
>> First question: How can the printLabel() function see the list
>> variable, l, defined outside of this function? I thought that
>> functions only had access to variables lo
On Wed, Nov 26, 2014 at 05:23:40PM -0600, boB Stepp wrote:
> Python 2.4.4
> Solaris 10
>
> #!/usr/bin/env python
>
> from Tkinter import *
>
> def printLabel():
> print "Button number ", var.get(), " was pressed."
> print "You selected this option:", l[var.get() - 1][0]
>
> root = Tk()
On 26/11/14 23:23, boB Stepp wrote:
def printLabel():
print "Button number ", var.get(), " was pressed."
print "You selected this option:", l[var.get() - 1][0]
...
buttonNumber = []
l = [("Brain_Partial", 1), ("Brain_Whole", 2),
("Head & Neck", 3), ("Chest",
Python 2.4.4
Solaris 10
#!/usr/bin/env python
from Tkinter import *
def printLabel():
print "Button number ", var.get(), " was pressed."
print "You selected this option:", l[var.get() - 1][0]
root = Tk()
root.title("ROI List Creator")
root.geometry(newGeometry='225x230+900+300')
root.tk
On Wed, Oct 29, 2014 at 05:08:28PM +0100, jarod...@libero.it wrote:
> Dear All,
>
> I have a long matrix where I have the samples (1to n) and then I have (1to j
> )elements.
> I would like to count how many times each j element are present on each
> samples.
Jarod, looking at your email addres
On 29/10/14 16:08, jarod...@libero.it wrote:
I have a long matrix where I have the samples (1to n) and then I have
(1to j )elements.
I would like to count how many times each j element are present on each
samples.
That probably makes sense to you but it doesn't to me.
Lets assuyme you have n=
jarod...@libero.it wrote:
> Dear All,
>
> I have a long matrix where I have the samples (1to n) and then I have (1to
> j )elements.
> I would like to count how many times each j element are present on each
> samples.
>
> So the question is which is the best algoritm for obtain the results. The
Dear All,
I have a long matrix where I have the samples (1to n) and then I have (1to j
)elements.
I would like to count how many times each j element are present on each
samples.
So the question is which is the best algoritm for obtain the results. The
result I want is a table like that.
A
Al Bull wrote:
> Quick question then...
>
> Does this do the trick?
I may have misunderstood your original question; do you want to delete
records from the database or from the Python list? Your code below will do
the latter, once you have fixed the bugs.
> Currentrecord = 1
>
> While curre
-Original Message-
From: Tutor [mailto:tutor-bounces+a.bull=pubdmgroup@python.org] On
Behalf Of Alan Gauld
Sent: Wednesday, October 22, 2014 12:13 PM
To: tutor@python.org
Subject: Re: [Tutor] Question on a select statement with ODBC
On 22/10/14 16:06, Al Bull wrote:
> I don'
On 22/10/14 16:06, Al Bull wrote:
I don't think I explained the problem properly. I have several hundred
thousand records in the ORD table. There are many instances of records with
identical ORD_DBASUB values. Where duplicates exist, I only want to keep
the most current record.
Ah, OK th
-Original Message-
From: Tutor [mailto:tutor-bounces+a.bull=pubdmgroup@python.org] On
Behalf Of Alan Gauld
Sent: Tuesday, October 21, 2014 6:42 PM
To: tutor@python.org
Subject: Re: [Tutor] Question on a select statement with ODBC
On 21/10/14 19:57, Al Bull wrote:
> have multi
On 21/10/14 19:57, Al Bull wrote:
have multiple records per ord_dbasub. Is there a way I can structure the
select statement to retrieve only the most current record (based on
ord_date)?
Yes, the cursor can be told to only retrieve N records, in your case 1.
SELECT ord_dbasub, ord_pub,ord_dat
Windows 7.0
Python 3.3.4
I am accessing a database table via ODBC. The table I am accessing can
have multiple records per ord_dbasub. Is there a way I can structure the
select statement to retrieve only the most current record (based on
ord_date)?
I used to program in PL/I and assembly in the
Hi Clayton, and welcome.
My responses are interleaved between your questions below.
On Sat, Sep 20, 2014 at 03:20:09PM -0700, Clayton Kirkwood wrote:
> I'm ramping slowly unfortunately. How does one go about knowing which module
> to import to make certain functions work?
Experience, practice, r
>> Secondarily, why can you import a module without it importing all of its
>> daughters?
>
> The act of importing a module is "recursive": if you import a module,
> and that module itself has import statements, then Python will do the
> import of the child modules too. And so forth.
Hi Deb,
Oh!
On Sat, Sep 20, 2014 at 3:20 PM, Clayton Kirkwood wrote:
> I’m ramping slowly unfortunately. How does one go about knowing which module
> to import to make certain functions work? I have a read() that fails because
> there is no definition for it.
Specific details may help here. Can you tell us
I'm ramping slowly unfortunately. How does one go about knowing which module
to import to make certain functions work? I have a read() that fails because
there is no definition for it. I am using the Wing IDE. I have traversed
much of the developer's guide and can't find any certainty.
Secondar
Thank you Peter Otten,
actually i should study about the collections and defaultdict like how and
where these can be used and its advantage.
On Fri, Sep 19, 2014 at 5:59 PM, Peter Otten <__pete...@web.de> wrote:
> Sunil Tech wrote:
>
> > Danny i did it like this
> >
> > result_dict = {}
> > fo
Sunil Tech wrote:
> Danny i did it like this
>
> result_dict = {}
> for i in tes:
> if i['a'] in result_dict:
> temp = result_dict[i['a']]
> temp['b'].append(i['b'])
> temp['c'].append(i['c'])
> temp['a'] = i['a']
> result_dict[i['a']] = temp
> else
Danny i did it like this
result_dict = {}
for i in tes:
if i['a'] in result_dict:
temp = result_dict[i['a']]
temp['b'].append(i['b'])
temp['c'].append(i['c'])
temp['a'] = i['a']
result_dict[i['a']] = temp
else:
result_dict[i['a']] = {
On Sep 19, 2014 12:28 AM, "Danny Yoo" wrote:
>
>
> >{'a': 2, 'b': 'another', 'c': 754},
> >{'a': 2, 'b': 'word', 'c': 745}
> >
>
> > if the value of the 'a' is same, then all those other values of the
dict should be merged/clubbed.
>
> Can you write a function that takes two of the
Danny,
i wrote a method called *merge *below
can you be little clear with an example
I wrote something like this
ids = []
for i in tes:
if i['a'] not in ids:
ids.append(i['a'])
print ids
def merge(ids, tes):
for jj in ids:
txt = ''
for i in tes:
i
>{'a': 2, 'b': 'another', 'c': 754},
>{'a': 2, 'b': 'word', 'c': 745}
>
> if the value of the 'a' is same, then all those other values of the dict
should be merged/clubbed.
Can you write a function that takes two of these and merges them? Assume
that they have the same 'a'. Can
Hi all,
tes = [{'a': 1, 'b': 'this', 'c': 221},
{'a': 2, 'b': 'this', 'c': 215},
{'a': 1, 'b': 'is', 'c': 875},
{'a': 1, 'b': 'sentence', 'c': 874},
{'a': 2, 'b': 'another', 'c': 754},
{'a': 2, 'b': 'word', 'c': 745}]
The above one is the result form the DB. I
On Fri, Sep 12, 2014 at 08:26:29PM +0530, Sunil Tech wrote:
> Hi All,
>
> i have a dictionary like
>
> res = [{'description': 'Testo', 'id': '676', 'parentOf': True},
>{'description': 'Pesto', 'id': '620', 'parentOf': False}]
That is not a dictionary. It is a list containing two dictiona
Thank you Danny and Joel :)
On Fri, Sep 12, 2014 at 9:51 PM, Joel Goldstick
wrote:
> On Fri, Sep 12, 2014 at 12:04 PM, Danny Yoo
> wrote:
> >
> >> i wrote a code like this
> >>
> >> for i in res:
> >> dict = {}
> >> dict['id_desc'] = str(i['id'])+','+str(i['description'])
>
> A minor re
On Fri, Sep 12, 2014 at 12:04 PM, Danny Yoo wrote:
>
>> i wrote a code like this
>>
>> for i in res:
>> dict = {}
>> dict['id_desc'] = str(i['id'])+','+str(i['description'])
A minor revision for the right side of above:
",".join(str(i['id'], str(i['description']))
>> i.update(dict
> i wrote a code like this
>
> for i in res:
> dict = {}
> dict['id_desc'] = str(i['id'])+','+str(i['description'])
> i.update(dict)
>
> is there any other simple methods to achieve this?
>
Can you avoid the intermediate "dict" and just assign to i['id_desc']
directly?
Hi All,
i have a dictionary like
res = [{'description': 'Testo',
'id': '676',
'parentOf': True},
{'description': 'Pesto',
'id': '620',
'parentOf': False}]
i looking for the result like this
res = [{'description': 'Testo',
'id': '676',
'id_desc':'676_Testo',
'parentOf': True},
{'desc
On Fri, Aug 22, 2014 at 02:43:20AM +, Mimi Ou Yang wrote:
> if (name and age == jimmy and 35):
> print ("BLABLABLABLABLABLAB")
if name == 'jimmy' and age == 35:
print("BLAB")
or if you prefer:
if (name, age) == ("jimmy", 35):
print("BLAB")
Take careful note that strings like "
On 22/08/14 03:43, Mimi Ou Yang wrote:
name = input("Enter your name: )
age = input("Enter your age: )
age = int(age)
if (name and age == jimmy and 35):
print ("BLABLABLABLABLABLAB")
There are two problems here.
First You need to put quote signs around 'jimmy'
since its a literal string,
name = input("Enter your name: )
age = input("Enter your age: )
age = int(age)
if (name and age == jimmy and 35):
print ("BLABLABLABLABLABLAB")
how can I make a code that has the same effect has the code that I wrote even
though it isn’t a real working code. I hope you unders
Lucia Stockdale Wrote in message:
> Hi everyone,
Welcome to the list. And thanks for using text mode.
What's the Python version and os version. I expect this is crucial.
>
> I have been writing a program to print words backwards until an an empty line
> of input is entered,
> but after I put
Peter Otten wrote:
> I see another problem, the while loop will run at most once, but you
> should be able to fix that yourself.
Sorry, it will run forever reversing and unreversing the same string...
___
Tutor maillist - Tutor@python.org
To unsubs
On 21Aug2014 13:03, Lucia Stockdale wrote:
I have been writing a program to print words backwards until an an empty line
of input is entered,
but after I put in the input it comes up with TypeError.
Hi Lucia,
It would be helpful to include the whole traceback that Python shows you. Can
you
Lucia Stockdale writes:
> I have been writing a program to print words backwards until an an
> empty line of input is entered, but after I put in the input it comes
> up with TypeError.
For completeness give us the whole Traceback, it makes pin-pointing the
error easier. Also, tell us which Ver
Lucia Stockdale wrote:
> Hi everyone,
>
> I have been writing a program to print words backwards until an an empty
> line of input is entered, but after I put in the input it comes up with
> TypeError.
In the future please include the traceback (cut and paste, don't rephrase).
> This is my goa
Hi everyone,
I have been writing a program to print words backwards until an an empty line
of input is entered,
but after I put in the input it comes up with TypeError.
This is my goal:
Line: hello world
olleh dlrow
Line: extra
artxe
Line: i love python
i evol nohtyp
Line:
This is my current c
On 17/07/2014 17:23, Jose Amoreira wrote:
Hello,
On 07/17/2014 12:05 AM, Alan Gauld wrote:
Just throwing this idea in without really thinking about it...
Would itertools.groupby work?
It takes a sorted collection and groups the items found based on a key
function. If the key function deemed t
Hello,
On 07/17/2014 12:05 AM, Alan Gauld wrote:
Just throwing this idea in without really thinking about it...
Would itertools.groupby work?
It takes a sorted collection and groups the items found based on a key
function. If the key function deemed two items identical if they were
within dist
On 16.07.2014 13:49, Jose Amoreira wrote:
Hello
I wrote a function that, given a list of numbers, finds clusters of
values by proximity and returns a reduced list containing the centers of
these clusters. However, I find it rather unclear. I would appreciate
any comments on how pythonic my functi
On 16/07/14 12:49, Jose Amoreira wrote:
Hello
I wrote a function that, given a list of numbers, finds clusters of
values by proximity and returns a reduced list containing the centers of
these clusters. However, I find it rather unclear. I would appreciate
any comments on how pythonic my function
Hi!
On 07/16/2014 10:14 PM, Wolfgang Maier wrote:
careful here: you just stored a tuple instead of a list; doesn't matter
for your current implementation, but may bite you at some point.
Oh, you're right. Silly mistake, even if harmless for the application I
have in mind.
else:
Hello
I wrote a function that, given a list of numbers, finds clusters of
values by proximity and returns a reduced list containing the centers of
these clusters. However, I find it rather unclear. I would appreciate
any comments on how pythonic my function is and suggestions to improve
its re
On May 30, 2014 10:12 PM, "Matthew Ngaha" wrote:
>
> Thanks for the response Alan. I forgot to reply to tutor on my 2nd
> comment. Just incase someone might want to see it, here it is:
>
> "Okay I think learning how to scrap (library or framework) is not
> worth the trouble. Especially if some peo
Thanks for the response Alan. I forgot to reply to tutor on my 2nd
comment. Just incase someone might want to see it, here it is:
"Okay I think learning how to scrap (library or framework) is not
worth the trouble. Especially if some people consider it illegal.
Thanks for the input."
_
On Fri, May 30, 2014 at 7:20 PM, Alan Gauld wrote:
>
>
>> If a site offers an API that returns the data you need then use it,
>> If not you have few alternatives to scraping (although scraping
>> may be 'illegal' anyway due to the impact on other users). But scraping,
>> whether a web page or a GU
On 30/05/14 18:25, Matthew Ngaha wrote:
Hey all. I've been meaning to get into web scraping and was pointed to
the directions of lxml (library) and scrapy (framework). Can I ask in
terms of web scraping, what's the difference between a library and a
framework?
I don;t know of anything web speci
Hey all. I've been meaning to get into web scraping and was pointed to
the directions of lxml (library) and scrapy (framework). Can I ask in
terms of web scraping, what's the difference between a library and a
framework? Surely everyone should use a framework but I get the idea
more people use the
On Sat, May 3, 2014 at 9:13 PM, Steven D'Aprano wrote:
>
> On Sat, May 03, 2014 at 03:59:40PM -0700, Danny Yoo wrote:
> > Following up on this. Let's make sure that we're talking about the same
> > thing.
> >
> >
> > The assertion is that the following:
> >
> > fullPath += [...]
> >
> > wher
On Sat, May 03, 2014 at 03:59:40PM -0700, Danny Yoo wrote:
> Following up on this. Let's make sure that we're talking about the same
> thing.
>
>
> The assertion is that the following:
>
> fullPath += [...]
>
> where fullPath is a list of strings, exhibits O(n^2) time. I don't
> think th
Following up on this. Let's make sure that we're talking about the same thing.
The assertion is that the following:
fullPath += [...]
where fullPath is a list of strings, exhibits O(n^2) time. I don't
think this is true. Semantically, the statement above should be
equivalent to:
full
The the "Logical Error" question, this was brought up:
The big problem is this:
On 10/04/14 03:04, Conner Crowe wrote:
*Problem 2.*
# Here's one possible stand-in:
def leave(minute):
if minute > 0:
return minute
return 0
So far for this i have:
*def* *leave*(minute):
*if* minute > 0:
*return* minute
*elif* minute=0:
*return* 0
Ignoring the me
Conner Crowe wrote:
> To whom this may concern:
>
> I am struggling on two questions:
> Problem 2.
> Suppose you are given a function leave(minute) which returns the number of
> students that leave an exam during its mth minute. Write a function
> already_left(t) that returns the number of studen
To whom this may concern:
I am struggling on two questions:
Problem 2.
Suppose you are given a function leave(minute) which returns the number of
students
that leave an exam during its mth minute. Write a function already_left(t) that
returns the number of students that left at or before minute t
Steven D'Aprano wrote:
> On Tue, Apr 08, 2014 at 02:38:13PM -0600, Jared Nielsen wrote:
>> Hello,
>> Could someone explain why and how this list comprehension with strip()
>> works?
>>
>> f = open('file.txt')
>> t = [t for t in f.readlines() if t.strip()]
>> f.close()
>> print "".join(t)
>>
>> I
Thanks Danny!
That was an awesome explanation.
On Tue, Apr 8, 2014 at 7:05 PM, Danny Yoo wrote:
>
>> if line.strip()
>>
>> Is that stripping the line of white space at the same time that it is
>> testing it?
>>
>>
>
> Two features about Python:
>
> 1. Strings are immutable, so the above is com
Thank Danny,
That's much more clear.
But I still don't understand what's happening with:
if line.strip()
Is that stripping the line of white space at the same time that it is
testing it?
On Tue, Apr 8, 2014 at 3:44 PM, Danny Yoo wrote:
> > Could someone explain why and how this list comprehen
>
>
> if line.strip()
>
> Is that stripping the line of white space at the same time that it is
> testing it?
>
>
Two features about Python:
1. Strings are immutable, so the above is computing what a
whitespace-stripped line would look like. So that means that
'line.strip()' is doing just a com
On Tue, Apr 08, 2014 at 02:38:13PM -0600, Jared Nielsen wrote:
> Hello,
> Could someone explain why and how this list comprehension with strip()
> works?
>
> f = open('file.txt')
> t = [t for t in f.readlines() if t.strip()]
> f.close()
> print "".join(t)
>
> I had a very long file of strings fil
Jared Nielsen writes:
> I had a very long file of strings filled with blank lines I wanted to
> remove. I did some Googling and found the above code snippet
The code you found is one of several syntactic shortcuts in Python,
which allow creating a sequence directly from an expression in your
cod
Hi,
On 8 April 2014 22:38, Jared Nielsen wrote:
> Hello,
> Could someone explain why and how this list comprehension with strip()
> works?
>
> f = open('file.txt')
> t = [t for t in f.readlines() if t.strip()]
> f.close()
> print "".join(t)
>
> I had a very long file of strings filled with blank
> Could someone explain why and how this list comprehension with strip()
> works?
>
> f = open('file.txt')
> t = [t for t in f.readlines() if t.strip()]
> f.close()
> print "".join(t)
Hi Jared,
Let me rewrite this without the list comprehension, while preserving behavior.
#
Hello,
Could someone explain why and how this list comprehension with strip()
works?
f = open('file.txt')
t = [t for t in f.readlines() if t.strip()]
f.close()
print "".join(t)
I had a very long file of strings filled with blank lines I wanted to
remove. I did some Googling and found the above co
On 04/05/2014 07:46 PM, Jim Byrnes wrote:
Ubuntu 12.04 python 3.3
I was working through an exercise about sets. I needed to find the duplicates in
a list and put them in a set. I figured the solution had to do with sets not
supporting duplicates. I finally figured it out but along the way I wa
On 04/05/2014 01:15 PM, Steven D'Aprano wrote:
On Sat, Apr 05, 2014 at 12:46:19PM -0500, Jim Byrnes wrote:
Ubuntu 12.04 python 3.3
I was working through an exercise about sets. I needed to find the
duplicates in a list and put them in a set. I figured the solution had
to do with sets not suppo
On Sat, Apr 05, 2014 at 12:46:19PM -0500, Jim Byrnes wrote:
> Ubuntu 12.04 python 3.3
>
> I was working through an exercise about sets. I needed to find the
> duplicates in a list and put them in a set. I figured the solution had
> to do with sets not supporting duplicates. I finally figured i
Ubuntu 12.04 python 3.3
I was working through an exercise about sets. I needed to find the
duplicates in a list and put them in a set. I figured the solution had
to do with sets not supporting duplicates. I finally figured it out but
along the way I was experimenting in idle and got some res
> In the upper left corner of that page is a dropdown you can use to get to
3.3 for example.
Thanks for that info.
On Sun, Jan 19, 2014 at 11:42 PM, Dave Angel wrote:
> SM Wrote in message:
> > Sorry for not giving details on the OS and python version I am using:
> Ubuntu and Python3
>
>
> O
Eryksun: Thanks for your reply. Yes, as I mentioned in my reply to Allen, I
used subprocess.check_output and it worked for me.
-SM
On Sun, Jan 19, 2014 at 11:33 PM, eryksun wrote:
> On Sun, Jan 19, 2014 at 6:36 PM, SM wrote:
> >
> > This time it probably ran for a few more iterations than befo
SM Wrote in message:
> Sorry for not giving details on the OS and python version I am using: Ubuntu
> and Python3
On Sun, Jan 19, 2014 at 8:20 PM, Alan Gauld wrote:
On 19/01/14 23:36, SM wrote:
>> I read about os.popen in
>> http://docs.python.org/2/library/subprocess.html#subprocess.Popen
>
On Sun, Jan 19, 2014 at 6:36 PM, SM wrote:
>
> This time it probably ran for a few more iterations than before and stopped
> with the same error message. This time it also output the following
> messages:
>
> IOError: [Errno 4] Interrupted system call
> Attribute not found in file (tsk_fs_attrlist
Hi Alan,
Thanks for your reply.
My answer to why I am using os.popen could be a lame one - I have used it
extensively in various places before and it has been working well and so
was hung up on using it. Now I replaced it by subprocess.check_output with
appropriate parameters and it seems to be wor
On 19/01/14 23:36, SM wrote:
I read about os.popen in
http://docs.python.org/2/library/subprocess.html#subprocess.Popen
This doesn't answer the question but I'm curious.
If you read about os.popen in the subprocess module docs why did
you use it? The subprocess module replaces all the os.popen
Hello,
I am using os.popen repeatedly to run Unix shell commands within my Python
program. To be more specific, I am running in a loop which could iterate as
many times as there are lines in an input file - in this example, close to
150 iterations. Each loop has two calls to os.popen.
It works fine
On 18/01/14 22:52, Jackie Canales wrote:
def processScores(filename):
infile = open(filename, 'r')
line = infile.readlines()
infile.close()
lineNum = 0
s = Score(0)
for item in line2:
> lineNum += 1
What is line2? I assume you mean line?
You could do al
I have with my assignment.
class Score:
'A subclass of the object.'
def __init__(self, init):
'Sets the initial score to the object and sets the number of scores
that have contributed to the total to 1.'
self.x = 1
self.init = int(init)
self.total = i
On Sat, Jan 11, 2014 at 04:26:00AM -0500, eryksun wrote:
> On Sat, Jan 11, 2014 at 12:51 AM, Steven D'Aprano wrote:
> >
> >> However, when I writed it into a .py file and execute the .py file, it
> >> blocked at "temp=p.readline()".
> >
> > Of course it does. You haven't actually called the .exe f
On Fri, Jan 10, 2014 at 11:48 PM, daedae11 wrote:
> p = subprocess.Popen(['E:/EntTools/360EntSignHelper.exe',
> 'E:/build/temp/RemoteAssistSetup.exe'],
> stdout=subprocess.PIPE, shell=True).stdout
Is 360EntSignHelper supposed to run RemoteAssistSetup as a child
process? O
101 - 200 of 994 matches
Mail list logo