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
.
>
> 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
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://
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
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
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
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
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
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:
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
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
> >
> > > 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
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
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
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
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
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
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]
>
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
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
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
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
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
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
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
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!
> -
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
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
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
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
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
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-
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
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
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
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
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
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
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
;
>
> 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
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
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
#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
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
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.
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
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
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
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
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
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
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
>
> 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
om
> --
> http://mail.python.org/mailman/listinfo/python-list
--
Joel Goldstick
http://joelgoldstick.com
--
http://mail.python.org/mailman/listinfo/python-list
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
-
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
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
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
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
B(10)
> ' 1010'
>>>> I2B(1238)
> ' 010011100110'
>>>> I2B(-6)
> '-0110'
>>>>
> --
> Wulfraed Dennis Lee Bieber AF6VN
> wlfr...@ix.netcom.comHTTP://wlfraed.home.netco
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
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
.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
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
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
.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
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
> 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
`\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
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
#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
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
/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
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
azon.com/Python-Algorithms-Mastering-Language-Experts/dp/1430232374
--
Joel Goldstick
--
http://mail.python.org/mailman/listinfo/python-list
-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
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
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
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
did you try so far?
> --
> http://mail.python.org/mailman/listinfo/python-list
--
Joel Goldstick
--
http://mail.python.org/mailman/listinfo/python-list
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
>
>>>
>>> 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
? 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
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
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
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
new>
.
> Thanks,
>
> Laszlo
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Joel Goldstick
--
http://mail.python.org/mailman/listinfo/python-list
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
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
&
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!
&
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
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
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
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
("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
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
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
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
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
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 - 100 of 741 matches
Mail list logo