:$PATH
export PATH
--
Jerry
On Oct 14, 10:37 am, "veracon" <[EMAIL PROTECTED]> wrote:
> Long story short, in order to use Python 2.5, I've compiled it in my
> own account on my hosting. It works fantastic as
> /home/my_username/python2.5, but the shebang is a bit long.
f):
return self._val
def setval(self, val):
assert(isinstance(val, int))
self._val = val
_val = property(self.getval, self.setval)
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
Replace the conv function call with locale.localeconv.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
Did you install it with the --install-scripts command line option? If
you did, then there will be a ipython script located in the
$INSTALL_SCRIPTS/bin directory. If you didn't, then I think the
default location is /usr/lib/python or something like that.
--
http://mail.python.org/mailman/listinf
y it and understand what circumstances my solution works and
what the recommended construct actually is.
> May I kindly suggest that you learn more about properties and test your
> code before posting ?-)
I did test this on Python 2.4.3 in Mac OS X 10.4 and it worked fine.
--
Jerry
--
http://m
rans(invalid_chars, replace_chars)
>>> filename = "abc123.txt"
>>> filename.translate(charmap)
'123123.txt'
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
Okay, very well, then I put a couple of extra 'self' identifiers in
there when I hand-copied the code over. That would be my mistake for
letting my fingers do the walking and forgetting my brain. Is there
anything else wrong with my code?
--
Jerry
--
http://mail.python.org/mailma
ouldn't be reliable as in the case of PDF's and Adobe
Acrobat Reader, the user could close the document, but not the
application, so your script would never delete the file in question.
If anyone can think of a way to do this, it would be interesting to see
how it's done.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
ing to solve. Can anyone please point me to a general
discussion of decorators (preferrably explained with Python)?
Thanks,
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
gramming is PHP, Perl and Python and to my
knowledge only Python supports decorators (though it could be that I
just didn't encounter them until I came across Python).
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
r
os.exec()? If you are running a program that is a console program
(i.e. copy, move, del, etc...) then it will open up a command window to
run it. If that is the case, then you can try using the os.popen()
utility instead.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
Glad I could help.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
import os
print os.path.dirname(os.path.abspath(__file__))
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
Very inelegant, but you get the idea:
counter = 0
f = open("test.txt")
for line in f.readlines():
if line[0] != "$" and counter < 2:
counter += 1
continue
else:
print line,
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
t it needs to
run.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
e extending.
Again, I am not a guru and a read through the docs on python.org would
probably be the best place to get sound technical advice on these
subjects.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
I would probably go with an SQLite database to store your information.
You can have the contacts listed in a table with unique ids, then a
table of labels. Finally, create a table that links one or more labels
with each contact. Then you can just keep adding more labels.
--
http://mail.python
This really isn't the place to ask what is wrong with code that isn't
Python, especially of someone else's website. There is absolutely no
way for us to tell what is happening on the server side. You should
contact the maintainer of the site and let them know you are having
prob
Can anyone tell me if the telnetlib module is thread-safe? I've done
some looking, but don't know, and I don't know how to tell from reading
the module code.
--
http://mail.python.org/mailman/listinfo/python-list
success or fail based on the results).
I just want to make sure that telnetlib is safe for this.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
Great, thanks for the info.
--
http://mail.python.org/mailman/listinfo/python-list
ything that seems to relate to this.
Details:
All are binary distributions for Windows running on Windows XP SP2
ActivePython 2.4.3 Build 12
wxPython 2.6.3.3 (ansi) for Python 2.4
py2exe 0.6.5
Any ideas?
Thanks in advance.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
jean-michel, I'm at work at the moment and can't post with attachments.
I will do so once I get home.
jean-michel bain-cornu wrote:
> I'd like to reproduce your crash, could you post a sample ?
--
http://mail.python.org/mailman/listinfo/python-list
http://www.heiselman.com/MultiSSH.zip
--
http://mail.python.org/mailman/listinfo/python-list
andrew,
I would try looking into Windows automation with Python.
http://www.google.com/search?q=windows+automation+python should get
you started. The winGuiAuto package may help you out as it is like
have a human click and move throughout the interface. The only
downside is that there is no reco
I would probably start with a look at popen. With it you can make your
call to cscript and capture the output. Then, you don't need to set
any environment variables.
On Jan 24, 1:26 pm, "Rich" <[EMAIL PROTECTED]> wrote:
> I am writing my first python script and I'm guessing this is something
> o
ot
gotten it to work).
--
Jerry
On Jan 24, 10:25 pm, "NoName" <[EMAIL PROTECTED]> wrote:
> perl -ane "print join(qq(\t),@F[0,1,20,21,2,10,12,14,11,4,5,6]).qq(\n)"
> file.txt
>
> -a autosplit mode with -n or -p (splits $_ into @F)
> -n assume "while
d this post into a
commercial for Python. I hope that I've left you with enough ideas to
get started in the language.
--
Jerry H
--
http://mail.python.org/mailman/listinfo/python-list
I have used Eclipse+PyDev in the past. I don't use the debugger though
and don't find the outline all that useful, so now I just use the
PythonWin interface that comes with the ActiveState Python
distribution.
Another one that I've heard lots of people seem to like is Stani's
Python Editor (SPE).
l?
Thanks,
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
I did look at cx_Freeze at one point in time, but the documentation on
their site is pretty sparse and doesn't actually mention being able to
build for a different platform. I'll take another look. Thanks.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
That depends on your OS. In Windows, I believe you would have to
recompile Python from source. On Linux, you could probably just get a
package. From Debian, I know that it's python-ssl. I'm sure most the
others would have one as well.
--
Jerry
--
http://mail.python.org/mailma
Expressions (which I think is a must have for any
language even though it focuses on Perl).
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
is that I can't really afford to run around and experiment, so I
was hoping for some helpful comments or suggestions on how to research, or
where to look, or how to recruit.
If this has already been a topic of the list, I would appreciate any
pointers.
Thanks, Jerry
--
http://mail.pytho
Hi Terry,
Thank you for taking the time to respond. I enjoyed 7 weeks in Barcelona two
springs ago, but I think I would pick a different city to live. Yes, I am
talking about relocating full or part-time for myself, but a small fulltime
location.
Thanks, Jerry
-Original Message-
From
This one threw me for a loop as well. I looked at that gfx file for a
whole day before I finally understood what was in it. I only knew to
separate it into five piles because of the hint forums though. I guess
I'm not intuitive enough. :)
I too did this challenge without PIL. Just remember th
John,
If you are really frustrated with this one (like I was on 14), email me
off-list to get further hints. I'm willing to help you out.
I wish that someone was around to help me work through some of these.
I really think they are more fun/helpful when you work on them with
another person so if
So, this would be like .Net or Mono, but for KOffice? Kind of like
AppleScript then?
Sorry, just starting to learn about some of this stuff (CLI, CLR, CIL,
etc...) and am interested in understanding better.
--
http://mail.python.org/mailman/listinfo/python-list
Awesome, thanks for the explaination. It was very informative.
--
http://mail.python.org/mailman/listinfo/python-list
er object, told it to read in ~/my.cnf, the asked for the value
of section 'client', option 'mmz'. The error indicates that your config
files doesn't have a section named 'client'.
What is the content of your ~/my.cnf file?
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
) [MSC v.1500 32 bit (Intel)]
on win32
>>> f = "{} {} {}"
>>> v = "1,2,3"
>>> print(f.format(*eval(v)))
1 2 3
>>>
The * unpacks the tuple returned from eval(), so that you get 3 separate
parameters passed to format(), instead of the single tuple.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
n32\lib\json\decoder.py", line 351, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Python32\lib\json\decoder.py", line 367, in raw_decode
obj, end = self.scan_once(s, idx)
File "", line 5, in json_checker
raise ValueError("Duplicate key %r in json document" % key)
ValueError: Duplicate key 'x' in json document
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
> language have a continue that can go to the next iteration of an outer
> loop?)
Bash:
continue: continue [n]
Resume for, while, or until loops.
Resumes the next iteration of the enclosing FOR, WHILE or
UNTIL loop.
If N is specified, resumes the Nth enclosing loop.
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
nating IP address and look it up in a
geolocation database or submit it to a geolocation service and get the
response back from them. It's not stored in any environment
variables.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
#x27;re accidentally importing the pyglet package from the
local directory instead of from the proper location in dist-packages.
Try changing back to your home directory and trying this again. I
think you're picking up the code from
~/Desktop/pyglet-1.2alpha1/pyglet instead of from
/usr/local/lib/python3.3/dist-packages.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
guys don't use Facebook, you have a life ..
Can someone please point me in the right direction..
Thanks in advance,
Jerry
On Fri, Jun 22, 2012 at 4:28 PM, Jerry Rocteur wrote:
> Hi,
>
> I've done a bit of searching on this but I can find nothing really up to
> date and a
about doing it.
Can someone please put me in the right direction.
Thanks in advance,
--
Jerry Rocteur
je...@rocteur.com
Contact me: Google Talk/jerry.roct...@gmail.com, Skype/rocteur
--
http://mail.python.org/mailman/listinfo/python-list
>
>
> > > (Among our points are such diverse elements as... wrong Pythons, but
> whatever.)
> >
> > > There's no official Python-Facebook module (afaik!!), but a quick web
> > > search for 'python facebook' should get you to the couple that I saw,
> > > and possibly others. The next question is, do
ls turned on so I can see the
alerts, even when they pop up in another screen.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
r code directly from the command line?
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
;they" know this and provided
> all the complementary packages to circumvent this. It was
> in 199? (Python was not even born).
>
> Ditto for the foundries (Adobe, Linotype, ...)
I don't understand what any of this has to do with Python. Just
output your text in UTF-8 like any civilized person in the 21st
century, and none of that is a problem at all. Python make that easy.
It also makes it easy to interoperate with older encodings if you
have to.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
edia.org/wiki/Web_host
3 http://en.wikipedia.org/wiki/Virtual_private_server
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
writing to, why
bother? I know I certainly have no desire to spend any time at all on
your problem when you say things like that. Perhaps you're looking
for for the argument clinic instead?
http://www.youtube.com/watch?v=RDjCqjzbvJY
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
the thread has been commenting on the OP's choice of
python version and operating system. That's not exactly on topic, but
the original question was answered in the very first response.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
those arrays (what you're getting
from str(x_dates), etc) include the '...' in the middle instead of the
full contents.
Am I close?
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
t for trying to explain python fundamentals in
several different ways. Sometimes explaining the same idea in
different words helps people understand the concept better.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
e can help you, including the
specific documentation of the DLL you're trying to wrap, your
platform, and python version. If you are not permitted to share those
things, we may not be able to give you much help. Ctypes is very
specific to the actual library you are accessing, and requires th
imented with the very first bit of example code in the
documentation? What do you get if you do the following at the
interactive interpreter?
>>> from ctypes import *
>>> print windll.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
have your CPU sitting
idle, rather than continuing with whatever code is waiting to be run?
I'm having a hard time understanding what problem you might be having
that some combination of setting the nice level and imposing resource
limits won't handle.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
b service is going to have to
authenticate with the remote web site. The details of that
authentication are going to vary with each remote web site you want to
connect to.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
rity of a process, though it's a
little different from the *nix niceness level. See
http://code.activestate.com/recipes/496767/ for a recipe using
pywin32. I believe the psutil module handles this too, but I don't
think it manages to abstract away the platform differences.
ons, or money transfer, or whatever, be done on
the server, and just pass back the results.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
general TOS document.
That said, I am not a lawyer. If you want legal advice, you'll need
to pay a lawyer for that advice.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
x27;str' object has no attribute 'contains').
If that isn't what you're seeing, you'll need to provide the full and
complete text of the error you are getting, and preferably enough of
your code that we can reproduce the issue and help you solve it.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
> So does anyone know of a way to do this? Unfortunately, I've tried
> some searching but google doesn't like the term klog, and most of the
> hits involved injecting code or other things that are not related at
> all.
>
> Or, if there's a better way to get ac
ce from python's
interactive interpreter. I think that could shed a lot of light on
the behavior you're seeing.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
a maximum length of 79 characters per line, and
that's probably what PythonTidy was trying to accomplish by splitting
your line.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
"while/else".
That's always been my opinion too. I'd remember how the construct
worked if it was for/then (and while/then). Since seeing for/else
always makes my brain lock up for a few seconds when I'm reading code,
I don't bother using it.
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
man being behind the keyboard.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
sensor_a_buffer, as recommended by the PEP 8 style guide).
>if sensorbenable:
>sensorresult = re.search(r'\$A.*\$.*', self.sensorbenable)
>
here, you're not searching in the buffer, but in the enable flag.
>if sensorcenable:
>
in why you see different answers in
different environments.
Does that explain the behavior you're seeing?
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Jan 24, 2012 at 11:05 AM, Jerry Hill wrote:
> So, my guess is that emacs is mangling your HOME environment variable.
> That appears to be confirmed by the emacs documentation here:
> http://www.gnu.org/software/emacs/manual/html_node/emacs/General-Variables.html#General-Variable
quot; you could end up
with three different answers: "H:\", "\\server\share\userdirectory",
or "C:\Documents and Settings\username" all seem like valid candidates
to me. Just going by HOMEPATH isn't going to be helpful if I were to
run your code though.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
icrosoft.com/en-us/library/dd900818.aspx )
You could, in theory, make requests to Google just like a web browser
and parse the resulting HTML, but that tends to be fragile and prone
to break. I believe it also violates Google's Terms of Service.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
ef, obj.myname)
If you're creating lots of instances of A and deleting them, it would
probably be worth removing the old weakrefs from the _instances set instead
of just ignoring them when calling update().
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
now what particular behavior a
subclass might need to override, so a lot of times people don't bother to
write their classes to check for subclasses being passed in, etc.
Since you haven't actually shown us any code, that's about all I can tell
you.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
By the way, i like 1.exe, can i have it?
在 2012年2月18日 上午6:01,Jugurtha Hadjar 写道:
> On 16/02/2012 01:34, Jugurtha Hadjar wrote:
>
>> Hello gentlemen,
>>
>> I'm writing these words to give you a heads up. My computer has recently
>> been infected with "1.exe", and I am doing what I can to contain i
hon2.7
> Files python and python2.7 are identical
> $
>
> I'm just curious: Why two identical files rather than a symlink?
It's not two files, it's a hardlink. You can confirm by running ls
-li python* and comparing the inode numbers.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Feb 23, 2012 at 2:34 PM, HoneyMonster wrote:
> On Thu, 23 Feb 2012 14:24:23 -0500, Jerry Hill wrote:
>> It's not two files, it's a hardlink. You can confirm by running ls -li
>> python* and comparing the inode numbers.
>
> You are spot on. Thank you, and s
magination. What would you do with such a thing?
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
o another pages...etc)
>
> Did you look at Selenium?
> http://seleniumhq.org/
You might also be interested in Sikuli (http://sikuli.org/), which
uses Jython to write scripts to automate other programs using
screenshots. It's pretty neat if you need to automate a GUI that is
otherwise
the firefox window to pop up on the ssh server
machine if you allow it to interact with the desktop, assuming that's
what you're trying to do.
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
h are not cheap applications.
X Servers for windows aren't expensive pieces of software anymore.
XMing is quite good, and free. Cygwin also has an X server, but
Cygwin always seems like too much of a hassle to me.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
from http://www.gpg4win.org/download.html
>
> why ?
Probably because you opened the file in text mode, instead of binary
mode. Try opening the file this way:
f=open('c:\gpg4win-2.1.0.exe','rb')
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
unfindable on google? Certainly nothing on the first two pages of
google results for 'python codeblocks' jumps out at me as a python
module of that name.
Perhaps you would have better luck if you either post the actual code
you want people to critique, or posted a link to that code.
--
J
ant "%A %p, %B %d".
That is, Full Weekday Name, followed by the AM/PM marker, then a
comma, then the Full Month Name and the day of month.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
ly I've just seen "see other side", or (very occasionally) "see
reverse" and "see obverse".
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
... a call of aa() somewhere in the body of bb
> ...
>
>
> Whatever the order of definition of aa and bb the problem remains, one of the
> two identifiers is not known ...
This works just fine in python, exactly as you've written it. What's
the actual problem yo
'12')
> Decimal('49')
I'm curious. Is there a way to get the number of significant digits
for a particular Decimal instance? I spent a few minutes browsing
through the docs, and didn't see anything obvious. I was thinking
about setting the precision dynamically within a function, based on
the significance of the inputs.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
re
python libraries written for python 2.x that don't have 3.x versions,
and they've all worked just fine with just a quick run through the
2to3 process. I can't speak for larger libraries, or ones with lots
of compiled code, but my experience with 2to3 has been great.
--
Jerry
--
http:
x27;t have an idle.py or idle.pyw in C:\Python26\Lib\idlelib\
(or where ever you installed python)? If not, it sounds to me like
your python installation is screwed up. I would re-install.
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Jul 27, 2011 at 3:34 PM, W. eWatson wrote:
> On 7/27/2011 9:48 AM, Jerry Hill wrote:
>> So, you don't have an idle.py or idle.pyw in C:\Python26\Lib\idlelib\
>> (or where ever you installed python)? If not, it sounds to me like
>> your python installation
renaming) the
whole C:\Users\Wayne\idlerc folder. Idle should re-build anything it
needs if it's not there when you start up.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
hat post was by the original
poster, or that it was irrelevant. It seems to me that it
demonstrated exactly the behavior Eldon was complaining about as a
normal part of the operation of lots of normal unix programs. Thomas
even said that in the very first line of his post (after the quoted
bit).
3/iterators-iterables-and-generators-oh-my/
seems to cover the differences between iterables, iterators, and
generators pretty well.
Some more reading:
http://docs.python.org/howto/functional.html
http://www.python.org/dev/peps/pep-0255/
http://www.python.org/dev/peps/pep-0289/
--
Jerry
--
http:
ch = msvcrt.getch()
print (ch)
for a bit more information, do this instead:
import msvcrt
ch = msvcrt.getch()
print(type(ch), repr(ch), ord(ch))
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
you may be getting.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
"bar1": "/usr/local/bar/bar1.txt",
"bar2": "/home/joe/logs/bar2.log",
}
for item in list_of_strings:
filename = mapping[item]
do_something(filename)
(Untested)
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
ne please tell me how to avoid this error .
>
It looks to me like that should be pyudev.QUDevMonitorObserver, shouldn't
it?
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
1 it tries to close stdin then raises SystemExit().
Does that maybe explain the behavior you're seeing? I didn't go
digging in 2.7, which appears to be what you're using, but I think you
need to explore the differences between sys.exit() and the builtin
exit() functions.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 472 matches
Mail list logo