Jump to content




Recent Topics

Recent Status Updates

  • Photo
      15 Nov
    duzamucha

    Hi, I am final year Interior Design Student from University of Huddersfield. I am currently working on my final major project which is going to be linked to coding. I was hoping that you could help me with my research. I have prepared a short survey, it would be a massive help if you could fill it in for me. It takes less than 2 minutes to complete, I promise. Here is the link: https://www.surveymonkey.com/s/73XLJKK Thank you so much in advance!

View All Updates

Developed by TechBiz Xccelerator
Photo
- - - - -

How to pass many arguments/parametars to runinng python programm

background application sending arguments

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1 squirll

squirll

    CC Lurker

  • New Member
  • Pip
  • 5 posts

Posted 06 March 2013 - 06:31 AM

Hello,
I have python program who accept argument on start from CLI and check that argument in memcached base, do output of result and close. Thats working ok but problem is that I have ~2000 hits in seconds for that programm so he make big load on my server.
I figurate to make program who will be run in background and recieve data from other program, open thread get result and output that result. I think that will reduce my server load alot.
Problem is that I dont know how to pass argument/parametars to runing python programm.It will be comunication between two programs (one of them is python)
How to do that? What all options i have?



#2 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3,533 posts

Posted 06 March 2013 - 07:33 PM

I'm tempted to say you already got the solution at hand!

 

you said you already have a memcached base, you can use that or memcached file as parameters repository, so one program writes on there, and the other pulls off the data and makes it its parameters.



#3 squirll

squirll

    CC Lurker

  • New Member
  • Pip
  • 5 posts

Posted 07 March 2013 - 12:59 AM

I have program who pull data (its python) and program who write (its made in php) i just need to make solution how to pass arguments/parameters to runing python program and that he dont screw my server :) 

Im very close to solution just litle thing stp me :D and that is how to pass to python :) 






Powered by binpress