Posts
 
Reputation
Joined
Last Seen
Ranked #464
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
96% Quality Score
Upvotes Received
30
Posts with Upvotes
25
Upvoting Members
17
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
6 Commented Posts
2 Endorsements
Ranked #621
Ranked #818
~87.5K People Reached
Favorite Forums

75 Posted Topics

Member Avatar for LastMitch

A Separation (or Separation of Nader and Simin) by Asghar Farhady. The Dreamers. Forest Gump.

Member Avatar for LoanHensley
6
6K
Member Avatar for vegaseat

Importing modules inside anonymous functions: t = lambda: __import__('time').localtime() print('Date: %s/%s/%s'%(t().tm_mday, t().tm_mon, t().tm_year))

Member Avatar for vegaseat
23
34K
Member Avatar for ItsAdZy

PyScripter is the best one in my opinion. it supports many versions of Python code.google.com/p/pyscripter/

Member Avatar for RogueHaxor
0
1K
Member Avatar for nouth

> for example I don't know what this is called » [('cat', 'meow'), ('dog', 'ruff')] It's called a list of tuples > so I can now remove the square brackets but I want to make it liek this ↴ catmeow dogrugg You can do something like this: your_list = [('cat', …

Member Avatar for vegaseat
0
249
Member Avatar for Helper guy

off topic but wise ;-) Where shall I begin, please your majesty?" he asked. "Begin at the beginning", the king said, gravely, "and go on till you come to the end: then stop ." Alice in wonderland.

Member Avatar for M.S.
0
193
Member Avatar for mkweska

def main(): with open(raw_input("Enter file name: ", "r")) as fin: for num, line in enumerate(fin.readlines()): print("%d: %s"%(num+1, line)) it is without error checking, u you can add exception catching to it.

Member Avatar for snippsat
0
479
Member Avatar for mkweska

and... the module profession.py returns nothing! so your player will not have any of those properties.

Member Avatar for Schol-R-LEA
0
219
Member Avatar for M.S.

Assuming that every person has a National ID number, I am trying to check if the Entered number is a valid ID number, under these conditions: 1. ID number must be of 10 digits length. 2. If ID length is greater than/equal to 8 and less than 10 digits, add …

Member Avatar for M.S.
0
2K
Member Avatar for Lardmeister

I'm using py4a on android and it helps me script things for my android phone. stuff like searching messages for desired words, text encryption and sending via sms reboot options for root devises bluetooth control with gui and some more, I scripted already.

Member Avatar for M.S.
0
220
Member Avatar for ZZucker
Member Avatar for elrond

just write down some code and then try to enhance it step by step. then come back here and ask your questions. what is yor algorithm or logic?

Member Avatar for Lardmeister
-1
125
Member Avatar for Vusumuzi

first no need to use print when assigning a user input to a variable. secondfunction arguments are pre-requisit for function. so get those two user input vars out of the function.

Member Avatar for Vusumuzi
0
157
Member Avatar for aaron.jensen.923

just something to start with: data_list = [line.split() for line in myFile.readlines()]

Member Avatar for HiHe
0
311
Member Avatar for crazyjdog

python uses (* asterix) for multiplication. in line 54 it assumes the s(s-side1) as a function call not a multiplication. it should look like s*(s-side1)*(s-side2)...

Member Avatar for JasonHippy
0
469
Member Avatar for ArtemKrass

I dont know wx and dont know how to fill searchbox :D but for searching a word or words u can add queries to google address: www.google.com/search?q=SEARCH+WORDS query = 'what is Python' search_google = 'www.google.com/search?q=%s'%query

Member Avatar for ArtemKrass
0
135
Member Avatar for Lynick

you have to assign thevariable before using it. in your case, replace the line 1 and 2 with each other. in python 2.x use raw_input instead of input and then convert it to integer or float.

Member Avatar for M.S.
0
105
Member Avatar for hotblink

what structure has the data in the text file? show some of its data. btw, range() doesnt work with float.

Member Avatar for hughesadam_87
0
391
Member Avatar for Sarah2012

define get_score(with a string argument): length = len(string) score = 0 if length < 3: score = 0 elif score > 6: score = length multiplied by 1 elif other condition: apply other rules to score ... return score

Member Avatar for HiHe
0
124
Member Avatar for apayn

instead of confusing while MainLoop == 1 you can use: while True: '''do stuff''' break

Member Avatar for M.S.
0
299
Member Avatar for favoredanteater

EDIT. PLEASE REMOVE THIS POST. my system got problem when tried to post :D long delay in refresh,

Member Avatar for Schol-R-LEA
0
210
Member Avatar for Delnith
Member Avatar for Jacklittle01

look at the full traceback record. and it's better to post the full traceback here...

Member Avatar for TrustyTony
0
193
Member Avatar for nUmbdA

you should return shipping_rate in the second function: def shippingRate ( poundage , classification ): return poundage * classification

Member Avatar for nUmbdA
0
3K
Member Avatar for emeka.l.iwuagwu

what is your targeted devise? if sysmbian: import inbox box = inbox.Inbox(inbox.EInbox) for sms_ID in box.sms_messages(): print box.content(sms_ID)

Member Avatar for M.S.
0
437
Member Avatar for BigPaw

if you mean to write and run code, there is no support for python 3.3. SL4A only supports 2.6.2 and 3.0.1.

Member Avatar for BigPaw
0
132
Member Avatar for birch18

post your code and traceback if you want to attract forum's experts attention. otherwise you wont get any help ;)

Member Avatar for M.S.
0
55
Member Avatar for giancan

simplest way: url= 'http://maps.google.com/maps?q=%s+%s' % (latitude,longitude)

Member Avatar for M.S.
0
221
Member Avatar for M.S.

This is me with another project for beginners :) The Project as stated by ZZucker about 2 months ago: "Given the length of three sides, write a function that checks if it is possible to create a triangle." I could solve it with an annonymus function like this: is_triangle = …

Member Avatar for M.S.
0
253
Member Avatar for sean.kallungal
Member Avatar for M.S.
0
678
Member Avatar for M.S.

This is and answer to one of the Vegaseat's recent projects for beginners. I share my solution here because -as a begginer and do learn python as a hobby- I need your feedback. So please tell me am I doing it the right way? Thanks in advance for comments from …

Member Avatar for M.S.
0
310
Member Avatar for littleEuler
Member Avatar for hughesadam_87
0
110
Member Avatar for M.S.

this is my first attempt to implement OOP. IS this class ok?(in terms of structure) AND another Question: there are some folders in message application in Symbian phones and sometimes there are up to 1000 messages in each folders. I do itterate over all messages for gathering their info about …

Member Avatar for M.S.
0
175
Member Avatar for supravat

All the Info you need, is accessible through the API documentation: menu > help > API help > bluetooth facade. from android import Android droid = Android() check = droid.checkBluetoothState().result if check != 1: droid.toggleBluetoothState(1,0) print "Bluetooth turned ON!" droid.bluetoothMakeDiscoverable(300) print "Bluetooth is Discoverable for 300sec now" else: droid.toggleBluetoothState(0,0) print …

Member Avatar for M.S.
0
312
Member Avatar for crishein14

Try the TopWindow module for the graphics and those Icons (actually they are not icons but images that are linked to an app uid for App Run). the cursor is an image too and moves by defined keys(e.g. left/right arrow keys) via a redraw callback. Implementing graphics like these is …

Member Avatar for M.S.
0
104
Member Avatar for crishein14

pyo, is os dependent i think, and there is no way to compile a py to pyo on the phone. you can compile or decompile py/pyc files using many apps out there as symbian packages (e.g. BestDeCompiler.sis). if you make a pyo on pc from a pys60 script, i think …

Member Avatar for M.S.
0
3K
Member Avatar for crishein14

there is no example needed. just pack your script with py2sis application and type y for autostart in its wizard. thats it.

Member Avatar for M.S.
0
173
Member Avatar for crishein14

the most widely used pys60 is v1.45 and is a port of python 2.2.2. the pys60 v1.9.7 that is a python 2.5 port that is less used. for pys60 there are many modules for manipulating files and dirs, as an example I can suggest the pow_light fm module or fman …

Member Avatar for M.S.
0
174
Member Avatar for dan.nitschke

ordertype = raw_input(" Is the order for pickup or delivery? ") while True: if not (ordertype.lower() in ["p","d"]): print "No, Enter only P or D!" ordertype = raw_input("Is the order for pickup or delivery? ") else: print "Ok, %s Entered" %ordertype break

Member Avatar for M.S.
0
141
Member Avatar for wootburgers

split the RNA sequence at the midline and reverse the second part then compare the 2parts. something like a function that takes the sequence and returns the following: return sequence[:len(sequence)/2]==sequence[len(sequence)/2:][::-1]

Member Avatar for wootburgers
0
259
Member Avatar for M.S.

How the following code can be rewritten in a better way? #!/usr/bin/env python """Simple program for finding popular names over last 100 years, in response to vegaseat's last post in Projects for Beginners(9/1/2012). It first lists the popular names and then search for entered name by user""" oldnames = """Mary,Helen,Margaret,Anna,Ruth …

Member Avatar for vegaseat
2
273
Member Avatar for blaine.rogers.14

no need to open and close the file several times. for names printing in different lins you can strip the end of line symbol. a simple function is what I would use: import random def name_gen() query = raw_input("Whould you like to generate a random name? y/n") if query == …

Member Avatar for blaine.rogers.14
0
261
Member Avatar for duyencaothi
Member Avatar for Jacklittle01

@ Jacklittle01: A friendly Advise, Spamming at the board and asking a question many times is waste of time. I think it'd be better to start learning Python by first reading some tutorials or introductory texts then pick up simple practices for every method, data type and so on. after …

Member Avatar for M.S.
-1
170
Member Avatar for Jacklittle01

The very first thing to learn in any situation is THE RULES. And Python has few rules such as Indentation, Style and.. that you need to learn first. def some_function(): #some notes here while some_condition: if some_other_condition: some=process+here else: some=other*process+here

Member Avatar for Jacklittle01
0
137
Member Avatar for toyotajon93

Using the SL4A is a simple and good choice, for securing your script you can Compile it as a *.pyc file and run it from another script via importing it. Or, you can make an apk file and then pass it toyour friends. i think installing SL4A and Py4A is …

Member Avatar for M.S.
0
152
Member Avatar for HTMLperson5

if you want it to work with every site,I guess you need to consider the encoding too: print sourcecode.decode("utf8")

Member Avatar for M.S.
0
172
Member Avatar for TrustyTony

I dont know why but extend adds 'devide' as another list to oper. I couldn't find "extend" function for lists! Strange and amazing, using new line in second example somehow works like a "+" opperator. but fails when we use a variable instead of a string. the below works as …

Member Avatar for snippsat
1
185
Member Avatar for HTMLperson5

from os import path PATH = "folder_path/file.txt" if path.exists(PATH) and path.isfile(PATH): print "File does exist" else: print "File doesn't exist!"

Member Avatar for HTMLperson5
0
2K
Member Avatar for sinnebril
Member Avatar for sinnebril
0
204
Member Avatar for salina786

I'm not familiar with AT commands, but, what if you use a longer time.sleep()? because those commands are very fast and phone needs more time to respond.

Member Avatar for salina786
0
296

The End.