Ubuntu :: Simple Python Script Not Working Properly

Apr 27, 2010

Trying to learn python. Going well, but I have run into a minor speed bump. I wrote a simple program to see if Python was set up correctly. Wouldn't you know it, the thing pops open and then closes again. I put raw input fields there to stop the program, but they didn't work. The program is:

Code:
x = raw_input("Please input your name: ")
print "Hello " + x + ". Good to meet you."
raw_input("Press Enter to exit")

And as for python, I have installed the following packages. The program was made in IDLE using Python2.6 I just started learning python a few days ago, so this may be a really small mistake.

View 1 Replies


ADVERTISEMENT

Programming :: Simple C# Using Mono Not Working Properly?

May 13, 2010

I am creating a simple program using C# to print the contents of the todo.txt file once it has run. Problem is when I run the program, I get this warning.

PHP Code:

[code]....

View 12 Replies View Related

Programming :: Python: Simple Message Queues / IPC?

Mar 10, 2010

I have this daemon I'm writing in Python, but I still a Python n00b. I've coded the part of the daemon that does the work, but not the part that receives messages. I need a simple system so that other processes on the same (Linux) computer can occasionally send text-string messages to the daemon (without needing to stay running all the time themselves). Once in the past we did something similar by (mis)using pyliblo to listen for OSC messages coming in on a certain port. That option isn't as workable here because the pyliblo interface (as near as I can tell) requires you to know in advance specifically what messages you are expecting, and forward them to specified functions, rather than just allowing you to generically process incoming messages as you see fit.

View 1 Replies View Related

Programming :: Use PIL In Python To Simple Composite Images

Jun 24, 2010

I have a render script that uses several Blender 3D instances on several machines to co-render one still image. The image is split into squares of 64 x 64 pixels. In the end, I have like 200 image files, each one with a puzzle piece of the whole.

Now I would like to assembe these pieces into whole with PIL and Python, but so far cannot figure out how. I am new to PIL, but in imagemagick, a convert image1.png image2.png image3.png +append finalimage.png works a charme. But convert chokes on so many image files, so I need something automatic and scalable. I think that pictures are RGBA, so black should be the alpha channel and transparent.

I think I have to mention that the pieces are in the right position and that every piece has the original dimensions of the full picture, so it is not a problem figuring out where each piece should be. Just putting all the pictures on top of eachother and ignoring anything that is black would do the trick nicely.

How can I reach this with PIL? Which functions do I need for that? PIL does a lot of stuff, so finding my simple function is daunting.

View 1 Replies View Related

Programming :: Double-quotes Do Not Escape Properly (bash=python)?

May 2, 2010

I wrote the Automatik widget (you can find it at :http://kde-look.org/content/show.php...&PHPSESSID=caeTo improve it, I would like to add this one-line script into a text sensor :

top -b -n 1 | head -12 | tail -6 | sed '/top/d' | awk '{ printf "%-12.12s %-4s %-4s %-3s
" , $12,$9,$10,$2}'

[code]...

View 3 Replies View Related

Red Hat / Fedora :: Can't Properly Partition Both Hard Drives - Simple Way To Create Partition On Drive?

Jun 22, 2011

I installed Redhat Enterprise 3 on one of my servers. In my haste I didn't properly partition both Hard Drives and only properly partitioned one of them. Thus now I have

/dev/sdb1 478711768 137858256 316536328 31% /
/dev/sda1 101089 15346 80524 17% /boot

Where /dev/sda1 is actually a 80 GB hard drive. Is there anyway I can safely and easily repartition the unpartitioned space without causing a huge mess? I have a very important Oracle database on /dev/sdb1 and thus I want to be able to back it up on the second disk. I can create a partition on that drive?

View 2 Replies View Related

Ubuntu Servers :: .htaccess Working, Rewrite Not Working Properly?

Apr 25, 2011

I had a problem with apache2 and getting .htaccess working. I have done some things and i believe its working the ErrorDocument command is anyway. I believe there may be some problems with the rewrites though.Im trying to take a urlhttp://localhost/showthread/123and make it display whats on http://localhost/index.php?showthread=123The rewrite rule is Quote:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^showthread/([^/.]+)/?$ index.php?showthread=$1 [L]

[code]....

View 8 Replies View Related

Ubuntu :: Simple Scan - Resolution Control Not Working ?

Dec 19, 2010

Xsane is no doubt wonderfully competent, but far too complicated for casual use.

But I am having a problem with Simple Scan, in that I can't seem to get selected resolutions to have any effect.

A typical A4 mainly-text document I am playing with, ends up as:

My Epson V200 scanner allows normal resolution selection with Xsane or with Epson's iscan application.

View 1 Replies View Related

Programming :: Simple Perl Log Code Not Working?

May 25, 2010

I just upgraded servers, and I'm now on 'perl v5.8.8 built for i386-linux-thread-multi' and a simple log script doesn't work. I got it changed to

Code:
#!/usr/bin/perl
use strict;

[code]....

View 4 Replies View Related

Ubuntu :: Python Based Programs Not Working

Apr 8, 2010

I've been using Ubuntu 9.10 fairly regularly on my home computer for a week or two now, dual-booting it with Windows 7. So far I've been quite happy with it, but yesterday something odd happened. I decided to copy all the music I had stored on the Windows partition over to the Ubuntu file system so that I could listen to it there. I have about 16 gigs of music mostly in .mp3 format, so I put the folder on an external hard drive, then logged into Ubuntu and copied it back from the external drive to my Music file.

Once the transfer was done, I opened the Music file and double-clicked on one of the .mp3s at random to play it. When I did this, a window popped up and the first half-second or so of the track played, and then the window closed and it stopped. This happened once or twice more with different .mp3s. The window didn't last long enough for me to get a good idea of what program it was for, but I assume it was Totem, which I hadn't yet run since installing Ubuntu, because according to the Properties->Open With tab of any .mp3 file, that's the default program to use to open .mp3s.

Attempting to run Totem from the Applications menu gives the same result, I later found. Attempting to run Totem from a terminal gave the following error:

andrew@Lovelace-Linux:~$ totem
** (totem:2323): WARNING **: Could not import pygtk
ImportError: No module named pygtk
Segmentation fault

Then, several other programs began having similar issues immediately after I first tried to play a .mp3 yesterday. Specifically, Rhythmbox - which I also hadn't used before, and next tried to use to play the music - will not start at all. Running it from the terminal gives:

andrew@Lovelace-Linux:~$ rhythmbox
** (rhythmbox:2338): CRITICAL **: atk_object_set_name: assertion `name != NULL' failed
** (rhythmbox:2338): CRITICAL **: atk_object_set_name: assertion `name != NULL' failed
(rhythmbox:2338): Rhythmbox-WARNING **: Could not import pygtk
ImportError: No module named pygtk
Segmentation fault

Note that pygtk is again referenced. The weirdest part is that other program that's having this issue, an IM client called emesene, is one that I had been using just fine, without issue, for several sessions previous. Since trying to play that .mp3, it now won't run at all. I tried removing and re-installing emesene, to no avail. Running it from the Terminal gives:

andrew@Lovelace-Linux:~$ emesene
Traceback (most recent call last):
File "/usr/share/emesene/Controller.py", line 21, in <module>
import gtk
ImportError: No module named gtk

This time the missing module is gtk, but I know that emesene is written in Python, which the earlier "pygtk" is perhaps a reference to. Thus, the connecting thread between all these programs, as near as I can tell, is Python.

View 9 Replies View Related

Fedora :: Python 2.5 On 12 Not Working

Feb 15, 2010

I've got Fedora 12 and I need to install python 2.5. Without trhis version of python, very important program to me will not work - is it possible?

View 6 Replies View Related

Programming :: How To Compile / Simple Tutorial For Making Simple Program

Oct 7, 2010

i'm a college student studying pc programing, and i was given today a special work and i have to program using miranda... which i've never used it >.< can anyone give me a hand to where to download, how to compile, and a simple tutorial for making a simple program or something?

View 3 Replies View Related

Ubuntu :: Vi Not Working Properly?

Dec 21, 2010

Does anyone know why vi text editor would not work. I'm running Ubuntu server with SIP service and apache and when i try to edit config files with vi it gets messy.On the bottom of the screen it would not indicate if I'm in backup mode or not. I won't same changes, and it messes up the layout when you use arrow keys to move between the lines. Also sometimes when I use arrow keys it will insert capital A, B, C or D.

View 5 Replies View Related

Ubuntu :: Can't Get 11.04 Working Properly

Apr 28, 2011

I have a Lenovo W500 ThinkPad. It is running XP on first partition, then Ubuntu. I've tried both 10.10, 11.04 beta 2, and now 11.04 release.With the release I just installed, it seemed OK till reboot-after-install, at which point nothing came up. I rebooted several times and just got errors and kernel panics in the ATI video driver. I also saw a lot of these messages:"udevd[80]: worker [XXX] did not accept message -1 (Connection refused), kill it" URL...

I had download updates on, I'm trying again with a clean install without updates. (Although, I said don't download while installing, and it says it is downloading language packs...?)Now, I also had issues with 10.10, where it would intermittently boot and fail to get video, I'd just be at a tty, and have to reboot and try again. I found it usually got video if I had just booted Windows (XP Pro SP3) beforehand, and not otherwise So what's going on there? Something up with the actual video card? I want to run Gnome anyways, is there a way I can specify that during the install?At any rate, if I can't get 11.04 working properly, I'll have to run 10.10, which I didn't want to do. I'm starting from scratch and wish to start from 11.04 if at all possible.

View 2 Replies View Related

Ubuntu :: 11.04 Not Working Properly?

Apr 29, 2011

So yesterday I upgraded to 11.04 from 10.10 and now when I enter Ubuntu only my background image appears. No files, programs, or anything. It worked right after it rebooted to finish the upgrade but when I turned my computer on this morning I got nothing but background.

View 4 Replies View Related

Programming :: Python Gconf Not Working When Ran As Root?

Jan 23, 2010

This is the case. I run openSUSE 11.2 with GNOME. I want my desktop wallpaper to automatically cycle on a fixed interval. So I found this script (change-background.py), edited it to match my needs, and put it in my home bin directory. The script runs fine.

change-background.py

Code:
#!/usr/bin/env python
#
# change-background.py
#
#

[Code]....

View 6 Replies View Related

Ubuntu :: Firefox Not Working Properly

Jan 11, 2010

The navigation buttons in firefox are not working and I can not access File, Edit, View, and History pull down menus. This just started today i think. I have 3.5.pre8 and 3.7 installed. both are affected.

Edit: Actually it is a problem with all apps when window is maximized. I cannot access the first 3 or 4 pull down menus or buttons on the tool bar unless the window is not maximized. This happens with konqueror, firefox and Banshee. Have not tested other apps yet.

Edit2: Upper left corner of desktop is also affected. The icons in this part of the screen are not accessible. seems that anything in that region of the screen is dead. just switched from compiz window manager to metacity and there is a black square in the upper left corner of my screen about 2.5"x 2.5".

View 1 Replies View Related

Ubuntu Installation :: APT Is Not Working Properly

Jan 12, 2010

I can't install software in Karmic - just installed the OS and hooked up to the network, but whenever I 'sudo apt-get install <program>' I get: Couldn't find package <program>I've looked at sources.list and can't find any problems. Is there something else I should look at?

View 2 Replies View Related

Ubuntu :: M And S Key Not Working Properly After Upgrade

May 4, 2010

I upgraded two machines to 10.4 TLS. When I press "s" key, system shutdown menu is displayed, and when I press "m" key, message menu is displayed.

View 4 Replies View Related

Ubuntu :: Touch-pad Is Not Working Properly

Oct 11, 2010

upon the upgrade from 10.04 to 10.10, all upgraded nicely, except for my touchpad, which can't right click anymore, I can use the scroll on the side, and the button-trackpad just functions as a left click.I have an HP Pavilion dv6, with a touchpad like that of the HP Envy, click touchpad, with depressing ends on the bottom and middle respectively for left, middle, and right click.

I submitted a bug report on this when it was in beta, is there a solution to this issue? I use my laptop for work, so I would appreciate a fix... or something I could do aside from uninstalling my Operating System and reinstalling the previous version, which would seem to be a hassle.

View 2 Replies View Related

Ubuntu :: Can't Get Java Working Properly ?

Nov 20, 2010

I can't get java applications to run properly in a lot of cases. I've tried completely removing Java and reinstalling it. I've tried removing Iced Tea and OpenJDK and installing Sun Java instead. I've done a complete, clean reinstall of Ubuntu. The symptoms of my problem never seem to change. Minecraft is the best example I can give you. As soon as the game loads (in the web or on the desktop alike) it closes abruptly. This is what's in the log file.

Code:

I'm thinking "C [+0x416] __kernel_vsyscall+0x2" is important somehow. I can't seem to figure out what it means. I've tested this on a friend's laptop using the same (Ubuntu 10.10) and it works fine, no errors. I know other people are running their java fine.

View 1 Replies View Related

Ubuntu :: Empathy MSN Not Working Properly?

Dec 5, 2010

Has anyone else been getting problems with contacts on MSN not receiving any messages?Works fine for google chat though, having to use Emesene for MSN at the moment, quite annoying.Also sometimes messages seem to double up and notifications too.

View 1 Replies View Related

Ubuntu :: Webcam Isn't Working Properly

Dec 28, 2010

i recently installed guvcview on xubuntu and the window just shows up as a black screen with nothing and according to the uvc website my Logitech QuickCam Communicate Deluxe is supported by linux when i start up guvc the webcam's light turns on so i think its working

View 1 Replies View Related

Ubuntu :: Autofs Not Working Properly?

Apr 24, 2011

I managed to configure autofs5 on my Kubuntu 10.10. I want to use autofs to mount my NAS drive, when I am home(most of the time ) and not bother me when I am away. I mount it in /etc/fstab, but suspend and hibernate does not work correctly, when I am not at home. Now I comment the line which mounts the NAS driveI am still not at home, and decided to try to autofs my flash drive Here is my auto.master

Code:
# directory map
/- /etc/auto.direct --timeout=2 --ghost

[code]....

View 4 Replies View Related

Ubuntu :: Rtcwake Not Working Properly?

Apr 25, 2011

In my laptop pc the following command doesn't work properly

Code:
rtcwake -m disk -s 1500
The pc reboots as usal after 1500 sec

[code]....

View 1 Replies View Related

Ubuntu :: Hibernate Is Not Working Properly

Jul 10, 2011

I've installed Ubuntu Natty on my new lenovo laptop, and hibernate isn't working.Problem: When I click hibernate, the computer shuts down ok. When I boot it again, it seems as if hibernate is resuming (I get the blank purple screen), however the computer restarts again, and now boots as if I had shut it down(ie none of the programs are open).Also, programs (such as google chrome) that were open when I hibernated show that the program did not exit normally.

View 5 Replies View Related

Ubuntu :: Vmware - Login Not Working Properly

Jan 18, 2010

i have a question about vmware fusion (3.0.1) and ubuntu (9.1) i just created the ubuntu virtual disk yesterday, and have not done anything on it besides change some minor stuff (background, theme, etc). for some reason this morning, the login screen has been freaking out. the vm loads and shows the login screen, i click my name and enter my password, i get the cool music, but right before my desktop loads it goes straight back to the login screen and i have to start over. it does this over and over until i cry and give up. i have tried restarting the vm, restarting the host computer, everything. every once in a while it will randomly work, but then if i restart, back to the same issue

View 1 Replies View Related

Ubuntu :: Minimize Button Not Working Properly?

Jan 29, 2010

i have just changed my desktop appearance by using the customise option, but now when i click on minimize the windows close instead of going to the panel ive searched high and low for a settings option but cant find one so i have no idea what i have done.ive tried reverting back to the old desk top but get the same problem there so ive managed to change a setting somewhere but don't know where.

View 4 Replies View Related

Ubuntu Installation :: Gnome Is Not Working Properly

Feb 16, 2010

I have updated my ubuntu to the following kernel: 2.6.31-20. There has been several other update such as compiz that I do not have installed.Anyway, now I gnome doesn't work properly - at least I think it is Gnome, I cannot switch between windows, I do not have the bar on top with the cross and all I only have one desktop loaded out of 4 and the computer is continuously working.

View 6 Replies View Related

Ubuntu :: Mouse Not Working Properly With Eclipse?

Mar 2, 2010

I am using ubuntu 9.10 , but while opening eclipse and working with it, i used to face some strange problem which is my mouse does not work properly inside eclipse and these effect the other application and i used to get stuck (the keyboard will be still working) which force me sometimes to kill the whole eclipse (using keyboard)....

View 7 Replies View Related







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