[Tutor] Medical Decision-Making Question

2011-06-13 Thread Fred G
Hello--

I'm a pre-med student interested in decision-making as applied to medical
decisions.  I am trying to build a medical decision-making algorithm and am
pretty stuck on a few things.

I've built a file that contains a list of many diseases and their associated
symptoms.  For example, here are the column headers and two sample rows (the
"|" = "or"):
DiseaseSymptoms
Cold
sore_throat|runny_nose|congestion|cough|aches|slight_fever
Flu
sore_throat|fever|headache|muscle_aches|soreness|congestion|cough|returning_fever

My questions are the following:
a)  How's the best way to make it so I can have a user type in a list of
symptoms and then have the computer tell the user the possible diseases that
share those symptoms? In other words, on a high-level I have a pretty good
idea of what I want my algorithm to do-- but I need help implementing the
basic version first.  I'd like to do the following:
>>>Please enter a list of symptoms
>>>[user_input]
>>>Possible diseases include: x, y, z

b)Once I get that working, could anyone point me to good code already
written in Python such that I could have a model (for syntax and overall
structure) for figuring out how to make the computer evaluate more factors
such as: patient age, patient history, and even downloading archival data
for patients in the same demographic group?

Thanks!
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Medical Decision-Making Question

2011-06-13 Thread Fred G
Thanks guys for all the feedback.

re Jim's comments: I completely agree that the difference b/t "slight" fever
and "returning" fever, etc will pose some problems.  My hunch is that
initially I'll just do something like make "fever" be the only one for now
w/ the obvious caveat that a few more diseases would not be eliminated than
actually should be.  Building on this, another challenging problem will be
how to code the fact that when a symptom occurs early it usually means
something else than if it returns later in the course of an illness.  I'm
not 100% sure how I'll handle this, but I think the first priority is
getting access to a dataset and getting the bot up and running before I
focus on this.

re Steve's comments: hmm, sounds like I really should take an AI class.
 This problem is just really exciting and driving me, and I'm glad you
pointed out that this will probably take a lot more time than I had
predicted.  I'm pretty motivated personally to solve it.  I had a few more
questions about your code:
a) Why did you choose not to use a dictionary to store the diseases (keys)
and their possible values (symptoms)?  That seemed the most intuitive to me,
like, what I want to do is have it such that we enter in a few symptoms and
then all the keys without those symptoms are automatically eliminated.  I've
been off and on teaching myself python for the last 6 months and have
experience in Java.  I mean, I think I want a structure like this:
1) Main class
-this class calls the diagnose_disease class based on the set of entered
symptoms and demographic information (ie age, location, season (winter,
spring, fall, etc), patient history)
2) Diagnose_disease class
-this is the heart of the project.  Based on the entered symptoms, it keeps
narrowing down the list of possible diseases.  Ideally it would ask
follow-up questions of the user to even further narrow down the list of
possible diseases, but that's going to have to wait until I get the rest
working.
3) Dictionary Class
-this class contains a *dictionary??* of all possible diseases and their
associated symptoms.  Assuming in a standardized form for now (such that
"slight_fever" and "returning_fever" are simply coded as "fever" for now,
etc).

does this seem like the best way to go about it?

re: James.  I completely agree that my first step should be getting access
to a dataset.  I need to know the format, etc of it before I really can
progress on this.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] quick data structures question

2011-09-20 Thread Fred G
Hey guys,

I want to write a short script that takes from an input excel file w/ a
bunch of rows and columns.  The two columns I'm interested in are "high
gains" and "genes."  I want the user to write:

>>>Which genes are associated with gains over 20%?

and then I want the script to search through the excel file, find in the
"high gains" column when the number is greater than 20%, and then store the
corresponding genes in that row (but in the "genes" column).  I know this
should be super simple, but I'm having trouble breaking the problem into
smaller, manageable pieces.  For instance, the "high gains" column does not
have just integers, it is in the format %.  Also, I'd like for the final
script to be usable in R if possible, too.

pseudocode is something like this:

for line in lines:
  if item in "high gains" > 20
 create new dictionary
   store genes from "genes" into new dictionary

Much thanks in advance!
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Mapping ID's for corresponding values in different Columns

2012-07-08 Thread Fred G
Hi--

My current input looks like the following:

FILE1.csv
PERSON_IDPERSON_NAME
1 Jen
2 Mike
3 Jim
4
5 Jane
6 Joe
7 Jake

FILE2.csv
PERSON_ID   PERSON_NAME
 Jim
 Mike
 Jane
 Todd
 Jen

_
I want to fill into the PERSON_ID column of FILE2.csv the corresponding
ID's associated with those names as identified in FILE1.csv.

At first I imported the csv module and was using the csv.Reader, but then
it seemed simple enough just to write something like:
for line in file2:
 print(line)

giving me the following output:
PERSON_ID, PERSON_NAME
, Jim
, Mike
, Jane
, Todd
, Jen

I think I understand the issue at a conceptual level, but not quite sure
how to fully implement it:
a) I want to build a dictionary to create keys, such that each number in
file1 corresponds to a unique string in column B of file1.
b) then write a for loop like the following:
for "person_name" in file2:
   if "person_name.file2" == "person_name.file1":
   person_id.file2 == person_id.file1
c) write into file2 the changes to person_id's...

But it's pretty difficult for me to get past this stage. Am I on the right
track? And more importantly, how could I learn how to actually implement
this in smaller stages?

Thanks so much.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Mapping ID's for corresponding values in different Columns (UPDATE)

2012-07-08 Thread Fred G
I thought it made sense to read the two columns in File1 in as a dictionary
(where the key is actually the name, so that we can search on it later),
and the column of interest in File2 as a list.  Finding the common values
then is just:

for item in file2_list:
  for line in file1_dict:
if item == line:
  print item

Creating a new dictionary and filling it in with the common values gives us
something like:
new_dict = {}
for item in file2_list:
for line in file1_dict:
  if item == line:
new_dict[item] = line

I'm not quite sure where to go from here, though. I want:
a) to edit the new_dict such that we get the proper key and value
combination, instead of what it is now which is just the proper values.
b) Once we have the correct dictionary with the proper keys and their
values, how do I then output it into the form (???):

File2.csv
PERSON_IDPERSON_NAME
key1   Jim
key100   Mike
key3  Jane
key989  Todd
etc... etc...


On Sun, Jul 8, 2012 at 2:47 PM, Fred G  wrote:

> Hi--
>
> My current input looks like the following:
>
> FILE1.csv
> PERSON_IDPERSON_NAME
> 1 Jen
> 2 Mike
> 3 Jim
> 4
> 5 Jane
> 6 Joe
> 7 Jake
>
> FILE2.csv
> PERSON_ID   PERSON_NAME
>  Jim
>  Mike
>  Jane
>  Todd
>  Jen
>
> _
> I want to fill into the PERSON_ID column of FILE2.csv the corresponding
> ID's associated with those names as identified in FILE1.csv.
>
> At first I imported the csv module and was using the csv.Reader, but then
> it seemed simple enough just to write something like:
> for line in file2:
>  print(line)
>
> giving me the following output:
> PERSON_ID, PERSON_NAME
> , Jim
> , Mike
> , Jane
> , Todd
> , Jen
>
> I think I understand the issue at a conceptual level, but not quite sure
> how to fully implement it:
> a) I want to build a dictionary to create keys, such that each number in
> file1 corresponds to a unique string in column B of file1.
> b) then write a for loop like the following:
> for "person_name" in file2:
>if "person_name.file2" == "person_name.file1":
>person_id.file2 == person_id.file1
> c) write into file2 the changes to person_id's...
>
> But it's pretty difficult for me to get past this stage. Am I on the right
> track? And more importantly, how could I learn how to actually implement
> this in smaller stages?
>
> Thanks so much.
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Mapping ID's for corresponding values in different Columns

2012-07-09 Thread Fred G
Thank you guys so much.  I'm quite close now, but I'm having a bit of
trouble on the final for-loop to create the new dictionary.  I have the
following 3 functions (note I'm re-typing it from a different computer so
while the identation will be off here, it is correct in the actual code):

#read in file as dictionary.  Name is key, id is value.
def csv_to_dict(filename):
  record = {}
  line = filename.readline()
  for line in filename:
key = line.split(",", 1)[-1]
val = line.split(",", 1)[:-1]
  return record

#read in file2 names
def nested_line(filename):
  line = filename.readline()
  new_list = []
  for line in filename:
name = line.split(",", 1)[-1]
new_list.append(name)
  return new_list

#this is the function that I'm having trouble with
#create new dict mapping file 1 ids to file2's names
def new_dict (csv_to_dict, nested_line):
  old_dict = cssv_to_dict(file1)
  old_list = nested_line(file2)
  new_dict1 = {}
  for item in old_list:
new_dict1[item] = item
  return (new_dict1)

I have tried various permutations of the for loop in this final function,
but I haven't quite gotten it.  The current form is the closest I have
gotten to my desired output, since it produces the new dictionary with the
name that I want-- just an invalid id associated with that name.  I tried a
bunch of different nested loops but kept getting it incorrect and then
after so many attempts I got a little confused about what I was trying to
do.  So I backed up a little bit and have this.

Conceptually, I thought that this would give me my desired result:
new_dict
for name in old_list:
  for key, value in old_dict:
if name == key:
  new_dict1[key] = value
return(new_dict1)

But it wasn't right.  I tried a different approach where I used the
dict.values() function in order to pull out the values from old_dict that
we want to include in the new_dict, but I got a bit lost there, too.

I'm so close right now and I would be so thankful for any bit of
clarification which could get me to the finish line.

On Mon, Jul 9, 2012 at 12:42 AM, Hugo Arts  wrote:

> On Sun, Jul 8, 2012 at 11:47 PM, Fred G  wrote:
>
>> Hi--
>>
>> My current input looks like the following:
>>
>> FILE1.csv
>> PERSON_IDPERSON_NAME
>> 1 Jen
>> 2 Mike
>> 3 Jim
>> 4
>> 5 Jane
>> 6 Joe
>> 7 Jake
>>
>> FILE2.csv
>> PERSON_ID   PERSON_NAME
>>  Jim
>>  Mike
>>  Jane
>>  Todd
>>  Jen
>>
>> _
>> I want to fill into the PERSON_ID column of FILE2.csv the corresponding
>> ID's associated with those names as identified in FILE1.csv.
>>
>> At first I imported the csv module and was using the csv.Reader, but then
>> it seemed simple enough just to write something like:
>> for line in file2:
>>  print(line)
>>
>> giving me the following output:
>> PERSON_ID, PERSON_NAME
>> , Jim
>> , Mike
>> , Jane
>> , Todd
>> , Jen
>>
>> I think I understand the issue at a conceptual level, but not quite sure
>> how to fully implement it:
>> a) I want to build a dictionary to create keys, such that each number in
>> file1 corresponds to a unique string in column B of file1.
>> b) then write a for loop like the following:
>> for "person_name" in file2:
>>if "person_name.file2" == "person_name.file1":
>>person_id.file2 == person_id.file1
>> c) write into file2 the changes to person_id's...
>>
>> But it's pretty difficult for me to get past this stage. Am I on the
>> right track? And more importantly, how could I learn how to actually
>> implement this in smaller stages?
>>
>>
>  You're on the right track, and you're almost there! You've already broken
> down the problem into steps. You should now try to implement a function for
> each step, and finally you should glue these functions together into a
> final program.
>
> a) Though you don't *have* to use it, csv.reader is really quite simple,
> I'd recommend it. Try and write a function that takes a file name as
> argument and returns a dictionary of the form { name: id, name: id } (i.e.
> the names are the keys).
>
> b) For this step, you first need a list of all names in file 2. You could
> use csv.reader again or you could just parse it. Then, you use the
> dictionary to look up the corresponding id. The end goal for this function
> is to return a list of lists that l

Re: [Tutor] Mapping ID's for corresponding values in different Columns

2012-07-09 Thread Fred G
Got it! Thanks guys for all your help--what a satisfying feeling!  Just out
of curiosity, in the following:

def new_dict (csv_to_dict, nested_line):
old_dict = csv_to_dict(file1)
old_list = nested_line(file2)
new_dict = {}
#for item in old_list:
#new_dict[item] = item
for k, v in old_dict.iteritems():
for item in old_list:
if k == item:
new_dict[item] = v
return (new_dict)

when I deleted the third line from the bottom (the "if k == item"), I got
the same value ("3") for each key, instead of the correct output (ie the
different ID's).  Does anyone know why this was the case?

Thanks so much.


On Mon, Jul 9, 2012 at 8:23 AM, Fred G  wrote:

> Thank you guys so much.  I'm quite close now, but I'm having a bit of
> trouble on the final for-loop to create the new dictionary.  I have the
> following 3 functions (note I'm re-typing it from a different computer so
> while the identation will be off here, it is correct in the actual code):
>
> #read in file as dictionary.  Name is key, id is value.
> def csv_to_dict(filename):
>   record = {}
>   line = filename.readline()
>   for line in filename:
> key = line.split(",", 1)[-1]
> val = line.split(",", 1)[:-1]
>   return record
>
> #read in file2 names
> def nested_line(filename):
>   line = filename.readline()
>   new_list = []
>   for line in filename:
> name = line.split(",", 1)[-1]
> new_list.append(name)
>   return new_list
>
> #this is the function that I'm having trouble with
> #create new dict mapping file 1 ids to file2's names
> def new_dict (csv_to_dict, nested_line):
>   old_dict = cssv_to_dict(file1)
>   old_list = nested_line(file2)
>   new_dict1 = {}
>   for item in old_list:
> new_dict1[item] = item
>   return (new_dict1)
>
> I have tried various permutations of the for loop in this final function,
> but I haven't quite gotten it.  The current form is the closest I have
> gotten to my desired output, since it produces the new dictionary with the
> name that I want-- just an invalid id associated with that name.  I tried a
> bunch of different nested loops but kept getting it incorrect and then
> after so many attempts I got a little confused about what I was trying to
> do.  So I backed up a little bit and have this.
>
> Conceptually, I thought that this would give me my desired result:
> new_dict
> for name in old_list:
>   for key, value in old_dict:
> if name == key:
>   new_dict1[key] = value
> return(new_dict1)
>
> But it wasn't right.  I tried a different approach where I used the
> dict.values() function in order to pull out the values from old_dict that
> we want to include in the new_dict, but I got a bit lost there, too.
>
> I'm so close right now and I would be so thankful for any bit of
> clarification which could get me to the finish line.
>
> On Mon, Jul 9, 2012 at 12:42 AM, Hugo Arts  wrote:
>
>> On Sun, Jul 8, 2012 at 11:47 PM, Fred G  wrote:
>>
>>> Hi--
>>>
>>> My current input looks like the following:
>>>
>>> FILE1.csv
>>> PERSON_IDPERSON_NAME
>>> 1 Jen
>>> 2 Mike
>>> 3 Jim
>>> 4
>>> 5 Jane
>>> 6 Joe
>>> 7 Jake
>>>
>>> FILE2.csv
>>> PERSON_ID   PERSON_NAME
>>>  Jim
>>>  Mike
>>>  Jane
>>>  Todd
>>>  Jen
>>>
>>> _
>>> I want to fill into the PERSON_ID column of FILE2.csv the corresponding
>>> ID's associated with those names as identified in FILE1.csv.
>>>
>>> At first I imported the csv module and was using the csv.Reader, but
>>> then it seemed simple enough just to write something like:
>>> for line in file2:
>>>  print(line)
>>>
>>> giving me the following output:
>>> PERSON_ID, PERSON_NAME
>>> , Jim
>>> , Mike
>>> , Jane
>>> , Todd
>>> , Jen
>>>
>>> I think I understand the issue at a conceptual level, but not quite sure
>>> how to fully implement it:
>>> a) I want to build a dictionary to create keys, such that each number in
>>> file1 corresponds to a unique string in column B of file1.
>>> b) then write a for loop like the following:
>>> for "person_name" in file2:
>>>if "person_name.fil

Re: [Tutor] Mapping ID's for corresponding values in different Columns

2012-07-09 Thread Fred G
Sorry, just got that as well.  It was the placement of the if-statement in
the nested for-loop.  so v was stuck on 3...thanks again for the help with
this!!!

On Mon, Jul 9, 2012 at 1:57 PM, Fred G  wrote:

> Got it! Thanks guys for all your help--what a satisfying feeling!  Just
> out of curiosity, in the following:
>
> def new_dict (csv_to_dict, nested_line):
> old_dict = csv_to_dict(file1)
> old_list = nested_line(file2)
> new_dict = {}
> #for item in old_list:
> #new_dict[item] = item
> for k, v in old_dict.iteritems():
> for item in old_list:
> if k == item:
> new_dict[item] = v
> return (new_dict)
>
> when I deleted the third line from the bottom (the "if k == item"), I got
> the same value ("3") for each key, instead of the correct output (ie the
> different ID's).  Does anyone know why this was the case?
>
> Thanks so much.
>
>
> On Mon, Jul 9, 2012 at 8:23 AM, Fred G  wrote:
>
>> Thank you guys so much.  I'm quite close now, but I'm having a bit of
>> trouble on the final for-loop to create the new dictionary.  I have the
>> following 3 functions (note I'm re-typing it from a different computer so
>> while the identation will be off here, it is correct in the actual code):
>>
>> #read in file as dictionary.  Name is key, id is value.
>> def csv_to_dict(filename):
>>   record = {}
>>   line = filename.readline()
>>   for line in filename:
>> key = line.split(",", 1)[-1]
>> val = line.split(",", 1)[:-1]
>>   return record
>>
>> #read in file2 names
>> def nested_line(filename):
>>   line = filename.readline()
>>   new_list = []
>>   for line in filename:
>> name = line.split(",", 1)[-1]
>> new_list.append(name)
>>   return new_list
>>
>> #this is the function that I'm having trouble with
>> #create new dict mapping file 1 ids to file2's names
>> def new_dict (csv_to_dict, nested_line):
>>   old_dict = cssv_to_dict(file1)
>>   old_list = nested_line(file2)
>>   new_dict1 = {}
>>   for item in old_list:
>> new_dict1[item] = item
>>   return (new_dict1)
>>
>> I have tried various permutations of the for loop in this final function,
>> but I haven't quite gotten it.  The current form is the closest I have
>> gotten to my desired output, since it produces the new dictionary with the
>> name that I want-- just an invalid id associated with that name.  I tried a
>> bunch of different nested loops but kept getting it incorrect and then
>> after so many attempts I got a little confused about what I was trying to
>> do.  So I backed up a little bit and have this.
>>
>> Conceptually, I thought that this would give me my desired result:
>> new_dict
>> for name in old_list:
>>   for key, value in old_dict:
>> if name == key:
>>   new_dict1[key] = value
>> return(new_dict1)
>>
>> But it wasn't right.  I tried a different approach where I used the
>> dict.values() function in order to pull out the values from old_dict that
>> we want to include in the new_dict, but I got a bit lost there, too.
>>
>> I'm so close right now and I would be so thankful for any bit of
>> clarification which could get me to the finish line.
>>
>> On Mon, Jul 9, 2012 at 12:42 AM, Hugo Arts  wrote:
>>
>>> On Sun, Jul 8, 2012 at 11:47 PM, Fred G  wrote:
>>>
>>>> Hi--
>>>>
>>>> My current input looks like the following:
>>>>
>>>> FILE1.csv
>>>> PERSON_IDPERSON_NAME
>>>> 1 Jen
>>>> 2 Mike
>>>> 3 Jim
>>>> 4
>>>> 5 Jane
>>>> 6 Joe
>>>> 7 Jake
>>>>
>>>> FILE2.csv
>>>> PERSON_ID   PERSON_NAME
>>>>  Jim
>>>>  Mike
>>>>  Jane
>>>>  Todd
>>>>  Jen
>>>>
>>>> _
>>>> I want to fill into the PERSON_ID column of FILE2.csv the corresponding
>>>> ID's associated with those names as identified in FILE1.csv.
>>>>
>>>> At first I imported the csv module and was using the csv.Reader, but
>>>> then it seemed simple enough just to write something like:
>>>> for line in 

[Tutor] Accessing a Website

2012-07-12 Thread Fred G
Hi--

My pseudocode is the following

new_dictionary = []
for name in file:
 #1) log into university account
 #2) go to website with data
 #3) type in search box: name
 #4) click search
 #5) if name is exact match with name of one of the hits:
line.find("Code Number")
#6) remove the number directly after "Code Number: " and stop at the
next space
new_dictionary[name] = Code Number

With the exception of step 6, I'm not quite sure how to do this in Python.
 Is it very complicated to write a script that logs onto a website that
requires a user name and password that I have, and then repeatedly enters
names and gets their associated id's that we want?  I used to work at a
cancer lab where we decided we couldn't do this kind of thing to search
PubMed, and that a human would be more accurate even though our criteria
was simply (is there survival data?).  I don't think that this has to be
the case here, but would greatly appreciate any guidance.

Thanks so much.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Rapidly Importing CSVs with Python into MySQL

2012-07-20 Thread Fred G
Hi--

This question has to do with MySQL but is fundamentally a python question,
so apologies if it seems tangential initially...

I've written a long python file that creates all the tables in database UN.
 Here is the first few lines:
import MySQLdb as mysql
statement = """CREATE DATABASE UN"""
db = mysql.connect(this stuff is correct)
cursor = db.connect()
cursor.execute(statement)
sql = """CREATE TABLE UN.1(
 id VARCHAR(255),
 name VARCHAR(255),
 age INT
   )"""
cursor.execute(sql)
statement = """LOAD DATA LOCAL INFILE...(this stuff is correct)"""
db.commit()
db.close()

db = mysql.connect(this stuff is correct)
cursor = db.connect()
sql = """CREATE TABLE UN.2(
 id VARCHAR(255),
 fname VARCHAR(255),
 lname VARCHAR(255),
 age INT
   )"""
cursor.execute(sql)
statement = """LOAD DATA LOCAL INFILE...(this stuff is correct)"""
db.commit()
db.close()

UN.3, UN.4, UN.5...etc...

I have a lot of tables here and I have a few questions:
1) When I run this Python file, only the first table is created.  Why does
the interpreter think that the statements are done at this point? I tried
experimenting with taking out all the "db.close()" commands until the last
one, but that didn't work, either.  More importantly, how can I get it such
that I can press run all and all these tables are built?  I'm going to be
re-building these (and other database's tables) pretty frequently, so it's
pretty frustrating to have to copy and paste out of the .py file into the
idle editor every single statement...

2) Is there a shortkey command to run line-by-line in a file using IDLE in
Python 2.7? (Some languages have this capacity, but a Google search of
python was not too promising about this feature...)

Thanks so much
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] I-Phone App in Python?

2012-08-03 Thread Fred G
I just googled whether it is possible to write an i-phone app in Python and
got very confusing, and not super good results.

Is it possible? And if so, what module(s) do I need to install?

Much thanks!
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] I-Phone App in Python?

2012-08-04 Thread Fred G
Thanks guys. Sounds like I'll be learning Objective C in the near future!

On Sat, Aug 4, 2012 at 2:57 PM,  wrote:

> Send Tutor mailing list submissions to
> tutor@python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mail.python.org/mailman/listinfo/tutor
> or, via email, send a message with subject or body 'help' to
> tutor-requ...@python.org
>
> You can reach the person managing the list at
> tutor-ow...@python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Tutor digest..."
>
>
> Today's Topics:
>
>1. Re: adding a windows registry value (Albert-Jan Roskam)
>2. Re: I-Phone App in Python? (James Reynolds)
>3. Re: I-Phone App in Python? (James Reynolds)
>4. Re: I-Phone App in Python? (Chris Fox)
>5. Re: I-Phone App in Python? (Kwpolska)
>6. Re: I-Phone App in Python? (Kwpolska)
>
>
> --
>
> Message: 1
> Date: Sat, 4 Aug 2012 03:55:51 -0700 (PDT)
> From: Albert-Jan Roskam 
> To: eryksun 
> Cc: Python Mailing List 
> Subject: Re: [Tutor] adding a windows registry value
> Message-ID:
> <1344077751.47038.yahoomail...@web110701.mail.gq1.yahoo.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> Thanks to all who replied, also those who replied off-list. Somebody else
> confirmed that the code was working as expected on another machine, so it's
> probably a rights issue. Still nice to have a look at _winreg though.
>
> ?
> Regards,
> Albert-Jan
>
>
> ~~
> All right, but apart from the sanitation, the medicine, education, wine,
> public order, irrigation, roads, a
> fresh water system, and public health, what have the Romans ever done for
> us?
> ~~?
>
>
> >
> > From: eryksun 
> >To: Albert-Jan Roskam 
> >Cc: Python Mailing List 
> >Sent: Friday, August 3, 2012 10:58 PM
> >Subject: Re: [Tutor] adding a windows registry value
> >
> >On Fri, Aug 3, 2012 at 10:39 AM, Albert-Jan Roskam 
> wrote:
> >> Hi,
> >>
> >> I am trying to change a registry value (Windows 7, Python 2.7) but it
> won't
> >> work when I try to do this using Python:
> >>
> >> import os
> >> # 1 using this from Python won't work, but double-clicking the file
> works.
> >> os.system(r"regedit /s C:\Users\Desktop\set_temp.reg")
> >> # 2: using this from Python won't work, but from the commandline or
> with a
> >> batch file works
> >> os.system("reg add HKEY_CURRENT_USER\Software .(etc)")
> >>
> >> Why is this not working using Python? Is there a built-in way to do
> this (I
> >> don't have win32api)?
> >
> >Wouldn't it be simpler to use the? _winreg module?
> >
> >http://docs.python.org/library/_winreg.html
> >
> >
> >
> -- next part --
> An HTML attachment was scrubbed...
> URL: <
> http://mail.python.org/pipermail/tutor/attachments/20120804/44369c90/attachment-0001.html
> >
>
> --
>
> Message: 2
> Date: Sat, 4 Aug 2012 14:18:53 -0400
> From: James Reynolds 
> To: Fred G 
> Cc: "tutor@python.org" 
> Subject: Re: [Tutor] I-Phone App in Python?
> Message-ID: <63e00c4f-3e75-44d4-be96-841d157f8...@gmail.com>
> Content-Type: text/plain;   charset=us-ascii
>
> Instagram is written in python django.
>
> Sent from my iPad
>
> On Aug 3, 2012, at 7:13 PM, Fred G  wrote:
>
> > I just googled whether it is possible to write an i-phone app in Python
> and got very confusing, and not super good results.
> >
> > Is it possible? And if so, what module(s) do I need to install?
> >
> > Much thanks!
> > ___
> > Tutor maillist  -  Tutor@python.org
> > To unsubscribe or change subscription options:
> > http://mail.python.org/mailman/listinfo/tutor
>
>
> ------
>
> Message: 3
> Date: Sat, 4 Aug 2012 14:26:26 -0400
> From: James Reynolds 
> To: Fred G 
> Cc: "tutor@python.org" 
> Subject: Re: [Tutor] I-Phone App in Python?
> Message-ID: <7ea1bb55-4203-48e4-bc9d-0f3de3033...@gmail.com>
> Content-Type: text/plain;   charset=us-ascii
>
> To clarify, that is their serv