Go Back   CodingForums.com > Search Forums

Before you post, read our: Rules & Posting Guidelines

Showing results 1 to 25 of 165
Search took 0.42 seconds.
Search: Posts Made By: Samhain13
Forum: Python 01-01-2012, 12:19 PM
Replies: 1
Views: 1,907
Posted By Samhain13
while True: # Get some user input. ...

while True:
# Get some user input.
x_str = raw_input("Someting: ")
# If the user simply hits enter or supplies a string full of spaces, break.
if not x_str or x_string.isspace():...
Forum: Python 12-25-2011, 12:14 AM
Replies: 5
Views: 3,567
Posted By Samhain13
notch[x]/360 is likely going to be a float...

notch[x]/360 is likely going to be a float anyway, regardless of whether notch[x] were rounded. And the problem is, range simply doesn't want floats; hence, the Deprecation Warning.

I believe "a...
Forum: Apache configuration 11-01-2011, 08:11 PM
Replies: 2
Views: 729
Posted By Samhain13
^ Not sure if it was what OP was looking for but...

^ Not sure if it was what OP was looking for but it helped me with another issue. Thanks.
Forum: Python 09-01-2011, 05:46 AM
Replies: 7
Views: 3,938
Posted By Samhain13
^Cool! Would you be so kind to post a link to a...

^Cool! Would you be so kind to post a link to a how-to on installing Django (and maybe Pylons/Pyramid) on AMPPS? I can't seem to find any. And their website only has stuff for PHP and JavaScript, so...
Forum: Python 08-30-2011, 10:45 PM
Replies: 7
Views: 3,938
Posted By Samhain13
^ Go ahead. Have fun. :)

^ Go ahead. Have fun. :)
Forum: Python 08-28-2011, 07:32 PM
Replies: 7
Views: 3,938
Posted By Samhain13
Same answer. :D AMPPS is just another way to...

Same answer. :D

AMPPS is just another way to get Apache + MySQL + Php/Python/Perl on your computer. But when developing with Python, you don't necessarily have to serve your projects through...
Forum: Python 08-26-2011, 04:36 PM
Replies: 7
Views: 3,938
Posted By Samhain13
^ It really depends on the applications that you...

^ It really depends on the applications that you want to write and how you plan on deploying them.

On AMP, using Python as CGI is pretty straight forward. But if you're thinking about using Python...
Forum: Python 08-12-2011, 03:14 PM
Replies: 1
Views: 2,407
Posted By Samhain13
Like this? l = ['Johns','Luke John...

Like this?
l = ['Johns','Luke John Doe','DoeJanice']
search = 'John'
# Use list comprehension to generate a list of results.
results = [x for x in l if search in x]

Result:
['Johns', 'Luke...
Forum: Other server side languages/ issues 07-21-2011, 05:12 PM
Replies: 1
Views: 814
Posted By Samhain13
I've only seen this kind of thing in free,...

I've only seen this kind of thing in free, ads-supported hosts.

Does your host give you a way to edit files remotely? Like, in cPanel, there's a file browser and a file editor? I'm asking because,...
Forum: Other server side languages/ issues 07-21-2011, 04:56 PM
Replies: 1
Views: 891
Posted By Samhain13
Have you tried: man wget or: wget --help...

Have you tried:
man wget

or:
wget --help

Just saying.
Forum: Python 07-08-2011, 05:04 PM
Replies: 1
Views: 2,368
Posted By Samhain13
It would make sense if core.py looked like: ...

It would make sense if core.py looked like:
class core:

def printHello(self):
print "Hello Moto"


and the script with AddOn (addon.py) looked like:
class AddOn:
Forum: Python 06-18-2011, 02:54 PM
Replies: 1
Views: 2,625
Posted By Samhain13
Instead of using all "ifs", use "if" then "elif",...

Instead of using all "ifs", use "if" then "elif", and an "else". Like:

# ...all the code before the while
while True:
if commandinput == command[0]:
# whatever's supposed to be...
Forum: Python 03-01-2011, 02:00 PM
Replies: 9
Views: 3,257
Posted By Samhain13
Riiiight... :thumbsup:

Riiiight... :thumbsup:
Forum: Python 03-01-2011, 12:03 PM
Replies: 9
Views: 3,257
Posted By Samhain13
Oooh, lots of machismo going around. "If you can...

Oooh, lots of machismo going around. "If you can prove that...."

Here's the thing. If you can get the League Results table from this page:
http://www.footballalliance.ph/league/Results.php

and...
Forum: Python 03-01-2011, 12:07 AM
Replies: 6
Views: 3,217
Posted By Samhain13
If your server allows you to use .htaccess (like...

If your server allows you to use .htaccess (like in Apache), try this:

# This is a .htaccess file.
# Tell the server to treat .py files as CGI scripts:
AddHandler cgi-scipt .py

# Tell the...
Forum: Python 02-28-2011, 11:54 PM
Replies: 9
Views: 3,257
Posted By Samhain13
Easy way out? Use BeautifulSoup:...

Easy way out? Use BeautifulSoup: http://www.crummy.com/software/BeautifulSoup/ :D
Forum: Apache configuration 11-23-2010, 04:06 AM
Replies: 1
Views: 998
Posted By Samhain13
You have a reseller. Couldn't the clients have...

You have a reseller. Couldn't the clients have removed the missing .htaccess files?
Forum: Apache configuration 11-23-2010, 04:00 AM
Replies: 1
Views: 1,681
Posted By Samhain13
You can try: RewriteEngine on RewriteBase...

You can try:

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} ^/shop.*
RewriteRule ^shop/?$ cgi-bin/cart/$1 [L]


Basically, you'll need to evaluate the request URI so that the...
Forum: Python 11-21-2010, 07:47 PM
Replies: 1
Views: 6,258
Posted By Samhain13
You can use the object's internal dictionary...

You can use the object's internal dictionary (assuming "obj" is an instance of some object):

for o in obj.__dict__:
obj.__dict__[o] = "some new value"

If you have a source, like another...
Forum: Python 11-19-2010, 03:14 PM
Replies: 11
Views: 13,081
Posted By Samhain13
^Cool! This was actually a very enlightening side...

^Cool! This was actually a very enlightening side project, I'm now working on something that gets stuff from OpenDocument Spreadsheets. Putting what I've learned from here to practice. :D
Forum: Python 11-19-2010, 02:00 AM
Replies: 11
Views: 13,081
Posted By Samhain13
I'm glad the thing worked! :D for node in...

I'm glad the thing worked! :D

for node in e_nodes:
node.setAttribute("LanguageCode", "EN")
Forum: Python 11-17-2010, 02:35 PM
Replies: 11
Views: 13,081
Posted By Samhain13
Woohoo, now that's an example! Anyway, it was a...

Woohoo, now that's an example! Anyway, it was a good exercise.

First things first: in order to keep my sanity, I needed to write a helper class that provides a few methods for manipulating the XML...
Forum: Python 11-17-2010, 02:26 PM
Replies: 4
Views: 4,704
Posted By Samhain13
^ Nice. :D

^ Nice. :D
Forum: Python 11-16-2010, 02:52 AM
Replies: 4
Views: 4,704
Posted By Samhain13
Right. Weird though. I just ran your script...

Right.

Weird though. I just ran your script with the x = Employee line uncommented and the thing works. (Using Python 2.6 in Ubuntu.)
Forum: Python 11-16-2010, 02:40 AM
Replies: 11
Views: 13,081
Posted By Samhain13
^ Of course, the XML and sample XLS would be...

^ Of course, the XML and sample XLS would be helpful. Maybe you can attach them in your next reply so we can have a look?
Showing results 1 to 25 of 165

 
Forum Jump

All times are GMT +1. The time now is 11:10 AM.