User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
DaniWeb is a massive community of 373,881 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,946 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Showing results 1 to 40 of 41
Search took 0.01 seconds.
Posts Made By: 1337455 10534
Forum: Python May 9th, 2008
Replies: 2
Views: 320
Posted By 1337455 10534
Re: Python interaction with firefox?

Is it possible to do a

import os
os.system('tskill firefox')
?
Forum: Python May 9th, 2008
Replies: 8
Views: 323
Posted By 1337455 10534
Re: "choose" in Python?

That is pretty ingenious!
Does it work without using lambda? e.g
'1':"w/e", etc
Forum: Java Apr 8th, 2008
Replies: 1
Views: 203
Posted By 1337455 10534
Python to Java: Questions I Have

Hi,
I'm a high-school freshman that wont be taking a programming class until next year. I am proficient at Python, and they decided to put me in AB Programming, which is Java.
When I first started...
Forum: Python Apr 1st, 2008
Replies: 1
Views: 352
Posted By 1337455 10534
Re: Glade + Python

No code generation :).
Forum: Python Mar 26th, 2008
Replies: 6
Views: 522
Posted By 1337455 10534
Re: Function & writing to file problem

You, my friend, need to try concatenation.
I believe that it works with both lists and strings, so this is what you'd do;

final = fileString1 + '\n'+ fileString2 + '\n' + "" + integerData
outfile =...
Forum: Python Mar 24th, 2008
Replies: 7
Views: 635
Posted By 1337455 10534
Re: XML parsing

Ok, I fixed it :)!
It works great!
I decided to give up on converting it to DOC ;) but it converts to text files excellently.
I'll update the version I posted earlier after I get back on Linux to...
Forum: Linux Users Lounge Mar 23rd, 2008
Replies: 22
Views: 1,043
Posted By 1337455 10534
Re: Faster Linux for Good Hardware

Too much choice :).
Thanks for all of your replies.
I made a list of all the kernel mods I need and I'll try it out again.
Probably wont go to Arch VooDoo unless the Final Hardy LTS disappoints (I...
Forum: Python Mar 23rd, 2008
Replies: 3
Views: 400
Posted By 1337455 10534
Re: user input choosing attribute

Your best method would be to use lists (in C, arrays).
(BTW:
1. I don't think you can use self outside of a class.
2. raw_input always returns a string
)

data = []
type = raw_input("Type: ")
entry =...
Forum: Python Mar 22nd, 2008
Replies: 1
Views: 277
Posted By 1337455 10534
Re: NameError: name 'guess' is not defined

guess == int(raw_input("enter an integer:"))

should be

guess = int(raw_input("enter an integer:"))

If you try to assign a value to a variable using '==', you will return a Boolean data validity...
Forum: Python Mar 22nd, 2008
Replies: 7
Views: 635
Posted By 1337455 10534
Re: XML parsing

hmmm..
not quite windows yet..

I found the bug but cant kill it.
Does anybody know how to use zipfile.ZipFile to access a file within a directory in a ZIP?

edit: this works great on Linux, i'd post...
Forum: Kernels and Modules Mar 21st, 2008
Replies: 3
Views: 382
Posted By 1337455 10534
Re: Kernel Autocompile Script (?)

hmm.
suppose the script could make a log of the hardware info you'd need to actually compile?
maybe i'll write something...
Forum: Python Mar 21st, 2008
Replies: 4
Views: 203
Posted By 1337455 10534
Re: Naming a variable after the output of a variable.

rikxik has the easier way to do it.
But anyways;
1. eval is an in-built python function. works sort of like C pointers. sort of.
2. in Python, %s in a string followed by % variable outside of the...
Forum: Python Mar 21st, 2008
Replies: 8
Views: 375
Posted By 1337455 10534
Re: Judging my skill.

np :D, I have a lot of time to spare.
Forum: Python Mar 21st, 2008
Replies: 3
Views: 1,862
Posted By 1337455 10534
Re: Python web browser automation

Webbrowser is great too.

import webbrowser as WEB
WEB.open('anyfile.extension')
# are URL's accepted? probably
# or under Linux, you could;
# import os
# os.system('firefox URL')
# and then
#...
Forum: Kernels and Modules Mar 20th, 2008
Replies: 1
Views: 473
Posted By 1337455 10534
Re: new to linux :quick linux questions.

If you have kernel source, look in promising folders. There isnt great documentation on where to find things, I dont think.
There are daemons (background tasks), active, dead, zombie (killed but...
Forum: Kernels and Modules Mar 20th, 2008
Replies: 3
Views: 382
Posted By 1337455 10534
Kernel Autocompile Script (?)

Hi,
to me, specifying hardware for compiling the kernel is the biggest pain and things never seem to go perfectly.
Either the boot process is too slow, or sound doesn't work, or something...

Is...
Forum: Linux Users Lounge Mar 20th, 2008
Replies: 22
Views: 1,043
Posted By 1337455 10534
Re: Faster Linux for Good Hardware

If you put it that way, I'm sticking with Ubuntu because it works just fine.
Forum: Python Mar 20th, 2008
Replies: 8
Views: 375
Posted By 1337455 10534
Re: Judging my skill.

You're looking for this; http://www.codesampler.com/python.htm

I just messed with size dimensions, speed and crap to learn a bit of pygame.
The original is well commented (I tested out a script to...
Forum: Python Mar 20th, 2008
Replies: 5
Views: 579
Posted By 1337455 10534
Re: Making a programs in addition to the main one

If you want to send data to external programs, your easiest method is using sys.argv.
After executing your first program, you'd need to execute the other program with your data in the argument within...
Forum: Python Mar 20th, 2008
Replies: 1
Views: 275
Posted By 1337455 10534
Re: How to browse and select a directory of file by using python TKinter help please

Get easygui and look at the source for fileopenbox or diropenbox.
http://www.ferg.org/easygui/index.html
Forum: Linux Users Lounge Mar 19th, 2008
Replies: 13
Views: 930
Posted By 1337455 10534
Re: When Hardy Comes Out...

Yeah, it may be better to backup your files and Gconf, then do a manual reinstall via CD.
The dist-upgrade method messed up all of my default programs (on Feisty).
To linux:
do you have an...
Forum: Linux Users Lounge Mar 19th, 2008
Replies: 22
Views: 1,043
Posted By 1337455 10534
Re: Faster Linux for Good Hardware

I've done everything I've found to tweak Ubuntu.
IPv6 alias junk, screwing with ext3 writeback methods, stripping all the unused services via BUM (yea, hdparm is enabled) and tuning the boot...
Forum: Python Mar 19th, 2008
Replies: 2
Views: 187
Posted By 1337455 10534
Re: defining and Importing file

If you dont read the link;

yourfile = open('yourfilename.txt','r')
# r stands for read
yourtext = yourfile.readlines()
print yourtext
Forum: Python Mar 19th, 2008
Replies: 7
Views: 635
Posted By 1337455 10534
Re: XML parsing

Using Dive Into Python, I came up with this.
I decided to parse the file myself, its easier this way (to me).

import os, zipfile
print """DiXTiXa.py; GPLv3 Python DOCX to TXT Assembler
Converts MS...
Forum: Python Mar 19th, 2008
Replies: 4
Views: 203
Posted By 1337455 10534
Re: Naming a variable after the output of a variable.

a = input("Number: ")
b = 2 + a
filename = eval(str(b))
outfile = open('%s' % filename,'w')
outfile.write(b)
Forum: Python Mar 19th, 2008
Replies: 8
Views: 317
Posted By 1337455 10534
Re: python + web

found something awesome;

import webbrowser
file = 'any media or html/xml file you like.extension'
webbrowser.open('%s' % file)
Forum: Python Tutorials Mar 19th, 2008
Replies: 3
Views: 6,689
Posted By 1337455 10534
Re: Multimedia: introducing the webbrowser module

It uses firefox to play mp3's. Odd.
But overall 10/10.
Forum: Linux Users Lounge Mar 19th, 2008
Replies: 22
Views: 1,043
Posted By 1337455 10534
Help Faster Linux for Good Hardware

Hi,
I am in the search of my 'perfect' Linux fit.
So far, Ubuntu 7.10 seems to be getting the most points, but it is slow compared to Zenwalk and others.
My hardware is pretty good, it can manage...
Forum: *nix Software Mar 19th, 2008
Replies: 9
Views: 645
Posted By 1337455 10534
Re: How can i decrypt linux source code?

yeah, really, wth?
what is paragnet and how is source code difficult to get?
What's there to decrypt???
Forum: Python Mar 19th, 2008
Replies: 8
Views: 317
Posted By 1337455 10534
Re: python + web

A web browser is better suited for such, but please search the global module index, there will be something in there for you.
Forum: Python Mar 19th, 2008
Replies: 8
Views: 375
Posted By 1337455 10534
Re: Judging my skill.

Here is an interesting example I slightly modified.

import random, os, pygame
from pygame.locals import *
SCREEN_WIDTH = 742
SCREEN_HEIGHT = 600
def loadIageFile(name, useColorKey = False):
...
Forum: Python Mar 18th, 2008
Replies: 8
Views: 375
Posted By 1337455 10534
Re: Judging my skill.

Very simple :);
Do you know what to do?
Do you even know what you want to do?
There's a wide variety of games...
I'm sure you've heard of Pygame.. why don't you test it out.
I made a lil star-wars...
Forum: Python Mar 18th, 2008
Replies: 5
Views: 420
Posted By 1337455 10534
Re: pyGTK and the Mandate of Sudo

Sudo has its uses, overall I think its important, though it can be a pain.
Let me stress that this has to be portable. I can't randomly create scripts like that on multiple-users computers. People...
Forum: Python Mar 18th, 2008
Replies: 5
Views: 373
Posted By 1337455 10534
Re: Compiling SPE IDE Using PY2EXE

Pretty good link;
http://effbot.org/zone/python-compile.htm

Sorry, not a great explainer..
Forum: Python Mar 18th, 2008
Replies: 7
Views: 635
Posted By 1337455 10534
Re: XML parsing

Thank you all for great replies!
Dive Into Python looks really good, I'll read it. Thanks, again.
Forum: Python Mar 16th, 2008
Replies: 7
Views: 635
Posted By 1337455 10534
XML parsing

I need to convert .docx files to .doc (on Linux and Windows).
I'm planning to use the zip mod to access all of the internal XML documents.
Then I'll the /word/document.xml and I need to parse it so...
Forum: Python Mar 16th, 2008
Replies: 5
Views: 420
Posted By 1337455 10534
Re: pyGTK and the Mandate of Sudo

I'm running GNOME :D.
Did you try to actually remove anything with KleanSweep? Because it still prompts for a password when I use it (if you do, make sure to back up).

One more thing, did you run KS...
Forum: Python Mar 16th, 2008
Replies: 5
Views: 373
Posted By 1337455 10534
Re: Compiling SPE IDE Using PY2EXE

Sorry, just that in a different Python to Executable compiler, (by a Mr Gold.. something), you have to add a line specifying whether to compile tk, wx, or gtk support or not.
I'm not sure, but py2exe...
Forum: Python Mar 16th, 2008
Replies: 1
Views: 188
Posted By 1337455 10534
Re: Need help streamlining this code please

I'm not gonna bother changing your approach, just perhaps you code.
I wouldn't define a function in a function. Try classes.
And its good syntax to define a function before you use it.

import...
Forum: Python Mar 16th, 2008
Replies: 5
Views: 420
Posted By 1337455 10534
pyGTK and the Mandate of Sudo

So I have a pyGTK app going on nicely, but it requires sudo permission (under Linux) to perform a BASH operation.
If I prompt for a password using a GUI, is there any way I can do my BASH stuff...
Showing results 1 to 40 of 41

 
All times are GMT -4. The time now is 3:58 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC