Re: Test a list

2013-03-20 Thread Joel Goldstick
int "Test1" > > else: > >print "Test2" > > What is missing here for this script work? > > Thank you all > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re:

2013-03-23 Thread Joel Goldstick
, by adam gomaa > > Sincerly yours, > I just googled him. He has several repositories and also a facebook page. Why not see if you can contact him directly > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: i need advice

2013-03-24 Thread Joel Goldstick
best regards > Start here: http://www.python.org/about/help/ and especially http://wiki.python.org/moin/BeginnersGuide Everyone learns in their own way so keep trying different resources until you find what works best for you. > > leonardo > -- > http://mail.python.org/mailma

Re: Help with zip in a Python exercise

2013-03-26 Thread Joel Goldstick
at all > > Thanks. > Bill Lugg > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: From Perl to Python: restructuring a HPC workflow

2013-03-27 Thread Joel Goldstick
t you, remember that if perl > is old, C/Fortran are older. > There are options today for rewriting the whole system, such as > haskell and julia http://julialang.org/ > > WARNING: If the Spolsky warning above for perl->python is X units, > take it 2X for Haskell and 4X for Julia! > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQLdbd error. Perhpas it isn't installed?

2013-03-27 Thread Joel Goldstick
ndex.html' in > 'where clause'") > [/code] > > > loook at http://superhost.gr please to see the whoel traceback > -- > http://mail.python.org/mailman/listinfo/python-list > You should print the sql statement to see what is being created. Create the sq

Re: Help printing the integers of a longer number

2013-03-28 Thread Joel Goldstick
a string and use a for loop to iterate over each item > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: No errors displayed but i blank scren nstead.

2013-03-29 Thread Joel Goldstick
u have problems you will be able to come back here and ask more informed questions, and likely will get more willing help. good luck -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: While loop help

2013-04-09 Thread Joel Goldstick
a lot of duplicated code here, most notably your continuation > condition. You can simply back-tab after the elif block and have some > code that reunites all the branches; this would also make things > clearer" > > Thanks for your reply and if you have any ideas for me to improve my > coding that will prevent me from learning python in a sloppy way. I'd like > to learn it correctly the first time! > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: While loop help

2013-04-09 Thread Joel Goldstick
ue as is any string that isn't empty. Empty sequences are considered false (Tuples, lists) > while (x<3) > { > if () > else () > } > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Ubuntu package "python3" does not include tkinter

2013-04-19 Thread Joel Goldstick
rcase 'T' for versions prior to V3.0 >>> import tkinter # no underscore, lowercase 't' for V3.0 and later -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: shmid = shmget(SHM_KEY, SHM_SIZE, 0o666) - syntax error.

2013-04-30 Thread Joel Goldstick
t] > shmat.restype = c_void_p > > shmid = shmget(SHM_KEY, SHM_SIZE, 0o666) > if shmid < 0: > print "System not infected" > else: > addr = shmat(shmid, None, 0) > > f = file(OUTFILE, 'wb') > f.write(string_at(addr,SHM_SIZE)) > f.close() > > print "Dumped %d bytes in %s" % (SHM_SIZE, OUTFILE) > > > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: how to compare two fields in python

2013-04-30 Thread Joel Goldstick
You should study the csv module. > Thanks in advance.. > > Upendra > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Streaming pdf with URLLib

2009-05-22 Thread Joel Goldstick
I think you misspelled 'Content-Disposition' Aahz wrote: In article <04eacd56-5293-4553-bdb3-ad2e8266c...@z7g2000vbh.googlegroups.com>, Scooter wrote: #!/usr/bin/python import urllib u = urllib.urlopen('https://myinternal.server/pdfs/pdfstreamer.aspx') print 'Content-type: application/pdf\n

test message

2009-05-26 Thread Joel Goldstick
I'm wondering why I couldn't post here. I read the email list, not from the newsgroup -- http://mail.python.org/mailman/listinfo/python-list

Re: covert number into string

2010-01-21 Thread Joel Goldstick
anusha k wrote: Hi, Can anyone tell me how to convert number to words For example: If number = then it should give me *Nine thousand nine hundred ninetynine* Is there any build-in function or something that can do this for me Thank you in advance Anusha Kadambala This might help: http:

Re: Simple if-else question

2009-09-29 Thread Joel Goldstick
Sandy wrote: Hi all, A simple and silly if-else question. I saw some code that has the following structure. My question is why else is used there though removing else has the same result. More important, is it not syntactically wrong :-( for i in xrange(8): if i < 4: print i else:

Re: Printing forms and labels in Python

2010-06-13 Thread Joel Goldstick
;t come up with much... either I'm really not using the right search terms, or physical printing is a black hole/art...? TIA, Monte Why not go the other direction. Use python to do your processing, and send the results to excel. There are python modules that read and write excel files.

Re: Printing forms and labels in Python

2010-06-13 Thread Joel Goldstick
n to users without the need to install. It also makes it totally platform agnostic Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: Accumulate function in python

2010-07-19 Thread Joel Goldstick
Peter Otten wrote: dhruvbird wrote: I have a list of integers: x = [ 0, 1, 2, 1, 1, 0, 0, 2, 3 ] And would like to compute the cumulative sum of all the integers from index zero into another array. So for the array above, I should get: [ 0, 1, 3, 4, 5, 5, 5, 7, 10 ] What is the best way (

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Joel Goldstick
o speed on it, but it lets you set up multiple 'virtual environments' for python to do exactly what I think you are asking about Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: Replace and inserting strings within .txt files with the use of regex

2010-08-08 Thread Joel Goldstick
e job in a program environment. The discussion so far has dealt with stripping php, and leaving the html. But the html must have embeded ?> in it. Or, there could be long fragments of html which are constructed by php and then echo'ed. Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: I need a starter ptr writing python embedded in html.

2010-08-08 Thread Joel Goldstick
are going is django or another (perhaps smaller) framework. Since you say you are good with python, you could get your website done in a weekend Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: # of Months between two dates

2010-08-08 Thread Joel Goldstick
Greg Lindstrom wrote: I work for a company that processes claims for the health care industry (Novasys Health, recently purchased by Centene Corp). My current assignment has me writing a routine to compute insurance premiums. One of the requirements is to determine how many months a policy has

Is there a similar mailing list about django?

2009-09-13 Thread Joel Goldstick
I'm learning python and django more or less concurrently. I've googled to find a similar list like this for django. Help? Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a similar mailing list about django?

2009-09-13 Thread Joel Goldstick
Andreas Waldenburger wrote: On Sun, 13 Sep 2009 15:54:07 -0400 Albert Hopkins wrote: On Sun, 2009-09-13 at 21:27 +0200, Andreas Waldenburger wrote: Didn't like http://groups-beta.google.com/group/django-users ? (Second hit for "django mailing list", but I know Google results vary from countr

Re: Find closest matching string based on collection of strings in list/dict/set

2010-08-31 Thread Joel Goldstick
pyt...@bdurham.com wrote: I'm parsing a simple, domain specific scripting language that has commands like the following: *page, *title, *text, *footer, etc. There are about 100 of these '*' commands. When we see a command that we don't recognize, I would like to find the closest match possible (f

Re: Problems with scripts

2017-02-13 Thread Joel Goldstick
t that price? ") > while price or how_many != "done": > total_price = int(total_price) + int(price) > total_items = int(total_items) + int(how_many) > item_num = item_num + 1 > price = input("What is the price of item number " + str(item_num) + &

Re: Who are the "spacists"?

2017-03-17 Thread Joel Goldstick
ndentation, > did such attemps take place? > -- > https://mail.python.org/mailman/listinfo/python-list This is not a useful conversation. It has been had over and over in the past. Some people like tabs, some like spaces. In python you can use either, but you must stick to one

Re: Who are the "spacists"?

2017-03-20 Thread Joel Goldstick
first to post that this topic would go nowhere. 77 posts later, for some reason the word 'spaceist' bothers me. Why do people debate spaces versus tabs? I don't think it has to do with spaces or tabs, but something more sociological or psychological. -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: PEOPLE! PLEASE! [ WAS: Re: Who are the "spacists"? ]

2017-03-25 Thread Joel Goldstick
worth the name, makes it a non issue (since it can > convert between one and the other, Eclipse/LiClipse comes to mind). Get > real, and think before you post/send! > > -- > Gilmeh > -- > https://mail.python.org/mailman/listinfo/python-list +1 -- Joel Goldstick http://

Re: Escaping confusion with Python 3 + MySQL

2017-03-26 Thread Joel Goldstick
ng at all and it still > produces > ProgrammingError(1064, "You have an error in your SQL syntax; check the > manual that corresponds to your MariaDB server version for the right syntax > to use near '(pagesID, host, ref, location, useros, browser, visits) VALUES > (1, 'cyta.gr', '' at line 1") > > I think that Ian Kelly is right and it has soemthign to do with the databse > wrapper not substituting properly the actual string contain in the LIKE > clause between the double quotes. > > Perhaps i need to change pymysql with some other database interface or there > is something other than that? > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Quick questions about globals and database connections

2017-04-05 Thread Joel Goldstick
e') >> 17 updatedb('postgres') >> 18 >> 19 if __name__ == "__main__": >> 20 main() >> - >> >> > > -- > https://mail.python.org/mailman/listinfo/python-list You may have an indentation problem that isn't apparent in your code pasted here. Are you sure that dbconnect always returns something? -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Joel Goldstick
y on topic. > > Isn't this list content moderated by anyone? > > -Jim > Plus 1 to Jim. Come on gang! Back to python! Spaces vs. tabs anyone? -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: I have a encountered a new problem.

2017-05-01 Thread Joel Goldstick
te the traceback -- most people (all?) won't see the image you added here -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: I need help with making my claculator

2017-05-20 Thread Joel Goldstick
webpage before answering: > > http://sscce.org/ > > It is written for Java programmers, but it applies to Python too. > > Thank you. > > > > -- > Steve > Emoji: a small, fuzzy, indistinct picture used to replace a clear and > perfectly comprehensible word.

Re: In which order many functions are executed in a python code

2017-06-09 Thread Joel Goldstick
pposite, for instance, some parameters or outputs from the second function >> are called in the first one even thou they are not global, any hints ? >> > Maybe if you post some specific code it will be easier to see what Functions are run in the order in which they are called

Re: Need python script to get last 6 month's monthly billing

2017-08-08 Thread Joel Goldstick
s://mail.python.org/mailman/listinfo/python-list > You haven't asked a question. It is doubtful someone here would write code for you. In any case your problem isn't well stated. Why don't you show the code you have written, and explain where it fails? -- Joel Golds

Re: Redirecting input of IDLE window

2017-08-14 Thread Joel Goldstick
rn more. It displays information like help does in a python environment, but you can also redirect it to a file -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: A small quiz question

2017-08-16 Thread Joel Goldstick
ef f(i): print(i); return i; > > f(4)**f(1)**f(2) > > > -- > https://mail.python.org/mailman/listinfo/python-list > That's a nice problem for order evaluation. I guessed wrong. -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Multiplication

2024-04-01 Thread Joel Goldstick via Python-list
; a = 2 > > b = 3 > > print( a * b ) > > I guess the operator "*" can be imported from any module... :-) > > bye, > > -- > > piergiorgio > > -- > https://mail.python.org/mailman/listinfo/python-list >>> a = 3 >>> b = 5 >>> print(a*b) 15 >>> No import is necessary. -- Joel Goldstick -- https://mail.python.org/mailman/listinfo/python-list

<    3   4   5   6   7   8