On 8/30/2024 3:18 PM, Simon Connah via Python-list wrote:
I need to write a script that will take some user input (supplied on a website)
and then execute a Python script on a host via SSH. I'm curious what the best
options are for protecting against malicious input in much the smae way a
> On 30 Aug 2024, at 23:28, dn via Python-list wrote:
>
> Me email (only) client shows a thread of 12 messages.
>
> The OP was @Gilmeh Serda (from an invalid email address). That appears in the
> email thread
>
> @Stefan Ram has had two contributions quoted, but
On 8/30/24 15:28, dn via Python-list wrote:
> The OP was @Gilmeh Serda (from an invalid email address). That appears in the
email thread
>
> @Stefan Ram has had two contributions quoted, but no such original-message
has appeared in the thread.
I can't speak about the archives,
Ethan Furman writes:
> On 8/30/24 15:28, dn via Python-list wrote:
>> The OP was @Gilmeh Serda (from an invalid email address). That appears in
>> the email thread
>>
>> @Stefan Ram has had two contributions quoted, but no such original-message
>> has appeared
On Friday, 30 August 2024 at 23:35, Thomas Passin via Python-list
wrote:
>
>
> On 8/30/2024 3:18 PM, Simon Connah via Python-list wrote:
>
> > I need to write a script that will take some user input (supplied on a
> > website) and then execute a Python scrip
PicklingError: Can't pickle : it's not found as
__builtin__.module
anybody could provide an alternative to call the function do_something() in
a separate thread ?
--
https://mail.python.org/mailman/listinfo/python-list
> On 2 Sep 2024, at 15:00, marc nicole via Python-list
> wrote:
>
> I am using Python 2.7 on Windows 10
Why? Install Python 3.12 and it will be easier to get help and support.
If you have legacy that still needs porting then you can install 3.12 along side
the unsupported 3
reading the console DID display the messages correctly!
Thanks.
Le mar. 3 sept. 2024 à 10:48, Alan Gauld via Tutor a
écrit :
> On 02/09/2024 15:00, marc nicole via Python-list wrote:
> > Hello,
> >
> > I am using Python 2.7 on Windows 10
>
> Others have pointed out th
this situation I wondered? So I tried:
>>> x,2,z == [1,2,3]
(1, 2, False)
Now that made me laugh.
- Alan
[ Some people reading this will be tempted to explain what's really
going on here -- it's not hard to understand. But please remember that
a joke is never funny if you have to explain it. ]
--
https://mail.python.org/mailman/listinfo/python-list
empted to explain what's really
going on here -- it's not hard to understand. But please remember that
a joke is never funny if you have to explain it. ]
--
https://mail.python.org/mailman/listinfo/python-list
imagine that it would be even
more difficult for readers whose first language is not English.
You also indent your own new text, which is exactly the opposite of
common Usenet conventions. (You've been doing this for a long time.)
Please consider prioritizing your readers' convenience over whatever
benefit you derive from your unconventional posting style.
--
Keith Thompson (The_Other_Keith) [email protected]
void Void(void) { Void(); } /* The recursive call of the void */
--
https://mail.python.org/mailman/listinfo/python-list
o_mock, mock_function2_to_mock
def test_main(mock_dependencies):
some_function()
When some_function is called the real function1_to_mock is called instead
of my mock.
Can someone please let me know how to properly mock these 2 functions.
Thanks!
--
https://mail.python.org/mailman/listinfo/python-list
tware or interest.
-Original Message-
From: Tutor On Behalf Of
Alan Gauld via Tutor
Sent: Tuesday, September 3, 2024 4:41 AM
To: [email protected]
Cc: [email protected]
Subject: Re: [Tutor] Getting a Process.start() error pickle.PicklingError:
Can't pickle : it's not found
fore crashes.
Is it possible to turn on debugging and to display on the console, where
python is loading files from ?
Thank you
--
https://mail.python.org/mailman/listinfo/python-list
> On 4 Sep 2024, at 16:27, Guenther Sohler via Python-list
> wrote:
>
> Is it possible to turn on debugging and to display on the console, where
> python is loading files from ?
>
I assume you have a .app that is then packaged into a .dmg.
It will be the .app that
ere's usually just one executable file in there. Run that
from a shell and you should see anything written to stdout or stderr.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
available soon to help with coding.
Kind regards,
Schimon
On Thu, 5 Sep 2024 04:42:20 -
711 Spooky Mart via Python-list wrote:
> from
> https://www.reddit.com/r/bitmessage/comments/1d5ff18/unofficial_pybitmessage_port_to_run_with_python3/
>
> Unofficial PyBitmessage port to run with
Greetings, 711!
This is very good!
Do you know of Plebbit?
It might be good to interoperate with Plebbit too.
https://plebbit.com/
Kind regards,
Schimon
On Thu, 5 Sep 2024 04:53:05 -
711 Spooky Mart via Python-list wrote:
> from https://github.com/813492291816/BitChan
>
> B
Greetings!
I am interested in adding support for Bitmessage to Slixfeed news bot.
Support is currently provided to XMPP and it will be extended to Email,
IRC and Session.
https://git.xmpp-it.net/sch/Slixfeed
Schimon
On Thu, 5 Sep 2024 04:40:10 -
711 Spooky Mart via Python-list wrote
Good day, 711 Spooky Mart!
Did you consider to add support for IRC or XMPP too?
Best regards,
Schimon
On Thu, 5 Sep 2024 04:47:39 -
711 Spooky Mart via Python-list wrote:
> from https://github.com/kashikoibumi/bmwrapper
>
> bmwrapper is a poorly hacked together python scri
behalf of your friendly release team,
Ned Deily @nad <https://discuss.python.org/u/nad>
Steve Dower @steve.dower <https://discuss.python.org/u/steve.dower>
Pablo Galindo Salgado @pablogsal <https://discuss.python.org/u/pablogsal>
Łukasz Langa @ambv <https://discuss.python.org/u/ambv>
Thomas Wouters @thomas <https://discuss.python.org/u/thomas>
signature.asc
Description: Message signed with OpenPGP
--
https://mail.python.org/mailman/listinfo/python-list
TIP: The transaction might succeed if retried.
2024-08-20 22:17:04 DEBUG gm.logging[140274459512896
MainThread] (/usr/share/gnumed/Gnumed/pycommon/gmLog2.py::log_stack_trace()
#178): with_traceback:
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
--
https://mail.python.org/mailman/listinfo/python-list
On 07/09/2024 16:48, Karsten Hilbert via Python-list wrote:
Dear all,
unto now I had been thinking this is a wise idiom (in code
that needs not care whether it fails to do what it tries to
do^1):
conn = psycopg2.connection(...)
curs = conn.cursor()
try
about the SQL itself
succeeded but then the COMMIT failed due to serialization. I
was wondering about where to best place any needed
conn.commit(). My knee-jerk reaction was to then put it last
in the try: block...
All this is probably more related to Python than to PostgreSQL.
Thanks,
Karsten
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
--
https://mail.python.org/mailman/listinfo/python-list
gmLog2.log_stack_trace()
__safely_close_cursor_and_rollback_close_conn (
curs_close,
tx_rollback,
conn_close
)
raise
if get_col_idx:
col_idx = get_col_indices(curs)
curs_close()
tx_commit()
conn_close()
return (data, col_idx)
#
Best,
Karsten
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
--
https://mail.python.org/mailman/listinfo/python-list
ept: block.
Best,
Karsten
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
--
https://mail.python.org/mailman/listinfo/python-list
.rollback()
Doing an explicit rollback ensures that the transaction is always
rolled back if it is interrupted for any reason.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Am Sun, Sep 08, 2024 at 12:48:50PM +1200 schrieb Greg Ewing via Python-list:
> On 8/09/24 9:20 am, Karsten Hilbert wrote:
> > try:
> > do something
> > except:
> > log something
> > finally:
> > .commit(
Am Sun, Sep 08, 2024 at 12:48:50PM +1200 schrieb Greg Ewing via Python-list:
> On 8/09/24 9:20 am, Karsten Hilbert wrote:
> > try:
> > do something
> > except:
> > log something
> > finally:
> > .commit(
On 07/09/2024 22:20, Karsten Hilbert via Python-list wrote:
Am Sat, Sep 07, 2024 at 02:09:28PM -0700 schrieb Adrian Klaver:
Right, and this was suggested elsewhere ;)
And, yeah, the actual code is much more involved :-D
I see that.
The question is does the full code you show fail?
The
Am Sun, Sep 08, 2024 at 02:58:03PM +0100 schrieb Rob Cliffe via Python-list:
> >Ugly:
> >
> > try:
> > do something
> > except:
> > log something
> > finally:
> > try:
> >
o it's always called.
Good point. Putting the rollback first would be safer/
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
tions are
caught and logged.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Am Mon, Sep 09, 2024 at 01:48:32PM +1200 schrieb Greg Ewing via Python-list:
> That code doesn't inspire much confidence in me. It's far too
> convoluted with too much micro-management of exceptions.
>
> I would much prefer to have just *one* place where exceptions are
>
Am Mon, Sep 09, 2024 at 01:48:32PM +1200 schrieb Greg Ewing via Python-list:
> That code doesn't inspire much confidence in me. It's far too
> convoluted with too much micro-management of exceptions.
It is catching two exceptions, re-raising both of them,
except for re-raisin
back if it is interrupted for any reason.
What if there's an exception in your exception handler? I'd put the
rollback in the 'finally' handler, so it's always called. If you've
already called 'commit' then the rollback does nothing of course.
--
https://mail.python.org/mailman/listinfo/python-list
(non-database-related) exception and that thread of execution is
aborted. The database connection returns to the pool, and is re-used
by another thread which continues using it to perform a different
sequence of operations ... ending in a COMMIT, which commits
one-and-a-half transactions.
--
https://mail.python.org/mailman/listinfo/python-list
uding a program or
> system crash.
If it's a program or system crash, sure, but anything less than that -
how would the database even know, unless the program told it?
--
https://mail.python.org/mailman/listinfo/python-list
Am Mon, Sep 09, 2024 at 10:00:11AM - schrieb Jon Ribbens via Python-list:
> > The database only needs to commit when it is explicitly told. Anything
> > less -- no commit.
>
> So the Python code is half-way through a transaction when it throws
> a (non-database-relate
Am Mon, Sep 09, 2024 at 10:00:11AM - schrieb Jon Ribbens via Python-list:
> So the Python code is half-way through a transaction when it throws
> a (non-database-related) exception and that thread of execution is
> aborted. The database connection returns to the pool,
How does it
On 2024-09-09, Karsten Hilbert wrote:
> Am Mon, Sep 09, 2024 at 10:00:11AM - schrieb Jon Ribbens via Python-list:
>> So the Python code is half-way through a transaction when it throws
>> a (non-database-related) exception and that thread of execution is
>> aborted. Th
>> So the Python code is half-way through a transaction when it throws a
>> (non-database-related) exception and that thread of execution is
>> aborted. The database connection returns to the pool ...
>
> The DBMS connection is deleted.
How does that happen then?
--
https://mail.python.org/mailman/listinfo/python-list
S worth its salt, rollback is
something that happens automatically" and now you're saying it isn't
automatic after all, "you write code to do it". That was my point.
The database provides the tools, but it isn't psychic.
--
https://mail.python.org/mailman/listinfo/python-list
Am Tue, Sep 10, 2024 at 08:38:30AM - schrieb Jon Ribbens via Python-list:
> Ok. So we've moved away from "In any DBMS worth its salt, rollback is
> something that happens automatically"
Nope. The original post asked something entirely different.
> and now you'
On 2024-09-10, Karsten Hilbert wrote:
> Am Tue, Sep 10, 2024 at 08:38:30AM - schrieb Jon Ribbens via Python-list:
>> Ok. So we've moved away from "In any DBMS worth its salt, rollback is
>> something that happens automatically"
>
> Nope. The original pos
n mind. So
> any partial transaction data saved on persistent storage that remains
> after a system crash can be identified as such and discarded, leaving the
> database in its pre-transaction state.
Yes, nobody's disputing that. A good database will do what you tell it,
and keep the data you give it. But what if you tell it the wrong thing
or give it the wrong data? It's like, for example, a RAID array will
save you from a faulty disk, but will not save you from the software
writing incorrect data, which the RAID array will then faithfully copy
across to all the disks overwriting the good data.
--
https://mail.python.org/mailman/listinfo/python-list
case of an exception is completely
> unnecessary: the DBMS will take care of that for you.
No, it won't.
--
https://mail.python.org/mailman/listinfo/python-list
711 Spooky Mart wrote:
PyBitmessage is not dead.
https://bitmessage.org
It may help with looking "not dead" to have a changelog that has
actually changed within the last 8 years?
--
https://mail.python.org/mailman/listinfo/python-list
I tried to install this software python 3.4.3 to my pc which run windows Xp 32.
i could installed but it doesnot run.it gives this message
"python35-32/python.exe isnot a valid win32 app.Please help me to get solved
this problem
Thanks
Aruna
--
https://mail.python.org/mailman/listinfo/p
be more convenient
for me if it were 16."
No. It's 42.;-)
-=- Larry -=-
--
https://mail.python.org/mailman/listinfo/python-list
mechanisms should be used
to ensure the data appears valid.
--
https://mail.python.org/mailman/listinfo/python-list
e installation process failed -
unspecified error, etc.). Could you suggest something? Thanks,Demetris
--
https://mail.python.org/mailman/listinfo/python-list
, then loop through it. This will
guarantee that each color is only used once.
Not quite. Only if the original list has no repetitions.
My personal approach would be to use a set to eliminate the duplicates, convert back to a list
and shuffle that.
no_reps = list(set(LIST))
random.shuffle(no_reps)
print(no_reps) # Or use loop to print one-per-line
-=- Larry -=-
--
https://mail.python.org/mailman/listinfo/python-list
their ASCII representation?
No. The data is returned as raw bytes.
It's the print that is responsible for the way these bytes are _displayed_.
-=- Larry -=-
--
https://mail.python.org/mailman/listinfo/python-list
your first mistake (because the rest is wrong because of this):
READ YOUR INSTRUCTIONS!
It says "Create a function..."
Your 'solution' creates a list.
A list is NOT a function.
-=- Larry -=-
--
https://mail.python.org/mailman/listinfo/python-list
e not found in
['c:\\users\\---\\appdata\\local\\pro
grams\\python\\python35-32\\lib', 'C:\\',
'c:\\users\\---\\appdata\\local\\progr
ams\\python\\python35-32\\libs']
NOT AVAILABLE
How do I download matplotlib and the other packages mentioned in the subject
line?
-Omar Ray
--
https://mail.python.org/mailman/listinfo/python-list
that you just want to do. The state
(data) is not rich enough to make making it the focal point of your program.
Well said, thanks!
--
https://mail.python.org/mailman/listinfo/python-list
adafruit project work.
https://learn.adafruit.com/arduino-lesson-17-email-sending-movement-detector/overview
Thanks,Sam
--
https://mail.python.org/mailman/listinfo/python-list
.
But if this string comes from a program where it is parsed by an API, it IS accepted. And this
has been the case even since MSDOS prior to Windows.
-=- Larry -=-
--
https://mail.python.org/mailman/listinfo/python-list
better tutorial that actually bothers to mention what
it needs to run.
(You have read the tutorial from the beginning, yes?)
Thank you Chris and Steven, I'll see if I can get iPython running and do
a tutorial.
--
https://mail.python.org/mailman/listinfo/python-list
;>> import matplotlib.pyplot as plt
>>> %matplotlib inline
SyntaxError: invalid syntax
What am I doing wrong? Suggested reading?
TIA,
Mike
--
https://mail.python.org/mailman/listinfo/python-list
Perl. It's somewhat old
(2000), but a very interesting read. And probably relevant to your questions.
-=- Larry -=-
[1] Eric S. Raymond
--
https://mail.python.org/mailman/listinfo/python-list
k the longer version is visually
more obviously a line.
-=- Larry -=-
--
https://mail.python.org/mailman/listinfo/python-list
i installed it incorrectly or what.
What am I doing wrong??
Thank you
Russell McCune
--
https://mail.python.org/mailman/listinfo/python-list
Hello,
I'm trying to install the 3.5.1 of Python and am running windows 7. I keep
getting an error about api-ms-win-crt-runtime-|1-1-0.dll not being installed.
Any advice on what is wrong?
--
https://mail.python.org/mailman/listinfo/python-list
ine I got 3.4.4. to work, although I couldn't
figure out how to get IPython notebook to work, so I'm focusing on
getting that to work on my w7 and w10 boxes. Idk if you need Ipython.
--
https://mail.python.org/mailman/listinfo/python-list
n.org/pipermail/python-list/2015-September/697456.html
--
https://mail.python.org/mailman/listinfo/python-list
rt statement is
the one having the problem,
"from scipy.linalg import _fblas"
How do I troubleshoot this? I'm wondering if I have version conflict
between two modules.
Thanks,
Mike
--
https://mail.python.org/mailman/listinfo/python-list
On 2/9/2016 1:33 AM, Mark Lawrence wrote:
On 09/02/2016 04:22, Mike S via Python-list wrote:
I have Python 3.4.4 installed on Windows 7, also IPython, scipy, numpy,
statsmodels, and a lot of other modules, and am working through this
tutorial
http://www.analyticsvidhya.com/blog/2016/02/time
lying that you shouldn't, just offhand I don't see a reason for it.
-=- Larry -=-
--
https://mail.python.org/mailman/listinfo/python-list
to run it with
Cygwin?
I'm not implying that you shouldn't, just offhand I don't see a reason
for it.
-=- Larry -=-
Have you seen this?
http://www.davidbaumgold.com/tutorials/set-up-python-windows/
--
https://mail.python.org/mailman/listinfo/python-list
On 2/10/2016 5:05 AM, Mark Lawrence wrote:
On 10/02/2016 03:39, Mike S via Python-list wrote:
On 2/9/2016 7:26 PM, Larry Hudson wrote:
On 02/09/2016 08:41 AM, Fillmore wrote:
Hi, I am having a hard time making my Cygwin run Python 3.5 (or Python
2.7 for that matter).
The command will hang
indows.
Thanks for explaining, I had no idea what that comment might be based on.
--
https://mail.python.org/mailman/listinfo/python-list
ke his style of
teaching.
Of course, take that as one person's opinion -- and as always, YMMV. :-)
-=- Larry -=-
--
https://mail.python.org/mailman/listinfo/python-list
n that are identical to the features of BASIC. Python requires a different
mind-set to use it properly -- just like any other language.
Here is a rather naive somewhat brute-force way to read your example data. I'm using a Python
list here to simulate the file reading. (Actually, using re
of "Hello World", check out:
http://www2.latech.edu/~acm/HelloWorld.shtml
It's a collection of "Hello World" programs in umpteen languages.
(Well, not really umpteen, but there are a lot of them.) ;-)
-=- Larry -=-
--
https://mail.python.org/mailman/listinfo/python-list
tps://mail.python.org/mailman/listinfo/python-list
rary(s) available to everyone involved in a programming
project. No need for anyone to re-invent the wheel! ;-)Python calls them modules rather
than libraries, but it's the same thing.
-=- Larry -=-
--
https://mail.python.org/mailman/listinfo/python-list
This site was recommended by a friend, it looks really well put
together, I thought it might be of interest to people considering online
tutorials.
http://www.python-course.eu/index.php
--
https://mail.python.org/mailman/listinfo/python-list
https://www.reddit.com/r/IAmA/comments/45g8qu/we_are_the_ligo_scientific_collaboration_and_we/czxnlux?imm_mid=0e0d97&cmp=em-data-na-na-newsltr_20160224
--
https://mail.python.org/mailman/listinfo/python-list
/python-list
Pretty nice example code...
https://ggulati.wordpress.com/2016/02/24/coding-jarvis-in-python-3-in-2016/
--
https://mail.python.org/mailman/listinfo/python-list
Hi python stopped working on this error: The debug process never connected back
to Wing IDE: Aborting debug session. See Trouble-shooting Failure to Debug in
the product manual.
can you please show me how to fix this issue, thanks.
--
https://mail.python.org/mailman/listinfo/python-list
opment time and a GUI is needed, just my preference
based on my experience.
--
https://mail.python.org/mailman/listinfo/python-list
20
Yv2 2002 10
Yv2 2002 10
out put will be
city
xc1 2001 2
xc1 2002 3
yv1 2001 1
yv2 2002 3
Below is my starting code
count=0
fo=open("dat", "r+")
str = fo.read();
print "Read String is : ", str
fo.close()
Many thanks
--
https://mail.python.org/mailman/listinfo/python-list
Theory, each approaches it in
its own way, and each has its own benefits and challenges. This is a perfectly
valid question (and a good one), but don’t let yourself get into the trap of
feeling that Java is the definitive/best/only approach to OO (or Python for
that matter, or C++, or whatever!).
Dan Strohl
>
> Regards,
>
> Ben Mezger
>
> [1] - http://stackoverflow.com/q/4555932
--
https://mail.python.org/mailman/listinfo/python-list
# .split() at whitespace, omits empty fields
>city, year, x = line.split()
># collections.Counter has default 0,
> # key is a tuple (city, year), parentheses omitted here
>counts[city, year] += 1
>
> print("city")
> for city, year in sorted(counts): # iterate over keys
>print(city.lower(), year, counts[city, year], sep = "\t")
>
> # Alternatively:
> # for cy, n in sorted(counts.items()):
> # city, year = cy
> # print(city.lower(), year, n, sep = "\t")
> --
> https://mail.python.org/mailman/listinfo/python-list
--
https://mail.python.org/mailman/listinfo/python-list
u" gives üoo gives ° (degree sign)
Here's a cute one: CCCP gives ☭ (hammer & sickle)
This gives you (relatively) easy access to a large range of 'special'
characters.
--
https://mail.python.org/mailman/listinfo/python-list
ob11 20100210
Bob22 20010107
Bob31 20021021
Bob42 20041117
Alexa2 2 20070120
Alexa3 1 20020511
Alexa4 2 20041126
Alexa5 2 20090715
--
https://mail.python.org/mailman/listinfo/python-list
27;=' and '0' padding are not allowed in string format specifiers"
> -Original Message-
> From: Python-list [mailto:[email protected]]
> On Behalf Of Joel Goldstick
> Sent: Wednesday, March 16, 2016 11:39 AM
> Cc: python-list@p
://mail.python.org/mailman/listinfo/python-list
tError: No module named sas7bdat
What did I miss?
Val
--
https://mail.python.org/mailman/listinfo/python-list
i is not used as an actual index but rather a
line-number. So you can change "enumerate(something)" to "enumerate(something, 1)" to set the
starting number to 1 instead of the default 0, and the lines will be numbered 1, 2 and 3 rather
than 0, 1 and 2.
As always, the choice is
quences
or maps indifferently, and let the code untouched.
--
https://mail.python.org/mailman/listinfo/python-list
ed
much free time. But I suppose I can start with something quick and
dirty.
--
https://mail.python.org/mailman/listinfo/python-list
Has anyone done a recent reviews of creating REST services, in Python?
Regards.
David
--
https://mail.python.org/mailman/listinfo/python-list
rlindrome' is not defined
Thanks,
Don't be embarrassed, everybody does this: You're blind to your own typos...
You define palindrome() then call parlindrome() -- with an extra 'r'.
-=- Larry -=-
--
https://mail.python.org/mailman/listinfo/python-list
-=- Larry -=-
--
https://mail.python.org/mailman/listinfo/python-list
://mail.python.org/mailman/listinfo/python-list
till use Tkinter for a web
app? Do I need to do (use) anything to create cross platform executables or
would running in a
browser make that step not required?
Sorry for the newbie question, but I am obviously looking for a light switch.
Thanks,Bret
--
https://mail.python.org/mailman/listinfo/python-list
4801 - 4900 of 5869 matches
Mail list logo