On 22/05/2025 20:59, Michael F. Stemper wrote:
I recently wrote a program to do some record-keeping for me. I found
myself hard-coding a bunch of different values into it. This didn't
seem right, so I made my first use of configparser.ConfigParser().
Created the configuration file and everything
>
> Trying to compile Python-3.12.9 on Ubuntu-24.04
>
> The compilation is complete without errors but I have this message:
>
>
> The necessary bits to build these optional modules were not foun
🙏
On Tue, Dec 3, 2024 at 5:06 PM Thomas Wouters via Python-list <
python-list@python.org> wrote:
> Another big release day! Python 3.13.1 and 3.12.8 were regularly scheduled
> releases, but they do contain a few security fixes. That makes it a nice
> time to release the security-fix-only versions
>
> (a) An error-prone "feature" is returning -1 if a substring is not found
> by "find", since -1 currently refers to the last item. An example:
>
> >>> s = 'qwertyuiop'
> >>> s[s.find('r')]
> 'r'
> >>> s[s.find('p')]
> 'p'
> >>> s[s.find('a')]
> 'p'
> >>>
>
> If "find" is unsuccessful, an er
On Wed, Aug 21, 2024 at 4:04 PM Daniel via Python-list <
python-list@python.org> wrote:
>
> An example of use, here's a weather service tied to a finger. Put your
> city name as the user. This isn't mine, but it is inspiring. Example:
>
> finger mi...@graph.no
>
> For all options, go to the help f
On Sun, Nov 5, 2023 at 1:23 PM office officce via Python-list <
python-list@python.org> wrote:
> which python version is better to be used and how to make sure it works on
> my window 10 because i downloaded it and it never worked so I uninstall to
> do that again please can you give me the steps
def construct_response(exit_code: int, message: str) -> Response:
>> """
>> Construct a Flask-suitable response
>>
>> :param exit_code: 0 or something else
>> :param message: something useful
>> :return: a Flask-suitable response
>> """
>>
>>
>> @app.route(f"/{version}/", me
And I can answer my own Question 2:
:func:`my_project.main_application.construct_response`
On Mon, Aug 28, 2023 at 1:39 PM Jason Friedman wrote:
> def construct_response(exit_code: int, message: str) -> Response:
>> """
>> Construct a Flask-suitable re
>
> def construct_response(exit_code: int, message: str) -> Response:
> """
> Construct a Flask-suitable response
>
> :param exit_code: 0 or something else
> :param message: something useful
> :return: a Flask-suitable response
> """
>
>
> @app.route(f"/{version}/", methods=
I have two questions, please (this is after reading
https://docs.readthedocs.io/en/stable/guides/cross-referencing-with-sphinx.html#automatically-label-sections
).
This is my project structure:
my_project
api
stuff1.py
stuff2.py
lib
stuff3.py
stuff4.py
main_application.py
I want to be able to write code like this:
with Database() as mydb:
conn = mydb.get_connection()
cursor = conn.get_cursor()
cursor.execute("update table1 set x = 1 where y = 2")
cursor.close()
cursor = conn.get_cursor()
cursor.execute("update table2 set a = 1 where b = 2")
cursor.close()
I'd like
>
> Jason Friedman wrote at 2023-8-3 21:34 -0600:
> > ...
> >my_frame = inspect.currentframe()
> > ...
> >My question is: let's say I wanted to add a type hint for my_frame.
>
> `my_frame` will be an instance of `Types.FrameType`.
>
Confirmed. Th
> My question is: let's say I wanted to add a type hint for my_frame.
> >
> > my_frame: some_class_name = inspect.currentframe()
> >
> > What would I put for some_class_name?
> > "frame" (without quotations) is not recognized,
> > Nor is inspect.frame.
>
> We know Python code is executed in an exec
import inspect
def my_example(arg1, arg2):
print(inspect.stack()[0][3])
my_frame = inspect.currentframe()
args,_,_,values = inspect.getargvalues(my_frame)
args_rendered = [f"{x}: {values[x]}" for x in args]
print(args_rendered)
my_example("a", 1)
The above "works" in the sense it prints what I
I'm writing a database connectivity module to be used by other modules and
leveraging the jaydebeapi module.
>From what I can tell jaydebeapi contains no built-in timeout capability, so
then I turned to https://pypi.org/project/timeout-decorator/.
My goal is to have a default timeout of, say, 10 se
3 at 6:01 PM Greg Ewing via Python-list <
python-list@python.org> wrote:
> On 8/06/23 10:18 am, Jason Friedman wrote:
> > SyntaxError: name capture 'RANGE' makes remaining patterns unreachable
>
> The bytecode compiler doesn't know that you intend RANGE
> to be
This gives the expected results:
with open(data_file, newline="") as reader:
csvreader = csv.DictReader(reader)
for row in csvreader:
#print(row)
match row[RULE_TYPE]:
case "RANGE":
print("range")
case "MANDATORY":
print("mandatory")
case _:
print("nothing to do")
This:
RANGE = "RANGE"
MANDATORY
I'm trying to reconcile two best practices which seem to conflict.
1) Use a _with_ clause when connecting to a database so the connection is
closed in case of premature exit.
class_name = 'oracle.jdbc.OracleDriver'
url = f"jdbc:oracle:thin:@//{host_name}:{port_number}/{database_name}"
with jdbc.c
String(str_value, "utf-8",
"Error ~");
const char **strErrValue* = PyBytes_AS_STRING(pyExcValueStr);
//where *strErrValue* = "ImportError('Error: Reinit is forbidden')"
...
}
What we imported is a Python file which import some pyd libraries.
Thanks
Jason
Import_Import*(pName);
Py_DECREF(pName);
if (pModule == NULL) {
if (*PyErr_Occurred*()) {
handleError("PyImport_Import()");
}
}
}
void handleError(const char* msg)
{
...
"PyImport_Import() - ImportError('Error: Reinit is forbidden')"
}
Awesome, thanks!
On Thu, May 11, 2023 at 1:47 PM Eryk Sun wrote:
> On 5/11/23, Jason Qian via Python-list wrote:
> >
> > in the Python, I have a array of string
> > var_array=["Opt1=DG","Opt1=DG2"]
> > I need to call c library and pass var_arra
_int, ctypes.POINTER()]
In the c code:
int func (void* obj, int index, char** opt)
Thanks
Jason
--
https://mail.python.org/mailman/listinfo/python-list
在 2023/4/15 2:33, angela vales 写道:
Hello All,
I found this small group in a google search, so not sure if it is still active
but giving it a try nonetheless.
I have recently created a tkinter app and need the ability to copy and paste
data from tksheet table into an Excel file. I do have a bu
>
> I want learn python for 4 weeks and have problems, installing Tkinter. If
> I installed 3.11.0 for my windows 8.1 from python.org and type
>
> >>> import _tkinter
> > Traceback (most recent call last):
> >File "", line 1, in
> > ImportError: DLL load failed while importing _tkinter
On Wed, Dec 15, 2021 at 08:19:16PM -0800, Kushal Kumaran wrote:
> On Wed, Dec 15 2021 at 09:38:48 PM, Jason wrote:
> > Hello,
> >
> > How can I find out the exit code of a process when using the
> > subprocess module? I am passing an email message to a shell script and
tried something like this:
e_stat = p.communicate(input=msg)
but the value of e_stat is always '(None, None)'
--
Thanks & best regards,
Jason Rissler
--
https://mail.python.org/mailman/listinfo/python-list
>
>
> Hey All,
>
> I have a set of bash and python scripts that all interact with a remote
> git repository.
>
>
> https://gitpython.readthedocs.io/en/stable/reference.html?highlight=cache#git.index.fun.read_cache
> https://pypi.org/project/git-credential-helpers/
>
> But neither means appears to h
> Hey All,
>
> I have a set of bash and python scripts that all interact with a remote
> git repository.
>
This does not exactly answer your question, but whenever I have wanted to
interact with (popular) software via Python I have checked to see if
someone has already written that code for me.
h
eason
not to adopt pyproject.toml...and the topic thus became weirdly
political.
I understand that Brett Cannon intends to bring this up at the next
language summit, but, ah, might as well put the community two-cents in
now, hey?
I, for one, feel like this is obvious.
--
Jason C. McDonald (CodeMo
e the aforementioned on further inspection. (But I don't know
all cases either.)
> I do agree asking people to simply not be stupid doesn't seem to work
> these days for whatever reason.
I hadn't noticed. ;)
--
Jason C. McDonald (CodeMouse92)
Author | Speaker | Hacker | Time Lord
--
https://mail.python.org/mailman/listinfo/python-list
SS
> person is ever called for any possibly disrespecting words or
> behavior. A fluffy cloud echo chamber where everybody just accepts
> and respects you for what you are. Does the concept sound familiar?
>
>
> P.S.: *NOT* among the core symptoms of (the high-functioning levels)
> of ASS is the inability to learn. Mind that! (And that includes
> social norms.)
--
Jason C. McDonald (CodeMouse92)
Author | Speaker | Hacker | Time Lord
--
https://mail.python.org/mailman/listinfo/python-list
s open
> source on github.
>
> Claim #2, "he invented smartphones":
>
> Yes, he did (as part of a team) create the first smartphone,
> the Ericsson R380:
>
> https://en.wikipedia.org/wiki/Ericsson_R380
>
> /Toaster
--
Jason C. McDonald (CodeMouse92)
Author | Speaker | Hacker | Time Lord
--
https://mail.python.org/mailman/listinfo/python-list
t;
>
>
>
>Sent from [1]Mail for Windows 10
>
>
>
> References
>
>Visible links
> 1. https://go.microsoft.com/fwlink/?LinkId=550986
--
Jason C. McDonald (CodeMouse92)
Author | Speaker | Hacker | Time Lord
--
https://mail.python.org/mailman/listinfo/python-list
on turns out to
>> be something other than python?
>
> And it's bizarre that the OP, since he despises Python so much, and
> finds its syntax absurd, would even bother to make any sort of
> implementation of it.
>
--
Jason C. McDonald (CodeMouse92)
Author | Speaker | Hacker | Time Lord
--
https://mail.python.org/mailman/listinfo/python-list
I should state at the start that I have a solution to my problem. I am
writing to see if there is a better solution.
I have a program that runs via crontab every five minutes. It polls a
Box.com folder for files and, if any are found, it copies them locally and
performs a computation on them that
>
> I set listen(2) and expect to see "error" when more clients than "the
> maximum number of queued connections" trying to connect the server. But, no
> error!! Even 4 clients can run normally without problem.
>
> Am I misunderstanding the meaning of this argument?
>
https://docs.python.org/3/lib
>
>
> for path, dir, files in os.walk(myDestinationFolder):
> # for path, dir, files in os.walk(destfolder):
> print('The path is %s: ', path)
> print(files)
> os.chdir(mySourceFolder)
> if not os.path.isfile(myDestinationFolder + file):
> # if not os.path.isfile(destfolder + f
>
> import numpy as np
> import pandas as pd
> from numpy.random import randn
> df=pd.DataFrame(randn(5,4),['A','B','C','D','E'],['W','X','Y','Z'])
>
> W X Y Z
> A -0.183141 -0.398652 0.909746 0.332105
> B -0.587611 -2.046930 1.446886 0.167606
> C 1.142661 -0.861617 -0.180631 1.650463
> D 1.174805
>
> csv.DictReader appears to be happy with a list of strings representing
> the lines.
>
> Try this:
>
> contents = source_file.content()
>
> for row in csv.DictReader(contents.decode('utf-8').splitlines()):
> print(row)
>
Works great, thank you! Question ... will this form potentially use l
t_file:
reader = csv.DictReader(text_file)
for row in reader:
print(row)
Getting this error:
Traceback (most recent call last):
File "/home/jason/my_box.py", line 278, in
with io.TextIOWrapper(source_file.content(), encoding='utf-8') as
text_file:
AttributeError: 'bytes'
>
> The Box API is noisy ... very helpful for diagnosing, and yet for
> production code I'd like less noise.
>
> I tried this:
>
> warnings.filterwarnings(
> action='ignore',
> # category=Warning,
> # module=r'boxsdk.*'
> )
>
> but I still see this:
>
> WARNING:boxsdk.network.default_ne
The Box API is noisy ... very helpful for diagnosing, and yet for
production code I'd like less noise.
I tried this:
warnings.filterwarnings(
action='ignore',
# category=Warning,
# module=r'boxsdk.*'
)
but I still see this:
WARNING:boxsdk.network.default_network:"POST
https://api.bo
>
>
>> I'm using the Box API (
>> https://developer.box.com/guides/tooling/sdks/python/).
>> I can get an access token, though it expires after a certain amount of
>> time. My plan is to store the access token on the filesystem and use it
>> until it expires, then fetch a new one. In the example be
I'm using the Box API (https://developer.box.com/guides/tooling/sdks/python/).
I can get an access token, though it expires after a certain amount of
time. My plan is to store the access token on the filesystem and use it
until it expires, then fetch a new one. In the example below assume I have
an
>
> I'm looking to insert values into an oracle table (my_table) using the
> query below. The insert query works when the PROJECT is not NULL/empty
> (""). However when PROJECT is an empty string(''), the query creates a new
> duplicate row every time the code is executed (with project value
> popu
ators and abuse them
thusly, that's a consenting adults situation. Introducing this new
syntax into the language creates a trip hazard for the user.
Third, that proposed operator, .= oww that's hard to see. It looks
like a typo, and could easily be typed as one, or overlooked altogether
(ag
>
> import pandas; pd = pandas
>
> >df = pd.from_csv (...)
> >from selenium import webdriver
>
> import selenium.webdriver; webdriver = selenium.webdriver
>
Thank you, this works.
--
https://mail.python.org/mailman/listinfo/python-list
I have some code I'm going to share with my team, many of whom are not yet
familiar with Python. They may not have 3rd-party libraries such as pandas
or selenium installed. Yes I can instruct them how to install, but the path
of least resistance is to have my code to check for missing dependencies
well, but that doesn't mean they'll
necessarily enjoy it. I'm actually rather curious why you *need*
to become "efficient" (proficient?) in Python? Work requirement?
By the way, you should put your message the the BODY of the email,
not in the subject line. Keep subject lin
>
> I constructed a lexicon for words that show how different words are linked
> to consumer traits and motivations (e.g. Achievement and Power Motivation).
> Now I have collected a large amount of online customer reviews and want to
> match each review with the word definitions of the consumer tra
You have another thread on this list that refers to general Python
installation issues, so you'll need to work through that.
I'm writing in this thread to say that tensorflow does not (today) support
Python 3.8, you'll want to try 3.7, assuming that tensorflow is a critical
piece for you: https://
>
>
> I have some lines in a text file like
> ADD R1, R2
> ADD3 R4, R5, R6
> ADD.MOV R1, R2, [0x10]
>
Actually I want to get 2 matches. ADD R1, R2 and ADD.MOV R1, R2, [0x10]
> because these two lines are actually "ADD" instructions. However, "ADD3" is
> something else.
>
>>> s = """ADD R1, R
>
>
> When I define the X and Y values for prediction in the train and test
> data, should I capture all the columns that has been "OneHotEncoded" (that
> is all columns with 0 and 1) for the X and Y values???
>
You might have better luck asking on Stackoverflow, per the Pandas
instructions: https
>
> Chris Angelico: [PSF's] 2019 Q2 Community Service Award Winner
> http://pyfound.blogspot.com/2019/10/chris-angelico-2019-q2-community.html
>
> ...and for the many assistances and pearls of wisdom he has contributed
> 'here'!
> --
> Regards,
> =dn
>
> Agreed.
--
https://mail.python.org/mailman/
>
> If you're certain that the headers are the same in each file,
> then there's no harm and much simplicity in reading them each
> time they come up.
>
> with fileinput ...:
> for line in f:
> if fileinput.isfirstline():
> headers = extract_headers(line)
ne: {fileinput.isfirstline()}")
I run this:
$ python3 program.py ~/Section*.csv > ~/result
I get this:
$ grep "^Version" ~/result
Version: sys.version_info(major=3, minor=7, micro=1, releaselevel='final',
serial=0)
$ grep "^Files" ~/result
Files: ['/home
>
> If I have path: /home/admin/hello/yo/{h1,h2,h3,h4}
>
> import re
> r = re.search('{.}', path)
> # r should be ['h1,h2,h3,h4'] but I fail
>
> Why always search nothing?
>
A site like http://www.pyregex.com/ allows you to check your regex with
slightly fewer clicks and keystrokes than editing yo
>
> Pretty cool. FYI, the index page (now containing 4 articles) with Google
>> Chrome 72.0.3626.x prompts me to translate to French. The articles
>> themselves do not.
>>
>
> I'm now getting the translation offer on other web pages with Chrome, not
just this one.
Thus, please ignore my prior po
On Mon, Mar 25, 2019 at 11:03 PM Abdur-Rahmaan Janhangeer <
arj.pyt...@gmail.com> wrote:
> As proposed on python-ideas, i setup a repo to turn mail threads into
> articles.
>
> i included a script to build .md to .html (with syntax highlighting) here
> is the index
>
> https://abdur-rahmaanj.githu
On Thu, Mar 14, 2019 at 8:07 AM Jack Dangler wrote:
>
>
> class weapon:
> weaponId
> manufacturerName
>
> def printWeaponInfo(self):
> infoString = "ID: %d Mfg: %s Model: %s" % (self.weaponId,
> self.manufacturerName)
> return infoString
>
>
>
> import class_wea
On Fri, Jan 18, 2019 at 5:22 PM Cameron Davidson-Pilon <
cam.davidson.pi...@gmail.com> wrote:
> Hello! I invite you to participate in the Python Packages Survey - it takes
> less than a minute to complete, and will help open source developers
> understand their users' better. Thanks for participat
>
> So now the real question is: What were you trying to accomplish with
> the assignment? Tell us, and let's see if we can find a way to
> accomplish yor goal without wrecking the internals of the Grade class.
>
> And depending on your answer to that question, the new Data Classes
feature in 3.7
Hey,
Someone has discussed this issue before. Other than redirect stderr, does
the new version python 3.7.0 has other way to retrieve the string
whichPyErr_Print( ) ?
if (PyErr_Occurred())
PyErr_Print(); //need to retrieve the error to string
Thanks
--
https://mail.python.org/mailman/listi
>
> the EmailMessage class of email.message provides the methods
> add_header() and __setitem__() to add a header to a message.
> add_header() effectively calls __setitem__(), which does
> `self._headers.append(self.policy.header_store_parse(name, val))`. This
> inserts the header at the bottom.
>
Thanks a lot.
On Thu, Sep 13, 2018 at 5:24 PM, MRAB wrote:
> On 2018-09-13 21:50, Jason Qian via Python-list wrote:
>
>> Hey,
>>
>> Need some help on PyList.
>>
>>
>> #get path
>> PyObject *path = PyObject_GetAttrString(sys, &q
Hey,
Need some help on PyList.
#get path
PyObject *path = PyObject_GetAttrString(sys, "path");
#new user path
PyObject* newPath = PyUnicode_DecodeUTF8(userPath, strlen( userPath ),
errors);
#append newPath to path
PyList_Append(path, newPath);
How to check if the newPath is already in the pa
, Thomas Jollans wrote:
> On 09/06/2018 09:46 PM, Jason Qian via Python-list wrote:
>
>> Hi
>>
>> Need some help.
>>
>> I have a C++ application that invokes Python.
>>
>> ...
>> Py_SetPythonHome("python_path");
>>
>
> This
stem codec
ModuleNotFoundError: No module named 'encodings'
Thanks for the help
Jason
--
https://mail.python.org/mailman/listinfo/python-list
>
>
> > On 22 Aug 2018, at 8:38 am, Jason Friedman wrote:
> >
> >>
> >> I am building up the microsite based on Bottle framework now.
> >> Any references/books? I am unfamiliar with this framework yet.
> >>
> >> I have used it with
>
> I am building up the microsite based on Bottle framework now.
> Any references/books? I am unfamiliar with this framework yet.
>
> I have used it with success. The online documentation was sufficient for
my needs, at least.
--
https://mail.python.org/mailman/listinfo/python-list
$ python3
Python 3.6.1 (default, Apr 8 2017, 09:56:20)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import collections, datetime
>>> x = collections.defaultdict(int)
>>> x['something']
0
>>> x = collections.defaultdict(datetime.datetime)
>
> while 1:
> runner = os.popen("tracert -d www.hello.com")
> o=runner.read()
> print(o)
> runner.close()
> runner = os.popen("tracert -d www.hello.com")
> o=runner.read()
> print(o)
> runner.close()
> runner = os.popen("tracert -d www.hello.com")
> o=runner.read()
> print(o)
> runner.close()
>
>
>
> >> > It's probably better to write the function yourself according to what
> >> > makes sense in your use-case, and document its behaviour clearly.
> >>
> >>
> > I suggest using the dateutil module (
> > https://pypi.python.org/pypi/python-dateutil) before writing your own.
>
> I'm not seeing a
>
> > > I've written a function to return the months between date1 and date2
> but
> > > I'd like to know if anyone is aware of anything in the standard library
> > > to do the same? For bonus points, does anyone know if postgres can do
> > > the same (we use a lot of date/time funcitons in postgr
On Tue, Mar 6, 2018 at 1:52 AM, Kirill Balunov
wrote:
>
> I propose to delete all references in the `filter` documentation that the
> first argument can be `None`, with possible depreciation of `None` as the
> the first argument - FutureWarning in Python 3.8+ and deleting this option
> in Python
>
> I try to run an application with the latest version of python that is
> python 3.6.4 (32-bit) ., instead of running the application it only shows
> feel free to mail python-list@python.org if you continue to encounter
> issues,Please help me out thanks.
>
Hello, you might have more success if
> statistics.mode() currently raises an exception if there is more than one
> mode.
>
I am an infrequent user of this package and this function. My two cents:
* Leave the current behavior as-is.
* Continue to throw an exception for no data.
* Add an argument, named perhaps mutli=False, that if se
Thanks Chris,
I think I figured it out that when build python on Linux, we need to
enable-shared.
Thanks again,
On Mon, Feb 19, 2018 at 5:04 PM, Chris Angelico wrote:
> On Tue, Feb 20, 2018 at 8:07 AM, Jason Qian via Python-list
> wrote:
> > Hi,
> >
> > I am
Hi,
I am calling python from a c application.
It compiles and works fine on the windows. How do I compile and link
it on the linux for Python 3.6.4 ?
Under python dir, it only have a static library,
/opt/Python-3.6.4*/lib*/*libpython3.6m.a*
* If I link to it, I g
Thanks a lot and I will take a look Cython,
On Mon, Feb 19, 2018 at 3:23 PM, Stefan Behnel wrote:
> Jason Qian via Python-list schrieb am 04.02.2018 um 17:52:
> >This is the case of calling python from c and the python function
> will
> > return a string.
>
> Hi J
I have a variety of scripts that import some large libraries, and rather than
create a million little scripts with specific imports, I'd like to so something
like
psycopg2 = ensure_imported (psycopg2)
This way, regardless of invocation I can know psycopg2 is loaded, if it hasn't
already been l
Hi,
This only works when loading modules from the current directory.
Is there a way I can load from somewhere else ?
Thanks for help,
--
https://mail.python.org/mailman/listinfo/python-list
Hi Chris,
Thanks a lot ! Using PyUnicode_DecodeUTF8 fix the problem.
On Sun, Feb 4, 2018 at 12:02 PM, Chris Angelico wrote:
> On Mon, Feb 5, 2018 at 3:52 AM, Jason Qian via Python-list
> wrote:
> > Hi,
> >
> >This is the case of calling python from c and th
Hi,
This is the case of calling python from c and the python function will
return a string.
It seems python been called correctly, but got error when convert the
python string to c string.
-- c --
PyObject* pValue = PyObject_CallObject(pFunc, pArgs);
-- python --
import string, ran
The message type is bytes, this may make different ?
print(type(message))
On Sun, Jan 28, 2018 at 8:41 PM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
> On Sun, 28 Jan 2018 20:31:39 -0500, Jason Qian via Python-list wrote:
>
> > Thanks a lot :)
>
Thanks Peter,
replace print with os.write fixed the problem.
On Sun, Jan 28, 2018 at 3:57 AM, Peter Otten <__pete...@web.de> wrote:
> Jason Qian via Python-list wrote:
>
> > HI
> >
> >I have a string that contains \r\n\t
> >
> >[L
Thanks a lot :)
os.write(1, message) works !
On Sun, Jan 28, 2018 at 8:04 PM, Dan Stromberg wrote:
> How about:
> >>> os.write(1, message)
>
> On Sun, Jan 28, 2018 at 4:51 PM, Jason Qian via Python-list
> wrote:
> > print(repr(message)) out :
>
99 c
%d %c 111 o
%d %c 109 m
On Sun, Jan 28, 2018 at 9:50 AM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
> On Sat, 27 Jan 2018 21:23:02 -0500, Jason Qian via Python-list wrote:
>
> > there are 0D 0A 09
>
> If your string actually contains CARRIAGE
>
> import smtplib
> server = smtplib.SMTP('localhost')
> server.sendmail('gg77gal...@yahoo.com',
> """To: gg.gal...@gmail.com
> From: gg77gal...@yahoo.com
>
> Beware the Ides of March.
> """)
> server.quit()
>
> when running this I get the following message. Please help:
>
> Traceback (most recent
there are 0D 0A 09
%c %d 116
*%c %d 13%c %d 10%c %d
9*
%c %d 97
On Sat, Jan 27, 2018 at 9:05 PM, Dennis Lee Bieber
wrote:
> On Sat, 27 Jan 2018 20:33:58 -0500, Jason Qian via Python-list
> declaimed the following:
>
> > Ljava.lang.Object; does not exis
Reedy wrote:
> On 1/27/2018 3:15 PM, Jason Qian via Python-list wrote:
>
>> HI
>>
>> I am a string that contains \r\n\t
>>
>> [Ljava.lang.Object; does not exist*\r\n\t*at
>> com.livecluster.core.tasklet
>>
>>
>> I would like it p
st*\r\n\t*at com
Thanks
On Sat, Jan 27, 2018 at 4:20 PM, Ned Batchelder
wrote:
> On 1/27/18 3:15 PM, Jason Qian via Python-list wrote:
>
>> HI
>>
>> I am a string that contains \r\n\t
>>
>> [Ljava.lang.Object; does not exist*\r\n\t*at
>>
, 2018 at 3:15 PM, Jason Qian wrote:
> HI
>
>I am a string that contains \r\n\t
>
>[Ljava.lang.Object; does not exist*\r\n\t*at
> com.livecluster.core.tasklet
>
>
>I would like it print as :
>
> [Ljava.lang.Object; does not exist
> tat com.live
HI
I am a string that contains \r\n\t
[Ljava.lang.Object; does not exist*\r\n\t*at com.livecluster.core.tasklet
I would like it print as :
[Ljava.lang.Object; does not exist
tat com.livecluster.core.tasklet
--
https://mail.python.org/mailman/listinfo/python-list
Figured it out,
Thanks
On Wed, Jan 24, 2018 at 4:25 PM, Jason Qian wrote:
> Again, thanks for the help. Everything is working fine after the changes.
>
> Here is one more new issue needs some help.
>
> On c side,
>
>The createService function can pass a callb
HI Dennis,
Thanks for the help, After changing WINFUNCTYPE to CFUNCTYPE, the call
back function works on the Linux :)
Thanks again,
Jason
On Wed, Jan 24, 2018 at 6:15 PM, Dennis Lee Bieber
wrote:
> On Wed, 24 Jan 2018 17:16:22 -0500, Jason Qian via Python-list
> declaim
ponse ---')
print(message)
print(code)
class GSPythonDriver(object):
def submif(self,methodname)
invm_fn = InvocationCB(handleResponse)
lib.submit(self.obj,methodname,invm_fn)
How can I do this on the Linux ?
Thanks for the help
Jason
--
https://mail.python.org/mailman/listinfo/python-list
har* serviceName)
{
//case 1 :
//This works fine
createService(methodname);
//case 2
//This will not working,
InvocationCallback serviceCallback;
createService(methodname, &serviceCallback);
}
On Mon, Jan 22, 2018 at 5:58 PM, Jason Qian wrote:
> Thank
Thanks for the help,
Jason
On Mon, Jan 22, 2018 at 5:41 PM, eryk sun wrote:
> On Mon, Jan 22, 2018 at 9:00 PM, Jason Qian via Python-list
> wrote:
> >
> > I am using ctypes on Windows to interface with a dll and it works fine
> > on Linux and windows 32-bit python.
Thanks you very much, fixed the problem :)
On Mon, Jan 22, 2018 at 4:28 PM, Random832 wrote:
> On Mon, Jan 22, 2018, at 16:00, Jason Qian via Python-list wrote:
> > Hello!
> >
> > I am using ctypes on Windows to interface with a dll and it works fine
> > on Linu
1 - 100 of 1047 matches
Mail list logo