Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
9
Posts with Upvotes
9
Upvoting Members
3
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
3 Endorsements
Ranked #486
Ranked #490
~44.5K People Reached
Favorite Forums

98 Posted Topics

Member Avatar for shanenin

I am trying to get in the habit of practicing coding on daily basis. I decided to try do do tic tac toe in powershell. This took my a rediculous amount of hours to finsh. I am glad to be done. Nest projec will be something more useful like automating …

Member Avatar for Nutster
0
1K
Member Avatar for shanenin

I don't understand why my function is not giving similar output as the first example of powershell code PS C:\Users\shane> $x = 3 PS C:\Users\shane> $y = 6 PS C:\Users\shane> $a = $x + $y PS C:\Users\shane> Write-Host "The answer is $a" The answer is 9 My function using similar …

Member Avatar for shanenin
0
339
Member Avatar for shanenin
Member Avatar for shanenin

These would seem to be equivalent but according to the interperter they are not. I have been banging my head with this for along time >>> a = '123456789' >>> a[0:9] '123456789' >>> a[0:9:1] '123456789' >>> a[::1] '123456789' >>> a[::-1] '987654321' >>> a[0:9:-1] #why is this not equivilent to a[::-1] …

Member Avatar for snippsat
0
123
Member Avatar for shanenin

I am not sure if this is an appopropiate place to post this, but..... I am working on a site using squarespace.com. The problem I am haivng are jagged fonts. I have enclosed the link to my site. it is still in progress, The Home pages shows a good example. …

Member Avatar for LastMitch
0
129
Member Avatar for shanenin

I can't seem to see how this slice works test = (1,2,3) >>> test[::2] (1, 3) any insite would be helpful

Member Avatar for shanenin
0
1K
Member Avatar for shanenin

I am just back messing around a bit with programming. I am trying to clear out the mental cobwebs. I thought any non empty string evaluates to True. but according to my code, it does not apear so word = 'abc' if word is True: print 'yes' else: print 'no' …

Member Avatar for Gribouillis
0
111
Member Avatar for Micko

the very popular(notorious) program bittorrent is written in python. I wonder if the bittorrent windows executable used Py2Exe.

Member Avatar for darkside2205
0
326
Member Avatar for shanenin

I had a website that was made for me a while back. I am trying to update the info. I am doing my best to make changes to the code. It renders fine in all the major browsers except IE. This page in particular does not work, [url]http://brighteyedcomputer.com/test/site/contact[/url] . The …

Member Avatar for drjohn
0
173
Member Avatar for Fallen05

if your file is in /usr/bin and the file starts with #!/usr/bin/python the above method assumes you have python install in /usr/bin or better yet #!/usr/bin/env python this method will run it no matter where you installed python you just need to make the file executable with the command [code]chmod …

Member Avatar for Fredo699
0
281
Member Avatar for Gargen

[QUOTE=vegaseat] Python is compiled and then interpreted[/QUOTE] how is it compiled, I thought it is just interperted?

Member Avatar for Orion2k
0
527
Member Avatar for Avner .H.

What commands are you trying to get output with. I have not tested alot, but I get output with both cat and grep [code] >>> os.system('cat testfile') this is the output I am getting, I think you even get error output 0 >>> os.system('cat testfile | grep error') error output …

Member Avatar for sneekula
0
856
Member Avatar for rinque

echo "please do not close this window until promted, this may take awhile" sorry, I was trying to be funny. I am not sure how to do waht you wnat.

Member Avatar for rashshell
0
147
Member Avatar for a1eio

just yesterday i was googling around for infomation about this, I came across this link, it might have some info [url]http://homepage.hispeed.ch/py430/python/[/url]

Member Avatar for Stefano Mtangoo
0
2K
Member Avatar for leoman
Member Avatar for KlementHonza
0
2K
Member Avatar for leb

if it was a unix/linux system, you could call a command line program like mplayer or mpg123.

Member Avatar for hupa_nguyendinh
0
190
Member Avatar for joey101

i am pretty new to python, but are you talking about the os module? So long as your python script is started by bash, you have access to all of your system command using bash. example [php] import os os.system('enter your bash command here') os.system('/usr/sbin/useradd brian') [/php]

Member Avatar for ovoid
0
758
Member Avatar for xav.vijay

I just installed the pyssh module, it does not really have any good examples to follow. If I figure someting out I will let you know.

Member Avatar for xav.vijay
0
575
Member Avatar for chrchcol

what have you come up with so far? I can write a basic script, but don't have any experience using the mail command.

Member Avatar for riotxix
0
212
Member Avatar for shanenin

I am trying to position my logo at the very top and center of my web site. I am able to get it centered from left to right. The problem is I have about a several pixel space between the top of the image and the top of the web …

Member Avatar for DangerDev
0
98
Member Avatar for shanenin

I feel like kind of dumb. I have been reading python docs all day, and feel like I have not absorbed anything. I would like to parse info out of an xml document. here is a url to a sample doc [url]http://freetalklive.com/netcast.xml[/url] lets say I want to parse out the …

Member Avatar for vegaseat
0
180
Member Avatar for justsomerat

an interger is a whole number, with no decimal point. That is why it is telling you an integer is expected. either the number 2.5 or 3.0 will cause it to fail.

Member Avatar for mittelgeek
0
224
Member Avatar for pallavimahjan

the problem seems that the variable $job_id is not being set. I would look at the export command you are using. What value exactly are you trying to export?

Member Avatar for pzwcsx
0
101
Member Avatar for shanenin

I am trying to make a navigation bar using a list. Since a list is indented by default, I can't seem to get my list all the way to the left. I have looked at examples of this, but am not sure how they are doing it. Below is what …

Member Avatar for FC Jamison
0
187
Member Avatar for shanenin

I have been messing around trying to figure out some basics of html/css. I have a tan background with a white table. I want the background only to show up on the left and right sides(table is centered). The problem is the background is showing up on the top and …

Member Avatar for shanenin
0
115
Member Avatar for a1eio

I just wrote a little script that grabs searches for and grabs bittorrant files. One of the versions needs to read page source. [quote] i want to grab data from checks to see if another page is connected to it or perhaps to better phrase it:[/quote] when it comes to …

Member Avatar for metabo_man
0
343
Member Avatar for chrchcol

cat piped to grep can check to see if a line of text contains a string. the sed command is more suited for editing files. Sed is a good utility to modify text. Sed is good at deleting strings and also substituing one string for an other.

Member Avatar for chrchcol
0
302
Member Avatar for shanenin

I was seeing if I could use python to delete a file upon reboot. I am only able to rename it at reboot, I can't figure out the syntax to set the destination to null. Below is what works to rename the file [code] import win32file import win32api win32file.MoveFileEx("test.txt", "test2.txt" …

Member Avatar for vegaseat
0
451
Member Avatar for shanenin

I have a very simple plugin I wrote for freevo. below is the plugin. it will shutdown your computer after your avi file has finished playing, kind of like a sleep timer. [code] #!/usr/bin/env python import os import time import commands import thread import plugin from gui.PopupBox import PopupBox from …

Member Avatar for shanenin
0
3K
Member Avatar for shanenin

I am not sure if any of you use a pvr. Linux offers some good choices. One of the choices is freevo, it is fully implemented in python. Of cource it uses tools like mplayer(video player) and others that are written in c/c++ . I wrote python script that makes …

Member Avatar for vegaseat
0
233
Member Avatar for shanenin

I am trying to use distutils to install a pyhon module. below is an idea of the code I want to use [code] #!/usr/bin/env python from distutils.core import setup setup(name="freevo_cropit", version="0.1", description="A Freevo plugin for wirting mplayer config files", author="me", author_email="shane@test.com", url="http://test.com", py_modules=['cropit.py']) [/code] I have the cropit.py module in …

Member Avatar for shanenin
0
162
Member Avatar for PKort

[QUOTE=PKort] I have tried it several times but didn't worked. [/QUOTE] what way of installing did you do, did you get errors?

Member Avatar for shanenin
0
149
Member Avatar for xav.vijay

I am not familiar with that command, but would using the --batch option help. I think that would allow it to not ask for any user input [code] x = "d:\\path1\\subpath1\\gpg --batch -r encr -o d:\\dest1\\subdest\\" + f1[0] + ".txt.gpg -e d:\\path2\\subpath2\\" + filename[/code] just a thought about your code. …

Member Avatar for xav.vijay
0
263
Member Avatar for shanenin

I wrote a python script that checks for new media on my windows box, if it is new it copys it over to my standalone freevo jukebox. Below is a small part of the script that does the actually copying [code] source = "/mnt/samba/%s" %i destination = "/mnt/media/movies" print "copying …

Member Avatar for vegaseat
0
148
Member Avatar for danizzil14

This is not very efficient, but you could get your ip using a webbased service [code] import urllib2 def getip(): webaddress = "http://www.getip.com" page = urllib2.urlopen(webaddress) pagetolines = page.readlines() for i in pagetolines: if i.find('<title>GetIP') != -1: ipline = i break ip = ipline.split()[-1].replace("</title>","") return ip print getip()[/code] I am …

Member Avatar for shanenin
0
480
Member Avatar for bumsfeld

I just was messing around with the time module tonight. are you asking for something simple like [code] >>> import time >>> time.ctime() 'Mon Oct 24 23:30:47 2005'[/code]

Member Avatar for bumsfeld
0
159
Member Avatar for bumsfeld

when I run the code, I get this error [code] shane@mainbox ~ $ python test.py Traceback (most recent call last): File "test.py", line 58, in ? MyPanel(frame,-1) File "test.py", line 41, in __init__ self.Bind(wx.EVT_SLIDER, self.sliderUpdate) AttributeError: MyPanel instance has no attribute 'Bind'[/code] My linux system has two different versions of …

Member Avatar for bumsfeld
0
496
Member Avatar for shanenin

I noticed I have two versions of wxPython installed on my linux system. I found a way to choose which version you want to import [code] #!/usr/bin/env python import wxversion wxversion.select('2.6') [/code]

Member Avatar for shanenin
1
189
Member Avatar for Riptide-X-

you should show us the code you came up with. It would give us an idea of what you are using.

Member Avatar for shanenin
0
158
Member Avatar for shanenin

when I try and run boa-constuctorI am getting this error. Any suggestions to solve this. [code] C:/Python24/pythonw.exe -u "C:/Python24/Lib/site-packages/wxPython/tools/boa/Boa.py" Starting Boa Constructor v0.2.3 importing wxPython reading user preferences Traceback (most recent call last): File "C:/Python24/Lib/site-packages/wxPython/tools/boa/Boa.py", line 214, in ? import Preferences, About, Utils File "C:\Python24\Lib\site-packages\wxPython\tools\boa\Preferences.py", line 151, in ? screenWidth …

Member Avatar for vegaseat
0
352
Member Avatar for a1eio

will that work with anything complex, or just stuff that you can do from a windows shell. Unlike linux, windows commands available in the shell can't do everything.

Member Avatar for vegaseat
0
343
Member Avatar for shanenin

I was helping my 6 year old read some sentenses he learned in school. for example: the dog is on skates the bird is on a plane the pig rides the horse I noticed he was not really reading(kind of) the individual words, he had the whole sentenses memorized. When …

Member Avatar for bumsfeld
0
273
Member Avatar for qwester

[QUOTE=vegaseat] Please do not mix tabs and spaces for indentations, stick with spaces! [/QUOTE] I usually use the option "fill tabs with spaces" . Most editers offer this.

Member Avatar for bumsfeld
0
365
Member Avatar for xav.vijay

are you just looking for a was to copy a file(I might be missing something) [code] import shutil shutil.copy2('e:/disk/vm.xls', 'new_name_of_copy') [/code] I have only tested this on my linux system, but it should also work on a windows platform.

Member Avatar for xav.vijay
0
315
Member Avatar for shanenin

I would like to write an application that would search a site like "minitorrents.com" and automatically download torrent files of tv shows I like. I am thinking urllib.py might be able to do something like this. I need to be able to use the search feature of "minitorrents.com", then recursivley …

Member Avatar for shanenin
0
268
Member Avatar for bumsfeld

I have used rfind, which is a string method to search for substrings. This code will search through the C:\ drive of a windows box, and look for all files containing '.avi'. Then it prints the full path of where the file containing '.avi' was found. Surprisingly tghis search feature …

Member Avatar for shanenin
0
218
Member Avatar for c_shaft05

you could use the split method [code] >>> "the dog is going home".split() ['the', 'dog', 'is', 'going', 'home'] [/code] I hope I did not ruin your fun , but here is the code I would use [code] userinput = raw_input('> ') split_input = userinput.split() x = "" for i in …

Member Avatar for vegaseat
0
3K
Member Avatar for shanenin

I have been doing most all of my python programming in a linux bash shell. I mean I run all of my scripts from a bash shell. If my script produces an error(hardly ever happens :-), the error is outputted to the shell, so I am able to fix it. …

Member Avatar for shanenin
0
126
Member Avatar for Dani

I am learing python as my first language. I really enjoy it, it has kept my attention. I suppose I like the ease of it(I am not sure i have a programmers mind). For an introductory course, it seems perfect. It will teach you all of the basics of programming, …

Member Avatar for vegaseat
0
155
Member Avatar for shanenin

For my simple programs I have wirtten, I have just been using a simple editer with syntax highlighting. This seems sufficient. What kinds of thing can a good IDE do for me?

Member Avatar for vegaseat
0
142

The End.