Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
81% Quality Score
Upvotes Received
8
Posts with Upvotes
8
Upvoting Members
7
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
5 Commented Posts
0 Endorsements
Ranked #517
~43.4K People Reached
Favorite Tags

93 Posted Topics

Member Avatar for zac202020

You need a loop that checks if the user has selected option 4 or rather check that the user hasn't selected 4 in order to continue looping. Give it a try and come back with any questions. Also, use raw_input, not input. input will evaluate the users input as Python …

Member Avatar for Gribouillis
0
4K
Member Avatar for shea279

You're not giving us any information about how you want this to work but the simple solution would be to iterate over the files in the directory with the following as the body of the loop: [CODE=cpp] FtpPutFile(hFtpSession, "C:\\log.txt", "mylog.txt", FTP_TRANSFER_TYPE_BINARY, 0); if(FtpPutFile(hFtpSession, "C:\\log.txt", "mylog.txt", FTP_TRANSFER_TYPE_BINARY, 0)){ MessageBox(NULL, "Successfully uploaded …

Member Avatar for mohd_1
0
1K
Member Avatar for oiwah

[QUOTE=oiwah;844489]pleas help... is it possible that a wxpython program can become a web page??[/QUOTE] Be more specific. I doubt you can do what I think you are asking. You could write the server-side code using wxPython. I'm not sure you would really want to, however.

Member Avatar for TrustyTony
0
190
Member Avatar for Aue
Member Avatar for max.yevs

You might also want to check into the differences between 2.5, 2.6 and 3.0. They aren't a simple progression. It may not be a bad idea for someone just starting out to learn on 2.5; it's what most of the tutorials, examples and libraries you will come across will be …

Member Avatar for carapace
0
175
Member Avatar for frank.zappa

What happens when you forget to run the script or your computer is off one day? I suppose that's one more day of school ;) If you want to calculate the number of days, try something like this: [CODE=python] import datetime graduation_date = datetime.date(2010,8,31) today = datetime.date.today() duration = graduation_date …

Member Avatar for frank.zappa
0
400
Member Avatar for apollo1492

[icode]height = principal * 0.02 TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'[/icode] 0.02 is your float and * is your operand. That only leaves principal to be your NoneType. At another point, you are setting principal equal to the return value of a function that doesn't return anything. …

Member Avatar for apollo1492
0
141
Member Avatar for yemu

You would probably want to make that: [code=python]labels=['yes',"i don't know",'no'] results=[5,60,30] list_3 = zip(results, labels) list_3.sort() print list_3[/code] So that it's sorted based on results rather than labels. But using a dictionary may be a better choice in the first place.

Member Avatar for vidaj
0
2K
Member Avatar for nonang

What do you expect from us? We don't know what "weather" looks like and we aren't going to implement sorting algorithms for you. If you are having trouble, give it your best effort and come back with specific questions.

Member Avatar for jlm699
0
117
Member Avatar for harrykokil

You need to place the label somewhere like you did with the buttons: [code=python]label.grid(row=1, column=2)[/code] Also change: [code=python]while True: if count_flag == False:[/code] To: [code=python]while count_flag:[/code] Although that's not necessary, it's proper use of while loops.

Member Avatar for jlm699
0
117
Member Avatar for Straightone

Here's a simple example: [code=python] def funcA(): var = 1 print var var = funcB(var) print var def funcB(var): #var could be named anything you want var = var + 25 return var funcA()[/code] This will print (I hope, didn't test): [icode] 1 26 [/icode] EDIT: Just to make this …

Member Avatar for adam1122
0
146
Member Avatar for gotm

[QUOTE=sneekula;843752]With huge indentations like you have in your code my editor will go up in smoke! I will let someone else try it first! :)[/QUOTE] Haha. I just tried to run through the execution of the code in my head without trying to follow the logic. It seems to me …

Member Avatar for gotm
0
142
Member Avatar for Trav580

This looks like more of a math problem than a programming problem. Use b for your y-intercept. Anyone that has opened an Algebra book will be familiar with it. y1 = m1x + b1 y2 = m2x + b2 Solve for x and you have an equation you can plug …

Member Avatar for Trav580
0
453
Member Avatar for vidaj

Something like this: [icode]remote.download#CheckerRunner?checker=|EqualityChecker?threshold=5|+|AnotherChecker?threshold=6|[/icode] Or are you looking for help with the code?

Member Avatar for vidaj
0
105
Member Avatar for daviddoria

If that is all of the arguments your program will take, this would be the easiest option: [code=python]import sys for file_name in sys.argv[1:]: print file_name[/code]

Member Avatar for daviddoria
0
197
Member Avatar for daviddoria

You could write your own parser but that doesn't make sense when python standard library provides you optparse ([url]http://docs.python.org/library/optparse.html)[/url].

Member Avatar for jlm699
0
110
Member Avatar for max.yevs

Since you nearly had it, here's a working example with minimal changes to your code with comments where there are changes. [code=python]print ("Perfect Numbers") a = 1 #No need to start at 0 b = [] while True: for n in range(1, a+1): #Start at 1 and remove the check …

Member Avatar for max.yevs
0
207
Member Avatar for jmil2

A None value 3x3 matrix: [code=python][[None]*3]*3[/code] [code=python]def mlist(size): return [0] * size def mmatrix(rows,cols): return [mlist(cols)]*rows[/code]

Member Avatar for adam1122
0
8K
Member Avatar for Stefano Mtangoo

[QUOTE=evstevemd;847909]Yeah, I mean CLOSED SOURCE AND COMMERCIAL So if LGPL allows that and everything is as you have said, choice becomes to user, am I right?[/QUOTE] Just link to the shared library and you're fine with "closed source and commercial." Also, I much prefer Qt.

Member Avatar for NicAx64
0
440
Member Avatar for fearsneachta

EDIT: MrSpigot beat me to the semi-colon bit but the rest applies. You are missing semi-colons in these lines: [code=cpp]float fltBonus float fltMoney[/code] Also you have > in your case statements. You need an if clause to do what you are trying to do. Also, don't use [ICODE]#include<iostream.h>[/ICODE]. Use [ICODE]#include …

Member Avatar for fearsneachta
0
112
Member Avatar for max.yevs

[code=python]len(b)[/code] Will give you the length of b. [code=python]s = 0 for i, value in enumerate(b): s += value[/code] That will give you the sum of all elements in b. You could also do it like this: [code=python]s = 0 for i in range(len(b)): s += b[i][/code] Or: [code=python]sum(b)[/code] ;)

Member Avatar for max.yevs
0
83
Member Avatar for FREEZX

I thought I would throw another solution using recursion out there. Not fully tested but should do the job. [CODE=cpp] int sum_digits(int number) { int remainder = number%10; if (remainder > 0) return remainder+sum_digits((number-remainder)/10); else if (number >= 10 && remainder == 0) return sum_digits(number/10); return number; } bool sum_digits_even(int …

Member Avatar for tux4life
0
1K
Member Avatar for rajasekhar1242

You could use this library: [url]http://www.swftools.org/gfx_tutorial.html[/url] It will let you easily convert a PDF to another image format that you might find easier to print. As for ReportLab, I could be wrong but I don't think it will decode PDFs. It will generate them, however.

Member Avatar for woooee
0
218
Member Avatar for bhanu1225

[QUOTE=bhanu1225;847977]No no... [COLOR="Red"]I have created a sample program using python Tkinter(An application) which is not related to web application. Its Just a stand alone application.[/COLOR] Lets take an example In our PC's, we have "OPEN OFFICE". There is an option for print. Exactly, i need to get the [COLOR="Red"]print option[/COLOR] …

Member Avatar for scru
0
126
Member Avatar for max.yevs

[code=python]import time time.sleep(5.5) #sleep for 5.5 seconds [/code] [code=python]3**2 == 9[/code]

Member Avatar for adam1122
0
107
Member Avatar for -obol-
Member Avatar for jlm699
0
276
Member Avatar for max.yevs

Why are you using [icode]del[/icode] and using a recursive function? Why are you using two variables when you are only keeping track of one number? Try something like this: [code=python] import time a = 0 while True: a += 1 print(a) time.sleep(5) [/code] My recommendation would be that you forget …

Member Avatar for adam1122
0
146
Member Avatar for flip121

Any of your variable names that repeat should be in a container. So instead of T1...T50, you should have a list, T, with 50 elements. While you might consider jlm699's solution to the repetition, it really doesn't address the fact that you have 50 variables that could easily be reduced …

Member Avatar for flip121
0
1K
Member Avatar for LouieAnn

What are the guidelines? How much time do you have? Do you have any areas of special interest or expertise? Basically, we would need more in be any help.

Member Avatar for Nick Evan
0
98
Member Avatar for tschafer204

[icode]\t[/icode] will print a tab. I don't know if that's your best option, not seeing your data.

Member Avatar for tschafer204
0
89
Member Avatar for shiva666

[CODE=python]# find user ( elif choice == "1": import active_directory user_name = raw_input('Enter user name: ") user = active_directory.find_user (user_name) print user[/CODE] You might also want to do some input checking and/or check that the find_user function returns a valid user.

Member Avatar for shiva666
0
97
Member Avatar for shaun.b
Member Avatar for adam1122
0
198
Member Avatar for zublacko

You need to post your code. I don't know what you are asking. You say "specific detail" several times. What does this mean?

Member Avatar for jlm699
0
95
Member Avatar for zublacko

Search for the next " after the one in src=" As a side note, you would be better off using regex or an HTML parser.

Member Avatar for jlm699
0
115
Member Avatar for leegeorg07

Perhaps a little more detail will help with giving you better options. Is it OK for the user to be asked for input and then wait until after they are done to determine if it's past closing time? You could then just ignore the input. If the user must be …

Member Avatar for leegeorg07
0
127
Member Avatar for Esmeralda

Also, when you post the remainder of the code, ask specific questions. You are much more likely to get answers if people know exactly where you are having trouble. Does it not compile, does it not do what you expect (what do you expect?), is there something you need to …

Member Avatar for adam1122
0
128
Member Avatar for gretty

You really need to break this down into simple parts and put them together. This is not the optimized way of doing things but you have stated exactly what you have to do in simple steps: [QUOTE]What I am trying to do is, - break a number (say 85) into …

Member Avatar for adam1122
0
98
Member Avatar for max.yevs

If you want to run something arbitrary: [CODE=cpp]import os os.system('your\path\here') [/CODE] Using the webbrowser module would make more sense for that specific problem, as said above.

Member Avatar for max.yevs
0
123
Member Avatar for matthewsamdanny

[QUOTE=vidaj;845866]Oh, and by the way - don't create multiple threads with the same topic. It doesn't matter if you haven't got any answers yet, multiple threads are a no-go.[/QUOTE] The problem is that he did get a response and still posts multiple times (and probably on other forums) looking for …

Member Avatar for adam1122
0
1K
Member Avatar for starzstar

You're able to use -listContents because it's picking up the -l part. You should be able to replace 'istContents' with anything and get the same results. It's picking up 'istContents' as the option of the argument '-l'. The option parser in Python uses Unix style. Gotta run so I can't …

Member Avatar for adam1122
0
114
Member Avatar for matthewsamdanny

For the first problem, you can use two nested loops using the range function ([url]http://www.network-theory.co.uk/docs/pytut/rangeFunction.html)[/url]. The outer loop would be wind speed and the inner loop would be temperature. Something like this: [CODE=python]for wind in range(...): for temp in range(...): #calculate and display value using wind and temp[/CODE] Of course …

Member Avatar for adam1122
0
186
Member Avatar for tondeuse34

The first thing you do should be to determine if 3.0 is what you want. There are many backwards incompatible changes, as you have found. It's not as simple as moving on to the newest version.

Member Avatar for adam1122
0
66
Member Avatar for Bladtman242

.NET is a framework that can be used from many different languages (C#, C++, VB.NET, Python, etc.). It can be used for just about anything, web development, desktop applications, mobile phone apps, etc.

Member Avatar for Bladtman242
0
422
Member Avatar for nitinmukesh

If you're also looking for a Linux solution, in sys/utsname.h is the function uname. More info here: [url]http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/utsname.h.html[/url]

Member Avatar for nitinmukesh
0
293
Member Avatar for kelechi96

You're more likely to get help if you try to explain it and ask specific questions that trouble you. I have no idea what your level of knowledge is and won't waste my time trying to explain things that you already understand.

Member Avatar for Ancient Dragon
0
139
Member Avatar for guest7

boost::filesystem also provides [icode]remove[/icode] as a portable means to delete a file. [url]http://www.boost.org/doc/libs/1_38_0/libs/filesystem/doc/reference.html#Operations-functions[/url]

Member Avatar for MosaicFuneral
0
171
Member Avatar for mbirame

Try this: [CODE=python]event.where.append(gdata.calendar.Where(value_string=item[3]))[/CODE] You could try this for testing purposes so you don't have to edit your CVS structure: [CODE=python]event.where.append(gdata.calendar.Where(value_string="Home"))[/CODE]

Member Avatar for mbirame
0
1K
Member Avatar for fadia
Member Avatar for karthik.c
0
127
Member Avatar for skhan23

Do what breatheasier said and come back with more specific questions. It would do you no good to have one of us answer theses questions. You'll just get behind as your class moves on. If you really try hard on this and still can't get anywhere, I suggest you speak …

Member Avatar for adam1122
0
101
Member Avatar for cam875
Member Avatar for cam875
0
107

The End.