Re: Python for philosophers

2013-05-11 Thread Joel Goldstick
with) showing back the > most shortened expression of that data? > > Don't get me wrong. I can see the big picture and the amazing things that > programmers write on Python, it's just that my question points to the > lowest level of it's existence. > > Thanks a lot for your time. > > -- > http://mail.python.org/mailman/listinfo/python-list > > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Encodign issue in Python 3.3.1 (once again)

2013-05-28 Thread Joel Goldstick
. > > I have, i see no error, the error appears only when i append the charset > directive into the connector, if i remove it the error dissapears. > -- > http://mail.python.org/mailman/listinfo/python-list > http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect Could this be

Re: Python #ifdef

2013-05-28 Thread Joel Goldstick
No On May 28, 2013 3:48 PM, "Carlos Nepomuceno" wrote: > Are there Python 'preprocessor directives'? > > I'd like to have something like '#ifdef' to mix code from Python 2 and 3 > in a single file. > > Is that possible? How? > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://

Re: Python #ifdef

2013-05-28 Thread Joel Goldstick
eason that I must. Its not just print() -- that isn't bad, but changes in module names (urllib), arithmetic, and unicode especially make this idea in general, very tricky. Pity the next developer who needs to try to maintain it. So, maybe you CAN do it, but SHOULD you want to do it? -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Apache and suexec issue that wont let me run my python script

2013-06-04 Thread Joel Goldstick
g/mailman/listinfo/python-list > reading this thread is like slowing down to see the car wreck on the other side of the highway. I think I feel bad for the people who are paying to host their stuff on the OP server. But maybe they get what they deserve. -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Source code to identify user through browser?

2013-06-05 Thread Joel Goldstick
request object that contains information about the user (ip address, and lots of other stuff). Maybe that will help you. -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: I just wrote my first Python program a guessing game and it exits with an error I get this.

2013-06-05 Thread Joel Goldstick
am.py You will run your program and get an error message from python. You can get rid of the error message by using try/except, but you may not have learned about that yet. good luck -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Apache and suexec issue that wont let me run my python script

2013-06-05 Thread Joel Goldstick
that wrong* about me, what makes you think you can > judge someone else safely? > > ChrisA > -- > http://mail.python.org/mailman/listinfo/python-list > To solve the OPs problems once and for all, I believe we need to know his social security number and his mother's maiden na

Re: Apache and suexec issue that wont let me run my python script

2013-06-05 Thread Joel Goldstick
6, 2013 at 4:55 AM, rusi wrote: > > If you obdurately, obstinately, insistently, incessantly behave like > > an asshole, you leave no-one the choice but to treat you like an > > asshole. > > This is Python. We duck-type people. > > ChrisA > -- > http:

Re: I just wrote my first Python program a guessing game and it exits with an error I get this.

2013-06-05 Thread Joel Goldstick
taking classes on this nor do I have a >> book I followed a guy on You Tube. I am a student but I heard Python is a >> good language to learn in conjunction with C++ and Perl for example. I have >> taken Visual Basic 2010 last semester so keep thinking for me if you like >&g

Re: Redirecting to a third party site with injected HTML

2013-06-09 Thread Joel Goldstick
rd party without permission. At any rate, how is this a python question? -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Redirecting to a third party site with injected HTML

2013-06-09 Thread Joel Goldstick
> > > > > hints :) > > > > > > > > > > regards, > > > > > Guy > > > > What web framework are you using? > > > > This does not seem like a python question, instead a HTML/JavaScript one. > -- > http://mail.python.org/mailman/listinfo/python-list > unless you hack into 3rd party, you can't alter that site -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Apache and suexec issue that wont let me run my python script

2013-06-12 Thread Joel Goldstick
t; > I've half a mind to take you up on your offer, then go look for > > > > personal and private info from your clients, and email it to them > > > > (along with a link to this thread) to point out what's going on. > > > > > > > > ChrisA

Re: My son wants me to teach him Python

2013-06-12 Thread Joel Goldstick
m my experience of building Python, that's not difficult. > > [1] http://www.greenteapress.com/thinkpython/ I think, but DNS on this > computer is broken at the moment so I can't verify that link > > ChrisA > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrong website loaded when other requested

2013-06-12 Thread Joel Goldstick
u03ba\\u03b1\\u03c4\\u03ac\\**u03bb\\u03bf\\u03b3\\u03bf\\**u03c2: > '/home/nikos/public_html//**home/dauwin/public_html/index.**html', > referer: http://superhost.gr/ > [/code] > > > Notice that you have the file path you want concatenated to your /home/ni

Re: Version Control Software

2013-06-12 Thread Joel Goldstick
many developers work on > the same code base). Git and hg have ben vying for several years with > no clear winner, yet > > -- > MarkJ > Tacoma, Washington > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrong website loaded when other requested

2013-06-13 Thread Joel Goldstick
th the other. Somewhere in your SFBI mess of code you perhaps have set the nikos path as the start of a filename. Check that out DID YOU READ THIS? DID YOU THINK ABOUT IT. Also look up SFBI. It is a good name for you > [/code] > On Wed, Jun 12, 2013 at 4:35 PM, Joel Goldstick wrot

Re: Wrong website loaded when other requested

2013-06-13 Thread Joel Goldstick
On Thu, Jun 13, 2013 at 2:10 PM, Nick the Gr33k wrote: > > > Τη Πέμπτη, 13 Ιουνίου 2013 7:52:27 μ.μ. UTC+3, ο χρήστης Νικόλαος Κούρας > έγραψε: > > On 13/6/2013 6:35 μμ, Joel Goldstick wrote: > > > >> [Tue Jun 11 21:59:31 2013] [error] [client 79.103.41.173] >

Re: Creating a Super Simple WWW Link, Copy, & Paste into Spreadsheet Program

2013-06-13 Thread Joel Goldstick
it... row after row of hyperlinks all in one column... > > Please, please help me my wrist is starting to hurt a lot. You would have > my greatest appreciation for your help! > > thank you, Buford > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Gold

Re: Don't feed the troll...

2013-06-14 Thread Joel Goldstick
inary representation as a number" >> >> Hold on. > > number = an abstract sense > numeral = ? > notation = ? > represenation = ? > > > -- > What is now proved was at first only imagined! > -- > http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list> > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: A few questiosn about encoding

2013-06-14 Thread Joel Goldstick
of its corresponding ordinal value since it > doesn't get involved into the encoding process? > > Thank you very much for taking the time to explain. > > -- > What is now proved was at first only imagined! > -- > http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list> > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: A few questiosn about encoding

2013-06-15 Thread Joel Goldstick
t; -- > What is now proved was at first only imagined! > -- > http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list> > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Python to automatically boot my computer at a specific time and play a podcast

2013-06-16 Thread Joel Goldstick
likely python could handle that. > > CND > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Python to automatically boot my computer at a specific time and play a podcast

2013-06-16 Thread Joel Goldstick
then you might need another computer attached to a robot arm that could push the on button first! > > > > -- > Steven > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't feed the troll...

2013-06-17 Thread Joel Goldstick
g), then go learn about those things. If you are unwilling to do that, then go away. If you think its best to help this person, and be kind to him, and encourage him to become a better citizen, please remember that being inviting to a person who ruins the party for everyone is not being respectful of everyone else. All the while monopolizing many threads >From my perspective there seems to be some interesting people here with a wide array of experience and knowledge, whose understand and opinions I find fun and useful to read. All of that is drowned out by the freight train from superhost.gr -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Joel Goldstick
address) >>> >>> is the above correct? >>> >> >> When you interpret Python code, do you put data in locations with >> integer addresses? >> > > I lost you here. > > > > -- > What is now proved was at first only imagined! > -

Re: Problems with Python documentation [Re: Don't feed the troll...]

2013-06-17 Thread Joel Goldstick
u could start one so you would have local help and back and forth (fourth?). I think its great to read a question here and get a link for an answer. gives me somewhere to go explore more. If you reject these ways of learning for the single method of asking.. fix my code. Then you will ne

Re: A Beginner's Doubt

2013-06-19 Thread Joel Goldstick
ow to use it without having any basic knowledge of how to write a computer program. I'm not a teacher, but personally this seems like a really idiotic way to teach a student to learn how programming works. I think that you should write a text on first term calculus in french, or maybe in ch

Re: Making a pass form cgi => webpy framework

2013-06-25 Thread Joel Goldstick
rs, and how difficult (or easy!) it is to use. If webpy has a similar tutorial, I would start there, or try django. After the tutorial, the discussion becomes a lot more concrete and less theoretical as to whether that platform would be helpful -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Limit Lines of Output

2013-06-25 Thread Joel Goldstick
use a Google search > yielding nothing. > > Any insight would be appreciated. Thanks! > -- > http://mail.python.org/mailman/listinfo/python-list > If you are using linux, you should look up the comand 'less'. It allows you to page thru a test file. You can either write y

Re: Limit Lines of Output

2013-06-25 Thread Joel Goldstick
put to a text file, then use a text editor to view results? -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: FACTS: WHY THE PYTHON LANGUAGE FAILS.

2013-06-28 Thread Joel Goldstick
IAL INTELEGENT ROBOT PROGRAMS NOT SO BRAIN DAMAGES, >> OR SO SLAVERY AS C/C++ OR ASEMBLY PARTS. >> > > Best. Post. EVER. > In the 'general' category? or by a 'bot'? > > -W > -- > http://mail.python.org/**mailman/listinfo/python-

Re: FACTS: WHY THE PYTHON LANGUAGE FAILS.

2013-06-28 Thread Joel Goldstick
preciate -- he comes > up with spookily accurate gems one day and then hilarious nonsense the > next. One could with all the spammers were bots - they seem to post > less too. > > Alas, Dihedral is in a class of his own. > -- > http://mail.python.org/mailman/listinfo/python-li

Re: How to make a web framework

2013-06-28 Thread Joel Goldstick
t; Real (i.e. statistical) tennis and snooker player rankings and ratings: > http://www.statsfair.com/ > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

python adds an extra half space when reading froma string or list -- back to the question

2013-07-01 Thread Joel Goldstick
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 1 2 3 4 5 21 2 3 4 3 3 4 5 6 >#as you can see many numbers are between the lines of a normal print# #I thought this was due to "white space" int he format .So I tried a list of strings and got the same results.# -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Geo Location extracted from visitors ip address

2013-07-05 Thread Joel Goldstick
side from that you might have some permission problems since the file is owned by root. You should go back to old threads where this issue was explained. As was also pointed out, you only get information about where your isp is located. Phones and tablets find location from triangulating cell towers. I don't think that laptops have that capability, and desktops probably even less likely. What is the purpose that you wish to serve. I don't think you've thought this through. > > >>> > > > > -- > What is now proved was at first only imagined! > -- > http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list> > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Geo Location extracted from visitors ip address

2013-07-05 Thread Joel Goldstick
On Fri, Jul 5, 2013 at 9:10 PM, Νίκος Gr33k wrote: > Στις 6/7/2013 3:56 πμ, ο/η Joel Goldstick έγραψε: > >> >> Your code is not finding /root/GeoIPCity.dat because your directory has >> this file: GeoLiteCity.dat >> >> FileNotFoundError: [Errno 2] No s

Re: Geo Location extracted from visitors ip address

2013-07-08 Thread Joel Goldstick
ved was at first only imagined! > -- > http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list> > Google shows lots of results. This one might work for you: http://freegeoip.net/ -- Joel Goldstick http://joelgoldstick.com -- http://mai

Re: the general development using Python

2013-07-08 Thread Joel Goldstick
on.org/mailman/listinfo/python-list > Why do you want to use python? It isn't a language that can be packaged as an executable. Who are these people who you make software for who need to have a single file? -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Stack Overflow moderator “animuson”

2013-07-10 Thread Joel Goldstick
; > > my_obj = SomeKoolClass() > my_obj.modify_in_some_kool_**way() > new_result = sum([SKC1, SKC2, SKC3], my_obj) > > Guess what? You've just changed my_obj. > > -- > ~Ethan~ > -- > http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list> > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: UTF-EBCDIC encoding?

2013-07-12 Thread Joel Goldstick
python.org/mailman/listinfo/python-list> > I can't help you. I'm astonished. Trying to imagine the work environment where this technology would be necessary -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: UTF-EBCDIC encoding?

2013-07-12 Thread Joel Goldstick
I remember the AS400 series.. although I never worked with one. What kind of business still use that stuff? Is it for large corporation accounting, MIS stuff? -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread Joel Goldstick
#x27;t want to help because it doesn't help you solve your stated problem. Your stated problem is done. move on. > -- > What is now proved was at first only imagined! > -- > http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list> > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Understanding other people's code

2013-07-12 Thread Joel Goldstick
nce has been involved in reading and fixing or updating lots of other peoples code -- most less documented than would be nice. So my def of good code is code with good descriptive docstrings -- at the top level even before documenting the details. Its nice to know where the developer's head w

Re: Ideal way to separate GUI and logic?

2013-07-14 Thread Joel Goldstick
s been well understood that you always end up throwing away the first system anyway. It has to be built to truly understand what you think you want to create, but in the learning, you realize that its easier and better to start more or less from scratch rather than try to fix the first concept.

Re: GeoIP2 for retrieving city and region ?

2013-07-15 Thread Joel Goldstick
y cases the ISP has a physical link to your machine. But why should they provide that to you? After all you are not their customer. It might be fun to know, but the repercussions are serious. -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Dihedral

2013-07-15 Thread Joel Goldstick
s > their goal. We should feel honored that Dihedral's botmaster feels that > this mailinglist would benefit the development of Dihedral's knowledge. > > Devyn Collier Johnson > -- > http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list> > I particularly enjoy the misspellings, that seem to be such a human quality on email messages! -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: GeoIP2 for retrieving city and region ?

2013-07-16 Thread Joel Goldstick
here a way to pass Javascript's outcome to my Python cgi script > somehow? > > Can Javascript and Python Cgi somehow exchnage data? > > -- > What is now proved was at first only imagined! > -- > http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.o

Re: Homework help requested (not what you think!)

2013-07-16 Thread Joel Goldstick
it introduces the concept of open source which is really a key to a large segment of the whole software world, so that gives another teaching moment -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python HTTP POST

2013-07-17 Thread Joel Goldstick
uot; > > -- > http://mail.python.org/mailman/listinfo/python-list > Many people find urllib and urllib2 to be confusing. There is a module called requests which makes this stuff a lot easier. ymmv http://docs.python-requests.org/en/latest/ -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Share Code Tips

2013-07-19 Thread Joel Goldstick
ATA, flags=re.I); DATA = > re.sub(''**, '♜', DATA, flags=re.I); DATA = > re.sub(''**, '♝', DATA, flags=re.I); DATA = > re.sub(''**, '♞', DATA, flags=re.I); PTRNPRS = > re.sub('', '♟', DATA, flags=re.I

Re: How to tick checkboxes with the same name?

2013-07-22 Thread Joel Goldstick
would > help me with how to handle this question. The code is available here: > view-source:http://zakupki.gov.ru/pgz/public/action/contracts/search/ext/enter > -- > http://mail.python.org/mailman/listinfo/python-list Have you tried a[0], a[1], etc. for the names? -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: import syntax

2013-07-29 Thread Joel Goldstick
> > Devyn Collier Johnson > devyncjohn...@gmail.com > -- > http://mail.python.org/mailman/listinfo/python-list I think its just for clarity -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP8 79 char max

2013-07-29 Thread Joel Goldstick
om > -- > http://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Script that converts between indentation and curly braces in Python code

2013-07-31 Thread Joel Goldstick
am guesses the only purpose for this would be that you would convert them back to proper indentation in the copied to environment. So then you have to figure out a way to do that. > -- > http://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -

Re: Script that converts between indentation and curly braces in Python code

2013-07-31 Thread Joel Goldstick
So, why do you want to do this? As has been pointed out, its a difficult and likely sizable task to build such a parser. In the end you get something that isn't a computer language -- even tho it looks like one. And it also is probably just as big a job to convert it back to python. So, what is

Re: Diagramming code

2012-07-16 Thread Joel Goldstick
w about pydoc? Its a great way to get a handle on your modules. It doesn't make diagrams, but a synopsis of what is in the module. It makes use of docstrings, for the module and each class and function in the module. -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: shutil ignore fails on passing a tuple?

2012-07-19 Thread Joel Goldstick
df', 'Symmetry.pdf']) >>>> >>>> > ++++ > Why does it fail on passing in a tuple of ignore strings? I thought the , > (comma) is pretty much the tuple constructor (if that is the right word). > > How can I solve this? Is there a way to convert a tuple of strings in a form > that will be accepted? > > Thank you in advance, > Alex van der Spek > > > -- > http://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: from future import pass_function

2012-07-26 Thread Joel Goldstick
d out that pass is a syntax construction that is necessary in the very seldom case where you create a block of code that has no instructions. Instead of braces for every block, you get to skip that in python and just put pass in this extraordinary little case. While I've come to the point

Re: How to convert base 10 to base 2?

2012-08-20 Thread Joel Goldstick
B(10) > ' 1010' >>>> I2B(1238) > ' 010011100110' >>>> I2B(-6) > '-0110' >>>> > -- > Wulfraed Dennis Lee Bieber AF6VN > wlfr...@ix.netcom.comHTTP://wlfraed.home.netco

Re: help me debug my "word capitalizer" script

2012-08-22 Thread Joel Goldstick
thon-list Go into your python shell and type help(str) or lookup the documentation on the python site about strings http://docs.python.org/library/string.html There are methods to tell if a word is all caps, or if the first letter is capitalized -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: Objects in Python

2012-08-22 Thread Joel Goldstick
doesnt seem to be as > well put together as Java. Can anyone help with this problem? > -- > http://mail.python.org/mailman/listinfo/python-list It looks like you didn't add parens to the end of your call. Show us your code. with the traceback -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: writelines puzzle

2012-08-22 Thread Joel Goldstick
.3 > OS-X 10.8 > > Thanks, > Bill > -- > http://mail.python.org/mailman/listinfo/python-list writelines writes a list of strings to a file. you are using this: > stat = wd.writelines(str(x_dates[:i])) which is the same as my second line below If you use map it will perform the

Re: What do I do to read html files on my pc?

2012-08-27 Thread Joel Goldstick
is enough information to know where in the html your strings will be. If you just read the whole file into a string you can do this: >>> s = "this is a string" >>> if 'this' in s: ... print 'yes' ... yes >>> Of course you will be testing for '' or 'NOT PASSED' -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie ``print`` question

2012-09-02 Thread Joel Goldstick
gt; > Is there a way to stop this? Or is there a different function that > will only print what you have in the formatted string? You can do it with string formatting. My example shows 'old style' string formatting syntax. There is a newer style. You can learn about both from th

Re: python docs search for 'print'

2012-09-04 Thread Joel Goldstick
.org/mailman/listinfo/python-list That's pretty interesting. I always use google python and get very results. Not a correction for what you think isn't working well on python.org (I think I agree)., but if your friend is looking to learn, my suggestion works great -- Joel Goldstick

Re: Setting up a class

2012-09-06 Thread Joel Goldstick
thon.org/mailman/listinfo/python-list You should take the smallest snippit of your code that shows your problem and copy it here along with traceback where it fails. Java is not python and vice versa, so some of your ideas will be confused for a while -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie question About O'Reilly "Python for Unix and Linux System Administration" ftp Mirror question

2012-09-16 Thread Joel Goldstick
> parser.add_option("-l", "--local_dir", dest="local_dir", > action='store', help="Local starting directory") > parser.add_option("-d", "--delete", dest="delete", default=False, > action='store_true', help="use regex parser") > > (options, args) = parser.parse_args() comment the next line , then print the parameters and see what they are. That should get you started. > #f = FTPSync(options.host, options.username, options.password, > #options.remote_dir, options.local_dir, options.delete) f = print(options.host, options.username, options.password, options.remote_dir, options.local_dir, options.delete) > f.run() > > -- > http://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: Obnoxious postings from Google Groups (was: datetime issue)

2012-09-16 Thread Joel Goldstick
`\you I did not have C++ in mind.” —Alan Kay, creator of | >> >> _o__)Smalltalk, at OOPSLA 1997 | >> >> Ben Finney > > > If i ditch google groups what application can i use in Windows 8 to post to > this newsgroup and what newsserver too? > -- > http://mail.python.org/mailman/listinfo/python-list email client to python-list@python.org -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: Obnoxious postings from Google Groups (was: datetime issue)

2012-09-16 Thread Joel Goldstick
p.lang.python no? > > What is python-list@python.org how can i post there? > -- > http://mail.python.org/mailman/listinfo/python-list go to the url http://mail.python.org/mailman/listinfo/python-list sign up and use your email client instead. -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: Docstring parsing and formatting

2012-09-18 Thread Joel Goldstick
#x27;t looked at its source, but since it does a great job of printing documentation from docstrings it might contain what you need -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: sum works in sequences (Python 3)

2012-09-19 Thread Joel Goldstick
hon-list Help on built-in function sum in module __builtin__: sum(...) sum(sequence[, start]) -> value Returns the sum of a sequence of numbers (NOT strings) plus the value of parameter 'start' (which defaults to 0). When the sequence is empty, returns start. ~ -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: How to apply the user's HTML environment in a Python programme?

2012-09-21 Thread Joel Goldstick
/requests-python-http-module.html) Check those out > > Best regards, > Bob > -- > http://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: How to apply the user's HTML environment in a Python programme?

2012-09-21 Thread Joel Goldstick
gure out how you want to get the username/password from your 'friends' and add that in. Also look up Beautiful Soup (version 4) for a great library to parse the pages that you retrieve > > Bob > -- > http://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: Algorithms using Python?

2012-09-21 Thread Joel Goldstick
azon.com/Python-Algorithms-Mastering-Language-Experts/dp/1430232374 -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: trying to unsubscribe

2012-10-02 Thread Joel Goldstick
-list > Go here http://mail.python.org/mailman/listinfo/python-list and look for unsubscribe near the bottom -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: How to print html in python the normal way

2012-10-04 Thread Joel Goldstick
t;. Again, these are just a few examples; see the built-in filter reference for the complete list. -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: How to create a login screen using core python language without using any framework

2012-10-05 Thread Joel Goldstick
ed to display individual records I imagine. Do you need to edit them after they are created? How are you going to manage the accounts? Will you create them? Will you let the visitor create an account? Where will you store the account information? Do different accounts have different permis

Re: How to call python script from web.

2012-10-05 Thread Joel Goldstick
list A popular way for apache is to use mod_wsgi. http://code.google.com/p/modwsgi/ -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: how to build Object for List data

2012-10-08 Thread Joel Goldstick
did you try so far? > -- > http://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on Windows

2012-10-16 Thread Joel Goldstick
ws.html or google windows xp setting python path > > GC > > -- > http://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: Quickie - Regexp for a string not at the beginning of the line

2012-10-26 Thread Joel Goldstick
> >>> >>> You can't always have a universal solution because different PE >>> implementations have different syntax and semantics, but you should be >>> able to translate Janis's solution of matching *something* before your >>> target into every RE implementation around. >>> >>>> examples >>> >>> >>>> $hello$ should not be selected but >>>> not hello but all of the $hello$ and $hello$ ... $hello$ each one >>>> selected >>> >>> >>> I have taken your $s to be literal. That's not 100 obvious since $ is a >>> common (universal?) RE meta-character. >>> >>> >>> -- >>> Ben. >> >> > > -- > http://mail.python.org/mailman/listinfo/python-list I would use str.find('your string') It returns -1 if not found, and the index if it finds it. why use regex for this? -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: Difference between range and xrange ??

2012-11-05 Thread Joel Goldstick
? And which should be used where and in what situations.. ?? > > -- > http://mail.python.org/mailman/listinfo/python-list > > -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to creat a func that returns a cursor that can be used?

2012-11-12 Thread Joel Goldstick
hin the function disappears when the function ends. Read about python namespaces to learn more. So, you need to return the cur value in your function by using this statement: return cur Then when you call connect() is will return the cur value. You have to name it like this: cur = connect() You should go to python.org and read the tutorials, specifically about functions. good luck -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: Error

2012-11-14 Thread Joel Goldstick
st): > File "Z:\modules\classification2.py", line 74, in > ComputeClasses(data) > File "Z:\modules\classification2.py", line 56, in ComputeClasses > dist = distance(centre, point) > UnboundLocalError: local variable 'centre' referenced before as

Re: Migrate from Access 2010 / VBA

2012-11-29 Thread Joel Goldstick
ks, David, for all the helpful insights. I really appreciate the > time you took to reply. Thanks to everyone who pitched in. You've > given me a lot to think about. > > Keith > -- > http://mail.python.org/mailman/listinfo/python-list > This looks promising: http://www.codediesel.com/data/migrating-access-mdb-to-mysql/ -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: open URL in the current tab

2012-12-10 Thread Joel Goldstick
new> . > Thanks, > > Laszlo > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with print and output to screen

2012-12-11 Thread Joel Goldstick
t; > > The script is: > > #!/usr/bin/python > import os > > for user in open ("email"): > print '/opt/zimbra/bin/zmprov ga ' + user + '|egrep > "(zimbraPrefMailForwardingAddress:|zimbraPrefMailForwardingAddress:)" ' > > > > Thanks > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with print and output to screen

2012-12-11 Thread Joel Goldstick
On Tue, Dec 11, 2012 at 6:00 PM, Dave Angel wrote: > On 12/11/2012 05:53 PM, Joel Goldstick wrote: > > When you read the file line by line the end of line character is included > > in the result > > > > try user[:-1] instead to strip the return from your printed text &

Re: Python, email temperature

2012-12-22 Thread Joel Goldstick
nyone know why the program claims that cpu_temperature isnt defined, > when it is? > You should copy and paste the code here including the context around the error. You say print cputemp works, but cpu_temperature is not defined. They are spelled differently. Start there > > Thanx! &

Re: noob can't install python modules/scripts

2012-12-29 Thread Joel Goldstick
gt; beautifulsoup.py that should be in the C:\Python27\Lib\site-packages > directory, but I've found no such thing from the installation anywhere in > the Python folder (funnily enough, I did a drive search with Everything and > found a BeautifulSoup.py in my autodesk maya installation) > > am I somewhere near the mark? or am I off completely? > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: dict comprehension question.

2012-12-29 Thread Joel Goldstick
structed, that's just not a design goal > of comprehensions. > Would this help: >>> w = [1,2,3,1,2,4,4,5,6,1] >>> s = set(w) >>> s set([1, 2, 3, 4, 5, 6]) >>> {x:w.count(x) for x in s} {1: 3, 2: 2, 3: 1, 4: 2, 5: 1, 6: 1} >>> > -m > > > -- > Lark's Tongue Guide to Python: http://lightbird.net/larks/ > > -- > http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list> > -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: dict comprehension question.

2012-12-29 Thread Joel Goldstick
gt; which should gather all the statistics in one single pass across "w" > making it O(N), and it's Pythonically readable. > > -tkc > > I like this too. I haven't learned about collections module yet. Thanks for the pointer > > > -- > http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list> > -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: ignore case only for a part of the regex?

2012-12-30 Thread Joel Goldstick
t; > What's the use-case for this? > > The way I would typically do something like this is build my regexes in > all lower case and .lower() the text I was matching against them. I'm > curious what you're doing where you want to enforce case sensitivity i

Re: Beginner: Trying to get REAL NUMBERS from %d command

2012-12-30 Thread Joel Goldstick
("Enter a number: "); > print number, "will be divided by 2 then added by 5!"; > print " %d divided by %d is %d plus %d is... %d !" > %(number,2,number/2,5,number/2+5); > > > > > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: How do you call a function several times in this context??

2013-01-06 Thread Joel Goldstick
ber: is_even_digit(n) # this function should test the number and print what you want for odd and even #This will pass each digit to your function. I renamed your function to reflect better python naming conventions -- Joel Goldstick -- http://mail.python.org/mailman/listinfo/python-list

Re: Forcing Python to detect DocumentRoot

2013-01-16 Thread Joel Goldstick
by forcing Python to detect > DocumentRoot by itself? > -- > http://mail.python.org/mailman/listinfo/python-list > I don't think I understand your question. But, I think your answer is here: http://docs.python.org/2/library/os.path.html -- Joel Goldstick http://joelgoldstick.com -- h

Re: Forcing Python to detect DocumentRoot

2013-01-16 Thread Joel Goldstick
On Wed, Jan 16, 2013 at 9:32 AM, Ferrous Cranus wrote: > Τη Τετάρτη, 16 Ιανουαρίου 2013 4:01:07 μ.μ. UTC+2, ο χρήστης Joel > Goldstick έγραψε: > > On Wed, Jan 16, 2013 at 8:51 AM, Ferrous Cranus > wrote: > > > > When trying to open an html template within Python script

Re: Forcing Python to detect DocumentRoot

2013-01-17 Thread Joel Goldstick
work you're using? Can you post some code that's not working for > you? > -- > http://mail.python.org/mailman/listinfo/python-list > Import os Then read os.environ['HOME'] This will give you the home directory of the user. in my case: >>> os.environ['HO

Re: Forcing Python to detect DocumentRoot

2013-01-18 Thread Joel Goldstick
On Fri, Jan 18, 2013 at 8:02 AM, Ferrous Cranus wrote: > Τη Πέμπτη, 17 Ιανουαρίου 2013 5:14:19 μ.μ. UTC+2, ο χρήστης Joel Goldstick > έγραψε: > > On Thu, Jan 17, 2013 at 9:09 AM, Roy Smith wrote: > > > > In article <339d9d6d-b000-4cf3-8534-375e0c44b...@googlegroups.com

  1   2   3   4   5   6   7   8   >