473,836 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Strange problem with interactive mode, possible bug in Python?

I have a strange problem with Python command-line interactive mode.
Problem has been observed on every 2.3 version where it was tested, from
2.3 alpha to 2.3.4

Test is run on windows XP and 2000

I have written a ptyhon extension module called jpype, and run the
following code

D:\>python
Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on
win32
Type "help", "copyright" , "credits" or "license" for more information.
import jpype
jpype.startJVM( jpype.getDefaul tJVMPath()) Attempting to startup JVM
JVM has been initialized, using C:\Program
Files\Java\j2re 1.4.2_04\bin\cl ient\jvm.dll foo=3 File "<stdin>", line 1
foo=3
^
SyntaxError: invalid syntax


If the startJVM method is not called, everything remains fine.

Using a debug version of python 2.3.3 that I compiled myself (but havent
changed anything), does not exhibit the problem either.

If the same script is run in batch mode (python test.py), there
everything is fine too.

As far as I know, there should be no interactions between the JVM and
python's parser. the JVM may touch the "regular" IO channels though and
screw up the interactive mode ...

I am lost here and would welcome any suggestions.

Steve
Jul 18 '05 #1
0 1307

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6314
by: Christoph Becker-Freyseng | last post by:
Hello, is there a way to dump (and save) the command-history of the python interactive mode. Thanks, Christoph Becker-Freyseng
2
1855
by: Miki Tebeka | last post by:
Hello All, If there a way a script can tell Python to enter interactive mode even if the -i command line switch was not given? I want py2exe to create an interactive session, without writing my own REPL. Thanks. --
15
7396
by: Ashot | last post by:
This is sort of both Python and Vim related (which is why I've posted to both newsgroups). Python related: ---------------------- I have been frustrated for quite some time with a lack of a history command in IDLE (in fact with IDLE in general). Often I'll develop new code at the command line, testing each line as I go. Currently I have to copy and paste, removing outputs and the ">>>" at each line. Is it perhaps possible to make...
3
1702
by: qwweeeit | last post by:
Hi all, is it possible to enter an interactive session and automatically do some initialization? I explain better: I want that when I start interactive Python on a console (I use Linux) two command lines be executed automatically: Python 2.3.4 (#2, Aug 19 2004, 15:49:40) on linux2 Type "help", "copyright", "credits" or "license" for more information.
5
11107
by: A. L. | last post by:
In Python interactive mode, is there some function acting like 'clear' command in bash? Could somebody here give some advice? Thanks in advance.
3
2414
by: Pankaj | last post by:
I am facing a very basic problem as any new bie would face. I know perl and now i want to use python In perl, it is very simple , just "perl scriptname.pl" will execute the script. But i think python is worse than perl
0
857
by: Jakob Svavar Bjarnason | last post by:
Greetings. I have been trying to switch to Python from other languages such as Perland now I have a newbie question. I have been trying to run a setup script to install a python library. To dothat I need to run "c:python setup.py install" but the strange thing isis that when it runs the command: I get the error ONLY while in cmd. If I run this from the interactive shellthat comes with IDLE it works. But if I go into the interactive...
2
1395
by: Papalagi Pakeha | last post by:
Hi all, How can I turn on autocompletion when I push <tabin python 2.5.1 interactive mode? E.g. to give me a list of all methods and attributes of a given object. It works great on my Linux / Ubuntu 7.04 installation but doesn't work on Solaris 10 (x86). I have libreadline.so and libncurses.so installed and "import readline" is executed during startup, but <tabstill doesn't work. ArrowUp and ArrowDown however work and I can browse the
4
1769
by: digitnctu | last post by:
Dear all: I am coming with problem, to apply ctypes under interactive mode in python. libdll.dll is a third-party library. The below code segment will run well under the batch mode(ie. python test.py 11060) but when I type sequencially it doesn't work as usual. Can any give me a hand??
0
9810
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9656
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10819
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10526
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10570
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10240
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9355
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
4438
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4000
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.