General :: Embedding Python Script In C Program?

Apr 7, 2011

How can i embed python script in C program?

View 1 Replies


ADVERTISEMENT

Programming :: Python Program For Time ?

Jun 24, 2011

I need to write a program for time. like i have 2 tasks both minutes and hours.

like this
1st task=5 hours and 30 minutes
2nd task=2hours and 45 minutes

Together they will take 8 hours and 15 minutes.

I need to write a program thats called ADDTIMES to do something like this.

This is what i have so far.

H1=int(input("enter the number of hours:")) etc..

View 6 Replies View Related

General :: Get Apt-get To Install Python Packages For A Different Version Of Python?

Oct 27, 2010

in ubuntu 10.10, I have installed python 2.7. I would like to use apt-get to install packages to this version of python but I haven't been able to figure out howThings I have tried without success:changing the symlink at /usr/bin/python to point to /usr/bin/python2.7 - even after doing this apt-get still installs stuff to python2.6.Set up python2.7 as the primary alternative using update-alternatives - doesn't work

View 3 Replies View Related

Ubuntu :: Put A Print Icon Into A Python Program?

Dec 3, 2010

I am wanting to put a print icon into a Python program and will use printing via the command line via calling lp or lpr.

So a simple question: Whats the difference between lp and lpr?

Also when you type man lp or man lpr the man page says Apple Inc?

View 2 Replies View Related

Ubuntu :: Install Python Program From Source?

Dec 16, 2010

I downloaded this programs source and I'm having a hard time figuring out how to install it. I assume it is python source? I tried downloading the debian file but could not figure out how to install it aswell. I downloaded the software from [URL]

View 9 Replies View Related

Ubuntu :: How To Run A Python Program From The Command Line

Jun 14, 2011

i have ubuntu 10.04 and python 2.6 installed how do i run, stop or restart a .py file from the command line.

btw im using Putty from a windows computer

View 1 Replies View Related

Programming :: Run External Program From Python Script?

Dec 21, 2009

I want to be able to run a program in a python script, and capture it's output in a variable. I figured out that I can execute it with os.system(), but how do I capture it's output and store it in a variable?

View 1 Replies View Related

Ubuntu :: Make A Program Use An Older Python Version?

Jun 3, 2011

I need to know how to make a program use a version of python older than the newest one. I am trying to run the Traipse fork of OpenRPG. Through their forums, I have learned that one of my problems is that I am running too new a version of python. I have python 2.7.1 installed.

I also have python2.6.6 installed, so I should be able to use that. My first thought was to uninstall 2.7.1 and just use the older version. The problem is that if i uninstall 2.7.1, it wants to also uninstall all the packages dependent on that program. Let's face it, in Natty Narwhal, that is pretty much everything.

Do you know how to force Traipse make it use the 2.6 version?

View 2 Replies View Related

Programming :: Get Window Titles, Icons And Screenshots From A C++ Or Python Program?

Jan 30, 2011

Is it possible to easily get the number of desktops, add/remove desktops, and get window titles, icons, and screenshots from a C++ or Python program?

View 12 Replies View Related

Programming :: Continue Execution Of A Python Program While A Background Task Is Going On?

Aug 28, 2010

I'm trying to figure out how to continue execution of a Python program while a background task is going on.

In bash, it is adding "&" to the end as in:

Code:
#! /bin/bash
find / -iname "*.py" > /tmp/all_pys &
echo "looking for all python scripts and putting them in /tmp/all_pys"
(yes, I know I could just put the echo BEFORE the find but I just use it for example)

Say I do that in python (not necessarily running the shell, but perhaps using scriptutil.ffind or something similar), but want to allow the user to be doing something else while running that search in the background, how would I thread, fork, subprocess (not to be confused with the module and Popen) [or whatever I should call it] that?

View 14 Replies View Related

Programming :: Python - Call Function From The Command Line After Compile The Program?

Dec 28, 2010

If i have a python file with a function call_me(a,b),how can I call this function from the command line ,after i compile the program?

View 5 Replies View Related

Fedora Security :: Python Library For MLS - Write A Program To Change Range For Users?

Apr 16, 2010

I need to write program (preffer Python) to change range for users. Does anyone know some library which can help me to do that? Maybe someone has written program like that?

View 5 Replies View Related

Ubuntu One :: Embedding MOV Files ?

Sep 1, 2011

I know DropBox allows this for mov files where you can get the link and just quickly embed it on your blog or a forum.

Is there a way to do this with the published link that I get from UbuntuOne ?

View 2 Replies View Related

Ubuntu :: Existing MySQL Embedding To FTP

Jan 27, 2010

I have question about embedding existing mysql data to FTP. Let me tell you how the system works. Apache gets the user name and passwords records to the MYSQL and creates a folder per user in server. However users can not access their created folder using FTP client software. So how am I gonna merge the existing user/password data in MYSQL ---> to the FTP user/password. Vsftpd and proftpd installed already, so in whichever you feel more knowledgeable, I can go with that.

View 5 Replies View Related

Fedora Servers :: Flash Packages For Embedding Flv?

Jun 2, 2009

flash packages for embedding flv?

View 2 Replies View Related

Programming :: Embedding Command In Jython Script?

Jan 28, 2010

I am trying to embed a command in a Jython script. The version of jython does not support popen so I am using os.system("pmap -x %s | tail -n1 |cut -f2 -dB" % (pid)) to get the memory consumption of a pid and pass same into my Jython script. The problem is that my code which looks like this:

cmd = "pmap -x %s | tail -n1 |cut -f2 -dB" % (pid)
memusage = os.system(cmd)

executes properly but does not assing the result into the variable "memusage". So when I used the variable elsewhere I get "0". How do I manage to get the variable to grab this value rather than it executing directly.

View 1 Replies View Related

Ubuntu :: Grub2 Embedding Area Is Unusually Small?

May 4, 2011

I lost my capability to boot into any OS for some reason. I am dual booting Windows 7 and Ubuntu 10.10 and I have managed to restore my Windows bootloader using a Windows repair disk.I have tried to reinstall Grub using these commands from a Ubuntu Live CD:

Code:

ubuntu@ubuntu:~$ sudo mount /dev/sda6 /mnt
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/mnt /dev/sda

The latter gives this output:

Code:

/usr/sbin/grub-setup: warn: Your embedding area is unusually small. core.img won't fit in it..
/usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: if you really want blocklists, use --force.

Here are the results from the boot info script:

Code:

Boot Info Script 0.55 dated February 15th, 2010
============================= Boot Info Summary: =============================
=> Windows is installed in the MBR of /dev/sda
sda1: _________________________________________________________________________
File system: ntfs

[code]....

PS. I probably should mention that I edited the partitions prior to these problems, moving the extended sda3 to the left to give it some more space. The order of the partitions remained unchanged.

View 4 Replies View Related

Programming :: Embedding Flash To Html Pages For An Rtmp Stream

Aug 2, 2010

I am having a streaming server Red5 running on localhost. I have a few HTML pages which should be serving those streams.

I read documentation given here [url] and [url]and the swfobject.js and player.swf are on same directory where the test.html page I created is present.

Following is the HTML code
Red5 is working on localhost.

Code:

View 9 Replies View Related

Programming :: Python "support" Included In C Program?

Jul 11, 2011

I am just asking how this works in general. I know Python can wrap a C code, but here it seems Python is already integrated with this C program.Would it be correct to say one would have to understand the C code in addition to py programming in order to accomplish anything useful here?I need to control the program, and especially import its output to some algorithm that accomplishes command and control in the way of bash scripts or whatever.

View 2 Replies View Related

Ubuntu Installation :: Grub-setup: Warn: Your Embedding Area Is Unusually Small. Core.img Won't Fit In It

May 3, 2011

I would like to backup my entire Ubuntu installation (/boot, swap and /) at /dev/sda (4GB) to /dev/sdb (10GB).I recreated the exact partitions on /dev/sdb, formatted and cp -rp all the files over.For /boot, I used

Code:

dd if=/dev/sda1 of=/dev/sdb1

It didn't boot successfully as the system kept rebooting. I then tried to install grub onto the MBR and boot partition (mounted at /mnt/tempboot).

Code:

grub-install --force --no-floppy --root-directory=/mnt/tempboot /dev/sdb

But I get an error:

Code:

grub-setup: warn: Your embedding area is unusually small. core.img won't fit in it.

Anyhow, since I forced grub-install, I believe the grub is installed. I rebooted the system and I get a grub prompt:

Code:

grub>

Grub seems to not find my grub.cfg but it is present.

View 1 Replies View Related

Programming :: Make Python Programs Run Without Entering The Command Python?

Mar 22, 2009

I want to be able to do

sudo ./program.py

instead of always having to do

sudo python program.py

What do I need to change?

View 5 Replies View Related

Programming :: Python - Get Text File Data Into An Array On Python?

Nov 30, 2009

I've already used line split stuff to transform my data into something like this in a text file:

Code:

['1', '1', '3', '20.7505207']
['2', '1', '3', '23.0488319']
['3', '1', '3', '-1.5768747']
['4', '1', '3', '-26.4772491']

[code]....

How can I get this on a python program so I can manipulate it as an array?

View 3 Replies View Related

Software :: Python 3 Want Situation For Python 2 And Become Stop?

Jul 17, 2010

Python 3 want situation for python 2?Python 2 become stop?

View 1 Replies View Related

CentOS 5 :: Yum - Python-devel / Python Dependency

Jan 7, 2011

yum dependency problem please? I am running Centos 5.5. I need to install python-devel, but when I do so I get:

[Code]....

View 2 Replies View Related

Programming :: Python 2.x - Represent The Same In Python 3.x

Mar 4, 2010

I have a function definition in a Python 2.x script which take a tuple as one of its arguments, but 2to3 has no answers nor any of my searching on how to represent the same in Python 3.x

Code:

def blah(self, (string1, string2))

View 4 Replies View Related

CentOS 5 :: Upgrade Python-2.4.3 To Python-2.5?

Mar 30, 2011

How can I upgrade python-2.4.3 to python-2.5?

View 1 Replies View Related

General :: Make A Script To Open A Program Then Operate Within That Program?

May 7, 2010

I am new to linux and am trying out script writing. I am using shell. How can I make a script to open a program then operate within that program?

View 5 Replies View Related

General :: Connect A Jsp Program With A Java Program?

Apr 30, 2010

I have a jsp code. After executing that code, a Java program should be executed without refreshing the page. that is, my first page is a login page which is in jsp. After logging in the next page must be displayed which is a Java code. is that possible? Can we use applet for that?

View 1 Replies View Related

General :: Create A Program File For A New Program?

Mar 8, 2011

How do I create a program file for a new program?

View 1 Replies View Related

General :: Python Crash In Fedora 12

May 5, 2010

Due to this problem, everything that uses python is not working.

/lib/librt.so.1: symbol pthread_barrier_wait, version GLIBC_2.2 not defined in file libpthread.so.0 with link time reference

Please install a package which provides this module, or verify that the module is installed correctly.It's possible that the above module doesn't match the current version of Python, which is: 2.6.2 (r262:71600, Aug 21 2009, 12:22:21) [GCC 4.4.1 20090818 (Red Hat 4.4.1-6)]

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved