Re: How to add new data column using python script

2021-08-08 Thread Kasper Laudrup
On 06/08/2021 10.48, Harsha Priya G wrote: > Hi Devs, > How to add an additional new column named lat and long and put its data > to it using python tool and clean up the data as the data are > overflowing to next row for particular sno. > Assuming the attached file is related to your question, yo

How to add new data column using python script

2021-08-07 Thread Harsha Priya G
Hi Devs, How to add an additional new column named lat and long and put its data to it using python tool and clean up the data as the data are overflowing to next row for particular sno. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubsc

Re: ERROR WHEN RUNNING PYTHON SCRIPT IN DJANGO ENVIRONMENT

2020-07-09 Thread Sunday Iyanu Ajayi
ing > > On Thu, Jul 9, 2020 at 5:35 PM Sunday Iyanu Ajayi > wrote: > >> Hi guys >> >> Please I need help with my code. >> >> I am trying to run a python script in my django environment and that >> makes use of the django database. I get th

ERROR WHEN RUNNING PYTHON SCRIPT IN DJANGO ENVIRONMENT

2020-07-09 Thread Exactly musty
For any database you are using use this after your database is been set appropriately with the help of django doc Python manage.py makemigrations Python manage.py migrate -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: ERROR WHEN RUNNING PYTHON SCRIPT IN DJANGO ENVIRONMENT

2020-07-09 Thread dr neyx de godlove
which database are you using On Thu, Jul 9, 2020 at 5:35 PM Sunday Iyanu Ajayi wrote: > Hi guys > > Please I need help with my code. > > I am trying to run a python script in my django environment and that > makes use of the django database. I get this error > > Module

ERROR WHEN RUNNING PYTHON SCRIPT IN DJANGO ENVIRONMENT

2020-07-09 Thread Sunday Iyanu Ajayi
Hi guys Please I need help with my code. I am trying to run a python script in my django environment and that makes use of the django database. I get this error ModuleNotFoundError: No module named project.settings But if I run manage.py runserver, it runs without error *AJAYI Sunday

Re: passing django models data to python script

2019-02-20 Thread Mike Dewhirst
On 20/02/2019 6:39 pm, Ousmane Baricisse wrote: Hi, I would like to implement a web app using reactjs and django. I have a python script which does some sort of optimization and stores the final output in a list and returns it. Right now everything is static in the python script and I would

passing django models data to python script

2019-02-20 Thread Ousmane Baricisse
Hi, I would like to implement a web app using reactjs and django. I have a python script which does some sort of optimization and stores the final output in a list and returns it. Right now everything is static in the python script and I would like to make it dynamic so that i can get a user

Re: Webinterface for python script

2019-02-07 Thread PASCUAL Eric
___ From: django-users@googlegroups.com on behalf of Scot Hacker Sent: Thursday, February 7, 2019 09:16 To: Django users Subject: Re: Webinterface for python script On Wednesday, February 6, 2019 at 1:27:18 AM UTC-8, Eric Pascual wrote: Hi Derek, but I have never seen any

Re: Webinterface for python script

2019-02-07 Thread Scot Hacker
On Wednesday, February 6, 2019 at 1:27:18 AM UTC-8, Eric Pascual wrote: > > Hi Derek, > > but I have never seen anyone refer to it as a "lightweight" project > (before you, that is). > > I didn't meant "Django *is* lightweight" but "Django *can be* > lightweight", implied you configure it accor

Re: Webinterface for python script

2019-02-06 Thread PASCUAL Eric
ng things belonging to the different FW they work with 😊 Just my $0.2 😉 Best Eric From: django-users@googlegroups.com on behalf of Derek Sent: Tuesday, February 5, 2019 14:26 To: Django users Subject: Re: Webinterface for python script Hi Eric Of course I al

Re: Webinterface for python script

2019-02-05 Thread Scot Hacker
does not require the ORM. >> >> I was among these people until my experience and skills in Django reached >> the level where I became aware that it can be stripped down to a very basic >> an lightweight framework if needed, thanks to its modular approach. But >> this

Re: Webinterface for python script

2019-02-05 Thread Derek
; an lightweight framework if needed, thanks to its modular approach. But > this came with time 😉 > > Best > > Eric > -- > *From:* django...@googlegroups.com < > django...@googlegroups.com > on behalf of Scot Hacker < > scot@gmail.com > > *Se

Re: Webinterface for python script

2019-02-05 Thread PASCUAL Eric
time 😉 Best Eric From: django-users@googlegroups.com on behalf of Scot Hacker Sent: Tuesday, February 5, 2019 08:54 To: Django users Subject: Re: Webinterface for python script Make a basic Django view. Place your script in a python module that lives inside your a

Re: Webinterface for python script

2019-02-05 Thread Joel Mathew
Exactly. I to use file upload and rendering in a medical report. @OP Did your research and post your code. Can help with any errors you're getting. Research about request.POST, request.FILES. Read this. https://docs.djangoproject.com/en/2.1/topics/files/ On Tue, 5 Feb, 2019, 1:25 PM Scot Hacker

Re: Webinterface for python script

2019-02-04 Thread Scot Hacker
Make a basic Django view. Place your script in a python module that lives inside your app. Call that module/ function from the Django view. See Django docs and tutorials on how to handle uploaded files. Pass the uploaded file to your module, and handle the return value(s) however you want. Hard

Re: Webinterface for python script

2019-02-04 Thread Derek
Django could be overkill for his. Try using Flask e.g. https://stackoverflow.com/questions/39321540/how-to-process-an-upload-file-in-flask On Sunday, 3 February 2019 17:53:20 UTC+2, Asad Hasan wrote: > > Hi All , > > I have created certain python scripts to analyze log files and > sug

Webinterface for python script

2019-02-03 Thread Asad
Hi All , I have created certain python scripts to analyze log files and suggest solution based on logic which I invoke on the command line . I need some information on how to execute these through browser . I am using : python test.py file1 file2 How do I use the browser to upload the

Re: How to migrate old database into new database using python script

2018-10-11 Thread Joel Mathew
971501340618 >>> +971581756035 >>> >>> >>> On Thu, Oct 11, 2018 at 4:01 PM Mohammad Aqib >>> wrote: >>> >>>> Hi All, >>>> I have a task to migrate all data into a new database using >>>> "backup.sql" file. >

Re: How to migrate old database into new database using python script

2018-10-11 Thread carlos
gt; Mahammad Shareef M >>> +919741482617 >>> +971501340618 >>> +971581756035 >>> >>> >>> On Thu, Oct 11, 2018 at 4:01 PM Mohammad Aqib >>> wrote: >>> >>>> Hi All, >>>> I have a task to migrate all

Re: How to migrate old database into new database using python script

2018-10-11 Thread Mohammad Aqib
71501340618 >> +971581756035 >> >> >> On Thu, Oct 11, 2018 at 4:01 PM Mohammad Aqib >> wrote: >> >>> Hi All, >>> I have a task to migrate all data into a new database using "backup.sql" >>> file. >>> How to write a P

Re: How to migrate old database into new database using python script

2018-10-11 Thread Ryan Gedwill
egards, > Mahammad Shareef M > +919741482617 > +971501340618 > +971581756035 > > > On Thu, Oct 11, 2018 at 4:01 PM Mohammad Aqib > wrote: > >> Hi All, >> I have a task to migrate all data into a new database using "backup.sql" >> file. >

Re: How to migrate old database into new database using python script

2018-10-11 Thread Mohammad Shareef M
file. > How to write a Python script to do this task. > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to

How to migrate old database into new database using python script

2018-10-11 Thread Mohammad Aqib
Hi All, I have a task to migrate all data into a new database using "backup.sql" file. How to write a Python script to do this task. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

Re: facebook python script

2018-07-09 Thread Masoud Sadri
Hi, you can use youtube-dl module. https://github.com/rg3/youtube-dl On Monday, July 9, 2018 at 10:16:34 PM UTC+4:30, Ahmad wrote: > > Hello everyone, I hope all of you will be fine. > > I want a script to download facebook video (SD or HD) using python. > > if anyone has already please send m

Re: facebook python script

2018-07-09 Thread mottaz hejaze
i think you gonna need to scrap the page first . then use requests library On Mon, 9 Jul 2018, 20:17 Ahmad, wrote: > Thank you very much dear. It will help alot me. > > On Monday, July 9, 2018 at 10:46:34 PM UTC+5, Ahmad wrote: >> >> Hello everyone, I hope all of you will be fine. >> >> I want a

Re: facebook python script

2018-07-09 Thread Ahmad
Thank you very much dear. It will help alot me. On Monday, July 9, 2018 at 10:46:34 PM UTC+5, Ahmad wrote: > > Hello everyone, I hope all of you will be fine. > > I want a script to download facebook video (SD or HD) using python. > > if anyone has already please send me > > or if you have any

Re: facebook python script

2018-07-09 Thread Kasper Laudrup
Hi Ahmed, On 2018-07-09 19:46, Ahmad wrote: Hello everyone, I hope all of you will be fine. I want a script to download facebook video (SD or HD) using python. I highly suggest using the requests library for doing HTTP client communication: http://docs.python-requests.org It's a lot easi

facebook python script

2018-07-09 Thread Ahmad
Hello everyone, I hope all of you will be fine. I want a script to download facebook video (SD or HD) using python. if anyone has already please send me or if you have any other material which can help me. Waiting for you reply. Thanks -- You received this message because you are subscribe

Re: How to run python script by clicking a HTML button?

2018-06-22 Thread Julio Biason
Hi Subhendu, To make this all work, you'll need to do this: 1. Create a Django app 2. Add some URL to a view (any view) 3. Inside the view, run your script. 4. Change the for on the "action" to point to the URL in point 2. You may want to read the Django Tutorial[1] to grasp who those things are

Re: How to run python script by clicking a HTML button?

2018-06-21 Thread Jani Tiainen
Hi, Django doesn't exactly work that way. Please do the official tutorial from Django docs to get grasp of basics how things works and are tied together. to 21. kesäk. 2018 klo 23.15 SUBHENDU PANDA kirjoitti: > Below is my HTML code... > > > > > > HTML Forms > > > First name: > > >

How to run python script by clicking a HTML button?

2018-06-21 Thread SUBHENDU PANDA
Below is my HTML code... HTML Forms First name: I want is : If you I the "Submit" button, the form-data will be sent to a page called "/myscript.py and will perform the operation". myscript.py: import os def f1(): print ("Below are the files present in yo

Re: executing python script in html button

2017-11-09 Thread Vineet Kothari
t into the overall > Django approach. > > Hope this helps > Derek > > > On Friday, 3 November 2017 18:08:58 UTC+2, Rizal M. wrote: >> >> I have custom python script for twitter sentiment analysis, let's call it >> sentiment.py >> it has two inpu

Re: executing python script in html button

2017-11-09 Thread Derek
. wrote: > > I have custom python script for twitter sentiment analysis, let's call it > sentiment.py > it has two inputs, topic query and number of tweets. > > this is the full code > > import sys > import csv > import tweepy > import matplotlib.pyplot as plt >

executing python script in html button

2017-11-03 Thread Rizal M.
I have custom python script for twitter sentiment analysis, let's call it sentiment.py it has two inputs, topic query and number of tweets. this is the full code import sys import csv import tweepy import matplotlib.pyplot as plt from collections import Counter from aylienapiclient i

Re: add models class and fields through python script

2016-07-16 Thread Ryan Castner
I think the best thing you can do in this situation is design a system where the system administrator (non-technical user I am assuming from your description) fills out a form for an 'Event' model. The 'Event' is posted on the calendar or what have you and student's can register to participate

add models class and fields through python script

2016-07-16 Thread akshaya kumar
i am working on a data base of college students. it follows the same schema but has different tables for students of different years. further each student participates in some events which are randomly announced during the year. i want to maintain this data. i want a way such that admin of the

Re: How to run an external python script in my Django view

2016-01-16 Thread Larry Martell
On Sat, Jan 16, 2016 at 2:28 AM, wrote: > Thanks Larry for the reply. Nothing is happening after invoking the script(I > think, I am doing something wrong in using the python script in Django > views). I have tried running the script separately which is working fine and > giving th

How to run an external python script in my Django view

2016-01-16 Thread Luis Zárate
): classname.mfuction() El sábado, 16 de enero de 2016, escribió: > Thanks Larry for the reply. Nothing is happening after invoking the script(I think, I am doing something wrong in using the python script in Django views). I have tried running the script separately which

Re: How to run an external python script in my Django view

2016-01-16 Thread Musab Gültekin
If you do this frequently, your view will likely growing with wastes of script. You should clean it regularly. On Friday, January 15, 2016 at 4:56:07 PM UTC+2, raman@gmail.com wrote: > > Hi, > > I have a script which is running fine and giving output in the form of > list of lists. I want to

Re: How to run an external python script in my Django view

2016-01-15 Thread raman . balyan
Thanks Larry for the reply. Nothing is happening after invoking the script(I think, I am doing something wrong in using the python script in Django views). I have tried running the script separately which is working fine and giving the output. On Friday, January 15, 2016 at 8:32:51 PM UTC+5:30

Re: How to run an external python script in my Django view

2016-01-15 Thread raman . balyan
Thanks Larry for the reply. Nothing is happening after invoking the script(I think, I am doing something wrong in using the python script in Django views). I have tried running the script separately which is working fine and giving the output. On Friday, January 15, 2016 at 8:32:51 PM UTC+5:30

Re: How to run an external python script in my Django view

2016-01-15 Thread Larry Martell
On Fri, Jan 15, 2016 at 9:54 AM, wrote: > Hi, > > I have a script which is running fine and giving output in the form of list > of lists. I want to use that data in my Django view. I am not getting, how > to run a script in django view. > I created a folder utils inside which, I have put the scri

How to run an external python script in my Django view

2016-01-15 Thread raman . balyan
Hi, I have a script which is running fine and giving output in the form of list of lists. I want to use that data in my Django view. I am not getting, how to run a script in django view. I created a folder utils inside which, I have put the script. Also, I have created __init__.py in the utils

Re: Interfacing Django Project with Python Script

2015-07-18 Thread Larry Martell
On Fri, Jul 17, 2015 at 12:55 PM, Jake Rudolph wrote: >> On Friday, July 17, 2015 at 5:12:51 AM UTC-7, larry@gmail.com wrote: >> >> On Thu, Jul 16, 2015 at 7:44 PM, Jake Rudolph wrote: >> > If I have a separate Python script that I want to interact with my >>

Re: Interfacing Django Project with Python Script

2015-07-18 Thread Andy Shapiro
events occur I need to send information from the script to the >> database. >> >> On Friday, July 17, 2015 at 5:12:51 AM UTC-7, larry@gmail.com wrote: >>> >>> On Thu, Jul 16, 2015 at 7:44 PM, Jake Rudolph >>> wrote: >>> > If I have

Re: Interfacing Django Project with Python Script

2015-07-17 Thread Gergely Polonkai
5 at 5:12:51 AM UTC-7, larry@gmail.com wrote: >> >> On Thu, Jul 16, 2015 at 7:44 PM, Jake Rudolph >> wrote: >> > If I have a separate Python script that I want to interact with my >> Django >> > project, how do I set them up to communicate? >> >>

Re: Interfacing Django Project with Python Script

2015-07-17 Thread Jake Rudolph
. On Friday, July 17, 2015 at 5:12:51 AM UTC-7, larry@gmail.com wrote: > > On Thu, Jul 16, 2015 at 7:44 PM, Jake Rudolph > wrote: > > If I have a separate Python script that I want to interact with my > Django > > project, how do I set them up to communicate? > &g

Re: Interfacing Django Project with Python Script

2015-07-17 Thread Larry Martell
On Thu, Jul 16, 2015 at 7:44 PM, Jake Rudolph wrote: > If I have a separate Python script that I want to interact with my Django > project, how do I set them up to communicate? Not 100% sure what you mean. Do you mean you want to have a standalone python script that uses the ORM? I do th

Re: Interfacing Django Project with Python Script

2015-07-16 Thread ADEWALE ADISA
U can just import the modules in the script file the way you import django modules. On Jul 17, 2015 12:55 AM, "Jake Rudolph" wrote: > If I have a separate Python script that I want to interact with my Django > project, how do I set them up to communicate? > > -- >

Interfacing Django Project with Python Script

2015-07-16 Thread Jake Rudolph
If I have a separate Python script that I want to interact with my Django project, how do I set them up to communicate? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from i

Re: how to initiate an interactive python script from an html cgi?

2015-03-25 Thread Tom Evans
On Wed, Mar 25, 2015 at 1:06 AM, arthur sherman wrote: > i have a python script which currently runs in a shell cli. > i'd like to initiate this script from a web page. > the closest i got was to have the output displayed on the webpage (w/o > linefeeds), > but it crashed w

Re: how to initiate an interactive python script from an html cgi?

2015-03-25 Thread Derek
Chromium/37.0.2062.120 Chrome/37.0.2062.120 Safari/537.36] on Linux i686 f = raw_input() f 'rest' On Wednesday, 25 March 2015 03:30:10 UTC+2, arthur sherman wrote: > > i have a python script which currently runs in a shell cli. > i'd like to initiate this script from a web p

how to initiate an interactive python script from an html cgi?

2015-03-24 Thread arthur sherman
i have a python script which currently runs in a shell cli. i'd like to initiate this script from a web page. the closest i got was to have the output displayed on the webpage (w/o linefeeds), but it crashed when requesting input via raw_input(). i simply did 'exec python-script-name

Re: How to run Python script? (configure settings error)

2014-08-13 Thread Daniel Grace
I used this method and got my script working OK. On Wednesday, 13 August 2014 15:37:30 UTC+1, Andrew Farrell wrote: > > Note: this is much better documented at > https://docs.djangoproject.com/en/dev/howto/custom-management-commands/ > > You want to move this file to the management.commands modul

Re: How to run Python script? (configure settings error)

2014-08-13 Thread Andrew Farrell
oks like: > > from django.core.management.base import BaseCommand > class Command(BaseCommand): > args = 'spam eggs' > help = 'makes an omelette to throw at a silly English knigget' > def handle(self, *args, **swargs): > print settings.STATIC_R

Re: How to run Python script? (configure settings error)

2014-08-13 Thread Collin Anderson
set: os.environ['DJANGO_SETTINGS_MODULE'] = 'yourproject.settings' (or see how it's done in manage.py) On 1.7 call django.setup() first before using models. On 1.6 or lower, you may need to call models.get_models() before using your models. -- You received this message because you are subscrib

Re: How to run Python script? (configure settings error)

2014-08-13 Thread Andrew Farrell
ore.management.base import BaseCommand class Command(BaseCommand): args = 'spam eggs' help = 'makes an omelette to throw at a silly English knigget' def handle(self, *args, **swargs): print settings.STATIC_ROOT On Wed, Aug 13, 2014 at 10:21 AM, Daniel Gr

Re: How to run Python script? (configure settings error)

2014-08-13 Thread Tom Evans
configure it yourself manually: https://docs.djangoproject.com/en/1.6/topics/settings/#either-configure-or-django-settings-module-is-required Cheers Tom On Wed, Aug 13, 2014 at 3:21 PM, Daniel Grace wrote: > I have a Python script as follows: > > from django.db import transacti

How to run Python script? (configure settings error)

2014-08-13 Thread Daniel Grace
I have a Python script as follows: from django.db import transaction from django.contrib.auth.models import User from flow.models import States, Types, Docs, Logs if __name__ == '__main__': with transaction.atomic(): models.Logs.objects.all().delete() models.Docs.o

Re: LiveServerTestCase modifies production database when ran in python script

2014-06-18 Thread yakkadesign
The solution was to use DjangoTestSuiteRunner. I ended up copying the method DjangoTestSuiteRunner.run_tests and modifying to use a test suite. The code is from django.test.simple import DjangoTestSuiteRunnerfrom django.utils import unittest suite_payment = unittest.TestLoader().loadTestsF

Re: Using Django as a framework to deploy python script on a website:

2014-06-14 Thread Daniel Roseman
On Saturday, 14 June 2014 17:22:24 UTC+1, Eran Ariel wrote: > > Hi, I am interested in Django as a platform to deploy applications using > mod_wsgi, accordingly, whether existing Django libraries such as the forms > library could be applied for this purpose as user initiated POST requests – > to

Using Django as a framework to deploy python script on a website:

2014-06-14 Thread Eran Ariel
Hi, I am interested in Django as a platform to deploy applications using mod_wsgi, accordingly, whether existing Django libraries such as the forms library could be applied for this purpose as user initiated POST requests – to pass the variables. I can place my scripts within the models.py fi

LiveServerTestCase modifies production database when ran in python script

2014-06-11 Thread yakkadesign
When I run my tests in a python script it modifies my production database. If I run from the command line it doesn't. When I say modify, it wipes out my existing users and replaces them with the users I create for testing. I followed this for the setup: https://docs.djangoproject.c

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread Steve McConville
> Is it possible to drop a Python script (around 50 lines) into one of your > django pages? Would this be embedding into the template code? You could wrap it in a custom template tag: https://docs.djangoproject.com/en/1.3/howto/custom-template-tags/ -- steve -- You received this m

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread Joey Espinosa
Jimmy, I don't know your specific situation, but this is probably not worth a fee. You already know Django and Python, all you need to do is extend that knowledge with some AJAX. If you run into problems, there's always this group ;) -- Joey "JoeLinux" Espinosa Software Developer http://about.me

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread jc
Oh, this does help...tremendously. Thanks for taking the time out and explaining. I think that's enough for me to start learning via the docs/experimenting and hopefully get something implemented. If I can't implement this, do you know anyone that could do this for a fee? thanks, jimmy -- You

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread Joey Espinosa
TML = data; // 'data' should be the output > that you returned from the view > } > }); Again, this is very basic, but this should get you started. Use some test scenarios to try it out just so you get the idea (such as dropping in a Python script that does nothing bu

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread jc
Oh, that would *totally* be fine. I have no idea how to do that, do you know of any docs that might show me how to execute this code on the server-side and print out via AJAX? thanks! jimmy -- You received this message because you are subscribed to the Google Groups "Django users" group. To v

Re: Can you drop a Python script into a Django page?

2011-11-12 Thread Joey Espinosa
"JoeLinux" Espinosa Software Developer http://about.me/joelinux On Nov 12, 2011 5:32 AM, "jc" wrote: > Hi, > > Is it possible to drop a Python script (around 50 lines) into one of your > django pages? Would this be embedding into the template code? I am > experimentin

Can you drop a Python script into a Django page?

2011-11-12 Thread jc
Hi, Is it possible to drop a Python script (around 50 lines) into one of your django pages? Would this be embedding into the template code? I am experimenting with doing this but I haven't had any luck in finding out how. An example of what I am trying to do is to place a script like

Re: Calling Jython from python script

2011-10-05 Thread Charles Cossé
Doubt I can be much help, but are you running via os.system("jythong ...")? If so, then I'd substitute something else (python itself?) for jython and confirm that that much works .. then carry on ... -Charles On Wed, Oct 5, 2011 at 12:54 PM, Bill Freeman wrote: > Have you tried using the full p

Re: Calling Jython from python script

2011-10-05 Thread Bill Freeman
Have you tried using the full path for both jython and for the script? Does jython also need classpath set up? Maybe you should provide the full path to a shell script that sets up the path, the class path and cd's to where the script is, then does: jython script-name Are you sure that you wa

Calling Jython from python script

2011-10-05 Thread Rohini Damle
Hello, I am using python, mod-wsgi, django, apache combination. My views.py script calls a set of python scripts. I also want to call some jython scripts. For this I use cmd " jython script-name" . This works great on django's development server. But on apache, with wsgi, the views.py simply does n

Re: Unable to import libxml2mod from the python script

2010-06-03 Thread Jeliuc Alexandr
You can use ipython or simple idle to see it /usr/local/lib/python2.5. but /bin/python are you sure about default version? On Jun 3, 3:06 pm, Darren wrote: > Go to  /usr/local/bin and do ls -l and see if python is a sym link. If   > so, see where it points and verify it points to python25. Your

Re: Unable to import libxml2mod from the python script

2010-06-03 Thread Darren
Go to /usr/local/bin and do ls -l and see if python is a sym link. If so, see where it points and verify it points to python25. Your modules are here: /usr/local/lib/python2.5/site-packages Verify that the python executable matches. Darren On Jun 2, 2010, at 9:38 PM, Superman wrote: Th

Re: Unable to import libxml2mod from the python script

2010-06-02 Thread Bruce Wang
On Thu, Jun 3, 2010 at 1:26 PM, Graham Dumpleton wrote: > > > > > Are you running your django app under mod_wsgi? It may not running with > your > > interpreter in your #! line. > > > > Try using > > import sys; print sys.executable > > in your wsgi file to find out the exact interpreter your wsg

Re: Unable to import libxml2mod from the python script

2010-06-02 Thread Graham Dumpleton
On Jun 3, 1:20 pm, Bruce Wang wrote: > On Thu, Jun 3, 2010 at 12:38 PM, Superman wrote: > > Thanks for your reply. How do you check env path variables diff > > between shell and code > > execution? > > > To my wsgi file, I have this line "#!/usr/local/bin/python" which > > tells which interpret

Re: Unable to import libxml2mod from the python script

2010-06-02 Thread Graham Dumpleton
On Jun 3, 12:38 pm, Superman wrote: > Thanks for your reply. How do you check env path variables diff > between shell and code > execution? > > To my wsgi file, I have this line "#!/usr/local/bin/python" which > tells which interpreter to use. Generally, no it doesn't. If this is a WSGI script

Re: Unable to import libxml2mod from the python script

2010-06-02 Thread Bruce Wang
On Thu, Jun 3, 2010 at 12:38 PM, Superman wrote: > Thanks for your reply. How do you check env path variables diff > between shell and code > execution? > > To my wsgi file, I have this line "#!/usr/local/bin/python" which > tells which interpreter to use. And yes, libxml2.py and libxml2mod.so >

Re: Unable to import libxml2mod from the python script

2010-06-02 Thread Superman
Thanks for your reply. How do you check env path variables diff between shell and code execution? To my wsgi file, I have this line "#!/usr/local/bin/python" which tells which interpreter to use. And yes, libxml2.py and libxml2mod.so files are there in "/usr/local/lib/python2.5/site-packages/" fol

Re: Unable to import libxml2mod from the python script

2010-06-02 Thread Jeliuc Alexandr
You should check env path variables diff between shell and code execution. Another way check this error path is there libxml2 or not. it may be in usr/lib/python2.5. or something like that. On Jun 2, 4:57 pm, Superman wrote: > I have a django site that is integrated with scrapy, but when the > s

Re: Unable to import libxml2mod from the python script

2010-06-02 Thread Darren
Just grasping at straws here, but could it have anything to do with permissions or the python path? I don't fully understand how imports work. But, those are things I'd explore first. Darren On Jun 2, 2010, at 8:57 AM, Superman wrote: I have a django site that is integrated with scrapy,

Unable to import libxml2mod from the python script

2010-06-02 Thread Superman
I have a django site that is integrated with scrapy, but when the scrapy code is called from the view, I get this error: File "/usr/local/lib/python2.5/site-packages/libxml2.py", line 1, in import libxml2mod ImportError: /usr/local/lib/python2.5/site-packages/ libxml2mod.so: undefined

Re: Create a web service for an existing stand alone python script

2009-05-05 Thread George Song
On 5/5/2009 4:39 AM, pallavi wrote: > Dear all, > thans for your input. > I read doumentation from different resources and still confused to > solve my problem. any help would be appreciated. > > My main python program is science.py > it have several modules.in it (each definition reads some para

Re: Create a web service for an existing stand alone python script

2009-05-05 Thread pallavi
Dear all, thans for your input. I read doumentation from different resources and still confused to solve my problem. any help would be appreciated. My main python program is science.py it have several modules.in it (each definition reads some parameters and results some data, that will be read by

Re: Create a web service for an existing stand alone python script

2009-05-02 Thread George Song
On 5/2/2009 10:01 AM, pallavi wrote: > Dear Mr.George, > > Thank a lot for your help. > But, in the python program "science.py" there are several functions > that do some calculations by reading the values in the two input > files. > > your code: >> from science import my_function >

Re: Create a web service for an existing stand alone python script

2009-05-01 Thread George Song
On 5/1/2009 5:13 AM, pallavi wrote: > For example lets say my python script is named "science.py" and it > reads two input files for the input data : abc.txt and xyz.txt and > after computation the output file is : output.txt If abc.txt and xyz.txt are available some

Create a web service for an existing stand alone python script

2009-05-01 Thread pallavi
Dear Django Users and Developers, I am very new to this world of web services and also python. I was reading about django and could not find solution for my problem. I hope anyone from this community can help me with the solution. I have a python application This python script contain some

Re: Sending SMS using python script

2009-04-01 Thread Karen Tracey
On Wed, Apr 1, 2009 at 7:14 AM, gganesh wrote: > > hi group, > my application needs to send SMS occasionally to all the clients .Is > there any library in python that supports in sending SMS. > [snip] > This question really has nothing to do with Django, so you'll likely get better responses if

Sending SMS using python script

2009-04-01 Thread gganesh
hi group, my application needs to send SMS occasionally to all the clients .Is there any library in python that supports in sending SMS. I like to conform few information i gathered in this regard. I can send SMS by two ways 1. Sending SMS using Email clients 2. Using sms gateway to send messag

Re: could not able to schedule a standalone python script which uses a django module

2009-01-26 Thread Rama Vadakattu
Thanks Malcolm. It is the case. Instead of relying on the DJANGO_SETTINGS_MODULE which was there in the /etc/profile i have used the below code (taken from http://superjared.com/entry/django-and-crontab-best-friends/ & also mentioned by peteDK) - from django.core.management import setup_e

Re: could not able to schedule a standalone python script which uses a django module

2009-01-26 Thread Malcolm Tredinnick
On Mon, 2009-01-26 at 19:46 -0800, Rama Vadakattu wrote: > i configured the DJANGO_SETTINGS_MODULE in /etc/profile.this means > that it is a system wide environmental variable and can be used every > where. Cron jobs are run in a very limited environment by default, for security reasons. That inc

Re: could not able to schedule a standalone python script which uses a django module

2009-01-26 Thread Rama Vadakattu
i configured the DJANGO_SETTINGS_MODULE in /etc/profile.this means that it is a system wide environmental variable and can be used every where. On Jan 26, 8:09 pm, Daniel Roseman wrote: > On Jan 26, 1:55 pm, Rama wrote: > > > > > i have a standalone python script which uses

Re: could not able to schedule a standalone python script which uses a django module

2009-01-26 Thread PeteDK
Hi I have had some problems with that myself. Don't know if this is any help, but here we go. i have created a file cron.py that i have placed in the exact same directory as my settings.py file. then at the beginning of my cron.py: from django.core.management import setup_environ import settings

Re: could not able to schedule a standalone python script which uses a django module

2009-01-26 Thread Daniel Roseman
On Jan 26, 1:55 pm, Rama wrote: > i have a standalone python script which uses a django module. i need to > schedule  that script using crontab. > while doing this i encountered the following problem > > 1) the above standalone python script  which uses django module is running &g

could not able to schedule a standalone python script which uses a django module

2009-01-26 Thread Rama
i have a standalone python script which uses a django module. i need to schedule that script using crontab. while doing this i encountered the following problem 1) the above standalone python script which uses django module is running properly on the terminal. ( DJANGO_MODULE_SETTINGS

Re: Can javascript call a python script?

2008-12-04 Thread Django Newbie
lly question, but I'm wondering if javascript > can call a python script, and if so, how? > > To elaborate, I'm trying to customize the admin change_list page so > that editing can be done directly from the change_list, instead of > clicking into the admin change_form page. To do

Re: Can javascript call a python script?

2008-12-03 Thread Daniel Roseman
On Dec 4, 4:09 am, Eric <[EMAIL PROTECTED]> wrote: > Hello, this might be a silly question, but I'm wondering if javascript > can call a python script, and if so, how? > > To elaborate, I'm trying to customize the admin change_list page so > that editing can be don

Re: Can javascript call a python script?

2008-12-03 Thread Jeff Anderson
Eric wrote: > Hello, this might be a silly question, but I'm wondering if javascript > can call a python script, and if so, how? > I believe Javascript can execute external commands, but I'm sure that it'd be turned off entirely for security reasons. I wouldn't tru

  1   2   >