On 31/07/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> is there a way for me to create a class that accepts a dictionary of
> submitted data and uses each key ad value to create a corresponding member
> variable ? The current way I do this is with a very long argument list, and
> line by line
dear fellow Python enthusiasts, let's say I have a dictionary of keys and
values obtained from a form submitted by a user. For each submitted form I
will create the Application and Candidate classes, and I want to be able to
call Application(Candidate(**submitted_data)).display() to create an html
Sara Johnson wrote:
> No luck finding tutors. I don't make enough.
Sara,
Alan didn't say to find a tutor, he suggested you read a tutorial.
You seem to be having problems with very basic python concepts and his
suggestion was to take an hour or two and *read* some gentle
introductions that w
Iyer wrote:
>
>
> Just to check, try to do away with the backslashes. Windows will
> accept
> a path with forward slashes just as well:
>
> os.path.exists("c:/winnt/file_name")
>
> Nope, even, with the use of forward slashes in the path, it still
> returns false
>
> What am I doing
On 31/07/07, Iyer <[EMAIL PROTECTED]> wrote:
> os.path.exists("c:/winnt/file_name")
>
> Nope, even, with the use of forward slashes in the path, it still returns
> false
>
> What am I doing wrong here ?
Type 'os.listdir("c:/winnt")' and see what it gives you. I haven't
looked at the code, but I
> Just to check, try to do away with the backslashes. Windows will accept
> a path with forward slashes just as well:
>
> os.path.exists("c:/winnt/file_name")
>
> Nope, even, with the use of forward slashes in the path, it still returns
> false
>
> What am I doing wrong here ?
>
> This is driving
No luck finding tutors. I don't make enough. It seems to be this script
that's throwing me off. But I understand and I'll take what I've learned to
date and something will work eventually.
Thanks for your concern and support.
Sara
- Original Message
From: Alan Gauld <[EMAIL PROT
Just to check, try to do away with the backslashes. Windows will accept
a path with forward slashes just as well:
os.path.exists("c:/winnt/file_name")
Nope, even, with the use of forward slashes in the path, it still returns false
What am I doing wrong here ?
This is driving me nuts!
"Sara Johnson" <[EMAIL PROTECTED]> wrote
> Sorry... I'm still learning about lists, tuples, etc...
Sarah, You've been hanging around with this list for a few weeks now.
If you just took one day out to go through the official tutorial then
you
should know enough to answer all of these questions
> That having been saisd their is another use for >> which is to append
> output to a file, as in:
>
> print 'hello world' >> myfile
>
> sends the string to myfile instead of to stdout. (Although I couldn't
> get this to
> work when I tried it!)
>
> Alan G.
>From Dive Into Python Section 10.2
Sorry... I'm still learning about lists, tuples, etc...
Thanks,
Sara
- Original Message
From: Tiger12506 <[EMAIL PROTECTED]>
To: tutor@python.org
Sent: Monday, July 30, 2007 5:42:47 PM
Subject: Re: [Tutor] attribute error - quick addition
> Thanks Alan and Kent (for the sorting notes
Picio wrote:
> Hi Kent, ok I've decided to go through Django. Now the clue is to find
> some simple guide to
> output json from my model and maybe I can benefit also for the url
> dispatcher to map in a clean way the request coming from my ajax app.
>
> This is what I'd like to do:
>
> ajax app->
> Thanks Alan and Kent (for the sorting notes)!
>
> Alan...I guess I thought outfile2 had data. { i.e.,
> outfile2=open('missmeas.dat','w') }
Argghh!!! No, no, no! Attribute Error! No matter how much data you have in
the file, you will *never* be able to call sort on it, because file objects
d
Picio wrote:
> The beginning idea was to build a json API myself. Since I need only
> to generate json from a db, maybe Django is too much. I'm a Django
> beginner. I don't know Turbogears.
> I've not found anything like: "how to build a json api".
> Maybe MySqldb+simplejson is the enough?
> Or
> I
Hi Kent, ok I've decided to go through Django. Now the clue is to find
some simple guide to
output json from my model and maybe I can benefit also for the url
dispatcher to map in a clean way the request coming from my ajax app.
This is what I'd like to do:
ajax app-> URL -> urls.py -> view.py ->
Picio wrote:
> The beginning idea was to build a json API myself. Since I need only
> to generate json from a db, maybe Django is too much. I'm a Django
> beginner. I don't know Turbogears.
> I've not found anything like: "how to build a json api".
> Maybe MySqldb+simplejson is the enough?
I guess
Thanks Alan and Kent (for the sorting notes)!
Alan...I guess I thought outfile2 had data. { i.e.,
outfile2=open('missmeas.dat','w') }
My mistake.
Thanks,
Sara
- Original Message
From: Alan Gauld <[EMAIL PROTECTED]>
To: tutor@python.org
Sent: Sunday, July 29, 2007 7:00:12 PM
Subject
> So normally, after the period is up, it would choose a new seed? or does
> it repeat after the period whether or not the time has changed?
It would repeat whether or not the time has changed, naturally. How would
the algorithm know when the period has finished? The mersenne twister is
based o
Amit Saxena wrote:
> ya i m trying to execute the procedure,these were the contents of that
> SQL file which i m trying to execute
Then (paraphrasing Greg's earlier response) you need something like
query = "SELECT Create_Process_Team(%(org_id)s, %(org_desc)s,
%(org_team)s, %(sessioner_id)s)"
re
ya i m trying to execute the procedure,these were the contents of that SQL
file which i m trying to execute
On 7/30/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
>
> Your original query asked how to execute an existing stored procedure.
> This is the SQL code to *create* a stored procedure. Are you
Your original query asked how to execute an existing stored procedure.
This is the SQL code to *create* a stored procedure. Are you trying to
create it or execute it?
Kent
Amit Saxena wrote:
> this is the file content of "metadata.sql"
>
> set serveroutput on
>
> CREATE OR REPLACE PROCEDURE C
I've never tried anything like that before; others may be of more help at
this point. What I would try is reading the contents of the file into a
local variable.
my_data = file('metadata.sql').readlines() # read the file into a list
query = ''.join(my_data) # append th
this is the file content of "metadata.sql"
set serveroutput on
CREATE OR REPLACE PROCEDURE Create_Process_Team (org_id IN VARCHAR2,
org_desc IN VARCHAR2, org_team IN VARCHAR2, sessioner_id IN VARCHAR2) IS
ptt_id KCM_PROCESS_TEAM_TEMPLATE.ID%TYPE;
pt_id KCM_PROCESS_TEAM.ID%TYPE;
BEGIN
selec
It is a complete PL/SQL Cursor which is written in this "metadata.sql" file
On 7/30/07, Greg Lindstrom <[EMAIL PROTECTED]> wrote:
>
>
>
> On 7/30/07, Amit Saxena <[EMAIL PROTECTED]> wrote:
> >
> >
> > I m still not able to run a Procedure
> >
> > from cx_Oracle import makedsn
> > import adodb
> >
On 7/30/07, Amit Saxena <[EMAIL PROTECTED]> wrote:
>
>
> I m still not able to run a Procedure
>
> from cx_Oracle import makedsn
> import adodb
>
> db = adodb.NewADOConnection('oci8')
> connection_string = makedsn("10.200.91.27 ", 1521, "scorpio") #<== your
> values here, of course
> db.Connect(c
I m still not able to run a Procedure
from cx_Oracle import makedsn
import adodb
db = adodb.NewADOConnection('oci8')
connection_string = makedsn("10.200.91.27", 1521, "scorpio") #<== your
values here, of course
db.Connect(connection_string, "kcmdev", "devkcm") #<== and here, too
#query = "SEL
My Oracle connection is set up using the adodb module (
http://adodb.sourceforge.net/). I don't remember why we set it up that
way...we haven't touched this part of our code for almost 2 years!.
from cx_Oracle import makedsn
import adodb
db = adodb.NewADOConnection('oci8')
connection_string = ma
I m on Windows Platform, was trying to use cx_oracle library but no success
On 7/30/07, Greg Lindstrom <[EMAIL PROTECTED]> wrote:
>
> >Can anybody help me in how to connect Python to oracle and then to
> execute
> >an already existing PL/SQL Procedure through Python.
>
> What platform are you runn
>Can anybody help me in how to connect Python to oracle and then to execute
>an already existing PL/SQL Procedure through Python.
What platform are you running? Windows? Linux? Mac?
I've used Oracle and plSql for years and will be happy to help out once I
know what you need.
--greg
__
Hi
Can anybody help me in how to connect Python to oracle and then to execute
an already existing PL/SQL Procedure through Python.
--
Thanks and Regards,
Amit Saxena
Senior QA Engineer
Ketera
Direct: +91 4199 5028
Mobile: +91 99001 18641
[EMAIL PROTECTED]
» Visit us at http://www.ketera.com
» W
30 matches
Mail list logo